diff --git a/Workspace_msvc/lib_com.vcxproj b/Workspace_msvc/lib_com.vcxproj
index 6c57d317032c5782d19194496ff34c94360294a9..a1f15745e7762c84f944666d816c4cef93882cf4 100644
--- a/Workspace_msvc/lib_com.vcxproj
+++ b/Workspace_msvc/lib_com.vcxproj
@@ -215,9 +215,8 @@
-
-
+
@@ -263,7 +262,6 @@
-
@@ -281,7 +279,6 @@
-
@@ -313,7 +310,6 @@
-
@@ -326,12 +322,9 @@
-
-
-
diff --git a/Workspace_msvc/lib_com.vcxproj.filters b/Workspace_msvc/lib_com.vcxproj.filters
index 3fbbb7bc58487f8e7a82723afd2e11ff344f323e..177c5315642a080fa71d2f119fabf001883016a3 100644
--- a/Workspace_msvc/lib_com.vcxproj.filters
+++ b/Workspace_msvc/lib_com.vcxproj.filters
@@ -73,15 +73,9 @@
common_ivas_c
-
- common_ivas_c
-
common_ivas_c
-
- common_ivas_c
-
common_ivas_c
@@ -184,9 +178,6 @@
common_all_c
-
- common_all_c
-
common_all_c
@@ -439,12 +430,6 @@
common_all_c
-
- common_all_c
-
-
- common_all_c
-
common_all_c
@@ -487,9 +472,6 @@
common_all_c
-
- common_all_c
-
common_all_c
@@ -517,6 +499,12 @@
common_all_c
+
+ common_ivas_c
+
+
+ common_all_c
+
@@ -531,9 +519,6 @@
common_h
-
- common_h
-
common_h
@@ -588,15 +573,9 @@
common_h
-
- common_h
-
common_h
-
- common_h
-
common_h
@@ -629,7 +608,6 @@
-
diff --git a/Workspace_msvc/lib_enc.vcxproj b/Workspace_msvc/lib_enc.vcxproj
index 1237541427184d6fe8470e1a0c0ab6fa04eccf03..5222b16b54419e12224c75bac322b9de6797fef4 100644
--- a/Workspace_msvc/lib_enc.vcxproj
+++ b/Workspace_msvc/lib_enc.vcxproj
@@ -240,7 +240,6 @@
-
diff --git a/Workspace_msvc/lib_enc.vcxproj.filters b/Workspace_msvc/lib_enc.vcxproj.filters
index e8f429f4914dace1f3d9efa63afe65a713d5bf25..4194dbc5a1b9602c6f126b86d3a64735badd9a31 100644
--- a/Workspace_msvc/lib_enc.vcxproj.filters
+++ b/Workspace_msvc/lib_enc.vcxproj.filters
@@ -253,9 +253,6 @@
encoder_all_c
-
- encoder_all_c
-
encoder_all_c
diff --git a/lib_com/cldfb_fx.c b/lib_com/cldfb_fx.c
index 00cb884d4ef1bdd41dc61acb426e1efd9cdb5a19..3a5908277b84242151978d2258dd94743dd1675a 100644
--- a/lib_com/cldfb_fx.c
+++ b/lib_com/cldfb_fx.c
@@ -41,7 +41,6 @@
#include "stat_dec.h"
#include "prot_fx.h"
#include "rom_com.h"
-#include "rom_com_fx.h"
#include "wmc_auto.h"
#if __STDC_VERSION__ >= 199901L
#if defined __ICL
diff --git a/lib_com/cng_exc_fx.c b/lib_com/cng_exc_fx.c
index 6296b406c483787d1bfd899c90ff4ad3d9ae3d3d..56701bf6162428e0d1ca71b9c2664eebf78217c3 100644
--- a/lib_com/cng_exc_fx.c
+++ b/lib_com/cng_exc_fx.c
@@ -1,20 +1,26 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
#include "options.h" /* Compilation switches */
#include "cnst.h" /* Common constants */
#include "prot_fx.h" /* Function prototypes */
#include "rom_com.h"
-#include "ivas_rom_com_fx.h"
+#include "ivas_rom_com.h"
+
/*---------------------------------------------------------------------*
* Local constants
*---------------------------------------------------------------------*/
+
#define A2 6554
#define OmA2 ( 32768 - A2 )
#define GAIN_VAR 11811 /* in Q31 divided by 2 (Q30) */
+
const Word16 att_pow_tbl[SIZE_SCALE_TABLE_STEREO + 1] = { 9234, 10361, 13044, 16422, 22669, 31292, 32767, 26634, 28212, 20674, 16422, 27254, 30934, 32767 };
+
+
/*-------------------------------------------------------*
* CNG_exc()
*
@@ -22,22 +28,22 @@ const Word16 att_pow_tbl[SIZE_SCALE_TABLE_STEREO + 1] = { 9234, 10361, 13044, 16
*-------------------------------------------------------*/
void CNG_exc_fx(
- const Word32 core_brate, /* i : core bitrate */
+ const Word32 core_brate, /* i : core bitrate */
const Word16 L_frame, /* i : length of the frame */
Word32 *Enew, /* i/o: decoded SID energy Q6 */
Word16 *seed, /* i/o: random generator seed */
Word16 exc[], /* o : current non-enhanced excitation Q_new */
Word16 exc2[], /* o : current enhanced excitation Q_new */
- Word32 *lp_ener, /* i/o: LP filtered E Q6 */
+ Word32 *lp_ener, /* i/o: LP filtered E Q6 */
const Word32 last_core_brate, /* i : previous frame core bitrate */
Word16 *first_CNG, /* i/o: first CNG frame flag for energy init. */
Word16 *cng_ener_seed, /* i/o: random generator seed for CNG energy */
- Word16 bwe_exc[], /* o : excitation for SWB TBE Q_syn */
+ Word16 bwe_exc[], /* o : excitation for SWB TBE Q_syn */
const Word16 allow_cn_step, /* i : allow CN step */
- Word16 *last_allow_cn_step, /* i/o: last allow step */
- const Word16 OldQ_exc, /* i : Old excitation scaling */
- const Word16 Q_exc, /* i : excitation scaling */
- const Word16 num_ho, /* i : number of selected hangover frames */
+ Word16 *last_allow_cn_step, /* i/o: last allow step */
+ const Word16 OldQ_exc, /* i : Old excitation scaling */
+ const Word16 Q_exc, /* i : excitation scaling */
+ const Word16 num_ho, /* i : number of selected hangover frames */
Word32 q_env[], /*Q6*/
Word32 *lp_env, /*Q6*/
Word32 *old_env, /*Q6*/
diff --git a/lib_com/fft_fx.c b/lib_com/fft_fx.c
index b1323e1561fb770e3c82f94bda56b3ee5f696fba..aa52bf3065e5d52af6debb96914844eb355c30ee 100644
--- a/lib_com/fft_fx.c
+++ b/lib_com/fft_fx.c
@@ -46,7 +46,6 @@
#include "cnst.h"
#include "prot_fx.h"
#include "rom_com.h"
-#include "rom_com_fx.h"
#include "wmc_auto.h"
#include "complex_basop.h"
@@ -7174,7 +7173,6 @@ void rfft_fx(
#define WMC_TOOL_SKIP
-#define SHC( x ) ( (Word16) x )
#define FFTC( x ) WORD322WORD16( (Word32) x )
#define C81_FX ( FFTC( 0x5a82799a ) ) /* FL2WORD32( 7.071067811865475e-1) */
diff --git a/lib_com/fft_rel_fx.c b/lib_com/fft_rel_fx.c
index a0905cc1689e11358c49e235afd5c5c498cbdd96..9f8f0355684746df6a60744a31bcb3cbdbe1c6fa 100644
--- a/lib_com/fft_rel_fx.c
+++ b/lib_com/fft_rel_fx.c
@@ -468,231 +468,6 @@ void r_fft_fx_lc(
* ..., re[n/2], im[n/2-1], ..., im[1].
*---------------------------------------------------------------------*/
-void fft_rel(
- float x[], /* i/o: input/output vector */
- const int16_t n, /* i : vector length */
- const int16_t m /* i : log2 of vector length */
-)
-{
- int16_t i, j, k, n1, n2, n4;
- int16_t step;
- float xt, t1, t2;
- float *x0, *x1, *x2;
- float *xi2, *xi3, *xi4, *xi1;
- const float *s, *c;
- const int16_t *idx;
-
- /* !!!! NMAX = 256 is hardcoded here (similar optimizations should be done for NMAX > 256) !!! */
-
- float *x2even, *x2odd;
- float temp[512];
-
- if ( n == 128 || n == 256 || n == 512 )
- {
- idx = fft256_read_indexes;
-
- /* Combined Digit reverse counter & Length two butterflies */
- if ( n == 128 )
- {
- x2 = temp;
- for ( i = 0; i < 64; i++ )
- {
- j = *idx++;
- k = *idx++;
-
- *x2++ = x[j >> 1] + x[k >> 1];
- *x2++ = x[j >> 1] - x[k >> 1];
- }
- }
- else if ( n == 256 )
- {
- x2 = temp;
- for ( i = 0; i < 128; i++ )
- {
- j = *idx++;
- k = *idx++;
-
- *x2++ = x[j] + x[k];
- *x2++ = x[j] - x[k];
- }
- }
- else if ( n == 512 )
- {
- x2even = temp;
- x2odd = temp + 256;
-
- for ( i = 0; i < 128; i++ )
- {
- j = 2 * *idx++;
- k = 2 * *idx++;
-
- *x2even++ = x[j] + x[k];
- *x2even++ = x[j] - x[k];
- *x2odd++ = x[++j] + x[++k];
- *x2odd++ = x[j] - x[k];
- }
- }
-
- /*-----------------------------------------------------------------*
- * 1st Stage Loop has been Unrolled because n4 is '1' and that
- * allows the elimination of the 'for_ (j = 1; j < n4; j++)' loop
- * and the associated pointers initialization.
- * Also, it allows to Put the Data from 'temp' back into 'x' due
- * to the previous Combined Digit Reverse and Length two butterflies
- *-----------------------------------------------------------------*/
-
- /*for_ (k = 2; k < 3; k++)*/
- {
- x0 = temp;
- x1 = x0 + 2;
- x2 = x;
-
- for ( i = 0; i < n; i += 4 )
- {
- *x2++ = *x0++ + *x1; /* x[i] = xt + x[i+n2]; */
- *x2++ = *x0;
- *x2++ = *--x0 - *x1++; /* x[i+n2] = xt - x[i+n2]; */
- *x2++ = -*x1; /* x[i+n2+n4] = -x[i+n2+n4]; */
-
- x0 += 4;
- x1 += 3; /* x1 has already advanced */
- }
- }
- }
- else
- {
- /*-----------------------------------------------------------------*
- * Digit reverse counter
- *-----------------------------------------------------------------*/
-
- j = 0;
- x0 = &x[0];
- for ( i = 0; i < n - 1; i++ )
- {
- if ( i < j )
- {
- xt = x[j];
- x[j] = *x0;
- *x0 = xt;
- }
- x0++;
- k = n / 2;
- while ( k <= j )
- {
- j -= k;
- k = k >> 1;
- }
- j += k;
- }
-
- /*-----------------------------------------------------------------*
- * Length two butterflies
- *-----------------------------------------------------------------*/
-
- x0 = &x[0];
- x1 = &x[1];
- for ( i = 0; i < n / 2; i++ )
- {
- *x1 = *x0 - *x1;
- *x0 = *x0 * 2 - *x1;
-
- x0++;
- x0++;
- x1++;
- x1++;
- }
-
- /*-----------------------------------------------------------------*
- * 1st Stage Loop has been Unrolled because n4 is '1' and that
- * allows the elimination of the 'for_ (j = 1; j < n4; j++)' loop
- * and the associated pointers initialization.
- *-----------------------------------------------------------------*/
-
- /* for_ (k = 2; k < 3; k++) */
- {
- x0 = x;
- x1 = x0 + 2;
-
- for ( i = 0; i < n; i += 4 )
- {
- *x1 = *x0 - *x1; /* x[i+n2] = xt - x[i+n2]; */
- *x0 = *x0 * 2 - *x1++; /* x[i] = xt + x[i+n2]; */
- *x1 = -*x1; /* x[i+n2+n4] = -x[i+n2+n4]; */
-
- x0 += 4;
- x1 += 3; /* x1 has already advanced */
- }
- }
- }
-
- /*-----------------------------------------------------------------*
- * Other butterflies
- *
- * The implementation described in [1] has been changed by using
- * table lookup for evaluating sine and cosine functions. The
- * variable ind and its increment step are needed to access table
- * entries. Note that this implementation assumes n4 to be so
- * small that ind will never exceed the table. Thus the input
- * argument n and the constant N_MAX_FFT must be set properly.
- *-----------------------------------------------------------------*/
-
- n4 = 1;
- n2 = 2;
- n1 = 4;
-
- step = N_MAX_DIV4;
-
- for ( k = 3; k <= m; k++ )
- {
- step >>= 1;
- n4 <<= 1;
- n2 <<= 1;
- n1 <<= 1;
-
- x0 = x;
- x1 = x0 + n2;
- x2 = x1 + n4;
-
- for ( i = 0; i < n; i += n1 )
- {
- *x1 = *x0 - *x1; /* x[i+n2] = xt - x[i+n2]; */
- *x0 = *x0 * 2 - *x1; /* x[i] = xt + x[i+n2]; */
- *x2 = -*x2; /* x[i+n2+n4] = -x[i+n2+n4]; */
-
- s = sincos_t_ext;
- c = s + N_MAX_FFT / 4; /* 1024/4 = 256, 256/4=64 */
- xi1 = x0;
- xi3 = xi1 + n2;
- xi2 = xi3;
- x0 += n1;
- xi4 = x0;
-
- for ( j = 1; j < n4; j++ )
- {
- xi3++;
- xi1++;
- xi4--;
- xi2--;
- c += step;
- s += step; /* autoincrement by ar0 */
-
- t1 = *xi3 * *c + *xi4 * *s; /* t1 = *xi3**(pt_c+ind) + *xi4**(pt_s+ind); */
- t2 = *xi3 * *s - *xi4 * *c; /* t2 = *xi3**(pt_s+ind) - *xi4**(pt_c+ind); */
-
- *xi4 = *xi2 - t2;
- *xi2 = *xi1 - t1;
- *xi1 = *xi1 * 2 - *xi2;
- *xi3 = -2 * t2 - *xi4;
- }
-
- x1 += n1;
- x2 += n1;
- }
- }
-
- return;
-}
-
void fft_rel_16_32fx(
Word16 x[], /* i/o: input/output vector Qx */
Word16 *q_x, /* extra scaling added on speech buffer*/
diff --git a/lib_com/igf_base_fx.c b/lib_com/igf_base_fx.c
index 44cf27c5f3da77010f5d13489439a0dc2bc507c7..bdfb5df70427df66445ddb33864db27f7ee4e85c 100644
--- a/lib_com/igf_base_fx.c
+++ b/lib_com/igf_base_fx.c
@@ -1230,26 +1230,6 @@ void IGFCommonFuncsMDCTSquareSpec_ivas( const Word16 sqrtBgn, /**< in
}
-/**********************************************************************/ /*
-write bits to stream
-**************************************************************************/
-void IGFCommonFuncsWriteSerialBit(
- BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
- Word16 *pBitOffset, /**< out: Q0 | bit offset */
- Word16 bit /**< in: Q0 | value of bit */
-)
-{
-
- IF( hBstr )
- {
- push_next_indice( hBstr, bit, 1 );
- }
- *pBitOffset = add( *pBitOffset, 1 );
- move16();
-
- return;
-}
-
/**********************************************************************/ /*
changes the IGF configuration
**************************************************************************/
diff --git a/lib_com/ivas_dirac_com_fx.c b/lib_com/ivas_dirac_com_fx.c
index 26d58936f8d3083fb7fbdff6470c91443f576edc..20b04e974be9661da6d07baaf146e04be77ed6ed 100644
--- a/lib_com/ivas_dirac_com_fx.c
+++ b/lib_com/ivas_dirac_com_fx.c
@@ -40,15 +40,15 @@
#include "cnst.h"
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
+
/*-----------------------------------------------------------------------*
* Local function prototypes
*-----------------------------------------------------------------------*/
-
static UWord16 deindex_sph_idx_general_fx( const Word16 idx_sph, const Word16 no_bits, Word32 *theta_dec_fx, Word32 *phi_dec_fx, UWord16 *p_id_phi, const MC_LS_SETUP mc_format );
+
/*-------------------------------------------------------------------------
* ivas_get_hodirac_flag()
*
diff --git a/lib_com/ivas_fb_mixer_fx.c b/lib_com/ivas_fb_mixer_fx.c
index b55e069d7deb8c63ba5af5f69170ddf2dfcf3057..3478daefac4ad2af0623529abcf91d4ace0c72cd 100644
--- a/lib_com/ivas_fb_mixer_fx.c
+++ b/lib_com/ivas_fb_mixer_fx.c
@@ -39,7 +39,6 @@
#include "ivas_rom_com.h"
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
/*------------------------------------------------------------------------------------------*
diff --git a/lib_com/ivas_lfe_com_fx.c b/lib_com/ivas_lfe_com_fx.c
index ab18a00565b8aa1875d935c705af9a556dba86e9..d515cc5fbc77ce306b43d6d8607a430a74c3f5b7 100644
--- a/lib_com/ivas_lfe_com_fx.c
+++ b/lib_com/ivas_lfe_com_fx.c
@@ -41,7 +41,6 @@
#include
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
/*-----------------------------------------------------------------------------------------*
@@ -49,11 +48,12 @@
*
* Selects LFE filter coeff based on config.
*-----------------------------------------------------------------------------------------*/
+
void ivas_lfe_lpf_select_filt_coeff_fx(
- const Word32 sampling_rate, /* i : sampling rate */
- const Word16 order, /* i : filter order */
- const Word32 **ppFilt_coeff_fx, /* o : filter coefficients */
- const Word16 **ppFilt_coeff_e /* o : exponents of filter coefficients */
+ const Word32 sampling_rate, /* i : sampling rate */
+ const Word16 order, /* i : filter order */
+ const Word32 **ppFilt_coeff_fx, /* o : filter coefficients */
+ const Word16 **ppFilt_coeff_e /* o : exponents of filter coefficients */
)
{
SWITCH( order )
diff --git a/lib_com/ivas_limiter_fx.c b/lib_com/ivas_limiter_fx.c
index 60982f3f2e3ad0bf854aba398859e416e89afc44..4250d7a7a46db4ebc5500b6754d015d1f25a601d 100644
--- a/lib_com/ivas_limiter_fx.c
+++ b/lib_com/ivas_limiter_fx.c
@@ -36,7 +36,7 @@
#include "prot_fx.h"
#include "ivas_prot_rend_fx.h"
#include "ivas_rom_rend.h"
-#include "ivas_rom_com_fx.h"
+#include "ivas_rom_com.h"
#include "wmc_auto.h"
#include
#include "ivas_prot_fx.h"
diff --git a/lib_com/ivas_masa_com_fx.c b/lib_com/ivas_masa_com_fx.c
index f4c8fab10d09d20b5591e2796305ac79a888ea38..9c706bc74a1dc6bfdeefea66b3835ef25fe0f2bd 100644
--- a/lib_com/ivas_masa_com_fx.c
+++ b/lib_com/ivas_masa_com_fx.c
@@ -39,7 +39,6 @@
#include "ivas_rom_com.h"
#include "ivas_stat_dec.h"
#include "wmc_auto.h"
-#include "ivas_rom_com_fx.h"
#include "ivas_prot_fx.h"
diff --git a/lib_com/ivas_mc_param_com_fx.c b/lib_com/ivas_mc_param_com_fx.c
index 4469e7f93d82856a3e2db90e362e3e02265108be..e3827c5685d146777de8975f73bd52b7b5791873 100644
--- a/lib_com/ivas_mc_param_com_fx.c
+++ b/lib_com/ivas_mc_param_com_fx.c
@@ -39,7 +39,6 @@
#include "ivas_stat_com.h"
#include "ivas_rom_com.h"
#include "wmc_auto.h"
-#include "ivas_rom_com_fx.h"
#include "ivas_prot_fx.h"
@@ -47,9 +46,9 @@
* Local function prototypes
*------------------------------------------------------------------------*/
-
static void ivas_param_mc_set_coding_scheme_fx( const MC_LS_SETUP mc_ls_setup, const Word32 ivas_total_brate, HANDLE_IVAS_PARAM_MC_METADATA hMetadataPMC );
+
/*-------------------------------------------------------------------------
* ivas_param_mc_get_configuration_index()
*
diff --git a/lib_com/ivas_mdct_imdct_fx.c b/lib_com/ivas_mdct_imdct_fx.c
index 542f5ca745df2f4a678581ab9c1968ba2966137e..960b823ae605a2c890c6b77a3e305039fe0af208 100644
--- a/lib_com/ivas_mdct_imdct_fx.c
+++ b/lib_com/ivas_mdct_imdct_fx.c
@@ -34,7 +34,7 @@
#include "options.h"
#include "prot_fx.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
+#include "ivas_rom_com.h"
#ifdef DEBUGGING
#include "debug.h"
#endif
diff --git a/lib_com/ivas_mdft_imdft_fx.c b/lib_com/ivas_mdft_imdft_fx.c
index 5d7bee1a6929347ac19968f7d8996878878f8897..1d07ab13356e8b5b418e841bd302a6dd002df1dd 100644
--- a/lib_com/ivas_mdft_imdft_fx.c
+++ b/lib_com/ivas_mdft_imdft_fx.c
@@ -40,7 +40,6 @@
#include
#include
#include "debug.h"
-#include "ivas_rom_com_fx.h"
#include "ivas_prot_fx.h"
/*-----------------------------------------------------------------------------------------*
diff --git a/lib_com/ivas_qmetadata_com_fx.c b/lib_com/ivas_qmetadata_com_fx.c
index a5fbf9e83c6d8c0c3b21f77d0a96f8d889f4543a..906277f54294d732a576187b64c798e8e375c836 100644
--- a/lib_com/ivas_qmetadata_com_fx.c
+++ b/lib_com/ivas_qmetadata_com_fx.c
@@ -40,9 +40,7 @@
#include "cnst.h"
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
-// #include "debug.h"
/*-----------------------------------------------------------------------*
* Local constants
diff --git a/lib_com/ivas_qspherical_com_fx.c b/lib_com/ivas_qspherical_com_fx.c
index 844c3ecdef2cdd60899fb73e3e549a35e4ee9e1b..7d7c159b365ed4e89520a51b472381c25d7b7c8a 100644
--- a/lib_com/ivas_qspherical_com_fx.c
+++ b/lib_com/ivas_qspherical_com_fx.c
@@ -40,7 +40,6 @@
#include "cnst.h"
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
/*-------------------------------------------------------------------------
diff --git a/lib_com/ivas_rom_com.c b/lib_com/ivas_rom_com.c
deleted file mode 100644
index 64fe2ba376bd9cb9577f0a08163b8bfdebc2b646..0000000000000000000000000000000000000000
--- a/lib_com/ivas_rom_com.c
+++ /dev/null
@@ -1,2903 +0,0 @@
-/******************************************************************************************************
-
- (C) 2022-2025 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
- Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
- Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
- Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
- contributors to this repository. All Rights Reserved.
-
- This software is protected by copyright law and by international treaties.
- The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB,
- Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
- Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
- Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
- contributors to this repository retain full ownership rights in their respective contributions in
- the software. This notice grants no license of any kind, including but not limited to patent
- license, nor is any license granted by implication, estoppel or otherwise.
-
- Contributors are required to enter into the IVAS codec Public Collaboration agreement before making
- contributions.
-
- This software is provided "AS IS", without any express or implied warranties. The software is in the
- development stage. It is intended exclusively for experts who have experience with such software and
- solely for the purpose of inspection. All implied warranties of non-infringement, merchantability
- and fitness for a particular purpose are hereby disclaimed and excluded.
-
- Any dispute, controversy or claim arising under or in relation to providing this software shall be
- submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in
- accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
- the United Nations Convention on Contracts on the International Sales of Goods.
-
-*******************************************************************************************************/
-
-#include
-#include "options.h"
-#include
-#include "cnst.h"
-#include "ivas_cnst.h"
-#include "ivas_rom_com.h"
-#include "wmc_auto.h"
-
-/* clang-format off */
-
-/*----------------------------------------------------------------------------------*
- * Table of IVAS bitrates
- *----------------------------------------------------------------------------------*/
-
-const Word32 ivas_brate_tbl[SIZE_IVAS_BRATE_TBL] =
-{
- FRAME_NO_DATA, IVAS_SID_5k2,
- IVAS_13k2, IVAS_16k4, IVAS_24k4, IVAS_32k, IVAS_48k,
- IVAS_64k, IVAS_80k, IVAS_96k, IVAS_128k, IVAS_160k,
- IVAS_192k, IVAS_256k, IVAS_384k, IVAS_512k
-};
-
-/*-------------------------------------------------------------------------
- * DFT Stereo ROM tables
- *------------------------------------------------------------------------*/
-
-/*4xERB scale: max of 14 bands*/
-const Word16 dft_band_limits_erb4[STEREO_DFT_ERB4_BANDS] =
-{
- 1, 3, 5, 10, 18, 26, 41, 56, 84, 132, 214, 342, 470, 601
-};
-
-/*8xERB scale: max of 8 bands*/
-const Word16 dft_band_limits_erb8[STEREO_DFT_ERB8_BANDS] =
-{
- 1, 5, 18, 41, 84, 214, 470, 601
-};
-
-
-const Word16 dft_band_ipd[3][4] =
-{
- {0,8,10,13},
- {0,5,6,8},
- {0,2,3,4}
-};
-
-const Word16 dft_band_res_cod[3][4] =
-{
- {0,8,10,11},
- {0,5,6,7},
- {0,5,6,7}
-};
-
-// Q31
-const Word32 dft_res_gains_q_Q31[][2] =
-{
- /* quantization points for joint quantization of prediction gain and residual energy */
-
- /* column 1 (|ILD| = 0): */
- {0, 0 },
- {0, 251216928 },
- {0, 487459456 },
- {0, 731632640 },
- {0, 997611392 },
- {0, 1299397248 },
- {0, 1666984192 },
- {0, 2147483647 },
-
- /* column 2 (|ILD| = 2): */
- {246151024, 0 },
- {249475328, 247871152 },
- {258660112, 480729248 },
- {274304544, 720918848 },
- {298427200, 981720000 },
- {334663840, 1276185088 },
- {391374592, 1632160640 },
- {485919712, 2091786496 },
-
- /* column 3 (|ILD| = 4): */
- {485919712, 0 },
- {492224736, 238188144 },
- {509610752, 461283776 },
- {539117184, 690072384 },
- {584326016, 936189056 },
- {651608832, 1210182144 },
- {755411712, 1534299776 },
- {924504576, 1938292992 },
-
- /* column 4 (|ILD| = 6): */
- {713563712, 0 },
- {722237376, 223142880 },
- {746085184, 431184640 },
- {786311872, 642617280 },
- {847364864, 866812416 },
- {936938496, 1111020032 },
- {1072199936, 1390431232 },
- {1285225984, 1720430720 },
-
- /* column 5 (|ILD| = 8): */
- {924504576, 0 },
- {934784576, 204139792 },
- {962942400, 393358880 },
- {1010083968, 583482048 },
- {1080789888, 781462848 },
- {1182728704, 991308544 },
- {1332741248, 1221608960 },
- {1559902080, 1475937536 },
-
- /* column 6 (|ILD| = 10): */
- {1115604864, 0 },
- {1126709504, 182744416 },
- {1156997632, 351025536 },
- {1207276672, 517958016 },
- {1281710592, 688294272 },
- {1387005952, 863412992 },
- {1537761536, 1046870336 },
- {1757032448, 1234717184 },
-
- /* column 7 (|ILD| = 13): */
- {1361843968, 0 },
- {1372924928, 149366080 },
- {1402942464, 285507936 },
- {1452130560, 417893888 },
- {1523515136, 548787328 },
- {1621670144, 677135936 },
- {1756740352, 802203264 },
- {1942499840, 915633344 },
-
- /* column 8 (|ILD| = 16): */
- {1559902080, 0 },
- {1569913600, 117815248 },
- {1596862336, 224162928 },
- {1640492800, 325650848 },
- {1702660352, 423060736 },
- {1785997696, 514412544 },
- {1896788608, 597466432 },
- {2042241920, 664027712 },
-
- /* column 9 (|ILD| = 19): */
- {1714196608, 0 },
- {1722634112, 90359672 },
- {1745223424, 171238192 },
- {1781415040, 247171072 },
- {1832190080, 318199104 },
- {1898830848, 382271424 },
- {1984989952, 437025792 },
- {2094086528, 475912448 },
-
- /* column 10 (|ILD| = 22): */
- {1831427712, 0 },
- {1838194432, 67828272 },
- {1856228992, 128123168 },
- {1884882944, 183977072 },
- {1924581248, 235132272 },
- {1975822336, 279821408 },
- {2040659200, 316058048 },
- {2120554240, 339023232 },
-
- /* column 11 (|ILD| = 25): */
- {1918819584, 0 },
- {1924055168, 50102940 },
- {1937964416, 94399088 },
- {1959916032, 135003712 },
- {1990038784, 171579648 },
- {2028424960, 202728896 },
- {2076217216, 226931040 },
- {2133943808, 240762976 },
-
- /* column 12 (|ILD| = 30): */
- {2015827840, 0 },
- {2019068416, 29502130 },
- {2027636864, 55420112 },
- {2041056512, 78889960 },
- {2059271424, 99626064 },
- {2082150784, 116769424 },
- {2110128128, 129415952 },
- {2143192960, 135682304 },
-
- /* column 13 (|ILD| = 35): */
- {2072441984, 0 },
- {2074364032, 17033840 },
- {2079438464, 31939524 },
- {2087347712, 45337676 },
- {2098012032, 57039312 },
- {2111296384, 66537632 },
- {2127368192, 73321536 },
- {2146126464, 76351632 },
-
- /* column 14 (|ILD| = 40): */
- {2104959232, 0 },
- {2106073728, 9723806 },
- {2109011456, 18212808 },
- {2113579136, 25810606 },
- {2119712384, 32401234 },
- {2127314432, 37692632 },
- {2136458496, 41399188 },
- {2147054208, 42945376 },
-
- /* column 15 (|ILD| = 45): */
- {2123466240, 0 },
- {2124103936, 5514738 },
- {2125783296, 10322954 },
- {2128390400, 14615774 },
- {2131882240, 18322330 },
- {2136200832, 21283710 },
- {2141376256, 23332410 },
- {2147348352, 24150602 },
-
- /* column 16 (|ILD| = 50): */
- {2133943808, 0 },
- {2134306688, 3115998 },
- {2135260160, 5830418 },
- {2136737664, 8250632 },
- {2138715520, 10335839 },
- {2141157120, 11995844 },
- {2144077696, 13136157 },
- {2147440640, 13580687 }
-};
-
-
-/* tables for adaptive Golomb-Rice coding of DFT stereo parameters */
-const Word16 dft_code_itd[] =
-{
- 0, 3, 4, 13, 8, 9, 12, 5, 10, 44, 23, 60, 45, 31, 235, 59, 28, 61, 234, 116
-};
-
-const Word16 dft_len_itd[] =
-{
- 2, 3, 4, 4, 4, 4, 4, 4, 4, 6, 5, 6, 6, 5, 8, 6, 5, 6, 8, 7
-};
-
-const Word16 dft_maps_rpg[] =
-{
- 0, 1, 2, 3, 4, 5, 6, 7,
- 2, 0, 1, 3, 4, 5, 6, 7,
- 6, 2, 0, 1, 3, 4, 5, 7,
- 7, 5, 2, 0, 1, 3, 4, 6,
- 7, 6, 4, 3, 1, 0, 2, 5,
- 7, 6, 5, 3, 2, 1, 0, 4,
- 7, 6, 5, 4, 3, 2, 0, 1,
- 7, 6, 5, 4, 3, 2, 0, 1,
- 6, 5, 4, 3, 1, 0, 2, 7,
-};
-
-const Word16 dft_maps_sg[NO_SYMB_GR_SIDE_G * NO_SYMB_GR_SIDE_G] =
-{
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 15, 4, 0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 12, 9, 4, 1, 0, 2, 3, 5, 6, 7, 8, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 16, 14, 8, 4, 2, 0, 1, 3, 5, 6, 7, 9, 10, 11, 12, 13, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 18, 16, 14, 10, 5, 0, 1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 13, 15, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 21, 19, 17, 15, 8, 4, 2, 0, 1, 3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 16, 18, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 21, 19, 17, 15, 12, 8, 4, 0, 1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 16, 18, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 21, 19, 17, 15, 13, 11, 9, 3, 0, 1, 2, 4, 5, 6, 7, 8, 10, 12, 14, 16, 18, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 24, 22, 20, 18, 16, 14, 12, 9, 6, 0, 1, 2, 3, 4, 5, 7, 8, 10, 11, 13, 15, 17, 19, 21, 23, 25, 26, 27, 28, 29, 30,
- 25, 23, 21, 19, 17, 15, 13, 11, 9, 6, 0, 1, 2, 3, 4, 5, 7, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 27, 28, 29, 30,
- 27, 25, 23, 21, 19, 17, 15, 13, 11, 8, 5, 0, 1, 2, 3, 4, 6, 7, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 29, 30,
- 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 1, 0, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 28, 29, 30,
- 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 30,
- 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 0, 1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30,
- 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30,
- 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 1, 0, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29,
- 30, 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28,
- 30, 29, 28, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 0, 1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26,
- 30, 29, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 9, 7, 6, 4, 3, 2, 1, 0, 5, 8, 11, 13, 15, 17, 19, 21, 23, 25, 27,
- 30, 29, 28, 27, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 7, 5, 4, 3, 2, 1, 0, 6, 9, 11, 13, 15, 17, 19, 21, 23, 25,
- 30, 29, 28, 27, 26, 25, 23, 21, 19, 17, 15, 13, 11, 10, 8, 7, 5, 4, 3, 2, 1, 0, 6, 9, 12, 14, 16, 18, 20, 22, 24,
- 30, 29, 28, 27, 26, 25, 24, 23, 22, 20, 18, 16, 14, 12, 10, 8, 7, 6, 5, 4, 2, 1, 0, 3, 9, 11, 13, 15, 17, 19, 21,
- 30, 29, 28, 27, 26, 25, 24, 23, 22, 20, 18, 16, 14, 13, 11, 10, 9, 7, 6, 5, 3, 2, 1, 0, 4, 8, 12, 15, 17, 19, 21,
- 30, 29, 28, 27, 26, 25, 24, 23, 22, 20, 18, 16, 14, 13, 12, 11, 10, 9, 7, 6, 5, 3, 1, 0, 2, 4, 8, 15, 17, 19, 21,
- 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 17, 15, 13, 12, 11, 9, 8, 7, 6, 4, 3, 2, 1, 0, 5, 10, 14, 16, 18,
- 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 15, 13, 12, 11, 10, 9, 7, 6, 5, 3, 1, 0, 2, 4, 8, 14, 16,
- 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 11, 10, 8, 7, 6, 5, 3, 2, 0, 1, 4, 9, 12,
- 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 3, 2, 1, 0, 4, 15,
- 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 0, 1,
- 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
-};
-
-
-/*-------------------------------------------------------------------------
- * Range Coder ROM tables
- *------------------------------------------------------------------------*/
-
-/* Create separate tables for cumulative frequency and symbol frequency */
-const UWord16 cum_freq_ari_pk_s17_LC_ext[RANGE_N_CONTEXT][1 + RANGE_N_SYMBOLS] =
-{
- { 0,16,47,153,241,269,325,468,591,674,798,912,1017,1082,1183,1277,1364,16384 },
- { 0,7401,7844,7886,7899,12065,12718,12790,12805,14099,14476,14533,14549,15058,15264,15299,15310,16384 },
- { 0,4362,6345,6864,7038,9037,11049,11736,12002,12569,13301,13656,13822,14021,14334,14515,14607,16384 },
- { 0,2955,5183,5822,6013,8153,10671,11614,11943,12586,13540,14025,14232,14437,14770,14978,15080,16384 },
- { 0,3155,4981,5615,5855,7969,9953,10739,11073,11936,12837,13208,13383,13767,14203,14400,14498,16384 },
- { 0,1216,2630,3264,3558,4831,6679,7661,8157,8709,9622,10204,10542,10799,11243,11568,11777,16384 },
- { 0,1759,3641,4350,4612,6325,8678,9732,10161,10790,11790,12361,12642,12883,13295,13566,13720,16384 },
- { 0,1109,2705,3433,3732,5226,7532,8732,9263,9978,11142,11842,12188,12490,12986,13321,13520,16384 },
- { 0,11524,13046,13170,13191,14956,15708,15813,15837,16028,16162,16195,16204,16245,16282,16295,16300,16384 },
- { 0,8027,10586,10909,10974,13291,14861,15157,15232,15535,15824,15914,15943,16014,16090,16123,16136,16384 },
- { 0,834,2034,2674,2997,4087,5843,6891,7455,8030,9013,9688,10085,10376,10893,11277,11528,16384 },
- { 0,6038,9086,9451,9519,12332,14521,14913,15003,15329,15711,15848,15893,15955,16045,16091,16111,16384 },
- { 0,4732,7685,8354,8545,10717,12924,13618,13852,14291,14842,15083,15181,15314,15491,15582,15625,16384 },
- { 0,745,1783,2347,2655,3537,4963,5864,6406,6863,7664,8248,8634,8891,9351,9708,9958,16384 },
- { 0,3957,6794,7669,7998,9743,11676,12498,12869,13313,13894,14186,14332,14498,14714,14835,14906,16384 },
- { 0,2779,5388,6021,6201,8582,11352,12260,12544,13117,13981,14408,14580,14751,15039,15213,15298,16384 },
- { 0,448,1160,1625,1920,2576,3706,4518,5053,5474,6234,6835,7262,7531,8032,8446,8758,16384 },
- { 0,1,2,1555,2246,2247,2248,3489,4112,5449,6596,7302,7710,8311,8876,9266,9517,16384 },
- { 0,2496,4910,5544,5722,8049,10799,11689,11973,12583,13467,13878,14047,14234,14537,14712,14803,16384 },
- { 0,921,2222,2880,3188,4407,6321,7406,7955,8573,9616,10296,10679,10978,11502,11880,12118,16384 },
- { 0,2620,4443,5017,5233,7072,9213,10083,10441,11049,11954,12442,12676,12918,13310,13565,13705,16384 },
- { 0,11205,13084,13178,13187,15164,16010,16081,16091,16213,16303,16321,16325,16340,16355,16360,16362,16384 },
- { 0,358,916,1288,1542,2055,2937,3594,4062,4399,5017,5524,5907,6136,6573,6941,7236,16384 },
- { 0,3575,5093,5536,5735,7408,9185,9878,10188,10727,11497,11933,12165,12410,12794,13019,13166,16384 },
- { 0,1,2,640,1036,1037,1038,1670,2096,2696,3287,3732,4056,4417,4800,5106,5339,16384 },
- { 0,969,1397,1518,1578,2633,3338,3566,3675,4197,4664,4857,4957,5288,5625,5783,5874,16384 },
- { 0,10458,12104,12294,12331,14246,15264,15437,15481,15752,15971,16031,16050,16120,16186,16210,16218,16384 },
- { 0,7178,9744,10039,10093,12701,14612,14961,15042,15360,15732,15869,15917,15978,16070,16117,16139,16384 },
- { 0,1298,2418,2879,3113,4146,5509,6227,6621,7053,7755,8229,8539,8776,9186,9492,9714,16384 },
- { 0,4957,7785,8252,8357,10978,13372,13955,14114,14561,15140,15378,15464,15570,15730,15820,15860,16384 },
- { 0,4823,8164,8570,8647,11604,14169,14653,14763,15105,15554,15727,15785,15852,15960,16018,16045,16384 },
- { 0,4735,7010,7517,7660,9986,12230,12914,13131,13666,14374,14689,14814,14972,15212,15342,15404,16384 },
- { 0,3363,5881,6658,6941,8864,11113,12015,12368,12889,13643,14019,14203,14394,14665,14823,14906,16384 },
- { 0,2569,4996,5779,6068,7917,10251,11209,11602,12129,12918,13321,13520,13696,13976,14155,14259,16384 },
- { 0,209,577,848,1046,1378,1982,2465,2835,3072,3513,3893,4202,4374,4703,4994,5241,16384 },
- { 0,2074,4337,5048,5274,7319,10003,11066,11446,12105,13112,13652,13885,14100,14464,14691,14810,16384 },
- { 0,1619,3560,4288,4550,6381,8955,10102,10543,11239,12362,12982,13261,13516,13958,14234,14381,16384 },
- { 0,89,257,441,582,734,1024,1325,1568,1716,1983,2222,2430,2545,2750,2941,3109,16384 },
- { 0,2202,3563,4044,4264,5686,7344,8100,8476,9006,9835,10331,10612,10864,11304,11599,11787,16384 },
- { 0,1220,2801,3492,3784,5223,7387,8496,8998,9640,10711,11369,11711,11993,12486,12829,13035,16384 },
- { 0,12626,13813,13903,13917,15396,15906,15972,15987,16139,16230,16251,16257,16289,16315,16323,16326,16384 },
- { 0,1579,3191,3831,4099,5678,7788,8761,9206,9842,10821,11388,11681,11958,12417,12722,12902,16384 },
- { 0,597,1514,2064,2379,3237,4679,5637,6213,6733,7649,8316,8755,9052,9599,10023,10323,16384 },
- { 0,9273,11762,12080,12151,14038,15210,15446,15514,15725,15929,15995,16019,16068,16124,16148,16158,16384 },
- { 0,9238,11681,11852,11872,14306,15644,15801,15828,16013,16183,16231,16243,16266,16297,16312,16318,16384 },
- { 0,6791,9200,9531,9594,12240,14178,14552,14639,15064,15506,15643,15687,15785,15908,15960,15983,16384 },
- { 0,7175,10415,10905,11033,13038,14621,15002,15123,15367,15651,15762,15806,15864,15938,15974,15992,16384 },
- { 0,5060,7703,8132,8225,10934,13270,13778,13911,14397,14972,15173,15242,15367,15537,15619,15654,16384 },
- { 0,3721,6311,6857,6992,9557,12180,12895,13098,13671,14418,14718,14830,14984,15212,15333,15390,16384 },
- { 0,5971,9288,10044,10269,11991,13680,14228,14437,14750,15130,15293,15374,15459,15579,15642,15677,16384 },
- { 0,3047,5311,5907,6078,8339,10850,11679,11946,12580,13442,13854,14024,14220,14534,14716,14810,16384 },
- { 0,2061,4280,4993,5228,7201,9735,10735,11097,11708,12606,13082,13295,13498,13836,14043,14161,16384 },
- { 0,4738,7949,8880,9234,10781,12502,13214,13531,13897,14355,14593,14718,14835,14998,15096,15153,16384 },
- { 0,3237,5045,5632,5860,7609,9702,10608,10986,11571,12476,12978,13230,13451,13830,14074,14208,16384 },
- { 0,1833,3889,4677,5028,6422,8379,9378,9884,10350,11086,11545,11809,12003,12327,12559,12711,16384 },
- { 0,3989,6858,7352,7459,10254,12936,13571,13735,14240,14895,15153,15242,15364,15548,15646,15690,16384 },
- { 0,1463,3197,3909,4220,5626,7609,8632,9127,9657,10520,11078,11380,11607,11991,12265,12442,16384 },
- { 0,14233,15083,15108,15110,16069,16300,16314,16316,16352,16370,16373,16374,16377,16380,16381,16382,16384 },
- { 0,1,2,2610,3293,3294,3295,5097,5671,8467,10332,11119,11437,12223,12850,13185,13345,16384 },
- { 0,2010,4053,4696,4910,6879,9391,10386,10750,11393,12376,12886,13119,13348,13726,13967,14099,16384 },
- { 0,7586,10517,10758,10791,13543,15346,15577,15619,15846,16082,16150,16169,16202,16245,16265,16273,16384 },
- { 0,3059,5772,6369,6524,9041,11801,12582,12813,13361,14115,14439,14567,14714,14944,15075,15141,16384 },
- { 0,8643,10594,10813,10856,13274,14686,14920,14975,15350,15680,15771,15799,15897,16003,16042,16057,16384 },
- { 0,6720,8878,9325,9467,11564,13248,13744,13929,14384,14880,15087,15167,15311,15488,15569,15607,16384 },
-};
-
-const UWord16 sym_freq_ari_pk_s17_LC_ext[RANGE_N_CONTEXT][RANGE_N_SYMBOLS] =
-{
- { 16,31,106,88,28,56,143,123,83,124,114,105,65,101,94,87,15020 },
- { 7401,443,42,13,4166,653,72,15,1294,377,57,16,509,206,35,11,1074 },
- { 4362,1983,519,174,1999,2012,687,266,567,732,355,166,199,313,181,92,1777 },
- { 2955,2228,639,191,2140,2518,943,329,643,954,485,207,205,333,208,102,1304 },
- { 3155,1826,634,240,2114,1984,786,334,863,901,371,175,384,436,197,98,1886 },
- { 1216,1414,634,294,1273,1848,982,496,552,913,582,338,257,444,325,209,4607 },
- { 1759,1882,709,262,1713,2353,1054,429,629,1000,571,281,241,412,271,154,2664 },
- { 1109,1596,728,299,1494,2306,1200,531,715,1164,700,346,302,496,335,199,2864 },
- { 11524,1522,124,21,1765,752,105,24,191,134,33,9,41,37,13,5,84 },
- { 8027,2559,323,65,2317,1570,296,75,303,289,90,29,71,76,33,13,248 },
- { 834,1200,640,323,1090,1756,1048,564,575,983,675,397,291,517,384,251,4856 },
- { 6038,3048,365,68,2813,2189,392,90,326,382,137,45,62,90,46,20,273 },
- { 4732,2953,669,191,2172,2207,694,234,439,551,241,98,133,177,91,43,759 },
- { 745,1038,564,308,882,1426,901,542,457,801,584,386,257,460,357,250,6426 },
- { 3957,2837,875,329,1745,1933,822,371,444,581,292,146,166,216,121,71,1478 },
- { 2779,2609,633,180,2381,2770,908,284,573,864,427,172,171,288,174,85,1086 },
- { 448,712,465,295,656,1130,812,535,421,760,601,427,269,501,414,312,7626 },
- { 1,1,1553,691,1,1,1241,623,1337,1147,706,408,601,565,390,251,6867 },
- { 2496,2414,634,178,2327,2750,890,284,610,884,411,169,187,303,175,91,1581 },
- { 921,1301,658,308,1219,1914,1085,549,618,1043,680,383,299,524,378,238,4266 },
- { 2620,1823,574,216,1839,2141,870,358,608,905,488,234,242,392,255,140,2679 },
- { 11205,1879,94,9,1977,846,71,10,122,90,18,4,15,15,5,2,22 },
- { 358,558,372,254,513,882,657,468,337,618,507,383,229,437,368,295,9148 },
- { 3575,1518,443,199,1673,1777,693,310,539,770,436,232,245,384,225,147,3218 },
- { 1,1,638,396,1,1,632,426,600,591,445,324,361,383,306,233,11045 },
- { 969,428,121,60,1055,705,228,109,522,467,193,100,331,337,158,91,10510 },
- { 10458,1646,190,37,1915,1018,173,44,271,219,60,19,70,66,24,8,166 },
- { 7178,2566,295,54,2608,1911,349,81,318,372,137,48,61,92,47,22,245 },
- { 1298,1120,461,234,1033,1363,718,394,432,702,474,310,237,410,306,222,6670 },
- { 4957,2828,467,105,2621,2394,583,159,447,579,238,86,106,160,90,40,524 },
- { 4823,3341,406,77,2957,2565,484,110,342,449,173,58,67,108,58,27,339 },
- { 4735,2275,507,143,2326,2244,684,217,535,708,315,125,158,240,130,62,980 },
- { 3363,2518,777,283,1923,2249,902,353,521,754,376,184,191,271,158,83,1478 },
- { 2569,2427,783,289,1849,2334,958,393,527,789,403,199,176,280,179,104,2125 },
- { 209,368,271,198,332,604,483,370,237,441,380,309,172,329,291,247,11143 },
- { 2074,2263,711,226,2045,2684,1063,380,659,1007,540,233,215,364,227,119,1574 },
- { 1619,1941,728,262,1831,2574,1147,441,696,1123,620,279,255,442,276,147,2003 },
- { 89,168,184,141,152,290,301,243,148,267,239,208,115,205,191,168,13275 },
- { 2202,1361,481,220,1422,1658,756,376,530,829,496,281,252,440,295,188,4597 },
- { 1220,1581,691,292,1439,2164,1109,502,642,1071,658,342,282,493,343,206,3349 },
- { 12626,1187,90,14,1479,510,66,15,152,91,21,6,32,26,8,3,58 },
- { 1579,1612,640,268,1579,2110,973,445,636,979,567,293,277,459,305,180,3482 },
- { 597,917,550,315,858,1442,958,576,520,916,667,439,297,547,424,300,6061 },
- { 9273,2489,318,71,1887,1172,236,68,211,204,66,24,49,56,24,10,226 },
- { 9238,2443,171,20,2434,1338,157,27,185,170,48,12,23,31,15,6,66 },
- { 6791,2409,331,63,2646,1938,374,87,425,442,137,44,98,123,52,23,401 },
- { 7175,3240,490,128,2005,1583,381,121,244,284,111,44,58,74,36,18,392 },
- { 5060,2643,429,93,2709,2336,508,133,486,575,201,69,125,170,82,35,730 },
- { 3721,2590,546,135,2565,2623,715,203,573,747,300,112,154,228,121,57,994 },
- { 5971,3317,756,225,1722,1689,548,209,313,380,163,81,85,120,63,35,707 },
- { 3047,2264,596,171,2261,2511,829,267,634,862,412,170,196,314,182,94,1574 },
- { 2061,2219,713,235,1973,2534,1000,362,611,898,476,213,203,338,207,118,2223 },
- { 4738,3211,931,354,1547,1721,712,317,366,458,238,125,117,163,98,57,1231 },
- { 3237,1808,587,228,1749,2093,906,378,585,905,502,252,221,379,244,134,2176 },
- { 1833,2056,788,351,1394,1957,999,506,466,736,459,264,194,324,232,152,3673 },
- { 3989,2869,494,107,2795,2682,635,164,505,655,258,89,122,184,98,44,694 },
- { 1463,1734,712,311,1406,1983,1023,495,530,863,558,302,227,384,274,177,3942 },
- { 14233,850,25,2,959,231,14,2,36,18,3,1,3,3,1,1,2 },
- { 1,1,2608,683,1,1,1802,574,2796,1865,787,318,786,627,335,160,3039 },
- { 2010,2043,643,214,1969,2512,995,364,643,983,510,233,229,378,241,132,2285 },
- { 7586,2931,241,33,2752,1803,231,42,227,236,68,19,33,43,20,8,111 },
- { 3059,2713,597,155,2517,2760,781,231,548,754,324,128,147,230,131,66,1243 },
- { 8643,1951,219,43,2418,1412,234,55,375,330,91,28,98,106,39,15,327 },
- { 6720,2158,447,142,2097,1684,496,185,455,496,207,80,144,177,81,38,777 },
-};
-
-
-/*-------------------------------------------------------------------------
- * ECLVQ Stereo ROM tables
- *------------------------------------------------------------------------*/
-
-/* table with round(ECSQ_PROB_TOTAL / index) for entropy coding, with i in {1, .., ECSQ_SEGMENT_SIZE} */
-const UWord16 ECSQ_tab_inverse[1 + ECSQ_SEGMENT_SIZE] =
-{
- 0, 16384, 8192, 5461, 4096, 3277, 2731, 2341, 2048
-};
-
-
-const Word16 tdm_bit_allc_tbl[5][6] =
-{
- /* IC -- UC -- GC -- TM --AC */
- { 1650, 3500, 0, 4400, 0, 5000 }, /* IVAS_13k2 */
- { 1650, 3500, 0, 5000, 0, 5000 }, /* IVAS_16k4 */
- { 1650, 3500, 0, 6000, 0, 5000 }, /* IVAS_24k4 */
- { 1650, 6050, 0, 10000, 0, 10000 }, /* IVAS_32k */
- { 1650, 6050, 0, 13000, 0, 14000 } /* IVAS_48k */
-};
-
-
-const Word16 fast_FCB_bits_2sfr[] = {8, 14, 18, 20, 24, 128/*stop value*/};
-
-const Word16 fast_FCB_rates_2sfr[] = {/*16*50,*/ (8+14)*50, 28*50, 32*50, 34*50, 36*50, 38*50, 40*50, 42*50, 44*50, 48*50};
-
-
-/*----------------------------------------------------------------------------------*
- * MDCT Stereo ROM tables
- *----------------------------------------------------------------------------------*/
-
- /* PsychLPC */
-
-const SpectrumWarping sw32000Hz[] =
-{{
- {
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6,
- 6, 8, 8, 8, 8, 8, 10, 10, 10, 10, 12, 12, 12, 12, 14, 14,
- 14, 16, 18, 18, 18, 20, 22, 22, 22, 24, 26, 26, 26, 28, 30, 32
- },
- {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5,
- 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10
- },
-}};
-
-const SpectrumWarping sw25600Hz[] =
-{{
- {
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6,
- 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 10, 12, 12, 12, 12,
- 12, 12, 14, 14, 14, 14, 14, 16, 16, 18, 18, 18, 18, 18, 20, 20
- },
- {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7
- },
-}};
-
-const SpectrumWarping sw16000Hz[] =
-{{
- {
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
- },
- {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
- },
-}};
-
-const MDCTStereoBands_config mdctStereoBands_32000_640[] =
-{{
- /*TCX 20*/
- { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 8, 8, 8, 8, 8, 8, 8, 12, 12, 12,
- 12, 20, 20, 20, 22, 22, 22, 22, 22, 22,
- 22, 22, 22, 22, 22, 22, 22, 22, 22, 42,
- 64, 64, 96, 160},
- {44, 41,38, 29},/*number of bands for frame lengths 960, 640, 512, 320 respectively*/
-
- /*TCX 10*/
- {
- 4, 4, 4, 4, 4, 8, 8, 8, 8, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 20, 32, 32,
- 32, 48, 80
- },
- {33, 29, 26, 18}/*number of bands for frame lengths 480, 320, 256, 160 respectively*/
-}};
-
-
-const Word16 dft_cng_coh_u2i[9] = { 4, 5, 3, 6, 2, 7, 1, 8, 0 }; /* Coherence unary codeword -> residual codeword conversion table */
-
-const Word16 dft_cng_coh_i2u[9] = { 8, 6, 4, 2, 0, 1, 3, 5, 7 }; /* Coherence residual codeword -> unary codeword conversion table */
-
-const Word16 dft_cng_coh_alpha_start[STEREO_DFT_N_COH_ALPHA_STEPS - 1] = { 15, 16, 17, 18 };
-
-
-const Word16 DirAC_band_grouping_12[12 + 1] =
-{
- 0, 1, 2, 3, 4, 5, 6, 7, 11, 17, 25, 40, 60
-};
-
-
-const Word16 DirAC_band_grouping_6[6 + 1] =
-{
- 0, 1, 4, 8, 20, 30, 60
-};
-
-const Word16 DirAC_band_grouping_5[5 + 1] =
-{
- 0, 1, 3, 7, 15, 60
-};
-
-const Word16 DirAC_block_grouping[MAX_PARAM_SPATIAL_SUBFRAMES + 1] =
-{
- 0, 4, 8, 12, 16
-};
-
-const Word16 DirAC_block_grouping_5ms_MDFT[MAX_PARAM_SPATIAL_SUBFRAMES + 1] =
-{
- 0, 1, 2, 3, 4
-};
-
-const Word32 c_weights_fx[DIRAC_NO_FB_BANDS_MAX] /* Q30 */ = { 106970960, 1033798336, 1065867776, 1071704704, 1073381888, 1073741824, 1073494016, 1072883072, 1072012032, 1070930560, 1069665600, 1068232640, 1066641792, 1064899968, 1063012224, 1060982464, 1058814144, 1056510016, 1054072832, 1051505280, 1048809664, 1045988480, 1043044160, 1039979072, 1036795776, 1033496576, 1030084096, 1026560960, 1022929600, 1019192512, 1015352576, 1011412416, 1007374720, 1003242112, 999017472, 994703488, 990302976, 985818688, 981253568, 976610304, 971891712, 967100672, 962240064, 957312576, 952321088, 947268224, 942156992, 936990080, 931770048, 926499840, 921182016, 915819200, 910414208, 904969344, 899487488, 893970944, 888422272, 882843840, 877238144, 871607552, 865954432, 860280896, 854589184, 848881728, 843160384, 837427328, 831684672, 825934208, 820178240, 814418240, 808656320, 802894208, 797133568, 791376192, 785623744, 779877568, 774139520, 768410880, 762693184, 756987904, 751296064, 745619328, 739958784, 734315584, 728691008, 723086208, 717502016, 711939712, 706400064, 700884096, 695392768, 689926912, 684487232, 679074688, 673689856, 668333504, 663006464, 657709056, 652442176, 647206144, 642001600, 636828992, 631688896, 626581696, 621507776, 616467520, 611461184, 606489344, 601552064, 596649792, 591782528, 586950784, 582154560, 577394112, 572669696, 567981312, 563329088, 558713152, 554133568, 549590464, 545083840, 540613760, 536180160, 531783104, 527422528, 523098464, 518810784, 514559520, 510344672, 506165856, 502023360, 497916832, 493846304, 489811488, 485812448, 481848832, 477920672, 474027808, 470169952, 466347008, 462558848, 458805152, 455085920, 451400736, 447749600, 444132160, 440548320, 436997792, 433480416, 429995904, 426544032, 423124608, 419737376, 416382144, 413058720, 409766720, 406505984, 403276288, 400077280, 396908768, 393770656, 390662496, 387584064, 384535200, 381515616, 378525024, 375563200, 372629952, 369724864, 366847872, 363998592, 361176672, 358382176, 355614592, 352873760, 350159456, 347471328, 344809216, 342172864, 339562048, 336976384, 334415808, 331879840, 329368576, 326881472, 324418432, 321979104, 319563392, 317170976, 314801664, 312455232, 310131328, 307829856, 305550528, 303293088, 301057440, 298843168, 296650176, 294478304, 292327168, 290196672, 288086432, 285996512, 283926432, 281876224, 279845472, 277834016, 275841792, 273868480, 271913856, 269977792, 268059968, 266160304, 264278672, 262414768, 260568368, 258739360, 256927520, 255132768, 253354752, 251593392, 249848448, 248119936, 246407424, 244710816, 243030080, 241364928, 239715120, 238080672, 236461248, 234856752, 233267088, 231692016, 230131440, 228585136, 227053024, 225534848, 224030544, 222539872, 221062832 };
-
-/*----------------------------------------------------------------------*
-* SPAR ROM tables
-*-----------------------------------------------------------------------*/
-
-const ivas_spar_br_table_t ivas_spar_br_table_consts[IVAS_SPAR_BR_TABLE_LEN] =
-{
-/* When AGC is ON additional (AGC_BITS_PER_CH+1) bits may be taken from each core-coder channel
- so minimum core-coder bitrate per channel can be min core-coder bitrates as per the table - AGC_BITS_PER_CH */
- { 13200, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0, { { 10000, 8150, 13150 } },
- { { 15, 1, 5, 1 },{ 15, 1, 3, 1 },{ 7, 1, 3, 1 } }, 0, 0, 0 },
-
- { 16400, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0, { { 13200, 11350, 16350 } },
- { { 15, 1, 5, 1 },{ 15, 1, 3, 1 },{ 7, 1, 3, 1 } }, 0, 0, 0 },
-
- { 24400, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0, { { 16400, 14850, 24350 } },
- { { 15, 1, 5, 1 },{ 15, 1, 3, 1 },{ 7, 1, 3, 1 } }, 0, 0, 0 },
-
- { 32000, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0, { { 24000, 20450, 31950 } },
- { { 21, 1, 5, 1 },{ 15, 1, 5, 1 },{ 15, 1, 3, 1 } }, 0, 0, 0 },
-
- { 48000, 0, SBA_FOA_ORDER, FB, 24000, 2, WYXZ, 0, 0, { { 24000, 21000, 31950 },{ 16000, 15000, 20400 } },
- { { 15, 7, 5, 1 },{ 15, 7, 3, 1 },{ 7, 7, 3, 1 } }, 1, 0, 0 },
-
- { 64000, 0, SBA_FOA_ORDER, FB, 24000, 2, WYXZ, 0, 0, { { 38000, 34050, 56000 },{ 16000, 15600, 20400 } },{ { 21, 7, 5, 1 },{ 15, 7, 5, 1 },{ 15, 7, 3, 1 } }, 1, 1, 0 },
-
- { 80000, 0, SBA_FOA_ORDER, FB, 24000, 2, WYXZ, 0, 0, { { 46000, 43000, 56000 },{ 24000, 23000, 31950 } },
- { { 21, 7, 5, 1 },{ 15, 7, 5, 1 },{ 15, 7, 3, 1 } }, 1, 0, 0 },
-
- { 96000, 0, SBA_FOA_ORDER, FB, 24000, 3, WYXZ, 0, 0, { { 47000, 42600, 56000 },{ 23000, 22600, 31950 },{ 16000, 15600, 20400 } },
- { { 21, 9, 9, 1 },{ 21, 7, 5, 1 },{ 21, 7, 5, 1 } }, 1, 0, 0 },
-
- { 128000, 0, SBA_FOA_ORDER, FB, 24000, 3, WYXZ, 0, 0, { { 55000, 50000, 56000 },{ 36000, 36000, 56000 },{ 27000, 27000, 31950 } },
- { { 21, 11, 9, 1 },{ 21, 9, 7, 1 },{ 21, 7, 7, 1 } }, 1, 0, 0 },
-
- { 160000, 0, SBA_FOA_ORDER, FB, 24000, 3, WYXZ, 0, 0, { { 74000, 70900, 112000 },{ 41000, 40050, 56000 },{ 35000, 34050, 56000 } },
- { { 21, 11, 11, 1 },{ 21, 9, 9, 1 },{ 21, 7, 7, 1 } }, 1, 0, 0 },
-
- { 192000, 0, SBA_FOA_ORDER, FB, 24000, 3, WYXZ, 0, 0, { { 90000, 87900, 112000 },{ 50000, 48050, 56000 },{ 42000, 41050, 56000 } },
- { { 21, 11, 11, 1 },{ 21, 9, 9, 1 },{ 21, 7, 7, 1 } }, 1, 0, 0 },
-
- { 256000, 0, SBA_FOA_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 90000, 85000, 112000 },{ 70000, 69000, 112000 },{ 50000, 48950, 56000 },{ 36400, 35600, 56000 } },
- { { 31, 1, 1, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 },
-
- { 256000, 0, SBA_HOA2_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 84650, 83000, 112000 },{ 65850, 64550, 56000 },{ 47000, 46100, 48000 },{ 28200, 27650, 40000 } },
- { { 31, 11, 11, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 },
-
- { 256000, 0, SBA_HOA3_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 76300, 73550, 112000 },{ 59350, 57200, 56000 },{ 42400, 40850, 48000 },{ 25450, 24500, 40000 } },
- { { 31, 11, 11, 1 },{ 1, 1, 1, 1 }, { 1, 1, 1, 1 } }, 1, 2, 0 },
-
- { 384000, 0, SBA_FOA_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 128000, 128000, 128000 },{ 100000, 100000, 128000 },{ 79850, 79850, 104000 },{ 66600, 66600, 104000 } },
- { { 31, 1, 1, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 },
-
- { 384000, 0, SBA_HOA2_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 128000, 128000, 128000 },{ 105350, 103300, 112000 },{ 75200, 73750, 96000 },{ 45100, 44250, 48000 } },
- { { 31, 11, 11, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 },
-
- { 384000, 0, SBA_HOA3_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 124300, 121550, 128000 },{ 96700, 94550, 112000 },{ 69050, 67500, 96000 },{ 41450, 40500, 48000 } },
- { { 31, 11, 11, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 },
-
- { 512000, 0, SBA_FOA_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 128000, 128000, 128000 },{ 128000, 128000, 128000 },{ 128000, 128000, 128000 }, {118450, 118450, 128000 } },
- { { 31, 1, 1, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 },
-
- { 512000, 0, SBA_HOA2_ORDER, FB, 24000, 4, WYXZ, 0, 0,{ { 124000, 124000, 128000 },{ 124000, 124000, 128000 },{ 125200, 118450, 128000 },{ 76300, 73000, 128000 } },
- { { 31, 11, 11, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 },
-
- { 512000, 0, SBA_HOA3_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 118000, 118000, 128000 },{ 118000, 118000, 128000 },{ 117200, 109250, 128000 },{ 72300, 69000, 128000 } },
- { { 31, 11, 11, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 },
-};
-
-const ivas_spar_br_table_t ivas_spar_br_table_consts_fx[IVAS_SPAR_BR_TABLE_LEN] = /*ceilf(log2f)*/
-{
- /* When AGC is ON additional (AGC_BITS_PER_CH+1) bits may be taken from each core-coder channel
- so minimum core-coder bitrate per channel can be min core-coder bitrates as per the table - AGC_BITS_PER_CH */
- { 13200, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0, { { 10000, 8150, 13150 } },
- { { 4, 0, 3, 0 },{ 4, 0, 2, 0 },{ 3, 0, 2, 0 } }, 0, 0, 0 },
-
- { 16400, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0, { { 13200, 11350, 16350 } },
- { { 4, 0, 3, 0 },{ 4, 0, 2, 0 },{ 3, 0, 2, 0 } }, 0, 0, 0 },
-
- { 24400, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0, { { 16400, 14850, 24350 } },
- { { 4, 0, 3, 0 },{ 4, 0, 2, 0 },{ 3, 0, 2, 0 } }, 0, 0, 0 },
-
- { 32000, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0, { { 24000, 20450, 31950 } },
- { { 5, 0, 3, 0 },{ 4, 0, 3, 0 },{ 4, 0, 2, 0 } }, 0, 0, 0 },
-
- { 48000, 0, SBA_FOA_ORDER, FB, 24000, 2, WYXZ, 0, 0, { { 24000, 21000, 31950 },{ 16000, 15000, 20400 } },
- { { 4, 3, 3, 0 },{ 4, 3, 2, 0 },{ 3, 3, 2, 0 } }, 1, 0, 0 },
-
- { 64000, 0, SBA_FOA_ORDER, FB, 24000, 2, WYXZ, 0, 0, { { 38000, 34050, 56000 },{ 16000, 15600, 20400 } },{ { 5, 3, 3, 0 },{ 4, 3, 3, 0 },{ 4, 3, 2, 0 } }, 1, 1, 0 },
-
- { 80000, 0, SBA_FOA_ORDER, FB, 24000, 2, WYXZ, 0, 0, { { 46000, 43000, 56000 },{ 24000, 23000, 31950 } },
- { { 5, 3, 3, 0 },{ 4, 3, 3, 0 },{ 4, 3, 2, 0 } }, 1, 0, 0 },
-
- { 96000, 0, SBA_FOA_ORDER, FB, 24000, 3, WYXZ, 0, 0, { { 47000, 42600, 56000 },{ 23000, 22600, 31950 },{ 16000, 15600, 20400 } },
- { { 5, 4, 4, 0 },{ 5, 3, 3, 0 },{ 5, 3, 3, 0 } }, 1, 0, 0 },
-
- { 128000, 0, SBA_FOA_ORDER, FB, 24000, 3, WYXZ, 0, 0, { { 55000, 50000, 56000 },{ 36000, 36000, 56000 },{ 27000, 27000, 31950 } },
- { { 5, 4, 4, 0 },{ 5, 4, 3, 0 },{ 5, 3, 3, 0 } }, 1, 0, 0 },
-
- { 160000, 0, SBA_FOA_ORDER, FB, 24000, 3, WYXZ, 0, 0, { { 74000, 70900, 112000 },{ 41000, 40050, 56000 },{ 35000, 34050, 56000 } },
- { { 5, 4, 4, 0 },{ 5, 4, 4, 0 },{ 5, 3, 3, 0 } }, 1, 0, 0 },
-
- { 192000, 0, SBA_FOA_ORDER, FB, 24000, 3, WYXZ, 0, 0, { { 90000, 87900, 112000 },{ 50000, 48050, 56000 },{ 42000, 41050, 56000 } },
- { { 5, 4, 4, 0 },{ 5, 4, 4, 0 },{ 5, 3, 3, 0 } }, 1, 0, 0 },
-
- { 256000, 0, SBA_FOA_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 90000, 85000, 112000 },{ 70000, 69000, 112000 },{ 50000, 48950, 56000 },{ 36400, 35600, 56000 } },
- { { 5, 0, 0, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 } }, 1, 2, 0 },
-
- { 256000, 0, SBA_HOA2_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 84650, 83000, 112000 },{ 65850, 64550, 56000 },{ 47000, 46100, 48000 },{ 28200, 27650, 40000 } },
- { { 5, 4, 4, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 } }, 1, 2, 0 },
-
- { 256000, 0, SBA_HOA3_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 76300, 73550, 112000 },{ 59350, 57200, 56000 },{ 42400, 40850, 48000 },{ 25450, 24500, 40000 } },
- { { 5, 4, 4, 0 },{ 0, 0, 0, 0 }, { 0, 0, 0, 0 } }, 1, 2, 0 },
-
- { 384000, 0, SBA_FOA_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 128000, 128000, 128000 },{ 100000, 100000, 128000 },{ 79850, 79850, 104000 },{ 66600, 66600, 104000 } },
- { { 5, 0, 0, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 } }, 1, 2, 0 },
-
- { 384000, 0, SBA_HOA2_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 128000, 128000, 128000 },{ 105350, 103300, 112000 },{ 75200, 73750, 96000 },{ 45100, 44250, 48000 } },
- { { 5, 4, 4, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 } }, 1, 2, 0 },
-
- { 384000, 0, SBA_HOA3_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 124300, 121550, 128000 },{ 96700, 94550, 112000 },{ 69050, 67500, 96000 },{ 41450, 40500, 48000 } },
- { { 5, 4, 4, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 } }, 1, 2, 0 },
-
- { 512000, 0, SBA_FOA_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 128000, 128000, 128000 },{ 128000, 128000, 128000 },{ 128000, 128000, 128000 }, {118450, 118450, 128000 } },
- { { 5, 0, 0, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 } }, 1, 2, 0 },
-
- { 512000, 0, SBA_HOA2_ORDER, FB, 24000, 4, WYXZ, 0, 0,{ { 124000, 124000, 128000 },{ 124000, 124000, 128000 },{ 125200, 118450, 128000 },{ 76300, 73000, 128000 } },
- { { 5, 4, 4, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 } }, 1, 2, 0 },
-
- { 512000, 0, SBA_HOA3_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 118000, 118000, 128000 },{ 118000, 118000, 128000 },{ 117200, 109250, 128000 },{ 72300, 69000, 128000 } },
- { { 5, 4, 4, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 } }, 1, 2, 0 },
-};
-const ivas_freq_models_t ivas_arith_pred_r_consts[TOTAL_PRED_QUANT_STRATS_ARITH] =
-{
- /* entry for 1 quantization points */
- {
- /* pred_R real */
- {
- { 0,16384, },
- { 0,16384, },
- { 0,16384, },
- { 0,16384, },
- },
- /* pred_R real differential */
- {
- { 0,16384, },
- { 0,16384, },
- { 0,16384, },
- { 0,16384, },
- },
- /* pred_R real : values for general and differential */
- { 0 },{ 0 },
- /* pred_R real : num dyn models for general and differential */
- 4, 4
- },
- /* entry for 7 quantization points for br_table_idx >= 2 */
- {
- /* pred_R real */
- {
- { 0,546,1092,2184,8740,2184,1092,546, },
- { 0,1779,2116,2516,3562,2516,2116,1779, },
- { 0,1848,2614,5229,2614,1848,1307,924, },
- { 0,924,1307,1848,2614,5229,2614,1848, },
- },
- /* pred_R real differential */
- {
- { 0,125,399,1269,12798,1269,399,125, },
- { 0,744,1327,2365,7512,2365,1327,744, },
- { 0,1354,2413,7664,2413,1354,760,426, },
- { 0,426,760,1354,2413,7664,2413,1354, },
- },
- /* pred_R real : values for general and differential */
- { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 },
- /* pred_R real : num dyn models for general and differential */
- 4, 4
- },
- /* entry for 15 quantization points for br_table_idx >= 2 */
- {
- /* pred_R real */
- {
- { 0,32,64,128,257,514,1028,2056,8226,2056,1028,514,257,128,64,32, },
- { 0,565,672,799,950,1130,1344,1598,2268,1598,1344,1130,950,799,672,565, },
- { 0,353,500,707,1000,1414,2000,4010,2000,1414,1000,707,500,353,250,176, },
- { 0,176,250,353,500,707,1000,1414,2000,4010,2000,1414,1000,707,500,353, },
- },
- /* pred_R real differential */
- {
- { 0,1,3,12,39,125,397,1260,12710,1260,397,125,39,12,3,1, },
- { 0,66,119,212,378,674,1201,2140,6804,2140,1201,674,378,212,119,66, },
- { 0,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119,67,37, },
- { 0,37,67,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119, },
- },
- /* pred_R real : values for general and differential */
- { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 },
- { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 },
- /* pred_R real : num dyn models for general and differential */
- 4, 4
- },
- /* entry for 21 quantization points for br_table_idx >= 2 */
- {
- /* pred_R real */
- {
- { 0,4,8,16,32,64,128,256,512,1024,2049,8198,2049,1024,512,256,128,64,32,16,8,4, },
- { 0,292,348,414,492,585,696,828,984,1171,1392,1980,1392,1171,984,828,696,585,492,414,348,292, },
- { 0,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119,84,59, },
- { 0,59,84,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119, },
- },
- /* pred_R real differential */
- {
- { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, },
- { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, },
- { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, },
- { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, },
- },
- /* pred_R real : values for general and differential */
- { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 },
- { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 },
- /* pred_R real : num dyn models for general and differential */
- 4, 4
- },
- /* entry for 31 quantization points */
- {
- /* pred real */
- {
- { 0,1,1,1,1,2,4,8,16,32,64,128,256,512,1024,2048,8188,2048,1024,512,256,128,64,32,16,8,4,2,1,1,1,1, },
- { 0,110,131,156,186,221,263,313,373,443,527,627,746,887,1055,1255,1798,1255,1055,887,746,627,527,443,373,313,263,221,186,156,131,110, },
- { 0,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20,14,10, },
- { 0,10,14,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20, }
- },
- /* pred real differential */
- {
- { 0,1,1,1,1,1,1,1,1,1,3,12,39,125,397,1260,12694,1260,397,125,39,12,3,1,1,1,1,1,1,1,1,1, },
- { 0,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1, },
- { 0,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1,1, },
- { 0,1,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1, }
- },
- /* pred real : values for general and differential */
- { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 },
- { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 },
- /* pred real : num dyn models for general and differential */
- 4, 4
- },
- /* entry for 7 quantization points for br_table_idx < 2 */
- {
- /* pred_R real */
- {
- { 0,327,778,1851,10472,1851,778,327, },
- { 0,1057,1630,2514,5982,2514,1630,1057, },
- { 0,1668,2572,6122,2572,1668,1081,701, },
- { 0,701,1081,1668,2572,6122,2572,1668, },
- },
- /* pred_R real differential */
- {
- { 0,125,399,1269,12798,1269,399,125, },
- { 0,744,1327,2365,7512,2365,1327,744, },
- { 0,1354,2413,7664,2413,1354,760,426, },
- { 0,426,760,1354,2413,7664,2413,1354, },
- },
- /* pred_R real : values for general and differential */
- { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 },
- /* pred_R real : num dyn models for general and differential */
- 4, 4
- },
- /* entry for 15 quantization points for br_table_idx < 2 */
- {
- /* pred real */
- {
- { 0,9,23,56,133,318,757,1800,10192,1800,757,318,133,56,23,9, },
- { 0,156,240,371,573,883,1363,2102,5008,2102,1363,883,573,371,240,156, },
- { 0,241,372,575,886,1367,2109,5027,2109,1367,886,575,372,241,156,101, },
- { 0,101,156,241,372,575,886,1367,2109,5027,2109,1367,886,575,372,241, }
- },
- /* pred real differential */
- {
- { 0,1,3,12,39,125,397,1260,12710,1260,397,125,39,12,3,1, },
- { 0,66,119,212,378,674,1201,2140,6804,2140,1201,674,378,212,119,66, },
- { 0,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119,67,37, },
- { 0,37,67,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119, }
- },
- /* pred real : values for general and differential */
- {-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7},
- { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 },
- /* pred real : num dyn models for general and differential */
- 4, 4
- },
- /* entry for 21 quantization points for br_table_idx < 2 */
- {
- /* pred_R real */
- {
- { 0,1,1,4,9,23,56,133,318,756,1799,10184,1799,756,318,133,56,23,9,4,1,1, },
- { 0,41,64,98,152,234,362,558,861,1329,2049,4888,2049,1329,861,558,362,234,152,98,64,41, },
- { 0,64,98,152,235,362,559,862,1330,2051,4891,2051,1330,862,559,362,235,152,98,64,41,26, },
- { 0,26,41,64,98,152,235,362,559,862,1330,2051,4891,2051,1330,862,559,362,235,152,98,64, },
- },
- /* pred_R real differential */
- {
- { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, },
- { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, },
- { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, },
- { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, },
- },
- /* pred_R real : values for general and differential */
- { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 },
- { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 },
- /* pred_R real : num dyn models for general and differential */
- 4, 4
- }
-};
-
-const ivas_freq_models_t ivas_arith_drct_r_consts[TOTAL_DRCT_QUANT_STRATS] =
-{
- /* entry for 1 quantization points */
- {
- /* drct real */
- {
- { 0,16384, },
- { 0,16384, },
- { 0,16384, },
- { 0,16384, },
- },
- /* drct real differential */
- {
- { 0,16384, },
- { 0,16384, },
- { 0,16384, },
- { 0,16384, },
- },
- /* drct real : values for general and differential */
- {0},{ 0 },
- /* drct real : num dyn models for general and differential */
- 4, 4
- },
- /* entry for 7 quantization points */
- { /* drct real */
- {
- { 0,125,399,1269,12798,1269,399,125, },
- { 0,744,1327,2365,7512,2365,1327,744, },
- { 0,988,1244,1568,1976,2489,3136,4983, },
- { 0,2111,2262,2425,2788,2425,2262,2111, },
- },
- /* drct real differential */
- {
- { 0,125,399,1269,12798,1269,399,125, },
- { 0,744,1327,2365,7512,2365,1327,744, },
- { 0,1354,2413,7664,2413,1354,760,426, },
- { 0,426,760,1354,2413,7664,2413,1354, },
- },
- /* drct real : values for general and differential */
- { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 },
- /* drct real : num dyn models for general and differential */
- 4, 4
- },
- /* entry for 9 quantization points */
- {
- /* drct real */
- {
- { 0,39,125,397,1263,12736,1263,397,125,39, },
- { 0,397,708,1262,2250,7150,2250,1262,708,397, },
- { 0,573,722,909,1146,1444,1819,2292,2888,4591, },
- { 0,1587,1701,1824,1955,2250,1955,1824,1701,1587, },
- },
- /* drct real differential */
- {
- { 0,39,125,397,1263,12736,1263,397,125,39, },
- { 0,397,708,1262,2250,7150,2250,1262,708,397, },
- { 0,716,1276,2274,7225,2274,1276,716,402,225, },
- { 0,225,402,716,1276,2274,7225,2274,1276,716, }
- },
- /* drct real : values for general and differential */
- { -4,-3,-2,-1,0,1,2,3,4 },{ -4,-3,-2,-1,0,1,2,3,4 },
- /* drct real : num dyn models for general and differential */
- 4, 4
- },
- /* entry for 11 quantization points */
- {
- /* drct real */
- {
- { 0,12,39,125,397,1261,12716,1261,397,125,39,12, },
- { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, },
- { 0,343,433,546,687,866,1092,1375,1733,2184,2751,4374, },
- { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, },
- },
- /* drct real differential */
- {
- { 0,12,39,125,397,1261,12716,1261,397,125,39,12, },
- { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, },
- { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, },
- { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, },
- },
- /* drct real : values for general and differential */
- { -5,-4,-3,-2,-1,0,1,2,3,4,5 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 },
- /* drct real : num dyn models for general and differential */
- 4, 4
- }
-};
-
-const ivas_freq_models_t ivas_arith_decd_r_consts[TOTAL_DECD_QUANT_STRATS] =
-{
- /* entry for 1 quantization points */
- {
- /* decd real */
- {
- { 0,16384, },
- { 0,16384, },
- { 0,16384, },
- { 0,16384, },
- },
- /* decd real differential */
- {
- { 0,16384, },
- { 0,16384, },
- { 0,16384, },
- { 0,16384, },
- },
- /* decd real : values for general and differential */
- { 0 },{ 0 },
- /* decd real : num dyn models for general and differential */
- 4, 4
- },
- /* entry for 3 quantization points */
- {
- /* decd real */
- {
- { 0,11917,2978,1489, },
- { 0,8840,4419,3125, },
- { 0,4567,7250,4567, },
- { 0,5203,5978,5203, },
- },
- /* decd real differential */
- {
- { 0,1356,13672,1356, },
- { 0,3166,10052,3166, },
- { 0,10984,3459,1941, },
- { 0,1941,3459,10984, },
- },
- /* decd real : values for general and differential */
- { 0,1,2 },{-1,0,1},
- /* decd real : num dyn models for general and differential */
- 4, 4
- },
- /* entry for 5 quantization points */
- {
- /* decd real */
- {
- { 0,11157,2788,1394,697,348, },
- { 0,7186,3592,2540,1796,1270, },
- { 0,2512,3166,5028,3166,2512, },
- { 0,3048,3267,3754,3267,3048, },
- },
- /* decd real differential */
- {
- { 0,406,1289,12994,1289,406, },
- { 0,1460,2601,8262,2601,1460, },
- { 0,2707,8599,2707,1519,852, },
- { 0,852,1519,2707,8599,2707, },
- },
- /* decd real : values for general and differential */
- { 0,1,2,3,4 },{ -2,-1,0,1,2 },
- /* decd real : num dyn models for general and differential */
- 4, 4
- },
- /* entry for 7 quantization points */
- {
- /* decd real */
- {
- { 0,10983,2744,1372,686,343,171,85, },
- { 0,6573,3285,2322,1642,1161,821,580, },
- { 0,1603,2020,2546,4046,2546,2020,1603, },
- { 0,2111,2262,2425,2788,2425,2262,2111, },
- },
- /* decd real differential */
- {
- { 0,125,399,1269,12798,1269,399,125, },
- { 0,744,1327,2365,7512,2365,1327,744, },
- { 0,1354,2413,7664,2413,1354,760,426, },
- { 0,426,760,1354,2413,7664,2413,1354, }
- },
- /* decd real : values for general and differential */
- { 0,1,2,3,4,5,6 },{ -3,-2,-1,0,1,2,3 },
- /* decd real : num dyn models for general and differential */
- 4, 4
- },
- /* entry for 9 quantization points */
- { /* decd real */
- {
- { 0,10941,2734,1367,683,341,170,85,42,21, },
- { 0,6305,3150,2227,1575,1113,787,556,393,278, },
- { 0,1101,1388,1749,2203,3502,2203,1749,1388,1101, },
- { 0,1587,1701,1824,1955,2250,1955,1824,1701,1587, },
- },
- /* decd real differential */
- {
- { 0,39,125,397,1263,12736,1263,397,125,39, },
- { 0,397,708,1262,2250,7150,2250,1262,708,397, },
- { 0,716,1276,2274,7225,2274,1276,716,402,225, },
- { 0,225,402,716,1276,2274,7225,2274,1276,716, }
- },
- /* decd real : values for general and differential */
- { 0,1,2,3,4,5,6,7,8 },{ -4,-3,-2,-1,0,1,2,3,4 },
- /* decd real : num dyn models for general and differential */
- 4, 4
- },
- /* entry for 11 quantization points */
- {
- /* decd real */
- {
- { 0,10932,2731,1365,682,341,170,85,42,21,10,5, },
- { 0,6181,3086,2182,1543,1091,771,545,385,272,192,136, },
- { 0,790,995,1254,1580,1991,3164,1991,1580,1254,995,790, },
- { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, },
- },
- /* decd real differential */
- {
- { 0,12,39,125,397,1261,12716,1261,397,125,39,12, },
- { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, },
- { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, },
- { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, },
- },
- /* decd real : values for general and differential */
- { 0,1,2,3,4,5,6,7,8,9,10 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 },
- /* decd real : num dyn models for general and differential */
- 4, 4
- }
-};
-
-const ivas_huff_models_t ivas_huff_pred_r_consts[TOTAL_PRED_QUANT_STRATS_HUFF] =
-{
- /* entry for 1 quantization points for br_table_idx */
- {{{ 0 }}, {{ 0 }}},
- /* entry for 7 quantization points for br_table_idx */
- {
- /* pred_R codebook */
- { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, },
- /* pred_R differential codebook */
- { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, },
- },
- /* entry for 15 quantization points for br_table_idx */
- {
- /* pred_r codebook */
- { { -7,4,2 },{ -6,4,3 },{ -5, 4, 4 },{ -4, 4, 5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },
- { 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 } },
- /* pred_r differential codebook */
- { { -7,4,2 },{ -6,4,3 },{ -5, 4, 4 },{ -4, 4, 5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },
- { 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 } },
- },
- /* entry for 21 quantization points for br_table_idx=0 */
- {
- /* pred_r codebook */
- { {-10,5,22},{-9,5,23},{-8,5,24},{-7,5,25},{-6,5,26}, { -5, 4, 0 },{ -4, 4, 1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },
- { 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{6,5,27},{7,5,28},{8,5,29},{9,5,30},{10,5,31} },
- /* pred_r differential codebook */
- { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5, 4, 0 },{ -4, 4, 1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },
- { 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 } },
- },
-
- /* entry for 31 quantization points for br_table_idx>0 */
- {
- /* pred_r codebook */
- { {-15,5,2},{-14,5,3},{-13,5,4},{-12,5,5},{-11,5,6}, { -10,5,7 },{ -9,5,8 },{ -8,5,9 },
- { -7,5,10 },{ -6,5,11 },{ -5, 5, 12 },{ -4, 5, 13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },
- { 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },
- { 8,5,24 },{ 9,5,25 },{ 10,5,26 },{11,5,27},{12,5,28},{13,5,29},{14,5,30},{15,5,31} },
- /* pred_r differential codebook */
- { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },
- { -7,5,10 },{ -6,5,11 },{ -5, 5, 12 },{ -4, 5, 13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },
- { 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },
- { 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 } },
- },
- };
-
- const ivas_huff_models_t ivas_huff_drct_r_consts[TOTAL_DRCT_QUANT_STRATS] =
-{
- /* entry for 1 quantization points */
- {{{ 0 }}, {{ 0 }}},
- /* entry for 7 quantization points */
- {
- /* drct_r codebook */
- { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 } },
- /* drct_r differential codebook */
- { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 } },
- },
- /* entry for 9 quantization points */
- {
- /* drct_r codebook */
- { { -4, 4, 14 },{ -3,3,0 },{ -2,3,1 },{ -1,3,2 },{ 0,3,3 },{ 1,3,4 },{ 2,3,5 },{ 3,3,6 },{ 4,4,15 } },
- /* drct_r differential codebook */
- { { -4, 4, 14 },{ -3,3,0 },{ -2,3,1 },{ -1,3,2 },{ 0,3,3 },{ 1,3,4 },{ 2,3,5 },{ 3,3,6 },{ 4,4,15 } },
- },
- /* entry for 11 quantization points */
- {
- /* drct_r codebook */
- { { -5, 4, 10 },{ -4, 4, 11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 } },
- /* drct_r differential codebook */
- { { -5, 4, 10 },{ -4, 4, 11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 } },
- },
-};
-
-const ivas_huff_models_t ivas_huff_decd_r_consts[TOTAL_DECD_QUANT_STRATS] =
-{
- /* entry for 1 quantization points */
- {{{ 0 }}, {{ 0 }}},
- /* entry for 3 quantization points */
- {
- /* decd_r codebook */
- { { 0, 2, 2 },{ 1, 1, 0 },{ 2,2,3 } },
- /* decd_r differential codebook */
- { { -1, 2, 2 },{ 0, 1, 0 },{ 1,2,3 } },
- },
- /* entry for 5 quantization points */
- {
- /* decd_r codebook */
- { { 0,3,6 },{ 1,2,0 },{ 2,2,1 },{ 3,2,2 },{ 4,3,7 } },
- /* decd_r differential codebook */
- { { -2,3,6 },{ -1,2,0 },{ 0,2,1 },{ 1,2,2 },{ 2,3,7 } },
- },
- /* entry for 7 quantization points */
- {
- /* decd_r */
- { { 0, 3, 2 },{ 1, 3, 3 },{ 2,3,4 },{ 3,3,0 },{ 4,3,5 },{ 5,3,6 },{ 6,3,7 } },
- /* decd_r codebook differential codebook */
- { { -3, 3, 2 },{ -2, 3, 3 },{ -1,3,4 },{ 0,3,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 } },
- },
- /* entry for 9 quantization points */
- {
- /* decd_r codebook */
- { { 0, 4, 14 },{ 1,3,0 },{ 2,3,1 },{ 3,3,2 },{ 4,3,3 },{ 5,3,4 },{ 6,3,5 },{ 7,3,6 },{ 8,4,15 } },
- /* decd_r differential codebook */
- { { -4, 4, 14 },{ -3,3,0 },{ -2,3,1 },{ -1,3,2 },{ 0,3,3 },{ 1,3,4 },{ 2,3,5 },{ 3,3,6 },{ 4,4,15 } },
- },
- /* entry for 11 quantization points */
- {
- /* decd_r codebook */
- { { 0, 4, 10 },{ 1, 4, 11 },{ 2,4,12 },{ 3,3,0 },{ 4,3,1 },{ 5,3,2 },{ 6,3,3 },{ 7,3,4 },{ 8,4,13 },{ 9,4,14 },{ 10,4,15 } },
- /* decd_r differential codebook */
- { { -5, 4, 10 },{ -4, 4, 11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 } },
- },
-};
-
-/* DTX quantization and bitstream constants */
-
-const Word16 dtx_pd_real_q_levels[3][3] = { { 7,7,7 },{ 7,7,0 },{ 3,0,0 } };
-const Word16 dtx_pr_real_q_levels[3][3] = { { 9,9,9 },{ 9,7,9 },{ 9,5,7 } };
-const Word16 pr_pr_idx_pairs[3][3][2] = { { { 0, 0 },{ 0, 0 },{ 0, 0 } },{ { 0, 0 },{ 0, 0 },{ 0, 0 } },{ { 0, 0 },{ 1, 3 },{ 0, 0 } } };
-const Word16 pr_pd_idx_pairs[3][3][2] = { { { 1, 1 },{ 2, 2 },{ 3, 3 } },{ { 1, 1 },{ 3, 2 },{ 2, 0 } },{ { 2, 1 },{ 0, 0 },{ 0, 0 } } };
-
-const Word16 remix_order_set[1][DIRAC_MAX_ANA_CHANS] = { /* WYZX --> WYXZ... */
- { 0, 1, 3, 2, 4, 5, 6, 7, 8, 9, 10 }
-};
-
-const Word16 HOA_keep_ind[IVAS_SPAR_MAX_FB_IN_CHAN] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15};
-const Word16 HOA_keep_ind_spar[IVAS_SPAR_MAX_CH] = {0, 1, 2, 3, 4, 8, 9, 10, 10, 10, 10};
-const Word16 HOA_keep_ind_spar512[IVAS_SPAR_MAX_CH] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
-
-
-/*----------------------------------------------------------------------*
-* PCA ROM tables
-*-----------------------------------------------------------------------*/
-
-const Word32 ivas_pca_offset_index1[IVAS_PCA_N1 + 1] =
-{
- 0, 1, 9, 61, 163, 359, 685, 1125, 1747,
- 2519, 3521, 4713, 6183, 7883, 9809, 12093, 14633, 17575,
- 20807, 24343, 28181, 32487, 37121, 42097, 47405, 53057, 59061,
- 65421, 72137, 79205, 86625, 94415, 102345, 110629, 119263, 128017,
- 137097, 146515, 156043, 165637, 175551, 185515, 195535, 205837, 216183,
- 226545, 236911, 247273, 257619, 267921, 277941, 287905, 297819, 307413,
- 316941, 326359, 335439, 344193, 352827, 361111, 369041, 376831, 384251,
- 391319, 398035, 404395, 410399, 416051, 421359, 426335, 430969, 435275,
- 439113, 442649, 445881, 448823, 451363, 453647, 455573, 457273, 458743,
- 459935, 460937, 461709, 462331, 462771, 463097, 463293, 463395, 463447,
- 463455, 463456
-};
-
-const Word16 ivas_pca_offset_index2[2692] =
-{
- 0, 1, 0, 1, 7, 8, 0, 1, 7, 19,
- 33, 45, 51, 52, 0, 1, 9, 23, 41, 61,
- 79, 93, 101, 102, 0, 1, 7, 21, 39, 61,
- 85, 111, 135, 157, 175, 189, 195, 196, 0, 1,
- 7, 19, 37, 59, 85, 115, 147, 179, 211, 241,
- 267, 289, 307, 319, 325, 326, 0, 1, 7, 21,
- 41, 65, 95, 127, 163, 201, 239, 277, 313, 345,
- 375, 399, 419, 433, 439, 440, 0, 1, 7, 19,
- 37, 61, 91, 125, 163, 203, 245, 289, 333, 377,
- 419, 459, 497, 531, 561, 585, 603, 615, 621, 622,
- 0, 1, 7, 21, 41, 67, 97, 133, 173, 217,
- 263, 311, 361, 411, 461, 509, 555, 599, 639, 675,
- 705, 731, 751, 765, 771, 772, 0, 1, 7, 19,
- 37, 61, 91, 127, 167, 211, 259, 309, 363, 417,
- 473, 529, 585, 639, 693, 743, 791, 835, 875, 911,
- 941, 965, 983, 995, 1001, 1002, 0, 1, 7, 21,
- 41, 67, 99, 135, 177, 223, 273, 327, 383, 443,
- 503, 565, 627, 689, 749, 809, 865, 919, 969, 1015,
- 1057, 1093, 1125, 1151, 1171, 1185, 1191, 1192, 0, 1,
- 7, 19, 37, 61, 91, 127, 169, 215, 265, 319,
- 377, 437, 501, 567, 633, 701, 769, 837, 903, 969,
- 1033, 1093, 1151, 1205, 1255, 1301, 1343, 1379, 1409, 1433,
- 1451, 1463, 1469, 1470, 0, 1, 7, 21, 41, 67,
- 99, 137, 179, 227, 279, 335, 395, 459, 525, 595,
- 667, 739, 813, 887, 961, 1033, 1105, 1175, 1241, 1305,
- 1365, 1421, 1473, 1521, 1563, 1601, 1633, 1659, 1679, 1693,
- 1699, 1700, 0, 1, 9, 23, 43, 69, 101, 139,
- 183, 231, 285, 343, 405, 471, 541, 613, 689, 765,
- 843, 923, 1003, 1083, 1161, 1237, 1313, 1385, 1455, 1521,
- 1583, 1641, 1695, 1743, 1787, 1825, 1857, 1883, 1903, 1917,
- 1925, 1926, 0, 1, 7, 21, 41, 67, 99, 137,
- 179, 227, 281, 339, 401, 467, 537, 611, 687, 767,
- 849, 931, 1015, 1099, 1185, 1269, 1353, 1435, 1517, 1597,
- 1673, 1747, 1817, 1883, 1945, 2003, 2057, 2105, 2147, 2185,
- 2217, 2243, 2263, 2277, 2283, 2284, 0, 1, 7, 21,
- 41, 67, 99, 137, 181, 231, 285, 345, 409, 477,
- 549, 625, 705, 787, 871, 957, 1045, 1135, 1225, 1315,
- 1405, 1495, 1583, 1669, 1753, 1835, 1915, 1991, 2063, 2131,
- 2195, 2255, 2309, 2359, 2403, 2441, 2473, 2499, 2519, 2533,
- 2539, 2540, 0, 1, 7, 19, 39, 65, 97, 135,
- 177, 225, 279, 337, 401, 469, 541, 617, 697, 781,
- 867, 955, 1045, 1137, 1231, 1327, 1423, 1519, 1615, 1711,
- 1805, 1897, 1987, 2075, 2161, 2245, 2325, 2401, 2473, 2541,
- 2605, 2663, 2717, 2765, 2807, 2845, 2877, 2903, 2923, 2935,
- 2941, 2942, 0, 1, 7, 21, 41, 67, 99, 137,
- 181, 229, 283, 343, 407, 477, 551, 629, 711, 797,
- 885, 977, 1071, 1167, 1265, 1365, 1465, 1565, 1667, 1767,
- 1867, 1967, 2065, 2161, 2255, 2347, 2435, 2521, 2603, 2681,
- 2755, 2825, 2889, 2949, 3003, 3051, 3095, 3133, 3165, 3191,
- 3211, 3225, 3231, 3232, 0, 1, 7, 21, 41, 67,
- 99, 137, 181, 231, 287, 347, 413, 483, 559, 639,
- 723, 811, 903, 997, 1093, 1193, 1295, 1399, 1503, 1609,
- 1715, 1821, 1927, 2033, 2137, 2241, 2343, 2443, 2539, 2633,
- 2725, 2813, 2897, 2977, 3053, 3123, 3189, 3249, 3305, 3355,
- 3399, 3437, 3469, 3495, 3515, 3529, 3535, 3536, 0, 1,
- 7, 21, 41, 67, 99, 137, 181, 231, 287, 349,
- 415, 487, 563, 645, 731, 821, 915, 1011, 1111, 1213,
- 1317, 1423, 1531, 1641, 1751, 1863, 1975, 2087, 2197, 2307,
- 2415, 2521, 2625, 2727, 2827, 2923, 3017, 3107, 3193, 3275,
- 3351, 3423, 3489, 3551, 3607, 3657, 3701, 3739, 3771, 3797,
- 3817, 3831, 3837, 3838, 0, 1, 7, 21, 41, 67,
- 99, 137, 181, 231, 285, 345, 411, 481, 557, 637,
- 721, 809, 901, 997, 1097, 1199, 1305, 1413, 1523, 1635,
- 1749, 1863, 1979, 2095, 2211, 2327, 2443, 2557, 2671, 2783,
- 2893, 3001, 3107, 3209, 3309, 3405, 3497, 3585, 3669, 3749,
- 3825, 3895, 3961, 4021, 4075, 4125, 4169, 4207, 4239, 4265,
- 4285, 4299, 4305, 4306, 0, 1, 7, 21, 41, 67,
- 99, 137, 181, 231, 287, 347, 413, 485, 561, 643,
- 729, 819, 913, 1011, 1113, 1217, 1325, 1435, 1547, 1663,
- 1779, 1897, 2017, 2137, 2257, 2377, 2497, 2617, 2737, 2855,
- 2971, 3087, 3199, 3309, 3417, 3521, 3623, 3721, 3815, 3905,
- 3991, 4073, 4149, 4221, 4287, 4347, 4403, 4453, 4497, 4535,
- 4567, 4593, 4613, 4627, 4633, 4634, 0, 1, 7, 21,
- 41, 67, 99, 137, 181, 231, 287, 349, 415, 487,
- 565, 647, 733, 825, 921, 1021, 1125, 1231, 1341, 1453,
- 1569, 1687, 1807, 1929, 2051, 2175, 2299, 2425, 2551, 2677,
- 2801, 2925, 3047, 3169, 3289, 3407, 3523, 3635, 3745, 3851,
- 3955, 4055, 4151, 4243, 4329, 4411, 4489, 4561, 4627, 4689,
- 4745, 4795, 4839, 4877, 4909, 4935, 4955, 4969, 4975, 4976,
- 0, 1, 7, 21, 41, 67, 99, 137, 181, 231,
- 287, 349, 417, 489, 567, 649, 737, 829, 925, 1025,
- 1129, 1237, 1349, 1463, 1581, 1701, 1823, 1947, 2073, 2201,
- 2329, 2459, 2589, 2719, 2849, 2979, 3107, 3235, 3361, 3485,
- 3607, 3727, 3845, 3959, 4071, 4179, 4283, 4383, 4479, 4571,
- 4659, 4741, 4819, 4891, 4959, 5021, 5077, 5127, 5171, 5209,
- 5241, 5267, 5287, 5301, 5307, 5308, 0, 1, 7, 21,
- 41, 67, 99, 137, 181, 231, 287, 349, 417, 489,
- 567, 651, 739, 831, 929, 1031, 1137, 1247, 1361, 1477,
- 1597, 1719, 1843, 1969, 2097, 2227, 2359, 2491, 2625, 2759,
- 2893, 3027, 3161, 3293, 3425, 3555, 3683, 3809, 3933, 4055,
- 4175, 4291, 4405, 4515, 4621, 4723, 4821, 4913, 5001, 5085,
- 5163, 5235, 5303, 5365, 5421, 5471, 5515, 5553, 5585, 5611,
- 5631, 5645, 5651, 5652, 0, 1, 7, 21, 41, 67,
- 99, 137, 181, 231, 287, 349, 417, 491, 569, 653,
- 741, 835, 933, 1035, 1141, 1251, 1365, 1483, 1603, 1727,
- 1853, 1983, 2115, 2249, 2383, 2519, 2657, 2795, 2933, 3071,
- 3209, 3347, 3485, 3621, 3755, 3889, 4021, 4151, 4277, 4401,
- 4521, 4639, 4753, 4863, 4969, 5071, 5169, 5263, 5351, 5435,
- 5513, 5587, 5655, 5717, 5773, 5823, 5867, 5905, 5937, 5963,
- 5983, 5997, 6003, 6004, 0, 1, 7, 21, 41, 67,
- 99, 137, 181, 231, 287, 349, 417, 491, 569, 653,
- 741, 835, 933, 1037, 1145, 1257, 1373, 1491, 1613, 1739,
- 1867, 1997, 2131, 2267, 2405, 2543, 2683, 2825, 2967, 3109,
- 3251, 3393, 3535, 3677, 3817, 3955, 4093, 4229, 4363, 4493,
- 4621, 4747, 4869, 4987, 5103, 5215, 5323, 5427, 5525, 5619,
- 5707, 5791, 5869, 5943, 6011, 6073, 6129, 6179, 6223, 6261,
- 6293, 6319, 6339, 6353, 6359, 6360, 0, 1, 7, 21,
- 41, 67, 99, 137, 181, 231, 287, 349, 417, 491,
- 569, 653, 743, 837, 935, 1039, 1147, 1259, 1375, 1495,
- 1619, 1745, 1875, 2007, 2143, 2281, 2421, 2563, 2705, 2849,
- 2993, 3139, 3285, 3431, 3577, 3723, 3867, 4011, 4153, 4295,
- 4435, 4573, 4709, 4841, 4971, 5097, 5221, 5341, 5457, 5569,
- 5677, 5781, 5879, 5973, 6063, 6147, 6225, 6299, 6367, 6429,
- 6485, 6535, 6579, 6617, 6649, 6675, 6695, 6709, 6715, 6716,
- 0, 1, 7, 21, 41, 67, 99, 137, 181, 231,
- 287, 349, 417, 491, 569, 653, 743, 837, 937, 1041,
- 1149, 1261, 1377, 1497, 1621, 1749, 1879, 2013, 2149, 2287,
- 2429, 2573, 2717, 2863, 3011, 3159, 3309, 3459, 3609, 3759,
- 3909, 4057, 4205, 4351, 4495, 4639, 4781, 4919, 5055, 5189,
- 5319, 5447, 5571, 5691, 5807, 5919, 6027, 6131, 6231, 6325,
- 6415, 6499, 6577, 6651, 6719, 6781, 6837, 6887, 6931, 6969,
- 7001, 7027, 7047, 7061, 7067, 7068, 0, 1, 7, 21,
- 41, 67, 99, 137, 181, 231, 287, 349, 417, 491,
- 569, 653, 743, 837, 937, 1041, 1149, 1261, 1377, 1497,
- 1621, 1749, 1881, 2015, 2153, 2293, 2435, 2579, 2725, 2873,
- 3023, 3175, 3327, 3479, 3633, 3787, 3941, 4093, 4245, 4397,
- 4547, 4695, 4841, 4985, 5127, 5267, 5405, 5539, 5671, 5799,
- 5923, 6043, 6159, 6271, 6379, 6483, 6583, 6677, 6767, 6851,
- 6929, 7003, 7071, 7133, 7189, 7239, 7283, 7321, 7353, 7379,
- 7399, 7413, 7419, 7420, 0, 1, 7, 21, 41, 67,
- 99, 137, 181, 231, 287, 349, 417, 489, 567, 651,
- 741, 835, 935, 1039, 1147, 1259, 1377, 1499, 1625, 1753,
- 1885, 2021, 2159, 2301, 2445, 2591, 2739, 2889, 3041, 3195,
- 3349, 3505, 3661, 3817, 3973, 4129, 4285, 4441, 4595, 4749,
- 4901, 5051, 5199, 5345, 5489, 5631, 5769, 5905, 6037, 6165,
- 6291, 6413, 6531, 6643, 6751, 6855, 6955, 7049, 7139, 7223,
- 7301, 7373, 7441, 7503, 7559, 7609, 7653, 7691, 7723, 7749,
- 7769, 7783, 7789, 7790, 0, 1, 7, 21, 41, 67,
- 99, 137, 181, 231, 287, 349, 417, 491, 571, 657,
- 747, 843, 945, 1051, 1161, 1277, 1397, 1521, 1649, 1781,
- 1915, 2053, 2195, 2339, 2485, 2635, 2787, 2941, 3095, 3251,
- 3409, 3567, 3725, 3885, 4045, 4205, 4363, 4521, 4679, 4835,
- 4989, 5143, 5295, 5445, 5591, 5735, 5877, 6015, 6149, 6281,
- 6409, 6533, 6653, 6769, 6879, 6985, 7087, 7183, 7273, 7359,
- 7439, 7513, 7581, 7643, 7699, 7749, 7793, 7831, 7863, 7889,
- 7909, 7923, 7929, 7930, 0, 1, 7, 21, 41, 67,
- 99, 137, 181, 231, 287, 349, 417, 491, 571, 657,
- 747, 843, 943, 1049, 1159, 1273, 1393, 1517, 1645, 1777,
- 1913, 2051, 2193, 2337, 2485, 2635, 2787, 2941, 3097, 3255,
- 3415, 3575, 3737, 3899, 4061, 4223, 4385, 4547, 4709, 4869,
- 5029, 5187, 5343, 5497, 5649, 5799, 5947, 6091, 6233, 6371,
- 6507, 6639, 6767, 6891, 7011, 7125, 7235, 7341, 7441, 7537,
- 7627, 7713, 7793, 7867, 7935, 7997, 8053, 8103, 8147, 8185,
- 8217, 8243, 8263, 8277, 8283, 8284, 0, 1, 7, 21,
- 41, 67, 99, 137, 181, 231, 287, 349, 417, 491,
- 571, 655, 745, 841, 941, 1047, 1157, 1271, 1389, 1513,
- 1641, 1773, 1907, 2045, 2187, 2331, 2479, 2629, 2783, 2939,
- 3097, 3257, 3417, 3579, 3743, 3907, 4071, 4235, 4399, 4563,
- 4727, 4891, 5055, 5217, 5377, 5537, 5695, 5851, 6005, 6155,
- 6303, 6447, 6589, 6727, 6861, 6993, 7121, 7245, 7363, 7477,
- 7587, 7693, 7793, 7889, 7979, 8063, 8143, 8217, 8285, 8347,
- 8403, 8453, 8497, 8535, 8567, 8593, 8613, 8627, 8633, 8634,
- 0, 1, 7, 21, 41, 67, 99, 137, 181, 231,
- 287, 349, 417, 491, 571, 657, 749, 845, 947, 1053,
- 1165, 1281, 1401, 1527, 1657, 1791, 1929, 2069, 2213, 2361,
- 2511, 2663, 2819, 2977, 3137, 3299, 3463, 3627, 3793, 3959,
- 4125, 4293, 4461, 4629, 4795, 4961, 5127, 5291, 5455, 5617,
- 5777, 5935, 6091, 6243, 6393, 6541, 6685, 6825, 6963, 7097,
- 7227, 7353, 7473, 7589, 7701, 7807, 7909, 8005, 8097, 8183,
- 8263, 8337, 8405, 8467, 8523, 8573, 8617, 8655, 8687, 8713,
- 8733, 8747, 8753, 8754, 0, 1, 7, 21, 41, 67,
- 99, 137, 181, 231, 287, 349, 417, 491, 571, 657,
- 747, 843, 943, 1049, 1159, 1275, 1395, 1519, 1647, 1779,
- 1915, 2055, 2199, 2345, 2495, 2647, 2803, 2961, 3121, 3283,
- 3447, 3613, 3779, 3947, 4115, 4285, 4455, 4625, 4795, 4965,
- 5133, 5301, 5467, 5633, 5797, 5959, 6119, 6277, 6433, 6585,
- 6735, 6881, 7025, 7165, 7301, 7433, 7561, 7685, 7805, 7921,
- 8031, 8137, 8237, 8333, 8423, 8509, 8589, 8663, 8731, 8793,
- 8849, 8899, 8943, 8981, 9013, 9039, 9059, 9073, 9079, 9080,
- 0, 1, 7, 19, 39, 65, 97, 135, 179, 229,
- 285, 347, 415, 489, 567, 651, 741, 835, 935, 1041,
- 1151, 1265, 1385, 1509, 1637, 1769, 1905, 2045, 2189, 2335,
- 2485, 2637, 2793, 2951, 3111, 3273, 3437, 3603, 3771, 3939,
- 4109, 4279, 4451, 4623, 4795, 4967, 5139, 5309, 5479, 5647,
- 5815, 5981, 6145, 6307, 6467, 6625, 6781, 6933, 7083, 7229,
- 7373, 7513, 7649, 7781, 7909, 8033, 8153, 8267, 8377, 8483,
- 8583, 8677, 8767, 8851, 8929, 9003, 9071, 9133, 9189, 9239,
- 9283, 9321, 9353, 9379, 9399, 9411, 9417, 9418, 0, 1,
- 7, 21, 41, 67, 99, 137, 181, 231, 287, 349,
- 417, 491, 571, 657, 747, 843, 945, 1051, 1163, 1279,
- 1399, 1525, 1655, 1789, 1927, 2069, 2213, 2361, 2513, 2667,
- 2825, 2985, 3147, 3311, 3477, 3645, 3815, 3985, 4157, 4329,
- 4503, 4677, 4851, 5025, 5199, 5371, 5543, 5713, 5883, 6051,
- 6217, 6381, 6543, 6703, 6861, 7015, 7167, 7315, 7459, 7601,
- 7739, 7873, 8003, 8129, 8249, 8365, 8477, 8583, 8685, 8781,
- 8871, 8957, 9037, 9111, 9179, 9241, 9297, 9347, 9391, 9429,
- 9461, 9487, 9507, 9521, 9527, 9528, 0, 1, 7, 21,
- 41, 67, 99, 137, 181, 231, 287, 349, 417, 491,
- 571, 657, 749, 845, 947, 1055, 1167, 1285, 1407, 1533,
- 1663, 1797, 1935, 2077, 2223, 2373, 2525, 2681, 2839, 3001,
- 3165, 3331, 3499, 3669, 3839, 4011, 4185, 4359, 4533, 4709,
- 4885, 5061, 5235, 5409, 5583, 5755, 5925, 6095, 6263, 6429,
- 6593, 6755, 6913, 7069, 7221, 7371, 7517, 7659, 7797, 7931,
- 8061, 8187, 8309, 8427, 8539, 8647, 8749, 8845, 8937, 9023,
- 9103, 9177, 9245, 9307, 9363, 9413, 9457, 9495, 9527, 9553,
- 9573, 9587, 9593, 9594, 0, 1, 7, 21, 41, 67,
- 99, 137, 181, 231, 287, 349, 417, 491, 571, 655,
- 745, 841, 941, 1047, 1157, 1273, 1393, 1517, 1647, 1781,
- 1919, 2061, 2207, 2355, 2507, 2663, 2821, 2981, 3145, 3311,
- 3479, 3649, 3821, 3993, 4167, 4341, 4517, 4693, 4869, 5045,
- 5221, 5397, 5573, 5747, 5921, 6093, 6265, 6435, 6603, 6769,
- 6933, 7093, 7251, 7407, 7559, 7707, 7853, 7995, 8133, 8267,
- 8397, 8521, 8641, 8757, 8867, 8973, 9073, 9169, 9259, 9343,
- 9423, 9497, 9565, 9627, 9683, 9733, 9777, 9815, 9847, 9873,
- 9893, 9907, 9913, 9914, 0, 1, 7, 21, 41, 67,
- 99, 137, 181, 231, 287, 349, 417, 491, 571, 657,
- 747, 843, 945, 1051, 1163, 1279, 1401, 1527, 1657, 1791,
- 1929, 2071, 2217, 2367, 2519, 2675, 2835, 2997, 3161, 3327,
- 3495, 3665, 3837, 4011, 4185, 4361, 4537, 4715, 4893, 5071,
- 5249, 5427, 5603, 5779, 5953, 6127, 6299, 6469, 6637, 6803,
- 6967, 7129, 7289, 7445, 7597, 7747, 7893, 8035, 8173, 8307,
- 8437, 8563, 8685, 8801, 8913, 9019, 9121, 9217, 9307, 9393,
- 9473, 9547, 9615, 9677, 9733, 9783, 9827, 9865, 9897, 9923,
- 9943, 9957, 9963, 9964, 0, 1, 7, 21, 41, 67,
- 99, 137, 181, 231, 287, 349, 417, 491, 571, 657,
- 749, 845, 947, 1055, 1167, 1285, 1407, 1533, 1663, 1799,
- 1939, 2083, 2229, 2379, 2533, 2689, 2849, 3011, 3177, 3345,
- 3515, 3687, 3861, 4035, 4211, 4387, 4565, 4743, 4921, 5099,
- 5277, 5455, 5633, 5809, 5985, 6159, 6333, 6505, 6675, 6843,
- 7009, 7171, 7331, 7487, 7641, 7791, 7937, 8081, 8221, 8357,
- 8487, 8613, 8735, 8853, 8965, 9073, 9175, 9271, 9363, 9449,
- 9529, 9603, 9671, 9733, 9789, 9839, 9883, 9921, 9953, 9979,
- 9999, 10013, 10019, 10020, 0, 1, 7, 19, 39, 65,
- 97, 135, 179, 229, 285, 347, 415, 489, 567, 651,
- 741, 837, 937, 1043, 1153, 1269, 1389, 1513, 1643, 1777,
- 1915, 2057, 2203, 2351, 2503, 2659, 2817, 2979, 3143, 3309,
- 3477, 3647, 3819, 3993, 4169, 4345, 4523, 4701, 4881, 5061,
- 5241, 5421, 5601, 5779, 5957, 6133, 6309, 6483, 6655, 6825,
- 6993, 7159, 7323, 7485, 7643, 7799, 7951, 8099, 8245, 8387,
- 8525, 8659, 8789, 8913, 9033, 9149, 9259, 9365, 9465, 9561,
- 9651, 9735, 9813, 9887, 9955, 10017, 10073, 10123, 10167, 10205,
- 10237, 10263, 10283, 10295, 10301, 10302, 0, 1, 7, 21,
- 41, 67, 99, 137, 181, 231, 287, 349, 417, 491,
- 571, 655, 745, 841, 941, 1047, 1159, 1275, 1395, 1521,
- 1651, 1785, 1923, 2065, 2211, 2361, 2513, 2669, 2829, 2991,
- 3155, 3321, 3491, 3663, 3837, 4011, 4187, 4365, 4543, 4723,
- 4903, 5083, 5263, 5443, 5623, 5803, 5981, 6159, 6335, 6509,
- 6683, 6855, 7025, 7191, 7355, 7517, 7677, 7833, 7985, 8135,
- 8281, 8423, 8561, 8695, 8825, 8951, 9071, 9187, 9299, 9405,
- 9505, 9601, 9691, 9775, 9855, 9929, 9997, 10059, 10115, 10165,
- 10209, 10247, 10279, 10305, 10325, 10339, 10345, 10346, 0, 1,
- 7, 21, 41, 67, 99, 137, 181, 231, 287, 349,
- 417, 491, 571, 655, 745, 841, 943, 1049, 1161, 1277,
- 1397, 1523, 1653, 1787, 1925, 2067, 2213, 2363, 2517, 2673,
- 2833, 2995, 3159, 3327, 3497, 3669, 3843, 4019, 4195, 4373,
- 4551, 4731, 4911, 5091, 5271, 5451, 5631, 5811, 5989, 6167,
- 6343, 6519, 6693, 6865, 7035, 7203, 7367, 7529, 7689, 7845,
- 7999, 8149, 8295, 8437, 8575, 8709, 8839, 8965, 9085, 9201,
- 9313, 9419, 9521, 9617, 9707, 9791, 9871, 9945, 10013, 10075,
- 10131, 10181, 10225, 10263, 10295, 10321, 10341, 10355, 10361, 10362,
- 0, 1, 7, 21, 41, 67, 99, 137, 181, 231,
- 287, 349, 417, 491, 571, 657, 747, 843, 945, 1051,
- 1163, 1279, 1399, 1525, 1655, 1789, 1927, 2069, 2215, 2365,
- 2519, 2675, 2835, 2997, 3161, 3329, 3499, 3671, 3845, 4021,
- 4197, 4375, 4553, 4733, 4913, 5093, 5273, 5453, 5633, 5813,
- 5991, 6169, 6345, 6521, 6695, 6867, 7037, 7205, 7369, 7531,
- 7691, 7847, 8001, 8151, 8297, 8439, 8577, 8711, 8841, 8967,
- 9087, 9203, 9315, 9421, 9523, 9619, 9709, 9795, 9875, 9949,
- 10017, 10079, 10135, 10185, 10229, 10267, 10299, 10325, 10345, 10359,
- 10365, 10366
-};
-
-const Word16 ivas_pca_offset_n2[IVAS_PCA_N1] =
-{
- 0, 2, 6, 14, 24, 38, 56, 76, 100, 126, 156, 188,
- 224, 262, 302, 346, 392, 442, 494, 548, 604, 664, 726, 790,
- 856, 924, 994, 1066, 1140, 1216, 1294, 1374, 1454, 1536, 1620, 1704,
- 1790, 1878, 1966, 2054, 2144, 2234, 2324, 2416, 2508, 2600, 2692, 2784,
- 2876, 2968, 3058, 3148, 3238, 3326, 3414, 3502, 3588, 3672, 3756, 3838,
- 3918, 3998, 4076, 4152, 4226, 4298, 4368, 4436, 4502, 4566, 4628, 4688,
- 4744, 4798, 4850, 4900, 4946, 4990, 5030, 5068, 5104, 5136, 5166, 5192,
- 5216, 5236, 5254, 5268, 5278, 5286, 5290
-};
-
-const Word16 ph1_q_n2_tbl[IVAS_PCA_N1][2] = { /* ph1_q : Q13, n2 : Q0 */
- { 0, 1 },
- { 286, 3 },
- { 572, 7 },
- { 858, 9 },
- { 1144, 13 },
- { 1430, 17 },
- { 1716, 19 },
- { 2002, 23 },
- { 2288, 25 },
- { 2574, 29 },
- { 2860, 31 },
- { 3146, 35 },
- { 3431, 37 },
- { 3717, 39 },
- { 4003, 43 },
- { 4289, 45 },
- { 4575, 49 },
- { 4861, 51 },
- { 5147, 53 },
- { 5433, 55 },
- { 5719, 59 },
- { 6005, 61 },
- { 6291, 63 },
- { 6577, 65 },
- { 6863, 67 },
- { 7149, 69 },
- { 7435, 71 },
- { 7721, 73 },
- { 8007, 75 },
- { 8293, 77 },
- { 8579, 79 },
- { 8865, 79 },
- { 9151, 81 },
- { 9437, 83 },
- { 9722, 83 },
- { 10008, 85 },
- { 10294, 87 },
- { 10580, 87 },
- { 10866, 87 },
- { 11152, 89 },
- { 11438, 89 },
- { 11724, 89 },
- { 12010, 91 },
- { 12296, 91 },
- { 12582, 91 },
- { 12868, 91 },
- { 13154, 91 },
- { 13440, 91 },
- { 13726, 91 },
- { 14012, 89 },
- { 14298, 89 },
- { 14584, 89 },
- { 14870, 87 },
- { 15156, 87 },
- { 15442, 87 },
- { 15728, 85 },
- { 16013, 83 },
- { 16299, 83 },
- { 16585, 81 },
- { 16871, 79 },
- { 17157, 79 },
- { 17443, 77 },
- { 17729, 75 },
- { 18015, 73 },
- { 18301, 71 },
- { 18587, 69 },
- { 18873, 67 },
- { 19159, 65 },
- { 19445, 63 },
- { 19731, 61 },
- { 20017, 59 },
- { 20303, 55 },
- { 20589, 53 },
- { 20875, 51 },
- { 21161, 49 },
- { 21447, 45 },
- { 21733, 43 },
- { 22019, 39 },
- { 22304, 37 },
- { 22590, 35 },
- { 22876, 31 },
- { 23162, 29 },
- { 23448, 25 },
- { 23734, 23 },
- { 24020, 19 },
- { 24306, 17 },
- { 24592, 13 },
- { 24878, 9 },
- { 25164, 7 },
- { 25450, 3 },
- { 25736, 1 }
-};
-
-
-/*----------------------------------------------------------------------------------*
- * Parametric MC ROM tables
- *----------------------------------------------------------------------------------*/
-
-const Word16 param_mc_band_grouping_20[20 + 1] =
-{
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 17, 20, 23, 27, 33, 40, 52, 60
-};
-
-const Word16 param_mc_coding_band_mapping_20[20] =
-{
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-const Word16 param_mc_bands_coded_20[4] =
-{
- 10, 14, 18, 20
-};
-
-const Word16 param_mc_band_grouping_14[14 + 1] =
-{
- 0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 16, 20, 28, 40, 60
-};
-
-const Word16 param_mc_coding_band_mapping_14[14] =
-{
- 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0
-};
-
-const Word16 param_mc_bands_coded_14[4] =
-{
- 8, 11, 13, 14
-};
-
-const Word16 param_mc_band_grouping_10[10 + 1] =
-{
- 0, 1, 2, 3, 5, 7, 10, 14, 20, 40, 60
-};
-
-
-const Word16 param_mc_bands_coded_10[4] =
-{
- 6, 8, 9, 10
-};
-
-const Word16 param_mc_coding_band_mapping_10[10] =
-{
- 1, 1, 1, 1, 1, 0, 0, 0, 0, 0
-};
-
-const Word16 Param_MC_index[MAX_CICP_CHANNELS] =
-{
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
-};
-
-
-const Word32 ivas_param_mc_dmx_fac_CICP6_2tc_fx[12] =
-{
- 2147483647,0,1518500224,1518500224,2147483647,0, /*Lt*/
- 0,2147483647,1518500224,1518500224,0,2147483647 /*Rt*/
-};
-
-const Word32 ivas_param_mc_dmx_fac_CICP12_2tc_fx[16] =
-{
- 2147483647,0,1518500224,1518500224,2147483647,0,2147483647,0, /*Lt*/
- 0,2147483647,1518500224,1518500224,0,2147483647,0,2147483647 /*Rt*/
-};
-
-const Word32 ivas_param_mc_dmx_fac_CICP12_3tc_fx[24] =
-{
- 2147483647,0,0,0,2147483647,0,2147483647,0, /*Lt*/
- 0,2147483647,0,0,0,2147483647,0,2147483647, /*Rt*/
- 0,0,2147483647,2147483647,0,0,0,0 /*Ct*/
-};
-
-const Word32 ivas_param_mc_dmx_fac_CICP14_2tc_fx[16] =
-{
- 2147483647,0,1518500224,1518500224,2147483647,0,2147483647,0, /*Lt*/
- 0,2147483647,1518500224,1518500224,0,2147483647,0,2147483647 /*Rt*/
-};
-const Word32 ivas_param_mc_dmx_fac_CICP14_3tc_fx[24] =
-{
- 2147483647,0,0,0,2147483647,0,2147483647,0, /*Lt*/
- 0,2147483647,0,0,0,2147483647,0,2147483647, /*Rt*/
- 0,0,2147483647,2147483647,0,0,0,0 /*Ct*/
-};
-
-const Word32 ivas_param_mc_dmx_fac_CICP16_3tc_fx[30] =
-{
- 2147483647,0,0,0,2147483647,0,2147483647,0,2147483647,0, /*Lt*/
- 0,2147483647,0,0,0,2147483647,0,2147483647,0,2147483647, /*Rt*/
- 0,0,2147483647,2147483647,0,0,0,0,0,0 /*Ct*/
-};
-
-const Word32 ivas_param_mc_dmx_fac_CICP19_3tc_fx[36] =
-{
- 2147483647,0,0,0,2147483647,0,2147483647,0,2147483647,0,2147483647,0, /*Lt*/
- 0,2147483647,0,0,0,2147483647,0,2147483647,0,2147483647,0,2147483647, /*Rt*/
- 0,0,2147483647,2147483647,0,0,0,0,0,0,0,0 /*Ct*/
-};
-
-
-//Q15
-const Word16 ivas_param_mc_ild_fac_CICP6_2tc_fx[6] =
-{
- 12832,
- 12832,
- 6820,
- 10607,
- 10607,
- 6820
-};
-
-//Q15
-const Word16 ivas_param_mc_ild_fac_CICP12_2tc_fx[8] =
-{
- 11965,
- 11965,
- 6816,
- 6877,
- 6877,
- 5619,
- 5619,
- 6816
-};
-
-//Q15
-const Word16 ivas_param_mc_ild_fac_CICP12_3tc_fx[8] =
-{
- 16384,
- 16384,
- 9502,
- 9502,
- 6553,
- 6553,
- 32767,
- 8192
-};
-//Q15
-const Word16 ivas_param_mc_ild_fac_CICP14_2tc_fx[8] =
-{
- 11936,
- 11936,
- 5993,
- 6945,
- 6945,
- 8049,
- 8049,
- 6816
-};
-
-//Q15
-const Word16 ivas_param_mc_ild_fac_CICP14_3tc_fx[8] =
-{
- 16291,
- 16291,
- 8257,
- 8257,
- 9666,
- 9666,
- 32767,
- 8192
-};
-
-//Q15
-const Word16 ivas_param_mc_ild_fac_CICP16_3tc_fx[10] =
-{
- 11141,
- 11141,
- 7209,
- 7209,
- 6553,
- 6553,
- 5898,
- 5898,
- 32767,
- 8192
-};
-
-//Q15
-const Word16 ivas_param_mc_ild_fac_CICP19_3tc_fx[12] =
-{
- 9830,
- 9830,
- 5570,
- 5570,
- 3932,
- 3932,
- 6226,
- 6226,
- 6226,
- 6226,
- 32767,
- 16384
-};
-
-const PARAM_MC_ILD_MAPPING ivas_param_mc_ild_mapping_CICP6_2tc =
-{
- 5,
- 6,
- {0,1,2,4,5,3},
- {1,1,2,1,1,2},
- {{0},{1},{0,1},{0},{1},{0,1}}
-};
-
-const PARAM_MC_ILD_MAPPING ivas_param_mc_ild_mapping_CICP12_2tc =
-{
- 7,
- 8,
- {0,1,2,4,5,6,7,3},
- {1,1,2,1,1,1,1,2},
- {{0},{1},{0,1},{0},{1},{0},{1},{0,1}}
-};
-
-const PARAM_MC_ILD_MAPPING ivas_param_mc_ild_mapping_CICP12_3tc =
-{
- 6,
- 8,
- {0,1,4,5,6,7,2,3},
- {1,1,1,1,1,1,1,1},
- {{0},{1},{0},{1},{0},{1},{2},{2}}
-};
-
-const PARAM_MC_ILD_MAPPING ivas_param_mc_ild_mapping_CICP14_2tc =
-{
- 7,
- 8,
- {0,1,2,4,5,6,7,3},
- {1,1,2,1,1,1,1,2},
- {{0},{1},{0,1},{0},{1},{0},{1},{0,1}}
-};
-
-const PARAM_MC_ILD_MAPPING ivas_param_mc_ild_mapping_CICP14_3tc =
-{
- 6,
- 8,
- {0,1,4,5,6,7,2,3},
- {1,1,1,1,1,1,1,1},
- {{0},{1},{0},{1},{0},{1},{2},{2}}
-};
-
-const PARAM_MC_ILD_MAPPING ivas_param_mc_ild_mapping_CICP16_3tc =
-{
- 8,
- 10,
- {0,1,4,5,6,7,8,9,2,3},
- {1,1,1,1,1,1,1,1,1,1},
- {{0},{1},{0},{1},{0},{1},{0},{1},{2},{2}}
-};
-
-const PARAM_MC_ILD_MAPPING ivas_param_mc_ild_mapping_CICP19_3tc =
-{
- 10,
- 12,
- {0,1,4,5,6,7,8,9,10,11,2,3},
- {1,1,1,1,1,1,1,1,1,1,1,1},
- {{0},{1},{0},{1},{0},{1},{0},{1},{0},{1},{2},{2}}
-};
-
-const PARAM_MC_ICC_MAPPING ivas_param_mc_icc_mapping_CICP6_2tc =
-{
- 4,
- 5,
- { { 0, 4 }, /* L/LS */
- { 1, 5 }, /* R/RS */
- { 0, 2 }, /* L/C */
- { 1, 2 }, /* R/C */
- { 2, 3 }} /* C/LFE */
-};
-
-const PARAM_MC_ICC_MAPPING ivas_param_mc_icc_mapping_CICP12_2tc =
-{
- 6,
- 7,
- { { 0, 4 }, /* L/LS */
- { 1, 5 }, /* R/RS */
- { 0, 2 }, /* L/C */
- { 1, 2 }, /* R/C */
- { 2, 6 }, /* C/BLS */
- { 2, 7 }, /* C/BRS */
- { 2, 3 } /* C/LFE */
- }
-};
-
-const PARAM_MC_ICC_MAPPING ivas_param_mc_icc_mapping_CICP12_3tc =
-{
- 6,
- 7,
- { { 0, 4 }, /* L/LS */
- { 1, 5 }, /* R/RS */
- { 0, 2 }, /* L/C */
- { 1, 2 }, /* R/C */
- { 0, 6 }, /* L/BLS */
- { 1, 7 }, /* R/BRS */
- { 2, 3 } /* C/LFE */
- }
-};
-
-const PARAM_MC_ICC_MAPPING ivas_param_mc_icc_mapping_CICP14_2tc =
-{
- 6,
- 7,
- { { 0, 4 }, /* L/LS */
- { 1, 5 }, /* R/RS */
- { 0, 2 }, /* L/C */
- { 1, 2 }, /* R/C */
- { 2, 6 }, /* C/UFL */
- { 2, 7 }, /* C/UFR */
- { 2, 3 } /* C/LFE */
- }
-};
-const PARAM_MC_ICC_MAPPING ivas_param_mc_icc_mapping_CICP14_3tc =
-{
- 6,
- 7,
- { { 0, 4 }, /* L/LS */
- { 1, 5 }, /* R/RS */
- { 0, 2 }, /* L/C */
- { 1, 2 }, /* R/C */
- { 0, 6 }, /* L/UFL */
- { 1, 7 }, /* R/UFR */
- { 2, 3 } /* C/LFE */
- }
-};
-
-const PARAM_MC_ICC_MAPPING ivas_param_mc_icc_mapping_CICP16_3tc =
-{
- 8,
- 9,
- { { 0, 4 }, /* L/LS */
- { 1, 5 }, /* R/RS */
- { 0, 2 }, /* L/C */
- { 1, 2 }, /* R/C */
- { 0, 6 }, /* L/UFL */
- { 1, 7 }, /* R/UFR */
- { 4, 8 }, /* LS/UBL */
- { 5, 9 }, /* RS/UBR */
- { 2, 3 } /* C/LFE */
- }
-};
-
-const PARAM_MC_ICC_MAPPING ivas_param_mc_icc_mapping_CICP19_3tc =
-{
- 10,
- 11,
- { { 0, 4 }, /* L/LS */
- { 1, 5 }, /* R/RS */
- { 0, 2 }, /* L/C */
- { 1, 2 }, /* R/C */
- { 0, 6 }, /* L/LBS */
- { 1, 7 }, /* R/RBS */
- { 0, 8 }, /* L/UFL */
- { 1, 9 }, /* R/UFR */
- { 6, 10 }, /* LBS/UBL */
- { 7, 11 }, /* RBS/UBR */
- { 2, 3 } /* C/LFE */
- }
-};
-
-const PARAM_MC_CONF ivas_param_mc_conf[PARAM_MC_NUM_CONFIGS] =
-{
- /* CICP6 48000 */
- {
- MC_LS_SETUP_5_1,
- 6,
- 2,
- IVAS_48k,
- &ivas_param_mc_ild_mapping_CICP6_2tc,
- &ivas_param_mc_icc_mapping_CICP6_2tc,
- &ivas_param_mc_ild_fac_CICP6_2tc_fx[0],
- &ivas_param_mc_dmx_fac_CICP6_2tc_fx[0]
- },
- /* CICP6 64000 */
- {
- MC_LS_SETUP_5_1,
- 6,
- 2,
- IVAS_64k,
- &ivas_param_mc_ild_mapping_CICP6_2tc,
- &ivas_param_mc_icc_mapping_CICP6_2tc,
- &ivas_param_mc_ild_fac_CICP6_2tc_fx[0],
- & ivas_param_mc_dmx_fac_CICP6_2tc_fx[0]
- },
- /* CICP6 80000 */
- {
- MC_LS_SETUP_5_1,
- 6,
- 2,
- IVAS_80k,
- &ivas_param_mc_ild_mapping_CICP6_2tc,
- &ivas_param_mc_icc_mapping_CICP6_2tc,
- &ivas_param_mc_ild_fac_CICP6_2tc_fx[0],
- & ivas_param_mc_dmx_fac_CICP6_2tc_fx[0]
- },
- /* CICP12 48000 */
- {
- MC_LS_SETUP_7_1,
- 8,
- 2,
- IVAS_48k,
- &ivas_param_mc_ild_mapping_CICP12_2tc,
- &ivas_param_mc_icc_mapping_CICP12_2tc,
- &ivas_param_mc_ild_fac_CICP12_2tc_fx[0],
- &ivas_param_mc_dmx_fac_CICP12_2tc_fx[0]
- },
- /* CICP12 64000 */
- {
- MC_LS_SETUP_7_1,
- 8,
- 2,
- IVAS_64k,
- &ivas_param_mc_ild_mapping_CICP12_2tc,
- &ivas_param_mc_icc_mapping_CICP12_2tc,
- &ivas_param_mc_ild_fac_CICP12_2tc_fx[0],
- &ivas_param_mc_dmx_fac_CICP12_2tc_fx[0]
- },
- /* CICP12 80000 */
- {
- MC_LS_SETUP_7_1,
- 8,
- 2,
- IVAS_80k,
- &ivas_param_mc_ild_mapping_CICP12_2tc,
- &ivas_param_mc_icc_mapping_CICP12_2tc,
- &ivas_param_mc_ild_fac_CICP12_2tc_fx[0],
- &ivas_param_mc_dmx_fac_CICP12_2tc_fx[0],
- },
- /* CICP12 96000 */
- {
- MC_LS_SETUP_7_1,
- 8,
- 3,
- IVAS_96k,
- &ivas_param_mc_ild_mapping_CICP12_3tc,
- &ivas_param_mc_icc_mapping_CICP12_3tc,
- &ivas_param_mc_ild_fac_CICP12_3tc_fx[0],
- &ivas_param_mc_dmx_fac_CICP12_3tc_fx[0]
- },
- /* CICP14 48000 */
- {
- MC_LS_SETUP_5_1_2,
- 8,
- 2,
- IVAS_48k,
- &ivas_param_mc_ild_mapping_CICP14_2tc,
- &ivas_param_mc_icc_mapping_CICP14_2tc,
- &ivas_param_mc_ild_fac_CICP14_2tc_fx[0],
- &ivas_param_mc_dmx_fac_CICP14_2tc_fx[0]
- },
- /* CICP14 64000 */
- {
- MC_LS_SETUP_5_1_2,
- 8,
- 2,
- IVAS_64k,
- &ivas_param_mc_ild_mapping_CICP14_2tc,
- &ivas_param_mc_icc_mapping_CICP14_2tc,
- &ivas_param_mc_ild_fac_CICP14_2tc_fx[0],
- &ivas_param_mc_dmx_fac_CICP14_2tc_fx[0]
- },
- /* CICP14 80000 */
- {
- MC_LS_SETUP_5_1_2,
- 8,
- 2,
- IVAS_80k,
- &ivas_param_mc_ild_mapping_CICP14_2tc,
- &ivas_param_mc_icc_mapping_CICP14_2tc,
- &ivas_param_mc_ild_fac_CICP14_2tc_fx[0],
- &ivas_param_mc_dmx_fac_CICP14_2tc_fx[0]
- },
- /* CICP14 96000 */
- {
- MC_LS_SETUP_5_1_2,
- 8,
- 3,
- IVAS_96k,
- &ivas_param_mc_ild_mapping_CICP14_3tc,
- &ivas_param_mc_icc_mapping_CICP14_3tc,
- &ivas_param_mc_ild_fac_CICP14_3tc_fx[0],
- &ivas_param_mc_dmx_fac_CICP14_3tc_fx[0]
- },
- /* CICP16 96000 */
- {
- MC_LS_SETUP_5_1_4,
- 10,
- 3,
- IVAS_96k,
- &ivas_param_mc_ild_mapping_CICP16_3tc,
- &ivas_param_mc_icc_mapping_CICP16_3tc,
- &ivas_param_mc_ild_fac_CICP16_3tc_fx[0],
- &ivas_param_mc_dmx_fac_CICP16_3tc_fx[0]
- },
- /* CICP16 128000 */
- {
- MC_LS_SETUP_5_1_4,
- 10,
- 3,
- IVAS_128k,
- &ivas_param_mc_ild_mapping_CICP16_3tc,
- &ivas_param_mc_icc_mapping_CICP16_3tc,
- &ivas_param_mc_ild_fac_CICP16_3tc_fx[0],
- &ivas_param_mc_dmx_fac_CICP16_3tc_fx[0]
- },
- /* CICP19 128000 */
- {
- MC_LS_SETUP_7_1_4,
- 12,
- 3,
- IVAS_128k,
- &ivas_param_mc_ild_mapping_CICP19_3tc,
- &ivas_param_mc_icc_mapping_CICP19_3tc,
- &ivas_param_mc_ild_fac_CICP19_3tc_fx[0],
- &ivas_param_mc_dmx_fac_CICP19_3tc_fx[0]
- }
-};
-
-
-/* Alphabet for delta coding for the ICCs in Parametric MC processing */
-const UWord16 ivas_param_mc_cum_freq_icc_cicp6_48_16bits[PARAM_MC_SZ_ICC_QUANTIZER + 1] =
-{
- 0, 24, 224, 20873, 42384, 51699, 57122, 60572, 65535
-};
-
-const UWord16 ivas_param_mc_sym_freq_icc_cicp6_48_16bits[PARAM_MC_SZ_ICC_QUANTIZER] =
-{
- 24, 200, 20649, 21511, 9315, 5423, 3450, 4963
-};
-
-const UWord16 ivas_param_mc_cum_freq_icc_delta_cicp6_48_16bits[2 * PARAM_MC_SZ_ICC_QUANTIZER] =
-{
- 0, 4, 9, 124, 447, 1311, 4453, 18116, 48636, 60573, 63692, 64746, 65327, 65531, 65534, 65535
-};
-
-const UWord16 ivas_param_mc_sym_freq_icc_delta_cicp6_48_16bits[2 * PARAM_MC_SZ_ICC_QUANTIZER - 1] =
-{
- 4, 5, 115, 323, 864, 3142, 13663, 30520, 11937, 3119, 1054, 581, 204, 3, 1
-};
-
-const UWord16 ivas_param_mc_cum_freq_icc_cicp12_48_16bits[PARAM_MC_SZ_ICC_QUANTIZER + 1] =
-{
- 0, 30, 848, 26611, 47846, 57358, 61679, 63237, 65535
-};
-
-const UWord16 ivas_param_mc_sym_freq_icc_cicp12_48_16bits[PARAM_MC_SZ_ICC_QUANTIZER] =
-{
- 30, 818, 25763, 21235, 9512, 4321, 1558, 2298
-};
-
-const UWord16 ivas_param_mc_cum_freq_icc_delta_cicp12_48_16bits[2 * PARAM_MC_SZ_ICC_QUANTIZER] =
-{
- 0, 2, 7, 53, 243, 979, 3994, 16732, 49642, 61343, 64331, 65158, 65438, 65532, 65534, 65535
-};
-
-const UWord16 ivas_param_mc_sym_freq_icc_delta_cicp12_48_16bits[2 * PARAM_MC_SZ_ICC_QUANTIZER - 1] =
-{
- 2, 5, 46, 190, 736, 3015, 12738, 32910, 11701, 2988, 827, 280, 94, 2, 1
-};
-
-const UWord16 ivas_param_mc_cum_freq_icc_cicp14_48_16bits[PARAM_MC_SZ_ICC_QUANTIZER + 1] =
-{
- 0, 46, 826, 27798, 49552, 58447, 62046, 63284, 65535
-};
-
-const UWord16 ivas_param_mc_sym_freq_icc_cicp14_48_16bits[PARAM_MC_SZ_ICC_QUANTIZER ]={
- 46, 780, 26972, 21754, 8895, 3599, 1238, 2251
-};
-
-const UWord16 ivas_param_mc_cum_freq_icc_delta_cicp14_48_16bits[2 * PARAM_MC_SZ_ICC_QUANTIZER] =
-{
- 0, 3, 8, 36, 172, 763, 3436, 15845, 50168, 62005, 64676, 65298, 65481, 65533, 65534, 65535
-};
-
-const UWord16 ivas_param_mc_sym_freq_icc_delta_cicp14_48_16bits[2* PARAM_MC_SZ_ICC_QUANTIZER - 1] =
-{
- 3, 5, 28, 136, 591, 2673, 12409, 34323, 11837, 2671, 622, 183, 52, 1, 1
-};
-
-const UWord16 ivas_param_mc_cum_freq_icc_combined_48_16bits[PARAM_MC_SZ_ICC_QUANTIZER + 1] =
-{
- 0, 34, 552, 24717, 45819, 54772, 59054, 61166, 65535
-};
-
-const UWord16 ivas_param_mc_sym_freq_icc_combined_48_16bits[PARAM_MC_SZ_ICC_QUANTIZER] =
-{
- 34, 518, 24165, 21102, 8953, 4282, 2112, 4369
-};
-
-const UWord16 ivas_param_mc_cum_freq_icc_delta_combined_48_16bits[2 * PARAM_MC_SZ_ICC_QUANTIZER] =
-{
- 0, 3, 7, 74, 304, 1009, 3870, 16502, 49834, 61384, 64217, 65020, 65369, 65531, 65534, 65535
-};
-
-const UWord16 ivas_param_mc_sym_freq_icc_delta_combined_48_16bits[2 * PARAM_MC_SZ_ICC_QUANTIZER - 1] =
-{
- 3, 4, 67, 230, 705, 2861, 12632, 33332, 11550, 2833, 803, 349, 162, 3, 1
-};
-
-const UWord16 ivas_param_mc_cum_freq_ild_cicp6_48_16bits[PARAM_MC_SZ_ILD_QUANTIZER_4BITS + 1] =
-{
- 0, 1092, 5574, 8315, 10652, 13875, 19656, 27664, 36284, 47058, 56251, 62579, 65118, 65462, 65513, 65532, 65535
-};
-
-const UWord16 ivas_param_mc_sym_freq_ild_cicp6_48_16bits[PARAM_MC_SZ_ILD_QUANTIZER_4BITS] =
-{
- 1092, 4482, 2741, 2337, 3223, 5781, 8008, 8620, 10774, 9193, 6328, 2539, 344, 51, 19, 3
-};
-
-const UWord16 ivas_param_mc_cum_freq_ild_delta_cicp6_48_16bits[2 * PARAM_MC_SZ_ILD_QUANTIZER_4BITS] =
-{
- 0, 1, 2, 3, 5, 38, 146, 352, 638, 997, 1559, 2323, 3570, 5859, 10556, 21075, 44682, 55617, 60408, 62739, 63833, 64443, 64809, 65074, 65279, 65400, 65484, 65531, 65532, 65533, 65534, 65535
-};
-
-const UWord16 ivas_param_mc_sym_freq_ild_delta_cicp6_48_16bits[2 * PARAM_MC_SZ_ILD_QUANTIZER_4BITS - 1] =
-{
- 1, 1, 1, 2, 33, 108, 206, 286, 359, 562, 764, 1247, 2289, 4697, 10519, 23607, 10935, 4791, 2331, 1094, 610, 366, 265, 205, 121, 84, 47, 1, 1, 1, 1
-};
-
-const UWord16 ivas_param_mc_cum_freq_ild_cicp12_48_16bits[PARAM_MC_SZ_ILD_QUANTIZER_4BITS + 1] =
-{
- 0, 967, 6335, 9941, 12837, 16652, 22416, 29814, 38807, 48497, 57184, 62661, 64916, 65466, 65514, 65530, 65535
-};
-
-const UWord16 ivas_param_mc_sym_freq_ild_cicp12_48_16bits[PARAM_MC_SZ_ILD_QUANTIZER_4BITS] =
-{
- 967, 5368, 3606, 2896, 3815, 5764, 7398, 8993, 9690, 8687, 5477, 2255, 550, 48, 16, 5
-};
-
-const UWord16 ivas_param_mc_cum_freq_ild_delta_cicp12_48_16bits[2 * PARAM_MC_SZ_ILD_QUANTIZER_4BITS] =
-{
- 0, 1, 2, 3, 5, 18, 61, 149, 320, 592, 1083, 1793, 2974, 5257, 10133, 21274, 44342, 55891, 60895, 63174, 64244, 64793, 65100, 65287, 65406, 65477, 65517, 65531, 65532, 65533, 65534, 65535
-};
-
-const UWord16 ivas_param_mc_sym_freq_ild_delta_cicp12_48_16bits[2 * PARAM_MC_SZ_ILD_QUANTIZER_4BITS - 1] =
-{
- 1, 1, 1, 2, 13, 43, 88, 171, 272, 491, 710, 1181, 2283, 4876, 11141, 23068, 11549, 5004, 2279, 1070, 549, 307, 187, 119, 71, 40, 14, 1, 1, 1, 1
-};
-
-const UWord16 ivas_param_mc_cum_freq_ild_cicp14_48_16bits[PARAM_MC_SZ_ILD_QUANTIZER_4BITS + 1] =
-{
- 0, 229, 7068, 10910, 13856, 17467, 22629, 29174, 36906, 46558, 55579, 61802, 65222, 65505, 65527, 65534, 65535
-};
-
-const UWord16 ivas_param_mc_sym_freq_ild_cicp14_48_16bits[PARAM_MC_SZ_ILD_QUANTIZER_4BITS] =
-{
- 229, 6839, 3842, 2946, 3611, 5162, 6545, 7732, 9652, 9021, 6223, 3420, 283, 22, 7, 1
-};
-
-const UWord16 ivas_param_mc_cum_freq_ild_delta_cicp14_48_16bits[2 * PARAM_MC_SZ_ILD_QUANTIZER_4BITS] =
-{
- 0, 1, 2, 3, 4, 12, 56, 153, 278, 475, 856, 1430, 2489, 4723, 9580, 20685, 45423, 56274, 60948, 63097, 64128, 64679, 65002, 65208, 65348, 65445, 65517, 65531, 65532, 65533, 65534, 65535
-};
-
-const UWord16 ivas_param_mc_sym_freq_ild_delta_cicp14_48_16bits[2 * PARAM_MC_SZ_ILD_QUANTIZER_4BITS - 1] =
-{
- 1, 1, 1, 1, 8, 44, 97, 125, 197, 381, 574, 1059, 2234, 4857, 11105, 24738, 10851, 4674, 2149, 1031, 551, 323, 206, 140, 97, 72, 14, 1, 1, 1, 1
-};
-
-const UWord16 ivas_param_mc_cum_freq_ild_combined_48_16bits[PARAM_MC_SZ_ILD_QUANTIZER_4BITS+1] =
-{
- 0, 1453, 8326, 12221, 15164, 18764, 24177, 31297, 39520, 49154, 57135, 62460, 64821, 65468, 65514, 65530, 65535
-};
-
-const UWord16 ivas_param_mc_sym_freq_ild_combined_48_16bits[PARAM_MC_SZ_ILD_QUANTIZER_4BITS] =
-{
- 1453, 6873, 3895, 2943, 3600, 5413, 7120, 8223, 9634, 7981, 5325, 2361, 647, 46, 16, 5
-};
-
-const UWord16 ivas_param_mc_cum_freq_ild_delta_combined_48_16bits[2 * PARAM_MC_SZ_ILD_QUANTIZER_4BITS] =
-{
- 0, 1, 2, 3, 5, 29, 98, 220, 414, 699, 1186, 1876, 3049, 5304, 10013, 20612, 45247, 56109, 60818, 63022, 64081, 64647, 64977, 65198, 65348, 65443, 65502, 65530, 65532, 65533, 65534, 65535
-};
-
-const UWord16 ivas_param_mc_sym_freq_ild_delta_combined_48_16bits[2 * PARAM_MC_SZ_ILD_QUANTIZER_4BITS - 1] =
-{
- 1, 1, 1, 2, 24, 69, 122, 194, 285, 487, 690, 1173, 2255, 4709, 10599, 24635, 10862, 4709, 2204, 1059, 566, 330, 221, 150, 95, 59, 28, 2, 1, 1, 1
-};
-
-
-/*----------------------------------------------------------------------------------*
- * MASA ROM tables
- *----------------------------------------------------------------------------------*/
-
-
-const UWord8 ivasmasaFormatDescriptor[8] =
-{
- 0x49, 0x56, 0x41, 0x53, 0x4D, 0x41, 0x53, 0x41 /* "IVASMASA" */
-};
-
-const Word64 diffuseness_reconstructions_hr_fx[HR_MASA_ER_LEVELS] = { /* Q62 */
- 0,
- 65865144550293504,
- 138485688541642752,
- 239816680157478912,
- 355502895585558528,
- 485544334825881600,
- 667940119734386688,
- 902690250311073792,
- 1225260573621485568,
- 1635651089665622016,
- 2011983133527769088,
- 2354256705207926784,
- 2741003323208368128,
- 3172222987529093120,
- 3693796119373938688,
- 4305722718742904832,
-};
-
-const Word32 diffuseness_thresholds_hr_fx[HR_MASA_ER_LEVELS + 1] = { /* Q30 */
- 0,
- 10223616,
- 20447232,
- 44040192,
- 67633152,
- 97910784,
- 128188416,
- 182845440,
- 237502464,
- 333053952,
- 428605440,
- 508297216,
- 587988992,
- 688390144,
- 788791296,
- 931266560,
- MAX_32 /* out-of-range large value to make searching easier */
-};
-
-const Word16 bits_direction_masa[DIRAC_DIFFUSE_LEVELS] =
-{
- 11,
- 11,
- 10,
- 9,
- 7,
- 6,
- 5,
- 3
-};
-
-
-const Word16 len_cb_dct0_masa[DIRAC_DIFFUSE_LEVELS] = { 7, 6, 5, 4, 4, 4, 3, 2 };
-
-const UWord8 sur_coherence_cb_masa[MASA_MAX_NO_CV_SUR_COH*MASA_NO_CB_SUR_COH] =
-{
- 16, 99, 0, 0, 0, 0, 0, 0,
- 12, 64, 167, 0, 0, 0, 0, 0,
- 10, 45, 100, 218, 0, 0, 0, 0,
- 8, 34, 70, 124, 235, 0, 0, 0,
- 7, 27, 55, 90, 141, 242, 0, 0,
- 7, 23, 45, 71, 105, 153, 247, 0,
- 6, 20, 38, 60, 86, 119, 165, 249
-};
-
-const Word16 idx_cb_sur_coh_masa[MASA_MAX_NO_CV_SUR_COH] = { 0, 1, 2, 3, 4, 5, 5, 6 };
-
-const Word16 len_huf_masa[MASA_NO_CV_COH1] = { 4, 2, 1, 3, 4 };
-
-const Word16 huff_code_av_masa[MASA_NO_CV_COH1] = { 15, 2, 0, 6, 14 };
-
-const Word16 no_theta_masa[NO_SPHERICAL_GRIDS-2] = /* from 1 to 11 bits */
-{ /*1, 1,*/ 2 ,2 , 4, 5, 6, 7, 10, 14, 19
- /*0, 2, 8, 6, 7, 12, 14, 16*/
-};
-
-const Word16 no_phi_masa[NO_SPHERICAL_GRIDS][MAX_NO_THETA] = /* from 1 to 11 bits*/
-{
- { 2 },
- { 4 },
- { 4, 2 },
- { 8, 4 }, /* 8, 4*/
- { 12, 7, 2, 1 }, /* 12, */
- { 14, 13, 9, 2, 1 },
- { 22, 21, 17, 11, 3, 1 },
- { 33, 32, 29, 23, 17, 9, 1 },
- { 48, 47, 45, 41, 35, 28, 20, 12, 2, 1 },
- { 60, 60, 58, 56, 54, 50, 46, 41, 36, 30, 23, 17, 10, 1 },
- { 89, 89, 88, 86, 84, 81, 77, 73, 68, 63, 57, 51, 44, 38, 30, 23, 15, 8, 1 }
-};
-
-const Word16 MASA_band_grouping_24[24 + 1] =
-{
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 25, 30, 40, 60
-};
-
-const Word16 MASA_band_mapping_24_to_18[18 + 1] =
-{
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 17, 20, 21, 22, 23, 24
-};
-
-const Word16 MASA_band_mapping_24_to_12[12 + 1] =
-{
- 0, 1, 2, 3, 4, 5, 7, 9, 12, 15, 20, 22, 24
-};
-
-const Word16 MASA_band_mapping_24_to_8[8 + 1] =
-{
- 0, 1, 2, 3, 5, 8, 12, 20, 24
-};
-
-const Word16 MASA_band_mapping_24_to_5[5 + 1] =
-{
- 0, 1, 3, 7, 15, 24
-};
-
-const Word16 MASA_grouping_8_to_5[8] =
-{
- 0, 1, 1, 2, 3, 3, 4, 4
-};
-
-const Word16 MASA_grouping_12_to_5[12] =
-{
- 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4
-};
-
-const Word16 MASA_grouping_18_to_5[18] =
-{
- 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4
-};
-
-const Word16 MASA_grouping_24_to_5[24] =
-{
- 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4
-};
-
-/* IVAS_13k2, IVAS_16k4, IVAS_24k4, IVAS_32k, IVAS_48k, IVAS_64k, IVAS_80k, IVAS_96k, IVAS_128k, IVAS_160k, IVAS_192k, IVAS_256k, IVAS_384k, IVAS_512k */
-const Word16 masa_bits[IVAS_NUM_ACTIVE_BRATES] =
-{
- 50, 60, 70, 85, 140, 180, 220, 256, 350, 432, 528, 832, 1024, MASA_MAX_BITS
-};
-
-const Word16 masa_bits_LR_stereo[4] =
-{
- 50, 50, 60, 70
-};
-
-const Word16 mcmasa_bits[IVAS_NUM_ACTIVE_BRATES] =
-{
- 50, 70, 80, 120, 140, 160, 220, 256, 288, 432, 528, 832, 1024, MASA_MAX_BITS
-};
-
-const UWord8 masa_nbands[IVAS_NUM_ACTIVE_BRATES] =
-{
- 5, 5, 5, 5, 5, 5, 5, 5, 8, 12, 18, 24, 24, 24
-};
-
-const UWord8 masa_joined_nbands[IVAS_NUM_ACTIVE_BRATES] =
-{
- 5, 5, 5, 8, 12, 12, 12, 18, 18, 18, 18, 24, 24, 24
-};
-
-const UWord8 masa_twodir_bands[IVAS_NUM_ACTIVE_BRATES] =
-{
- 0, 0, 0, 0, 0, 1, 1, 1, 3, 4, 6, 6, 9, 24
-};
-
-const UWord8 masa_twodir_bands_joined[IVAS_NUM_ACTIVE_BRATES] =
-{
- 0, 0, 0, 0, 0, 2, 2, 3, 4, 6, 8, 9, 12, MASA_MAXIMUM_TWO_DIR_BANDS
-};
-
-
-/*----------------------------------------------------------------------------------*
- * OMASA ROM tables
- *----------------------------------------------------------------------------------*/
-
-const Word32 sep_object_brate[][MAX_NUM_OBJECTS] =
-{
- {0, 0, 0, 0}, /* 13k2 */
- {0, 0, 0, 0}, /* 16k4 */
- {9600, 0, 0, 0}, /* 24k4 */
- {IVAS_13k2, 0, 0, 0}, /* 32k */
- {16000, 11000, 0, 0}, /* 48k */
- {16000, 11700, 0, 0}, /* 64k */
- {20000, 16000, 0, 0}, /* 80k */
- {IVAS_32k, 20000, 20000, 0}, /* 96k */
- {IVAS_32k, IVAS_24k4, 24000, 24000}, /* 128k */
- {IVAS_48k, IVAS_32k, IVAS_24k4, 24000}, /* 160k */
- {IVAS_64k, IVAS_48k, IVAS_32k, IVAS_24k4}, /* 192k */
- {IVAS_96k, IVAS_64k, IVAS_48k, IVAS_32k}, /* 256k */
- {IVAS_128k, IVAS_80k, IVAS_64k, IVAS_48k}, /* 384k */
- {IVAS_128k, IVAS_96k, IVAS_80k, IVAS_64k} /* 512k */
-};
-
-/* column wise DCT matrices for 4 5, and 8 dim */
-/*----------------------------------------------------------------------------------*
- * Param ISM ROM tables
- *----------------------------------------------------------------------------------*/
-
-const Word16 Param_ISM_band_grouping[MAX_PARAM_ISM_NBANDS + 1] =
-{
- 0, 1, 2, 3, 4, 6, 8, 11, 15, 21, 31, 60
-};
-
-/*----------------------------------------------------------------------------------*
- * LFE coding ROM tables
- *----------------------------------------------------------------------------------*/
-
-const ivas_lfe_freq_models ivas_str_lfe_freq_models =
-{
- { 16384, 14924, 13463, 12003, 10542, 9082, 7622, 6161,
- 4701, 4336, 3970, 3605, 3240, 2875, 2510, 2145,
- 1780, 1689, 1597, 1506, 1415, 1323, 1232, 1141,
- 1050, 1004, 958, 913, 867, 821, 776, 730,
- 685, 639, 593, 548, 502, 456, 411, 365,
- 319, 297, 274, 251, 228, 205, 183, 160,
- 137, 126, 114, 103, 91, 80, 68, 57,
- 46, 40, 34, 29, 23, 17, 11, 6, 0 },
-
- { 16384, 13463, 10542, 7622, 4701, 3970, 3240, 2510,
- 1780, 1597, 1415, 1232, 1050, 958, 867, 776,
- 685, 593, 502, 411, 319, 274, 228, 183,
- 137, 114, 91, 68, 46, 34, 23, 11, 0 },
-
- { 16384, 4701, 1780, 1050, 685, 319, 137, 46,
- 0, },
-
- { 16384, 3277, 0 },
-
- { 16384, 13463, 10542, 7622, 4701, 3970, 3240, 2510,
- 1780, 1597, 1415, 1232, 1050, 958, 867, 776,
- 685, 593, 502, 411, 319, 274, 228, 183,
- 137, 114, 91, 68, 46, 34, 23, 11,
- 0 },
-
- { 16384, 10542, 4701, 3240, 1780, 1415, 1050, 867,
- 685, 502, 319, 228, 137, 91, 46, 23,
- 0 },
-
- { 16384, 4468, 1489, 745, 0 }, 0,
-};
-
-const Word16 ivas_lfe_num_ele_in_coder_models[2][4] =
-{
- { 63, 31, 7, 1 },{ 31, 15, 3, 0 }
-};
-
-const Word16 ivas_lfe_log2_num_ele_in_coder_models_fx[2][4] =
-{
- { 6, 5, 3, 1 },{ 5, 4, 2, 0 }
-};
-
-const Word16 ivas_lfe_num_dct_pass_bins_tbl[IVAS_LFE_NUM_COEFFS_IN_SUBGRP] = { 8, 6 };
-
-const Word16 ivas_lfe_min_shift_tbl[IVAS_LFE_NUM_COEFFS_IN_SUBGRP] = { 1, 0 };
-
-const Word16 ivas_lfe_lpf_delay_Q15[2] = { 57, 114 };
-const Word32 ivas_lfe_lpf_delay_ns[2] = { 1750000, 3500000 };
-
-const Word16 dirac_gains_P_idx[16] =
-{
- -1, 1, 0, 1, 4, 3, 2, 3, 4, 8, 7, 6, 5, 6, 7, 8
-};
-
-/*----------------------------------------------------------------------------------*
- * FB ROM tables
- *----------------------------------------------------------------------------------*/
-
-const Word32 ivas_fb_fcs_12band_1ms_fx[IVAS_FB_BANDS_12] =
-{
- 17895696, 53687092, 89478488, 125269880,
- 161061280, 196852672, 232644064, 304226848,
- 465288128, 715827904, 1091637520, 1735882615
-};/*Q31*/
-
-const Word16 ivas_fb_abs_bins_per_band_12band_1ms[IVAS_NUM_SUPPORTED_FS][IVAS_FB_BANDS_12] =
-{
- { 24, 30, 30, 30, 30, 30, 42, 76, 124, 182, 291, 367 },
- { 24, 30, 30, 30, 30, 30, 42, 76, 124, 182, 260, 47 },
- { 24, 30, 30, 30, 30, 30, 42, 75, 122, 73, 0, 0 }
-};
-
-const Word16 ivas_fb_abs_bins_start_offset_12band_1ms[IVAS_NUM_SUPPORTED_FS][IVAS_FB_BANDS_12] =
-{
- {0, 9, 25, 41, 57, 73, 88, 110, 158, 246, 380, 593 },
- {0, 9, 25, 41, 57, 73, 88, 110, 158, 246, 380, 593 },
- {0, 9, 25, 41, 57, 73, 88, 110, 159, 247, 0, 0 }
-};
-
-const Word16 ivas_fb_bins_per_band_12band_1ms[IVAS_NUM_SUPPORTED_FS][IVAS_FB_BANDS_12] =
-{
- {
- IVAS_FB_12_1MS_48K_END_BINS_BAND_0 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_0,
- IVAS_FB_12_1MS_48K_END_BINS_BAND_1 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_1,
- IVAS_FB_12_1MS_48K_END_BINS_BAND_2 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_2,
- IVAS_FB_12_1MS_48K_END_BINS_BAND_3 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_3,
- IVAS_FB_12_1MS_48K_END_BINS_BAND_4 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_4,
- IVAS_FB_12_1MS_48K_END_BINS_BAND_5 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_5,
- IVAS_FB_12_1MS_48K_END_BINS_BAND_6 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_6,
- IVAS_FB_12_1MS_48K_END_BINS_BAND_7 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_7,
- IVAS_FB_12_1MS_48K_END_BINS_BAND_8 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_8,
- IVAS_FB_12_1MS_48K_END_BINS_BAND_9 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_9,
- IVAS_FB_12_1MS_48K_END_BINS_BAND_10 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_10,
- IVAS_FB_12_1MS_48K_END_BINS_BAND_11 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_11
- },
- {
- IVAS_FB_12_1MS_32K_END_BINS_BAND_0 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_0,
- IVAS_FB_12_1MS_32K_END_BINS_BAND_1 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_1,
- IVAS_FB_12_1MS_32K_END_BINS_BAND_2 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_2,
- IVAS_FB_12_1MS_32K_END_BINS_BAND_3 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_3,
- IVAS_FB_12_1MS_32K_END_BINS_BAND_4 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_4,
- IVAS_FB_12_1MS_32K_END_BINS_BAND_5 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_5,
- IVAS_FB_12_1MS_32K_END_BINS_BAND_6 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_6,
- IVAS_FB_12_1MS_32K_END_BINS_BAND_7 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_7,
- IVAS_FB_12_1MS_32K_END_BINS_BAND_8 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_8,
- IVAS_FB_12_1MS_32K_END_BINS_BAND_9 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_9,
- IVAS_FB_12_1MS_32K_END_BINS_BAND_10 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_10,
- IVAS_FB_12_1MS_32K_END_BINS_BAND_11 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_11
- },
- {
- IVAS_FB_12_1MS_16K_END_BINS_BAND_0 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_0,
- IVAS_FB_12_1MS_16K_END_BINS_BAND_1 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_1,
- IVAS_FB_12_1MS_16K_END_BINS_BAND_2 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_2,
- IVAS_FB_12_1MS_16K_END_BINS_BAND_3 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_3,
- IVAS_FB_12_1MS_16K_END_BINS_BAND_4 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_4,
- IVAS_FB_12_1MS_16K_END_BINS_BAND_5 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_5,
- IVAS_FB_12_1MS_16K_END_BINS_BAND_6 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_6,
- IVAS_FB_12_1MS_16K_END_BINS_BAND_7 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_7,
- IVAS_FB_12_1MS_16K_END_BINS_BAND_8 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_8,
- IVAS_FB_12_1MS_16K_END_BINS_BAND_9 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_9,
- IVAS_FB_12_1MS_16K_END_BINS_BAND_10 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_10,
- IVAS_FB_12_1MS_16K_END_BINS_BAND_11 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_11
- },
-};
-
-const Word16 ivas_fb_bins_start_offset_12band_1ms[IVAS_NUM_SUPPORTED_FS][IVAS_FB_BANDS_12] =
-{
- {
- IVAS_FB_12_1MS_48K_START_OFFSET_BAND_0, IVAS_FB_12_1MS_48K_START_OFFSET_BAND_1,
- IVAS_FB_12_1MS_48K_START_OFFSET_BAND_2, IVAS_FB_12_1MS_48K_START_OFFSET_BAND_3,
- IVAS_FB_12_1MS_48K_START_OFFSET_BAND_4, IVAS_FB_12_1MS_48K_START_OFFSET_BAND_5,
- IVAS_FB_12_1MS_48K_START_OFFSET_BAND_6, IVAS_FB_12_1MS_48K_START_OFFSET_BAND_7,
- IVAS_FB_12_1MS_48K_START_OFFSET_BAND_8, IVAS_FB_12_1MS_48K_START_OFFSET_BAND_9,
- IVAS_FB_12_1MS_48K_START_OFFSET_BAND_10, IVAS_FB_12_1MS_48K_START_OFFSET_BAND_11
- },
- {
- IVAS_FB_12_1MS_32K_START_OFFSET_BAND_0, IVAS_FB_12_1MS_32K_START_OFFSET_BAND_1,
- IVAS_FB_12_1MS_32K_START_OFFSET_BAND_2, IVAS_FB_12_1MS_32K_START_OFFSET_BAND_3,
- IVAS_FB_12_1MS_32K_START_OFFSET_BAND_4, IVAS_FB_12_1MS_32K_START_OFFSET_BAND_5,
- IVAS_FB_12_1MS_32K_START_OFFSET_BAND_6, IVAS_FB_12_1MS_32K_START_OFFSET_BAND_7,
- IVAS_FB_12_1MS_32K_START_OFFSET_BAND_8, IVAS_FB_12_1MS_32K_START_OFFSET_BAND_9,
- IVAS_FB_12_1MS_32K_START_OFFSET_BAND_10, IVAS_FB_12_1MS_32K_START_OFFSET_BAND_11
- },
- {
- IVAS_FB_12_1MS_16K_START_OFFSET_BAND_0, IVAS_FB_12_1MS_16K_START_OFFSET_BAND_1,
- IVAS_FB_12_1MS_16K_START_OFFSET_BAND_2, IVAS_FB_12_1MS_16K_START_OFFSET_BAND_3,
- IVAS_FB_12_1MS_16K_START_OFFSET_BAND_4, IVAS_FB_12_1MS_16K_START_OFFSET_BAND_5,
- IVAS_FB_12_1MS_16K_START_OFFSET_BAND_6, IVAS_FB_12_1MS_16K_START_OFFSET_BAND_7,
- IVAS_FB_12_1MS_16K_START_OFFSET_BAND_8, IVAS_FB_12_1MS_16K_START_OFFSET_BAND_9,
- IVAS_FB_12_1MS_16K_START_OFFSET_BAND_10, IVAS_FB_12_1MS_16K_START_OFFSET_BAND_11
- },
-};
-
-
-const Word16 ivas_num_active_bands[FB - WB + 1] =
-{
- IVAS_16K_12BANDS_ACTIVE_BANDS, IVAS_FB_BANDS_12, IVAS_FB_BANDS_12
-};
-
-/*------------------------------------------------------------------------------------------*
- * SNS MSVQ codebooks and means
- *------------------------------------------------------------------------------------------*/
-
-const Word16 ivas_sns_cdbks_tcx20_levels[SNS_MSVQ_NSTAGES_TCX20] = { 128, 64, 32, 32 };
-
-const Word16 ivas_sns_cdbks_tcx20_bits[SNS_MSVQ_NSTAGES_TCX20] = { 7, 6, 5, 5 };
-
-/* pre-rounded codebook vectors for singed Q4.12 represantation */
-
-const Word16 ivas_sns_cdbks_tcx10_levels[SNS_MSVQ_NSTAGES_TCX10] = { 128, 32, 8 };
-
-const Word16 ivas_sns_cdbks_tcx10_bits[SNS_MSVQ_NSTAGES_TCX10] = { 7, 5, 3 };
-
-
-const Word16 ivas_sns_cdbks_side_tcx20_levels[SNS_MSVQ_NSTAGES_SIDE] = { 32, 32 };
-const Word16 ivas_sns_cdbks_side_tcx20_bits[SNS_MSVQ_NSTAGES_SIDE] = { 5, 5 };
-const Word16 ivas_sns_cdbks_side_tcx10_levels[SNS_MSVQ_NSTAGES_SIDE] = { 32, 8 };
-const Word16 ivas_sns_cdbks_side_tcx10_bits[SNS_MSVQ_NSTAGES_SIDE] = { 5, 3 };
-
-
-const Word16 sns_1st_cdbk[2][2][8 * 32] =
-{
- { /* split 1 */
- { /* TCX 20 */
- -10900, -11064, -10637, -10471, -9051, -6381, -4688, -2438,
- -2119, -5087, -6702, -8118, -7586, -6343, -4828, -3406,
- 2004, -3443, -4289, -3757, -3234, -2952, -2313, -1781,
- 1749, 5598, 3916, 732, -1472, -2964, -3275, -2332,
- -11978, -14369, -5600, -545, 981, -929, -57, 1903,
- 1745, 391, 202, 115, 256, -291, -862, -1637,
- -4052, 2059, 4709, 6768, 5595, 1975, -1723, -1218,
- 2093, 7263, 8679, 7576, 3701, -2438, -4389, -2686,
- -7120, -6279, -5715, -5520, -4752, -3125, -1856, -438,
- 8131, -2543, -6285, -6723, -5588, -4321, -3264, -2164,
- -653, -1301, -660, 608, 1598, 1805, 1698, 760,
- 4882, 9309, 6333, 1734, 284, 364, 560, 1015,
- -7686, -5737, -3443, -1642, 245, 1531, 1827, 1769,
- -1468, 3782, 144, -5130, -6883, -5165, -1497, 2072,
- -12937, -8429, -2619, 2894, 5004, 4710, 4627, 3740,
- 3198, 3928, 4358, 4554, 3887, 2844, 1299, 129,
- -13828, -12296, -9364, -7918, -5571, -1909, 307, 2047,
- -4314, -1211, -559, -1061, -1928, -2228, -2359, -1902,
- -309, -3224, -3404, -1895, -743, -59, 757, 908,
- 10914, 5865, 1599, -386, -1392, -2285, -2236, -2042,
- -11825, -16241, -11402, -3627, 6556, 8953, 6421, 1546,
- 6102, 777, -301, 536, 902, 541, 210, -429,
- -3052, 3997, 5389, 1842, -344, 1556, 2667, 2428,
- 11788, 10894, 7448, 5423, 2372, -677, -2385, -3839,
- -45, -7602, -8923, -7179, -3273, 65, 4500, 6726,
- 5895, 626, -1610, -2598, -3240, -3540, -2930, -2156,
- -971, 461, 1494, 4907, 5859, 5199, 3678, 2502,
- 10766, 5297, 1844, 1236, 2498, 3503, 2846, 838,
- -7816, -1212, 891, 2387, 1317, 2225, 1859, 1602,
- 2376, 5357, 2088, -2719, -3419, -420, 2431, 2943,
- -8383, -795, 4351, 7026, 7460, 7191, 5262, 3796,
- 1522, 6283, 8714, 8222, 7434, 5768, 3586, 1499,
- },
- { /* TCX 10 */
- -15596, -16321, -10264, -1002, 5955, 5543, -29, -1688,
- 17, -3794, -6207, -7356, -6998, -6081, -4453, -2448,
- -12543, -11530, -10186, -8817, -7083, -4440, -1946, 892,
- 5198, 2751, -274, -2574, -4561, -6087, -5944, -4600,
- -683, -2640, -2753, -1195, -239, -217, -286, 90,
- -1400, -1146, -1853, -2845, -3456, -3788, -3171, -1969,
- -1835, 392, 1725, 1209, -392, -1640, -2001, -1608,
- 5770, 7707, 5210, 2112, -382, -2088, -2634, -3007,
- -10766, -8101, -5137, -3754, -1881, 331, 2339, 3679,
- -2637, -4640, -5811, -5651, -3790, -1359, 913, 1893,
- -7793, -4768, -1762, -545, -717, -837, -441, -75,
- 4030, 1770, 467, 379, 10, -1330, -2398, -2290,
- -9395, -6952, -2494, 2022, 4753, 5614, 4443, 2642,
- -1486, 1748, 859, -2586, -3368, -638, 2761, 3269,
- -2408, 306, 3633, 6567, 5950, 2474, -621, -1421,
- 5478, 7986, 9498, 8165, 5477, 1244, -523, -1586,
- -13564, -14673, -10597, -5504, 1575, 8248, 7662, 4025,
- 4978, -682, -3586, -4305, -3703, -3001, -2227, -1278,
- -8002, -6831, -5558, -4868, -4243, -3393, -2486, -1110,
- 11485, 5472, 1645, -533, -1792, -2814, -3169, -2706,
- 1617, 421, 232, 1382, 2162, 2017, 1318, 744,
- 3677, 5212, 1990, -1514, -2894, -2441, -451, 592,
- 731, 4295, 5860, 3756, 1991, 1437, 869, 127,
- 12736, 11722, 7768, 4682, 1574, -744, -1989, -3131,
- -3490, -4269, -3681, -1531, 1111, 3327, 4138, 3815,
- 7344, 1400, -1302, -1502, -1015, 57, 1212, 1498,
- -4836, -1881, 1071, 2055, 2114, 2465, 2093, 1458,
- 8569, 5879, 3654, 2879, 2530, 1703, 781, -233,
- -3709, -990, 2338, 6227, 7083, 7102, 5657, 3401,
- 3389, 6392, 5267, 1011, 275, 3519, 5236, 4339,
- 599, 3752, 6943, 9211, 8152, 5568, 3337, 1838,
- 9885, 9591, 7905, 8068, 7929, 7421, 4234, 757,
- }
- },
- { /* split 2 */
- { /* TCX 20 */
- -178, -3476, -5982, -7081, -7548, -7440, -6859, -5798,
- -3596, -3670, -1501, 770, 812, -286, -2001, -3377,
- -3998, -5191, -4988, -4421, -3889, -3571, -2738, -1969,
- -2981, -2687, -1501, -83, 1136, 2377, 3248, 4105,
- 1842, -41, -1972, -4282, -6779, -8405, -8674, -7835,
- -259, 571, 2124, 3344, 2959, 1407, -750, -2523,
- -524, -1956, -2855, -3202, -3939, -4666, -4907, -4782,
- -5110, -4768, -3017, -663, 4188, 9210, 16602, 21081,
- 4373, 4846, -603, -6495, -7289, -5540, -4749, -5527,
- -1448, -1043, -619, -105, 356, 362, 542, 857,
- 1373, -752, -5334, -6244, -3001, -932, -1040, -3125,
- -2403, -1397, 612, 2449, 3920, 5231, 6819, 8581,
- 2183, 1211, -111, -1084, -2836, -4977, -6701, -7284,
- -751, 1255, 3408, 6474, 7503, 7026, 5413, 4464,
- 935, 850, 589, 353, 160, -434, -939, -931,
- 268, 2284, 3884, 5423, 6680, 7996, 9244, 9472,
- 1075, 113, -1289, -4457, -7512, -5930, -1799, -571,
- -3689, -4254, -3755, -2995, -1581, -135, 1049, 1589,
- -1166, -1752, -1790, -1897, -1927, -1831, -1359, -805,
- -1494, -735, 635, 1993, 2909, 3546, 4226, 4956,
- 4435, 4299, 4269, 1328, -3731, -7621, -9319, -9170,
- 1358, 2227, 3873, 4469, 4692, 4057, 2601, 1608,
- 813, 398, -499, -666, -1286, -2271, -3316, -4025,
- -3300, -1255, 2181, 6431, 10002, 12760, 13549, 12584,
- 3714, 4180, 484, -2905, -2864, -1359, -1256, -2477,
- 308, 868, 1373, 1629, 1793, 1834, 1814, 1746,
- 1472, 798, -282, -1935, -1818, 320, 2221, 2914,
- 2281, 3240, 2988, 1400, 2383, 4072, 5667, 6675,
- 2672, 2678, 2874, 2096, -226, -2301, -3861, -4534,
- 4988, 7231, 7641, 7731, 7061, 6447, 5411, 3513,
- 3978, 4156, 4126, 2896, 1469, 759, 368, -68,
- -264, 4210, 8534, 11008, 11606, 11888, 11072, 8949,
- },
- { /* TCX 10 */
- -2852, -6158, -7231, -7830, -8012, -7922, -7556, -6706,
- -3911, -5340, -5053, -4741, -4805, -4484, -3727, -3037,
- -966, -1461, -1694, -2427, -3081, -3037, -2547, -2230,
- -3455, -3315, -2451, -836, 1383, 3196, 3720, 3379,
- 3052, 281, -3351, -6866, -9051, -9586, -8983, -8236,
- -748, -4465, -4314, -2251, 29, -40, -3963, -6195,
- 200, 1293, 2535, 2803, 1603, -186, -1397, -1697,
- -1707, -265, 2196, 5295, 5894, 4216, 3440, 3826,
- -237, -2133, -2279, -3149, -4377, -5638, -6520, -6764,
- -2407, -2049, -1246, -664, -521, -430, -349, -211,
- 3874, 1335, -1501, -2055, -1268, -990, -1852, -2871,
- -1883, -1845, -1681, -484, 384, 2035, 5839, 9597,
- 275, 380, 1048, 424, -1146, -3012, -4431, -5104,
- -1699, -484, 756, 1261, 1279, 1377, 1975, 2590,
- 2139, 4502, 3645, 4975, 6491, 5972, 5012, 4346,
- -3821, -2581, -433, 2667, 6436, 10038, 11311, 8783,
- 2359, -2689, -6604, -7039, -5992, -4268, -3711, -4840,
- -2776, -4251, -4539, -3672, -2494, -1055, 280, 695,
- 491, 866, 822, -44, -1009, -1165, -831, -538,
- -1024, 91, 786, 1295, 2433, 3910, 4975, 5403,
- 3117, 2590, 2337, -667, -4580, -8147, -9400, -9523,
- -103, -630, -831, 669, 3062, 3398, 549, -1690,
- 2113, 3467, 4279, 5047, 5344, 3361, 127, -2313,
- -1199, 1153, 2914, 3688, 4260, 5421, 7471, 8831,
- 2815, 2184, 316, -3058, -5596, -5564, -4343, -3793,
- 922, 126, -1414, -1731, -1007, 359, 2029, 3088,
- 4889, 4619, 2537, 1114, 950, 946, 799, 419,
- -4271, -3750, -3359, -484, 1448, 4106, 10487, 20479,
- 3818, 4687, 4064, 2212, -172, -2287, -3535, -4041,
- 884, 2456, 3394, 2925, 2182, 2323, 2583, 2507,
- 4767, 8057, 8263, 6461, 5003, 4055, 2923, 1845,
- 19, 3813, 6926, 8432, 10141, 10850, 9692, 8383,
- }
- }
-};
-
-const Word16 sns_1st_means_16k[2][16] =
-{
- { /* TCX 20 */
- 14210, 19017, 14362, 9309, 5385, 2674, 1055, -211, -1407, -3059, -4393, -8597, -11180, -11756, -12131, -13281,
- },
- { /* TCX 10*/
- 12018, 15915, 11089, 6015, 847, -705, -539, -1548, -893, -2163, -1806, -4189, -7017, -8670, -8874, -9480,
- }
-};
-
-const Word16 sns_1st_means_25k6[2][16] =
-{
- { /* TCX 20 */
- 14973, 20323, 16461, 9554, 4017, 3103, 1602, 1694, -221, -1401, -6817, -10071, -11503, -11805, -13158, -16749,
- },
- { /* TCX 10 */
- 15560, 19489, 14623, 5595, 2084, 1699, 775, -1312, -2195, -6101, -9078, -9465, -7825, -6603, -7281, -9960,
- }
-};
-
-const Word16 sns_1st_means_32k[2][16] =
-{
- { /* TCX 20 */
- 15041, 20603, 16969, 10289, 4973, 4283, 3003, 3316, 1684, -259, -6614, -9535, -10363, -11834, -16625, -24930,
- },
- { /* TCX 10 */
- 16510, 20660, 16025, 7224, 3921, 3868, 2623, 742, -1316, -6269, -8284, -7288, -6380, -8410, -13351, -20277,
- }
-};
-
-
-/*----------------------------------------------------------------------*
- * MC ParamUpmix ROM tables
- *-----------------------------------------------------------------------*/
-
-const Word16 ivas_param_upmx_mx_qmap[33] =
-{
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0
-};
-
-/* clang-format on */
diff --git a/lib_com/ivas_rom_com.h b/lib_com/ivas_rom_com.h
index 8233a647c53741f33e3168e92101091f101ffa93..3c24b682315d2f2f108f56482978e7c6a0efcccf 100644
--- a/lib_com/ivas_rom_com.h
+++ b/lib_com/ivas_rom_com.h
@@ -78,6 +78,29 @@ extern const UWord16 ECSQ_tab_inverse[1 + ECSQ_SEGMENT_SIZE];
/*----------------------------------------------------------------------------------*
* Stereo ICA ROM tables
*----------------------------------------------------------------------------------*/
+
+extern const Word32 ica_sincInterp2_fx[]; // Q31
+extern const Word32 ica_sincInterp4_fx[]; // Q31
+extern const Word32 ica_sincInterp6_fx[]; // Q31
+
+/*----------------------------------------------------------------------------------*
+ * Stereo IC-BWE ROM tables
+ *----------------------------------------------------------------------------------*/
+
+extern const Word16 pow_10_icbwe_gsMapping_tbl_fx[];
+extern const Word16 pow_10_icbwe_gsMappingDFT_tbl_fx[];
+
+extern const Word16 icbwe_gsMapping_tbl_fx[];
+extern const Word16 icbwe_gsMappingDFT_tbl_fx[];
+
+/*----------------------------------------------------------------------------------*
+ * TD Stereo ROM tables
+ *----------------------------------------------------------------------------------*/
+
+extern const UWord32 tdm_ratio_tabl_fx[TDM_NQ + 1];
+extern const Word32 tdm_ratio_tabl_fx_Q30[TDM_NQ + 1];
+extern const Word32 tdm_ratio_tabl_fx_Q24[TDM_NQ + 1];
+extern const UWord32 tdm_den_ratio_tabl_fx[];
extern const Word16 tdm_bit_allc_tbl[5][6];
/* LSFs Intra-frame prediction tables */
@@ -97,7 +120,6 @@ extern const Word16 tdm_LSF_MEAN_PRED_QNT_IN_fx[M];
extern const Word16 tdm_LSF_MEAN_PRED_QNT_fx[M];
extern const Word16 tdm_PRED_QNT_fixed_beta_prd_diag_3_fx[15 + 16 + 15];
-
extern const Word16 fast_FCB_bits_2sfr[];
extern const Word16 fast_FCB_rates_2sfr[];
@@ -114,6 +136,7 @@ extern const MDCTStereoBands_config mdctStereoBands_32000_640[];
/*----------------------------------------------------------------------------------*
* Stereo DTX ROM tables
*----------------------------------------------------------------------------------*/
+
extern const Word16 dft_cng_coh_pred_fx[][STEREO_DFT_COH_PRED_COEFFS];
extern const Word16 dft_cng_coh_u2i[9];
extern const Word16 dft_cng_coh_i2u[9];
@@ -123,6 +146,10 @@ extern const Word16 dft_cng_coh_alpha_start[STEREO_DFT_N_COH_ALPHA_STEPS - 1];
/*----------------------------------------------------------------------------------*
* DirAC ROM tables
*----------------------------------------------------------------------------------*/
+
+extern const Word32 diffuseness_reconstructions_fx[DIRAC_DIFFUSE_LEVELS];
+extern const Word32 diffuseness_thresholds_fx[DIRAC_DIFFUSE_LEVELS + 1];
+extern const Masa_Diffuseness_Ratios masa_diffuse_ratios[DIRAC_DIFFUSE_LEVELS][DIRAC_DIFFUSE_LEVELS];
extern const Word16 DirAC_band_grouping_12[12 + 1];
extern const Word16 DirAC_band_grouping_6[6 + 1];
extern const Word16 DirAC_band_grouping_5[5 + 1];
@@ -131,6 +158,8 @@ extern const Word16 DirAC_block_grouping_5ms_MDFT[MAX_PARAM_SPATIAL_SUBFRAMES +
extern const Word32 c_weights_fx[DIRAC_NO_FB_BANDS_MAX]; // Q30
+extern const Word16 ivas_divde_255[256];
+
/*------------------------------------------------------------------------------------------*
* SPAR ROM tables
*------------------------------------------------------------------------------------------*/
@@ -153,6 +182,9 @@ extern const Word16 dtx_pr_real_q_levels[3][3];
extern const Word16 pr_pr_idx_pairs[3][3][2];
extern const Word16 pr_pd_idx_pairs[3][3][2];
+extern const Word32 dtx_pd_real_min_max_fx[2];
+extern const Word32 one_by_q_level[64];
+
/*----------------------------------------------------------------------*
* PCA ROM tables
*-----------------------------------------------------------------------*/
@@ -162,7 +194,6 @@ extern const Word16 ivas_pca_offset_index2[2692];
extern const Word16 ivas_pca_offset_n2[IVAS_PCA_N1];
extern const Word16 ph1_q_n2_tbl[IVAS_PCA_N1][2];
-
/*----------------------------------------------------------------------------------*
* Parametric MC ROM tables
*----------------------------------------------------------------------------------*/
@@ -220,6 +251,8 @@ extern const UWord16 ivas_param_mc_sym_freq_icc_combined_48_16bits[PARAM_MC_SZ_I
extern const UWord16 ivas_param_mc_cum_freq_icc_delta_combined_48_16bits[2 * PARAM_MC_SZ_ICC_QUANTIZER];
extern const UWord16 ivas_param_mc_sym_freq_icc_delta_combined_48_16bits[2 * PARAM_MC_SZ_ICC_QUANTIZER - 1];
+extern const Word16 ivas_param_mc_quant_ild_5d1_48_fx[PARAM_MC_SZ_ILD_QUANTIZER_4BITS];
+extern const Word16 ivas_param_mc_quant_icc_fx[PARAM_MC_SZ_ICC_QUANTIZER];
/*----------------------------------------------------------------------------------*
* MASA ROM tables
@@ -258,23 +291,86 @@ extern const UWord8 masa_twodir_bands_joined[];
extern const Word64 diffuseness_reconstructions_hr_fx[HR_MASA_ER_LEVELS];
extern const Word32 diffuseness_thresholds_hr_fx[HR_MASA_ER_LEVELS + 1];
+extern const Word32 no_phi_masa_inv_fx[NO_SPHERICAL_GRIDS][MAX_NO_THETA];
+extern const Word32 azimuth_cb_fx[8];
+extern const Word32 delta_theta_masa_fx[NO_SPHERICAL_GRIDS - 2];
+extern const Word16 coherence_cb0_masa_Q14[DIRAC_DIFFUSE_LEVELS * 2 * MASA_NO_CV_COH];
+extern const Word32 coherence_cb0_masa_fx[DIRAC_DIFFUSE_LEVELS * 2 * MASA_NO_CV_COH];
+extern const Word16 coherence_cb1_masa_Q15[MASA_NO_CV_COH1 * MASA_MAXIMUM_CODING_SUBBANDS]; /* 25 */
+extern const Word32 coherence_cb1_masa_fx[MASA_NO_CV_COH1 * MASA_MAXIMUM_CODING_SUBBANDS]; /* 25 */
+
+/* Multi-channel input and output setups */
+extern const Word16 ls_azimuth_CICP2_idx[2];
+extern const Word16 ls_elevation_CICP2_idx[2];
+extern const Word16 ls_azimuth_CICP6_idx[5];
+extern const Word16 ls_elevation_CICP6_idx[5];
+extern const Word16 ls_azimuth_CICP12_idx[7];
+extern const Word16 ls_elevation_CICP12_idx[7];
+extern const Word16 ls_azimuth_CICP14_idx[7];
+extern const Word16 ls_elevation_CICP14_idx[7];
+extern const Word16 ls_azimuth_CICP16_idx[9];
+extern const Word16 ls_elevation_CICP16_idx[9];
+extern const Word16 ls_azimuth_CICP19_idx[11];
+extern const Word16 ls_elevation_CICP19_idx[11];
+
+extern const Word32 shoebox_sin_cos_tbl_fx[11][2];
+
+extern const Word32 delta_phi_val[90];
+extern const Word32 inv_delta_phi_val[90];
+extern const Word32 dd_val[90];
+extern const Word32 cb_azi_chan_fx[]; // Q22
+extern const Word16 cb_azi_chan_16fx[]; // Q0
+
+/* Multi-channel input and output setups */
+extern const Word32 ls_azimuth_CICP1_fx[1];
+extern const Word32 ls_elevation_CICP1_fx[1];
+extern const Word32 ls_azimuth_CICP2_fx[2];
+extern const Word32 ls_elevation_CICP2_fx[2];
+extern const Word32 ls_azimuth_CICP6_fx[5];
+extern const Word32 ls_elevation_CICP6_fx[5];
+extern const Word32 ls_azimuth_CICP12_fx[7];
+extern const Word32 ls_elevation_CICP12_fx[7];
+extern const Word32 ls_azimuth_CICP14_fx[7];
+extern const Word32 ls_elevation_CICP14_fx[7];
+extern const Word32 ls_azimuth_CICP16_fx[9];
+extern const Word32 ls_elevation_CICP16_fx[9];
+extern const Word32 ls_azimuth_CICP19_fx[11];
+extern const Word32 ls_elevation_CICP19_fx[11];
+extern const Word16 pow_10_q11[128];
+extern const Word32 pow_10_q23[14];
+extern const Word16 ivas_sin_az_fx[361];
+extern const Word16 ivas_sine_panning_tbl_fx[601];
+extern const Word16 ivas_tan_panning_gain_dirac_tbl_fx[601];
+
+extern const UWord16 cum_n_for_id_th[122];
+
+extern const Word16 gridEq_Table[NO_THETA16_MAX];
+extern const Word32 McMASA_LFEGain_vectors_fx[64]; /* Q25 */
+
/*----------------------------------------------------------------------------------*
* MASA and ISM (OMASA) combined format ROM tables
*----------------------------------------------------------------------------------*/
extern const Word32 sep_object_brate[][MAX_NUM_OBJECTS];
+extern const Word32 dct4_fx[];
+extern const Word32 dct5_fx[];
+extern const Word32 dct8_fx[];
+extern const Word32 dct12_fx[];
+
/*----------------------------------------------------------------------------------*
* Param ISM ROM tables
*----------------------------------------------------------------------------------*/
+extern const Word32 ism_azimuth_borders_fx[4];
+extern const Word32 ism_elevation_borders_fx[4];
+
extern const Word16 Param_ISM_band_grouping[MAX_PARAM_ISM_NBANDS + 1];
/*----------------------------------------------------------------------------------*
* LFE coding ROM tables
*----------------------------------------------------------------------------------*/
-
extern const Word16 ivas_lfe_num_ele_in_coder_models[2][4];
extern const Word16 ivas_lfe_log2_num_ele_in_coder_models_fx[2][4];
extern const Word16 ivas_lfe_num_dct_pass_bins_tbl[IVAS_LFE_NUM_COEFFS_IN_SUBGRP];
@@ -285,6 +381,38 @@ extern const Word32 ivas_lfe_lpf_delay_ns[2];
extern const Word16 dirac_gains_P_idx[16];
+extern const Word32 ivas_lpf_4_butter_16k_sos_fx[IVAS_BIQUAD_FILT_LEN << 2];
+extern const Word16 ivas_lpf_4_butter_16k_sos_e[IVAS_BIQUAD_FILT_LEN << 2];
+extern const Word32 ivas_lpf_4_butter_32k_sos_fx[IVAS_BIQUAD_FILT_LEN << 2];
+extern const Word16 ivas_lpf_4_butter_32k_sos_e[IVAS_BIQUAD_FILT_LEN << 2];
+extern const Word32 ivas_lpf_4_butter_48k_sos_fx[IVAS_BIQUAD_FILT_LEN << 2];
+extern const Word16 ivas_lpf_4_butter_48k_sos_e[IVAS_BIQUAD_FILT_LEN << 2];
+#ifndef NONBE_FIX_MC_LFE_LPF
+extern const Word32 ivas_lpf_2_butter_16k_fx[IVAS_BIQUAD_FILT_LEN << 1];
+extern const Word32 ivas_lpf_2_butter_32k_fx[IVAS_BIQUAD_FILT_LEN << 1];
+extern const Word32 ivas_lpf_2_butter_48k_fx[IVAS_BIQUAD_FILT_LEN << 1];
+#endif
+
+extern const Word32 ivas_lfe_window_coeff_48k_fx[IVAS_LFE_FADE_LEN_48K]; // Q31
+extern const Word32 ivas_lfe_window_coeff_32k_fx[IVAS_LFE_FADE_LEN_32K]; // Q31
+extern const Word32 ivas_lfe_window_coeff_16k_fx[IVAS_LFE_FADE_LEN_16K]; // Q31
+
+extern const UWord32 d_hamm_lfe_plc_fx[LFE_PLC_LENANA / 2];
+
+/*------------------------------------------------------------------------------------------*
+ * MDFT/iMDFT ROM tables
+ *------------------------------------------------------------------------------------------*/
+
+extern const Word32 ivas_mdft_coeff_cos_twid_240_fx[IVAS_240_PT_LEN + 1];
+extern const Word32 ivas_mdft_coeff_cos_twid_160_fx[IVAS_160_PT_LEN + 1];
+extern const Word32 ivas_mdft_coeff_cos_twid_120_fx[IVAS_120_PT_LEN + 1];
+extern const Word32 ivas_mdft_coeff_cos_twid_80_fx[IVAS_80_PT_LEN + 1];
+extern const Word32 ivas_mdft_coeff_cos_twid_40_fx[IVAS_40_PT_LEN + 1];
+extern const Word32 ivas_mdft_coeff_cos_twid_960_fx[IVAS_960_PT_LEN + 1];
+extern const Word32 ivas_mdft_coeff_cos_twid_640_fx[IVAS_640_PT_LEN + 1];
+extern const Word32 ivas_mdft_coeff_cos_twid_320_fx[IVAS_320_PT_LEN + 1];
+extern const Word32 dirac_gains_trg_term_fx[181][2];
+
/*------------------------------------------------------------------------------------------*
* FB ROM tables
*------------------------------------------------------------------------------------------*/
@@ -296,9 +424,18 @@ extern const Word16 ivas_fb_bins_start_offset_12band_1ms[IVAS_NUM_SUPPORTED_FS][
extern const Word16 ivas_fb_abs_bins_per_band_12band_1ms[IVAS_NUM_SUPPORTED_FS][IVAS_FB_BANDS_12];
extern const Word16 ivas_fb_abs_bins_start_offset_12band_1ms[IVAS_NUM_SUPPORTED_FS][IVAS_FB_BANDS_12];
-
extern const Word16 ivas_num_active_bands[FB - WB + 1];
+extern const Word16 ivas_fb_cf_4ms_48k_fx[IVAS_FB_4MS_48K_SAMP];
+extern const Word16 ivas_fb_cf_1ms_48k_fx[IVAS_FB_1MS_48K_SAMP];
+extern const Word16 ivas_fb_cf_4ms_32k_fx[IVAS_FB_4MS_32K_SAMP];
+extern const Word16 ivas_fb_cf_1ms_32k_fx[IVAS_FB_1MS_32K_SAMP];
+extern const Word16 ivas_fb_cf_4ms_16k_fx[IVAS_FB_4MS_16K_SAMP];
+extern const Word16 ivas_fb_cf_1ms_16k_fx[IVAS_FB_1MS_16K_SAMP];
+
+extern const Word32 ivas_fb_resp_cheby_ramp_32del_fx[IVAS_FB_1MS_32K_SAMP + 1];
+extern const Word32 ivas_fb_resp_cheby_ramp_16del_fx[IVAS_FB_1MS_16K_SAMP + 1];
+
/*------------------------------------------------------------------------------------------*
* SNS MSVQ codebooks and means
*------------------------------------------------------------------------------------------*/
@@ -309,19 +446,22 @@ extern const Word16 ivas_sns_cdbks_tcx20_bits[];
extern const Word16 ivas_sns_cdbks_tcx10_levels[];
extern const Word16 ivas_sns_cdbks_tcx10_bits[];
-
extern const Word16 ivas_sns_cdbks_side_tcx20_levels[];
extern const Word16 ivas_sns_cdbks_side_tcx20_bits[];
extern const Word16 ivas_sns_cdbks_side_tcx10_levels[];
extern const Word16 ivas_sns_cdbks_side_tcx10_bits[];
-
/* means and codebooks for the split VQ in the 2-stage SNS VQ */
extern const Word16 sns_1st_cdbk[2][2][8 * 32];
extern const Word16 sns_1st_means_16k[2][16];
extern const Word16 sns_1st_means_25k6[2][16];
extern const Word16 sns_1st_means_32k[2][16];
+extern const Word16 *const ivas_sns_cdbks_tcx20_fx[];
+extern const Word16 *const ivas_sns_cdbks_tcx10_fx[];
+
+extern const Word16 *const ivas_sns_cdbks_side_tcx20_fx[];
+extern const Word16 *const ivas_sns_cdbks_side_tcx10_fx[];
/*----------------------------------------------------------------------*
* MC ParamUpmix ROM tables
@@ -329,6 +469,45 @@ extern const Word16 sns_1st_means_32k[2][16];
extern const Word16 ivas_param_upmx_mx_qmap[33];
+extern const ACPL_QUANT_TABLE_FX ivas_mc_paramupmix_alpha_quant_table_fx;
+extern const ACPL_QUANT_TABLE_FX ivas_mc_paramupmix_beta_quant_table_fx[9];
+
+extern const Word32 ivas_han_win_48k_fx[L_FRAME32k];
+extern const Word32 ivas_han_win_32k_fx[L_FRAME32k];
+extern const Word32 ivas_han_win_16k_fx[L_FRAME32k];
+
+extern const Word32 ivas_sine_delay_32_fx[32];
+
+extern const Word32 ivas_sine_frame_len_640_del_32_fx[577];
+extern const Word32 ivas_sine_frame_len_640_del_16_fx[289];
+
+extern const Word32 ivas_fb_fr_12band_1ms_re_fx[IVAS_FB_12_1MS_LEN];
+extern const Word32 ivas_fb_fr_12band_1ms_im_fx[IVAS_FB_12_1MS_LEN];
+
+/*----------------------------------------------------------------------*
+ * Limiter tables
+ *-----------------------------------------------------------------------*/
+
+extern const Word32 release_cnst_table[4][201]; // Q31
+
+/*----------------------------------------------------------------------*
+ * MDCT/IMDCT tables
+ *-----------------------------------------------------------------------*/
+
+extern const Word16 ivas_sin_twiddle_480_fx[IVAS_480_PT_LEN >> 1];
+extern const Word16 ivas_cos_twiddle_480_fx[IVAS_480_PT_LEN >> 1];
+extern const Word16 ivas_sin_twiddle_320_fx[IVAS_320_PT_LEN >> 1];
+extern const Word16 ivas_cos_twiddle_320_fx[IVAS_320_PT_LEN >> 1];
+extern const Word16 ivas_sin_twiddle_160_fx[IVAS_160_PT_LEN >> 1];
+extern const Word16 ivas_cos_twiddle_160_fx[IVAS_160_PT_LEN >> 1];
+extern const Word16 ivas_sin_twiddle_80_fx[IVAS_80_PT_LEN >> 1];
+extern const Word16 ivas_cos_twiddle_80_fx[IVAS_80_PT_LEN >> 1];
+extern const Word16 nf_tw_smoothing_coeffs_fx[N_LTP_GAIN_MEMS];
+extern const Word32 dft_res_gains_q_fx[][2];
+extern const Word16 dft_res_cod_alpha_fx[STEREO_DFT_BAND_MAX];
+extern const Word16 dft_trigo_12k8_fx[STEREO_DFT_N_12k8_ENC / 4 + 1];
+extern const Word16 dft_trigo_32k_fx[STEREO_DFT_N_32k_ENC / 4 + 1];
+extern const Word16 dft_trigo_48k_fx[STEREO_DFT_N_MAX_ENC / 4 + 1];
/* IVAS_ROM_COM_H */
#endif
diff --git a/lib_com/ivas_rom_com_fx.c b/lib_com/ivas_rom_com_fx.c
index 58c8444f82467c71cd4ac94a9b2b517b73d3c72d..2e7e832a561647d3885d42500ce383a368096b5f 100644
--- a/lib_com/ivas_rom_com_fx.c
+++ b/lib_com/ivas_rom_com_fx.c
@@ -35,12 +35,2869 @@
#include
#include "cnst.h"
#include "ivas_cnst.h"
-#include "ivas_rom_com_fx.h"
+#include "ivas_rom_com.h"
#include "wmc_auto.h"
+/* clang-format off */
+
+/*----------------------------------------------------------------------------------*
+ * Table of IVAS bitrates
+ *----------------------------------------------------------------------------------*/
+
+const Word32 ivas_brate_tbl[SIZE_IVAS_BRATE_TBL] =
+{
+ FRAME_NO_DATA, IVAS_SID_5k2,
+ IVAS_13k2, IVAS_16k4, IVAS_24k4, IVAS_32k, IVAS_48k,
+ IVAS_64k, IVAS_80k, IVAS_96k, IVAS_128k, IVAS_160k,
+ IVAS_192k, IVAS_256k, IVAS_384k, IVAS_512k
+};
+
+/*-------------------------------------------------------------------------
+ * DFT Stereo ROM tables
+ *------------------------------------------------------------------------*/
+
+/*4xERB scale: max of 14 bands*/
+const Word16 dft_band_limits_erb4[STEREO_DFT_ERB4_BANDS] =
+{
+ 1, 3, 5, 10, 18, 26, 41, 56, 84, 132, 214, 342, 470, 601
+};
+
+/*8xERB scale: max of 8 bands*/
+const Word16 dft_band_limits_erb8[STEREO_DFT_ERB8_BANDS] =
+{
+ 1, 5, 18, 41, 84, 214, 470, 601
+};
+
+
+const Word16 dft_band_ipd[3][4] =
+{
+ {0,8,10,13},
+ {0,5,6,8},
+ {0,2,3,4}
+};
+
+const Word16 dft_band_res_cod[3][4] =
+{
+ {0,8,10,11},
+ {0,5,6,7},
+ {0,5,6,7}
+};
+
+// Q31
+const Word32 dft_res_gains_q_Q31[][2] =
+{
+ /* quantization points for joint quantization of prediction gain and residual energy */
+
+ /* column 1 (|ILD| = 0): */
+ {0, 0 },
+ {0, 251216928 },
+ {0, 487459456 },
+ {0, 731632640 },
+ {0, 997611392 },
+ {0, 1299397248 },
+ {0, 1666984192 },
+ {0, 2147483647 },
+
+ /* column 2 (|ILD| = 2): */
+ {246151024, 0 },
+ {249475328, 247871152 },
+ {258660112, 480729248 },
+ {274304544, 720918848 },
+ {298427200, 981720000 },
+ {334663840, 1276185088 },
+ {391374592, 1632160640 },
+ {485919712, 2091786496 },
+
+ /* column 3 (|ILD| = 4): */
+ {485919712, 0 },
+ {492224736, 238188144 },
+ {509610752, 461283776 },
+ {539117184, 690072384 },
+ {584326016, 936189056 },
+ {651608832, 1210182144 },
+ {755411712, 1534299776 },
+ {924504576, 1938292992 },
+
+ /* column 4 (|ILD| = 6): */
+ {713563712, 0 },
+ {722237376, 223142880 },
+ {746085184, 431184640 },
+ {786311872, 642617280 },
+ {847364864, 866812416 },
+ {936938496, 1111020032 },
+ {1072199936, 1390431232 },
+ {1285225984, 1720430720 },
+
+ /* column 5 (|ILD| = 8): */
+ {924504576, 0 },
+ {934784576, 204139792 },
+ {962942400, 393358880 },
+ {1010083968, 583482048 },
+ {1080789888, 781462848 },
+ {1182728704, 991308544 },
+ {1332741248, 1221608960 },
+ {1559902080, 1475937536 },
+
+ /* column 6 (|ILD| = 10): */
+ {1115604864, 0 },
+ {1126709504, 182744416 },
+ {1156997632, 351025536 },
+ {1207276672, 517958016 },
+ {1281710592, 688294272 },
+ {1387005952, 863412992 },
+ {1537761536, 1046870336 },
+ {1757032448, 1234717184 },
+
+ /* column 7 (|ILD| = 13): */
+ {1361843968, 0 },
+ {1372924928, 149366080 },
+ {1402942464, 285507936 },
+ {1452130560, 417893888 },
+ {1523515136, 548787328 },
+ {1621670144, 677135936 },
+ {1756740352, 802203264 },
+ {1942499840, 915633344 },
+
+ /* column 8 (|ILD| = 16): */
+ {1559902080, 0 },
+ {1569913600, 117815248 },
+ {1596862336, 224162928 },
+ {1640492800, 325650848 },
+ {1702660352, 423060736 },
+ {1785997696, 514412544 },
+ {1896788608, 597466432 },
+ {2042241920, 664027712 },
+
+ /* column 9 (|ILD| = 19): */
+ {1714196608, 0 },
+ {1722634112, 90359672 },
+ {1745223424, 171238192 },
+ {1781415040, 247171072 },
+ {1832190080, 318199104 },
+ {1898830848, 382271424 },
+ {1984989952, 437025792 },
+ {2094086528, 475912448 },
+
+ /* column 10 (|ILD| = 22): */
+ {1831427712, 0 },
+ {1838194432, 67828272 },
+ {1856228992, 128123168 },
+ {1884882944, 183977072 },
+ {1924581248, 235132272 },
+ {1975822336, 279821408 },
+ {2040659200, 316058048 },
+ {2120554240, 339023232 },
+
+ /* column 11 (|ILD| = 25): */
+ {1918819584, 0 },
+ {1924055168, 50102940 },
+ {1937964416, 94399088 },
+ {1959916032, 135003712 },
+ {1990038784, 171579648 },
+ {2028424960, 202728896 },
+ {2076217216, 226931040 },
+ {2133943808, 240762976 },
+
+ /* column 12 (|ILD| = 30): */
+ {2015827840, 0 },
+ {2019068416, 29502130 },
+ {2027636864, 55420112 },
+ {2041056512, 78889960 },
+ {2059271424, 99626064 },
+ {2082150784, 116769424 },
+ {2110128128, 129415952 },
+ {2143192960, 135682304 },
+
+ /* column 13 (|ILD| = 35): */
+ {2072441984, 0 },
+ {2074364032, 17033840 },
+ {2079438464, 31939524 },
+ {2087347712, 45337676 },
+ {2098012032, 57039312 },
+ {2111296384, 66537632 },
+ {2127368192, 73321536 },
+ {2146126464, 76351632 },
+
+ /* column 14 (|ILD| = 40): */
+ {2104959232, 0 },
+ {2106073728, 9723806 },
+ {2109011456, 18212808 },
+ {2113579136, 25810606 },
+ {2119712384, 32401234 },
+ {2127314432, 37692632 },
+ {2136458496, 41399188 },
+ {2147054208, 42945376 },
+
+ /* column 15 (|ILD| = 45): */
+ {2123466240, 0 },
+ {2124103936, 5514738 },
+ {2125783296, 10322954 },
+ {2128390400, 14615774 },
+ {2131882240, 18322330 },
+ {2136200832, 21283710 },
+ {2141376256, 23332410 },
+ {2147348352, 24150602 },
+
+ /* column 16 (|ILD| = 50): */
+ {2133943808, 0 },
+ {2134306688, 3115998 },
+ {2135260160, 5830418 },
+ {2136737664, 8250632 },
+ {2138715520, 10335839 },
+ {2141157120, 11995844 },
+ {2144077696, 13136157 },
+ {2147440640, 13580687 }
+};
+
+
+/* tables for adaptive Golomb-Rice coding of DFT stereo parameters */
+const Word16 dft_code_itd[] =
+{
+ 0, 3, 4, 13, 8, 9, 12, 5, 10, 44, 23, 60, 45, 31, 235, 59, 28, 61, 234, 116
+};
+
+const Word16 dft_len_itd[] =
+{
+ 2, 3, 4, 4, 4, 4, 4, 4, 4, 6, 5, 6, 6, 5, 8, 6, 5, 6, 8, 7
+};
+
+const Word16 dft_maps_rpg[] =
+{
+ 0, 1, 2, 3, 4, 5, 6, 7,
+ 2, 0, 1, 3, 4, 5, 6, 7,
+ 6, 2, 0, 1, 3, 4, 5, 7,
+ 7, 5, 2, 0, 1, 3, 4, 6,
+ 7, 6, 4, 3, 1, 0, 2, 5,
+ 7, 6, 5, 3, 2, 1, 0, 4,
+ 7, 6, 5, 4, 3, 2, 0, 1,
+ 7, 6, 5, 4, 3, 2, 0, 1,
+ 6, 5, 4, 3, 1, 0, 2, 7,
+};
+
+const Word16 dft_maps_sg[NO_SYMB_GR_SIDE_G * NO_SYMB_GR_SIDE_G] =
+{
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 15, 4, 0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 12, 9, 4, 1, 0, 2, 3, 5, 6, 7, 8, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 16, 14, 8, 4, 2, 0, 1, 3, 5, 6, 7, 9, 10, 11, 12, 13, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 18, 16, 14, 10, 5, 0, 1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 13, 15, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 21, 19, 17, 15, 8, 4, 2, 0, 1, 3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 16, 18, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 21, 19, 17, 15, 12, 8, 4, 0, 1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 16, 18, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 21, 19, 17, 15, 13, 11, 9, 3, 0, 1, 2, 4, 5, 6, 7, 8, 10, 12, 14, 16, 18, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 24, 22, 20, 18, 16, 14, 12, 9, 6, 0, 1, 2, 3, 4, 5, 7, 8, 10, 11, 13, 15, 17, 19, 21, 23, 25, 26, 27, 28, 29, 30,
+ 25, 23, 21, 19, 17, 15, 13, 11, 9, 6, 0, 1, 2, 3, 4, 5, 7, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 27, 28, 29, 30,
+ 27, 25, 23, 21, 19, 17, 15, 13, 11, 8, 5, 0, 1, 2, 3, 4, 6, 7, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 29, 30,
+ 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 1, 0, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 28, 29, 30,
+ 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 30,
+ 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 0, 1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30,
+ 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30,
+ 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 1, 0, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29,
+ 30, 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28,
+ 30, 29, 28, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 0, 1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26,
+ 30, 29, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 9, 7, 6, 4, 3, 2, 1, 0, 5, 8, 11, 13, 15, 17, 19, 21, 23, 25, 27,
+ 30, 29, 28, 27, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 7, 5, 4, 3, 2, 1, 0, 6, 9, 11, 13, 15, 17, 19, 21, 23, 25,
+ 30, 29, 28, 27, 26, 25, 23, 21, 19, 17, 15, 13, 11, 10, 8, 7, 5, 4, 3, 2, 1, 0, 6, 9, 12, 14, 16, 18, 20, 22, 24,
+ 30, 29, 28, 27, 26, 25, 24, 23, 22, 20, 18, 16, 14, 12, 10, 8, 7, 6, 5, 4, 2, 1, 0, 3, 9, 11, 13, 15, 17, 19, 21,
+ 30, 29, 28, 27, 26, 25, 24, 23, 22, 20, 18, 16, 14, 13, 11, 10, 9, 7, 6, 5, 3, 2, 1, 0, 4, 8, 12, 15, 17, 19, 21,
+ 30, 29, 28, 27, 26, 25, 24, 23, 22, 20, 18, 16, 14, 13, 12, 11, 10, 9, 7, 6, 5, 3, 1, 0, 2, 4, 8, 15, 17, 19, 21,
+ 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 17, 15, 13, 12, 11, 9, 8, 7, 6, 4, 3, 2, 1, 0, 5, 10, 14, 16, 18,
+ 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 15, 13, 12, 11, 10, 9, 7, 6, 5, 3, 1, 0, 2, 4, 8, 14, 16,
+ 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 11, 10, 8, 7, 6, 5, 3, 2, 0, 1, 4, 9, 12,
+ 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 3, 2, 1, 0, 4, 15,
+ 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 0, 1,
+ 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
+};
+
+
+/*-------------------------------------------------------------------------
+ * Range Coder ROM tables
+ *------------------------------------------------------------------------*/
+
+/* Create separate tables for cumulative frequency and symbol frequency */
+const UWord16 cum_freq_ari_pk_s17_LC_ext[RANGE_N_CONTEXT][1 + RANGE_N_SYMBOLS] =
+{
+ { 0,16,47,153,241,269,325,468,591,674,798,912,1017,1082,1183,1277,1364,16384 },
+ { 0,7401,7844,7886,7899,12065,12718,12790,12805,14099,14476,14533,14549,15058,15264,15299,15310,16384 },
+ { 0,4362,6345,6864,7038,9037,11049,11736,12002,12569,13301,13656,13822,14021,14334,14515,14607,16384 },
+ { 0,2955,5183,5822,6013,8153,10671,11614,11943,12586,13540,14025,14232,14437,14770,14978,15080,16384 },
+ { 0,3155,4981,5615,5855,7969,9953,10739,11073,11936,12837,13208,13383,13767,14203,14400,14498,16384 },
+ { 0,1216,2630,3264,3558,4831,6679,7661,8157,8709,9622,10204,10542,10799,11243,11568,11777,16384 },
+ { 0,1759,3641,4350,4612,6325,8678,9732,10161,10790,11790,12361,12642,12883,13295,13566,13720,16384 },
+ { 0,1109,2705,3433,3732,5226,7532,8732,9263,9978,11142,11842,12188,12490,12986,13321,13520,16384 },
+ { 0,11524,13046,13170,13191,14956,15708,15813,15837,16028,16162,16195,16204,16245,16282,16295,16300,16384 },
+ { 0,8027,10586,10909,10974,13291,14861,15157,15232,15535,15824,15914,15943,16014,16090,16123,16136,16384 },
+ { 0,834,2034,2674,2997,4087,5843,6891,7455,8030,9013,9688,10085,10376,10893,11277,11528,16384 },
+ { 0,6038,9086,9451,9519,12332,14521,14913,15003,15329,15711,15848,15893,15955,16045,16091,16111,16384 },
+ { 0,4732,7685,8354,8545,10717,12924,13618,13852,14291,14842,15083,15181,15314,15491,15582,15625,16384 },
+ { 0,745,1783,2347,2655,3537,4963,5864,6406,6863,7664,8248,8634,8891,9351,9708,9958,16384 },
+ { 0,3957,6794,7669,7998,9743,11676,12498,12869,13313,13894,14186,14332,14498,14714,14835,14906,16384 },
+ { 0,2779,5388,6021,6201,8582,11352,12260,12544,13117,13981,14408,14580,14751,15039,15213,15298,16384 },
+ { 0,448,1160,1625,1920,2576,3706,4518,5053,5474,6234,6835,7262,7531,8032,8446,8758,16384 },
+ { 0,1,2,1555,2246,2247,2248,3489,4112,5449,6596,7302,7710,8311,8876,9266,9517,16384 },
+ { 0,2496,4910,5544,5722,8049,10799,11689,11973,12583,13467,13878,14047,14234,14537,14712,14803,16384 },
+ { 0,921,2222,2880,3188,4407,6321,7406,7955,8573,9616,10296,10679,10978,11502,11880,12118,16384 },
+ { 0,2620,4443,5017,5233,7072,9213,10083,10441,11049,11954,12442,12676,12918,13310,13565,13705,16384 },
+ { 0,11205,13084,13178,13187,15164,16010,16081,16091,16213,16303,16321,16325,16340,16355,16360,16362,16384 },
+ { 0,358,916,1288,1542,2055,2937,3594,4062,4399,5017,5524,5907,6136,6573,6941,7236,16384 },
+ { 0,3575,5093,5536,5735,7408,9185,9878,10188,10727,11497,11933,12165,12410,12794,13019,13166,16384 },
+ { 0,1,2,640,1036,1037,1038,1670,2096,2696,3287,3732,4056,4417,4800,5106,5339,16384 },
+ { 0,969,1397,1518,1578,2633,3338,3566,3675,4197,4664,4857,4957,5288,5625,5783,5874,16384 },
+ { 0,10458,12104,12294,12331,14246,15264,15437,15481,15752,15971,16031,16050,16120,16186,16210,16218,16384 },
+ { 0,7178,9744,10039,10093,12701,14612,14961,15042,15360,15732,15869,15917,15978,16070,16117,16139,16384 },
+ { 0,1298,2418,2879,3113,4146,5509,6227,6621,7053,7755,8229,8539,8776,9186,9492,9714,16384 },
+ { 0,4957,7785,8252,8357,10978,13372,13955,14114,14561,15140,15378,15464,15570,15730,15820,15860,16384 },
+ { 0,4823,8164,8570,8647,11604,14169,14653,14763,15105,15554,15727,15785,15852,15960,16018,16045,16384 },
+ { 0,4735,7010,7517,7660,9986,12230,12914,13131,13666,14374,14689,14814,14972,15212,15342,15404,16384 },
+ { 0,3363,5881,6658,6941,8864,11113,12015,12368,12889,13643,14019,14203,14394,14665,14823,14906,16384 },
+ { 0,2569,4996,5779,6068,7917,10251,11209,11602,12129,12918,13321,13520,13696,13976,14155,14259,16384 },
+ { 0,209,577,848,1046,1378,1982,2465,2835,3072,3513,3893,4202,4374,4703,4994,5241,16384 },
+ { 0,2074,4337,5048,5274,7319,10003,11066,11446,12105,13112,13652,13885,14100,14464,14691,14810,16384 },
+ { 0,1619,3560,4288,4550,6381,8955,10102,10543,11239,12362,12982,13261,13516,13958,14234,14381,16384 },
+ { 0,89,257,441,582,734,1024,1325,1568,1716,1983,2222,2430,2545,2750,2941,3109,16384 },
+ { 0,2202,3563,4044,4264,5686,7344,8100,8476,9006,9835,10331,10612,10864,11304,11599,11787,16384 },
+ { 0,1220,2801,3492,3784,5223,7387,8496,8998,9640,10711,11369,11711,11993,12486,12829,13035,16384 },
+ { 0,12626,13813,13903,13917,15396,15906,15972,15987,16139,16230,16251,16257,16289,16315,16323,16326,16384 },
+ { 0,1579,3191,3831,4099,5678,7788,8761,9206,9842,10821,11388,11681,11958,12417,12722,12902,16384 },
+ { 0,597,1514,2064,2379,3237,4679,5637,6213,6733,7649,8316,8755,9052,9599,10023,10323,16384 },
+ { 0,9273,11762,12080,12151,14038,15210,15446,15514,15725,15929,15995,16019,16068,16124,16148,16158,16384 },
+ { 0,9238,11681,11852,11872,14306,15644,15801,15828,16013,16183,16231,16243,16266,16297,16312,16318,16384 },
+ { 0,6791,9200,9531,9594,12240,14178,14552,14639,15064,15506,15643,15687,15785,15908,15960,15983,16384 },
+ { 0,7175,10415,10905,11033,13038,14621,15002,15123,15367,15651,15762,15806,15864,15938,15974,15992,16384 },
+ { 0,5060,7703,8132,8225,10934,13270,13778,13911,14397,14972,15173,15242,15367,15537,15619,15654,16384 },
+ { 0,3721,6311,6857,6992,9557,12180,12895,13098,13671,14418,14718,14830,14984,15212,15333,15390,16384 },
+ { 0,5971,9288,10044,10269,11991,13680,14228,14437,14750,15130,15293,15374,15459,15579,15642,15677,16384 },
+ { 0,3047,5311,5907,6078,8339,10850,11679,11946,12580,13442,13854,14024,14220,14534,14716,14810,16384 },
+ { 0,2061,4280,4993,5228,7201,9735,10735,11097,11708,12606,13082,13295,13498,13836,14043,14161,16384 },
+ { 0,4738,7949,8880,9234,10781,12502,13214,13531,13897,14355,14593,14718,14835,14998,15096,15153,16384 },
+ { 0,3237,5045,5632,5860,7609,9702,10608,10986,11571,12476,12978,13230,13451,13830,14074,14208,16384 },
+ { 0,1833,3889,4677,5028,6422,8379,9378,9884,10350,11086,11545,11809,12003,12327,12559,12711,16384 },
+ { 0,3989,6858,7352,7459,10254,12936,13571,13735,14240,14895,15153,15242,15364,15548,15646,15690,16384 },
+ { 0,1463,3197,3909,4220,5626,7609,8632,9127,9657,10520,11078,11380,11607,11991,12265,12442,16384 },
+ { 0,14233,15083,15108,15110,16069,16300,16314,16316,16352,16370,16373,16374,16377,16380,16381,16382,16384 },
+ { 0,1,2,2610,3293,3294,3295,5097,5671,8467,10332,11119,11437,12223,12850,13185,13345,16384 },
+ { 0,2010,4053,4696,4910,6879,9391,10386,10750,11393,12376,12886,13119,13348,13726,13967,14099,16384 },
+ { 0,7586,10517,10758,10791,13543,15346,15577,15619,15846,16082,16150,16169,16202,16245,16265,16273,16384 },
+ { 0,3059,5772,6369,6524,9041,11801,12582,12813,13361,14115,14439,14567,14714,14944,15075,15141,16384 },
+ { 0,8643,10594,10813,10856,13274,14686,14920,14975,15350,15680,15771,15799,15897,16003,16042,16057,16384 },
+ { 0,6720,8878,9325,9467,11564,13248,13744,13929,14384,14880,15087,15167,15311,15488,15569,15607,16384 },
+};
+
+const UWord16 sym_freq_ari_pk_s17_LC_ext[RANGE_N_CONTEXT][RANGE_N_SYMBOLS] =
+{
+ { 16,31,106,88,28,56,143,123,83,124,114,105,65,101,94,87,15020 },
+ { 7401,443,42,13,4166,653,72,15,1294,377,57,16,509,206,35,11,1074 },
+ { 4362,1983,519,174,1999,2012,687,266,567,732,355,166,199,313,181,92,1777 },
+ { 2955,2228,639,191,2140,2518,943,329,643,954,485,207,205,333,208,102,1304 },
+ { 3155,1826,634,240,2114,1984,786,334,863,901,371,175,384,436,197,98,1886 },
+ { 1216,1414,634,294,1273,1848,982,496,552,913,582,338,257,444,325,209,4607 },
+ { 1759,1882,709,262,1713,2353,1054,429,629,1000,571,281,241,412,271,154,2664 },
+ { 1109,1596,728,299,1494,2306,1200,531,715,1164,700,346,302,496,335,199,2864 },
+ { 11524,1522,124,21,1765,752,105,24,191,134,33,9,41,37,13,5,84 },
+ { 8027,2559,323,65,2317,1570,296,75,303,289,90,29,71,76,33,13,248 },
+ { 834,1200,640,323,1090,1756,1048,564,575,983,675,397,291,517,384,251,4856 },
+ { 6038,3048,365,68,2813,2189,392,90,326,382,137,45,62,90,46,20,273 },
+ { 4732,2953,669,191,2172,2207,694,234,439,551,241,98,133,177,91,43,759 },
+ { 745,1038,564,308,882,1426,901,542,457,801,584,386,257,460,357,250,6426 },
+ { 3957,2837,875,329,1745,1933,822,371,444,581,292,146,166,216,121,71,1478 },
+ { 2779,2609,633,180,2381,2770,908,284,573,864,427,172,171,288,174,85,1086 },
+ { 448,712,465,295,656,1130,812,535,421,760,601,427,269,501,414,312,7626 },
+ { 1,1,1553,691,1,1,1241,623,1337,1147,706,408,601,565,390,251,6867 },
+ { 2496,2414,634,178,2327,2750,890,284,610,884,411,169,187,303,175,91,1581 },
+ { 921,1301,658,308,1219,1914,1085,549,618,1043,680,383,299,524,378,238,4266 },
+ { 2620,1823,574,216,1839,2141,870,358,608,905,488,234,242,392,255,140,2679 },
+ { 11205,1879,94,9,1977,846,71,10,122,90,18,4,15,15,5,2,22 },
+ { 358,558,372,254,513,882,657,468,337,618,507,383,229,437,368,295,9148 },
+ { 3575,1518,443,199,1673,1777,693,310,539,770,436,232,245,384,225,147,3218 },
+ { 1,1,638,396,1,1,632,426,600,591,445,324,361,383,306,233,11045 },
+ { 969,428,121,60,1055,705,228,109,522,467,193,100,331,337,158,91,10510 },
+ { 10458,1646,190,37,1915,1018,173,44,271,219,60,19,70,66,24,8,166 },
+ { 7178,2566,295,54,2608,1911,349,81,318,372,137,48,61,92,47,22,245 },
+ { 1298,1120,461,234,1033,1363,718,394,432,702,474,310,237,410,306,222,6670 },
+ { 4957,2828,467,105,2621,2394,583,159,447,579,238,86,106,160,90,40,524 },
+ { 4823,3341,406,77,2957,2565,484,110,342,449,173,58,67,108,58,27,339 },
+ { 4735,2275,507,143,2326,2244,684,217,535,708,315,125,158,240,130,62,980 },
+ { 3363,2518,777,283,1923,2249,902,353,521,754,376,184,191,271,158,83,1478 },
+ { 2569,2427,783,289,1849,2334,958,393,527,789,403,199,176,280,179,104,2125 },
+ { 209,368,271,198,332,604,483,370,237,441,380,309,172,329,291,247,11143 },
+ { 2074,2263,711,226,2045,2684,1063,380,659,1007,540,233,215,364,227,119,1574 },
+ { 1619,1941,728,262,1831,2574,1147,441,696,1123,620,279,255,442,276,147,2003 },
+ { 89,168,184,141,152,290,301,243,148,267,239,208,115,205,191,168,13275 },
+ { 2202,1361,481,220,1422,1658,756,376,530,829,496,281,252,440,295,188,4597 },
+ { 1220,1581,691,292,1439,2164,1109,502,642,1071,658,342,282,493,343,206,3349 },
+ { 12626,1187,90,14,1479,510,66,15,152,91,21,6,32,26,8,3,58 },
+ { 1579,1612,640,268,1579,2110,973,445,636,979,567,293,277,459,305,180,3482 },
+ { 597,917,550,315,858,1442,958,576,520,916,667,439,297,547,424,300,6061 },
+ { 9273,2489,318,71,1887,1172,236,68,211,204,66,24,49,56,24,10,226 },
+ { 9238,2443,171,20,2434,1338,157,27,185,170,48,12,23,31,15,6,66 },
+ { 6791,2409,331,63,2646,1938,374,87,425,442,137,44,98,123,52,23,401 },
+ { 7175,3240,490,128,2005,1583,381,121,244,284,111,44,58,74,36,18,392 },
+ { 5060,2643,429,93,2709,2336,508,133,486,575,201,69,125,170,82,35,730 },
+ { 3721,2590,546,135,2565,2623,715,203,573,747,300,112,154,228,121,57,994 },
+ { 5971,3317,756,225,1722,1689,548,209,313,380,163,81,85,120,63,35,707 },
+ { 3047,2264,596,171,2261,2511,829,267,634,862,412,170,196,314,182,94,1574 },
+ { 2061,2219,713,235,1973,2534,1000,362,611,898,476,213,203,338,207,118,2223 },
+ { 4738,3211,931,354,1547,1721,712,317,366,458,238,125,117,163,98,57,1231 },
+ { 3237,1808,587,228,1749,2093,906,378,585,905,502,252,221,379,244,134,2176 },
+ { 1833,2056,788,351,1394,1957,999,506,466,736,459,264,194,324,232,152,3673 },
+ { 3989,2869,494,107,2795,2682,635,164,505,655,258,89,122,184,98,44,694 },
+ { 1463,1734,712,311,1406,1983,1023,495,530,863,558,302,227,384,274,177,3942 },
+ { 14233,850,25,2,959,231,14,2,36,18,3,1,3,3,1,1,2 },
+ { 1,1,2608,683,1,1,1802,574,2796,1865,787,318,786,627,335,160,3039 },
+ { 2010,2043,643,214,1969,2512,995,364,643,983,510,233,229,378,241,132,2285 },
+ { 7586,2931,241,33,2752,1803,231,42,227,236,68,19,33,43,20,8,111 },
+ { 3059,2713,597,155,2517,2760,781,231,548,754,324,128,147,230,131,66,1243 },
+ { 8643,1951,219,43,2418,1412,234,55,375,330,91,28,98,106,39,15,327 },
+ { 6720,2158,447,142,2097,1684,496,185,455,496,207,80,144,177,81,38,777 },
+};
+
+
+/*-------------------------------------------------------------------------
+ * ECLVQ Stereo ROM tables
+ *------------------------------------------------------------------------*/
+
+/* table with round(ECSQ_PROB_TOTAL / index) for entropy coding, with i in {1, .., ECSQ_SEGMENT_SIZE} */
+const UWord16 ECSQ_tab_inverse[1 + ECSQ_SEGMENT_SIZE] =
+{
+ 0, 16384, 8192, 5461, 4096, 3277, 2731, 2341, 2048
+};
+
+const Word16 tdm_bit_allc_tbl[5][6] =
+{
+ /* IC -- UC -- GC -- TM --AC */
+ { 1650, 3500, 0, 4400, 0, 5000 }, /* IVAS_13k2 */
+ { 1650, 3500, 0, 5000, 0, 5000 }, /* IVAS_16k4 */
+ { 1650, 3500, 0, 6000, 0, 5000 }, /* IVAS_24k4 */
+ { 1650, 6050, 0, 10000, 0, 10000 }, /* IVAS_32k */
+ { 1650, 6050, 0, 13000, 0, 14000 } /* IVAS_48k */
+};
+
+
+const Word16 fast_FCB_bits_2sfr[] = {8, 14, 18, 20, 24, 128/*stop value*/};
+
+const Word16 fast_FCB_rates_2sfr[] = {/*16*50,*/ (8+14)*50, 28*50, 32*50, 34*50, 36*50, 38*50, 40*50, 42*50, 44*50, 48*50};
+
+
+/*----------------------------------------------------------------------------------*
+ * MDCT Stereo ROM tables
+ *----------------------------------------------------------------------------------*/
+
+ /* PsychLPC */
+
+const SpectrumWarping sw32000Hz[] =
+{{
+ {
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6,
+ 6, 8, 8, 8, 8, 8, 10, 10, 10, 10, 12, 12, 12, 12, 14, 14,
+ 14, 16, 18, 18, 18, 20, 22, 22, 22, 24, 26, 26, 26, 28, 30, 32
+ },
+ {
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5,
+ 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10
+ },
+}};
+
+const SpectrumWarping sw25600Hz[] =
+{{
+ {
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6,
+ 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 10, 12, 12, 12, 12,
+ 12, 12, 14, 14, 14, 14, 14, 16, 16, 18, 18, 18, 18, 18, 20, 20
+ },
+ {
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7
+ },
+}};
+
+const SpectrumWarping sw16000Hz[] =
+{{
+ {
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
+ },
+ {
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
+ },
+}};
+
+const MDCTStereoBands_config mdctStereoBands_32000_640[] =
+{{
+ /*TCX 20*/
+ { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 8, 8, 8, 8, 8, 8, 8, 12, 12, 12,
+ 12, 20, 20, 20, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 42,
+ 64, 64, 96, 160},
+ {44, 41,38, 29},/*number of bands for frame lengths 960, 640, 512, 320 respectively*/
+
+ /*TCX 10*/
+ {
+ 4, 4, 4, 4, 4, 8, 8, 8, 8, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 20, 32, 32,
+ 32, 48, 80
+ },
+ {33, 29, 26, 18}/*number of bands for frame lengths 480, 320, 256, 160 respectively*/
+}};
+
+const Word16 dft_cng_coh_u2i[9] = { 4, 5, 3, 6, 2, 7, 1, 8, 0 }; /* Coherence unary codeword -> residual codeword conversion table */
+
+const Word16 dft_cng_coh_i2u[9] = { 8, 6, 4, 2, 0, 1, 3, 5, 7 }; /* Coherence residual codeword -> unary codeword conversion table */
+
+const Word16 dft_cng_coh_alpha_start[STEREO_DFT_N_COH_ALPHA_STEPS - 1] = { 15, 16, 17, 18 };
+
+const Word16 DirAC_band_grouping_12[12 + 1] =
+{
+ 0, 1, 2, 3, 4, 5, 6, 7, 11, 17, 25, 40, 60
+};
+
+const Word16 DirAC_band_grouping_6[6 + 1] =
+{
+ 0, 1, 4, 8, 20, 30, 60
+};
+
+const Word16 DirAC_band_grouping_5[5 + 1] =
+{
+ 0, 1, 3, 7, 15, 60
+};
+
+const Word16 DirAC_block_grouping[MAX_PARAM_SPATIAL_SUBFRAMES + 1] =
+{
+ 0, 4, 8, 12, 16
+};
+
+const Word16 DirAC_block_grouping_5ms_MDFT[MAX_PARAM_SPATIAL_SUBFRAMES + 1] =
+{
+ 0, 1, 2, 3, 4
+};
+
+const Word32 c_weights_fx[DIRAC_NO_FB_BANDS_MAX] /* Q30 */ = { 106970960, 1033798336, 1065867776, 1071704704, 1073381888, 1073741824, 1073494016, 1072883072, 1072012032, 1070930560, 1069665600, 1068232640, 1066641792, 1064899968, 1063012224, 1060982464, 1058814144, 1056510016, 1054072832, 1051505280, 1048809664, 1045988480, 1043044160, 1039979072, 1036795776, 1033496576, 1030084096, 1026560960, 1022929600, 1019192512, 1015352576, 1011412416, 1007374720, 1003242112, 999017472, 994703488, 990302976, 985818688, 981253568, 976610304, 971891712, 967100672, 962240064, 957312576, 952321088, 947268224, 942156992, 936990080, 931770048, 926499840, 921182016, 915819200, 910414208, 904969344, 899487488, 893970944, 888422272, 882843840, 877238144, 871607552, 865954432, 860280896, 854589184, 848881728, 843160384, 837427328, 831684672, 825934208, 820178240, 814418240, 808656320, 802894208, 797133568, 791376192, 785623744, 779877568, 774139520, 768410880, 762693184, 756987904, 751296064, 745619328, 739958784, 734315584, 728691008, 723086208, 717502016, 711939712, 706400064, 700884096, 695392768, 689926912, 684487232, 679074688, 673689856, 668333504, 663006464, 657709056, 652442176, 647206144, 642001600, 636828992, 631688896, 626581696, 621507776, 616467520, 611461184, 606489344, 601552064, 596649792, 591782528, 586950784, 582154560, 577394112, 572669696, 567981312, 563329088, 558713152, 554133568, 549590464, 545083840, 540613760, 536180160, 531783104, 527422528, 523098464, 518810784, 514559520, 510344672, 506165856, 502023360, 497916832, 493846304, 489811488, 485812448, 481848832, 477920672, 474027808, 470169952, 466347008, 462558848, 458805152, 455085920, 451400736, 447749600, 444132160, 440548320, 436997792, 433480416, 429995904, 426544032, 423124608, 419737376, 416382144, 413058720, 409766720, 406505984, 403276288, 400077280, 396908768, 393770656, 390662496, 387584064, 384535200, 381515616, 378525024, 375563200, 372629952, 369724864, 366847872, 363998592, 361176672, 358382176, 355614592, 352873760, 350159456, 347471328, 344809216, 342172864, 339562048, 336976384, 334415808, 331879840, 329368576, 326881472, 324418432, 321979104, 319563392, 317170976, 314801664, 312455232, 310131328, 307829856, 305550528, 303293088, 301057440, 298843168, 296650176, 294478304, 292327168, 290196672, 288086432, 285996512, 283926432, 281876224, 279845472, 277834016, 275841792, 273868480, 271913856, 269977792, 268059968, 266160304, 264278672, 262414768, 260568368, 258739360, 256927520, 255132768, 253354752, 251593392, 249848448, 248119936, 246407424, 244710816, 243030080, 241364928, 239715120, 238080672, 236461248, 234856752, 233267088, 231692016, 230131440, 228585136, 227053024, 225534848, 224030544, 222539872, 221062832 };
+
+
+/*----------------------------------------------------------------------*
+* SPAR ROM tables
+*-----------------------------------------------------------------------*/
+
+const ivas_spar_br_table_t ivas_spar_br_table_consts[IVAS_SPAR_BR_TABLE_LEN] =
+{
+/* When AGC is ON additional (AGC_BITS_PER_CH+1) bits may be taken from each core-coder channel
+ so minimum core-coder bitrate per channel can be min core-coder bitrates as per the table - AGC_BITS_PER_CH */
+ { 13200, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0, { { 10000, 8150, 13150 } },
+ { { 15, 1, 5, 1 },{ 15, 1, 3, 1 },{ 7, 1, 3, 1 } }, 0, 0, 0 },
+
+ { 16400, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0, { { 13200, 11350, 16350 } },
+ { { 15, 1, 5, 1 },{ 15, 1, 3, 1 },{ 7, 1, 3, 1 } }, 0, 0, 0 },
+
+ { 24400, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0, { { 16400, 14850, 24350 } },
+ { { 15, 1, 5, 1 },{ 15, 1, 3, 1 },{ 7, 1, 3, 1 } }, 0, 0, 0 },
+
+ { 32000, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0, { { 24000, 20450, 31950 } },
+ { { 21, 1, 5, 1 },{ 15, 1, 5, 1 },{ 15, 1, 3, 1 } }, 0, 0, 0 },
+
+ { 48000, 0, SBA_FOA_ORDER, FB, 24000, 2, WYXZ, 0, 0, { { 24000, 21000, 31950 },{ 16000, 15000, 20400 } },
+ { { 15, 7, 5, 1 },{ 15, 7, 3, 1 },{ 7, 7, 3, 1 } }, 1, 0, 0 },
+
+ { 64000, 0, SBA_FOA_ORDER, FB, 24000, 2, WYXZ, 0, 0, { { 38000, 34050, 56000 },{ 16000, 15600, 20400 } },{ { 21, 7, 5, 1 },{ 15, 7, 5, 1 },{ 15, 7, 3, 1 } }, 1, 1, 0 },
+
+ { 80000, 0, SBA_FOA_ORDER, FB, 24000, 2, WYXZ, 0, 0, { { 46000, 43000, 56000 },{ 24000, 23000, 31950 } },
+ { { 21, 7, 5, 1 },{ 15, 7, 5, 1 },{ 15, 7, 3, 1 } }, 1, 0, 0 },
+
+ { 96000, 0, SBA_FOA_ORDER, FB, 24000, 3, WYXZ, 0, 0, { { 47000, 42600, 56000 },{ 23000, 22600, 31950 },{ 16000, 15600, 20400 } },
+ { { 21, 9, 9, 1 },{ 21, 7, 5, 1 },{ 21, 7, 5, 1 } }, 1, 0, 0 },
+
+ { 128000, 0, SBA_FOA_ORDER, FB, 24000, 3, WYXZ, 0, 0, { { 55000, 50000, 56000 },{ 36000, 36000, 56000 },{ 27000, 27000, 31950 } },
+ { { 21, 11, 9, 1 },{ 21, 9, 7, 1 },{ 21, 7, 7, 1 } }, 1, 0, 0 },
+
+ { 160000, 0, SBA_FOA_ORDER, FB, 24000, 3, WYXZ, 0, 0, { { 74000, 70900, 112000 },{ 41000, 40050, 56000 },{ 35000, 34050, 56000 } },
+ { { 21, 11, 11, 1 },{ 21, 9, 9, 1 },{ 21, 7, 7, 1 } }, 1, 0, 0 },
+
+ { 192000, 0, SBA_FOA_ORDER, FB, 24000, 3, WYXZ, 0, 0, { { 90000, 87900, 112000 },{ 50000, 48050, 56000 },{ 42000, 41050, 56000 } },
+ { { 21, 11, 11, 1 },{ 21, 9, 9, 1 },{ 21, 7, 7, 1 } }, 1, 0, 0 },
+
+ { 256000, 0, SBA_FOA_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 90000, 85000, 112000 },{ 70000, 69000, 112000 },{ 50000, 48950, 56000 },{ 36400, 35600, 56000 } },
+ { { 31, 1, 1, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 },
+
+ { 256000, 0, SBA_HOA2_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 84650, 83000, 112000 },{ 65850, 64550, 56000 },{ 47000, 46100, 48000 },{ 28200, 27650, 40000 } },
+ { { 31, 11, 11, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 },
+
+ { 256000, 0, SBA_HOA3_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 76300, 73550, 112000 },{ 59350, 57200, 56000 },{ 42400, 40850, 48000 },{ 25450, 24500, 40000 } },
+ { { 31, 11, 11, 1 },{ 1, 1, 1, 1 }, { 1, 1, 1, 1 } }, 1, 2, 0 },
+
+ { 384000, 0, SBA_FOA_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 128000, 128000, 128000 },{ 100000, 100000, 128000 },{ 79850, 79850, 104000 },{ 66600, 66600, 104000 } },
+ { { 31, 1, 1, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 },
+
+ { 384000, 0, SBA_HOA2_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 128000, 128000, 128000 },{ 105350, 103300, 112000 },{ 75200, 73750, 96000 },{ 45100, 44250, 48000 } },
+ { { 31, 11, 11, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 },
+
+ { 384000, 0, SBA_HOA3_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 124300, 121550, 128000 },{ 96700, 94550, 112000 },{ 69050, 67500, 96000 },{ 41450, 40500, 48000 } },
+ { { 31, 11, 11, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 },
+
+ { 512000, 0, SBA_FOA_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 128000, 128000, 128000 },{ 128000, 128000, 128000 },{ 128000, 128000, 128000 }, {118450, 118450, 128000 } },
+ { { 31, 1, 1, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 },
+
+ { 512000, 0, SBA_HOA2_ORDER, FB, 24000, 4, WYXZ, 0, 0,{ { 124000, 124000, 128000 },{ 124000, 124000, 128000 },{ 125200, 118450, 128000 },{ 76300, 73000, 128000 } },
+ { { 31, 11, 11, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 },
+
+ { 512000, 0, SBA_HOA3_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 118000, 118000, 128000 },{ 118000, 118000, 128000 },{ 117200, 109250, 128000 },{ 72300, 69000, 128000 } },
+ { { 31, 11, 11, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 },
+};
+
+const ivas_spar_br_table_t ivas_spar_br_table_consts_fx[IVAS_SPAR_BR_TABLE_LEN] = /*ceilf(log2f)*/
+{
+ /* When AGC is ON additional (AGC_BITS_PER_CH+1) bits may be taken from each core-coder channel
+ so minimum core-coder bitrate per channel can be min core-coder bitrates as per the table - AGC_BITS_PER_CH */
+ { 13200, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0, { { 10000, 8150, 13150 } },
+ { { 4, 0, 3, 0 },{ 4, 0, 2, 0 },{ 3, 0, 2, 0 } }, 0, 0, 0 },
+
+ { 16400, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0, { { 13200, 11350, 16350 } },
+ { { 4, 0, 3, 0 },{ 4, 0, 2, 0 },{ 3, 0, 2, 0 } }, 0, 0, 0 },
+
+ { 24400, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0, { { 16400, 14850, 24350 } },
+ { { 4, 0, 3, 0 },{ 4, 0, 2, 0 },{ 3, 0, 2, 0 } }, 0, 0, 0 },
+
+ { 32000, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0, { { 24000, 20450, 31950 } },
+ { { 5, 0, 3, 0 },{ 4, 0, 3, 0 },{ 4, 0, 2, 0 } }, 0, 0, 0 },
+
+ { 48000, 0, SBA_FOA_ORDER, FB, 24000, 2, WYXZ, 0, 0, { { 24000, 21000, 31950 },{ 16000, 15000, 20400 } },
+ { { 4, 3, 3, 0 },{ 4, 3, 2, 0 },{ 3, 3, 2, 0 } }, 1, 0, 0 },
+
+ { 64000, 0, SBA_FOA_ORDER, FB, 24000, 2, WYXZ, 0, 0, { { 38000, 34050, 56000 },{ 16000, 15600, 20400 } },{ { 5, 3, 3, 0 },{ 4, 3, 3, 0 },{ 4, 3, 2, 0 } }, 1, 1, 0 },
+
+ { 80000, 0, SBA_FOA_ORDER, FB, 24000, 2, WYXZ, 0, 0, { { 46000, 43000, 56000 },{ 24000, 23000, 31950 } },
+ { { 5, 3, 3, 0 },{ 4, 3, 3, 0 },{ 4, 3, 2, 0 } }, 1, 0, 0 },
+
+ { 96000, 0, SBA_FOA_ORDER, FB, 24000, 3, WYXZ, 0, 0, { { 47000, 42600, 56000 },{ 23000, 22600, 31950 },{ 16000, 15600, 20400 } },
+ { { 5, 4, 4, 0 },{ 5, 3, 3, 0 },{ 5, 3, 3, 0 } }, 1, 0, 0 },
+
+ { 128000, 0, SBA_FOA_ORDER, FB, 24000, 3, WYXZ, 0, 0, { { 55000, 50000, 56000 },{ 36000, 36000, 56000 },{ 27000, 27000, 31950 } },
+ { { 5, 4, 4, 0 },{ 5, 4, 3, 0 },{ 5, 3, 3, 0 } }, 1, 0, 0 },
+
+ { 160000, 0, SBA_FOA_ORDER, FB, 24000, 3, WYXZ, 0, 0, { { 74000, 70900, 112000 },{ 41000, 40050, 56000 },{ 35000, 34050, 56000 } },
+ { { 5, 4, 4, 0 },{ 5, 4, 4, 0 },{ 5, 3, 3, 0 } }, 1, 0, 0 },
+
+ { 192000, 0, SBA_FOA_ORDER, FB, 24000, 3, WYXZ, 0, 0, { { 90000, 87900, 112000 },{ 50000, 48050, 56000 },{ 42000, 41050, 56000 } },
+ { { 5, 4, 4, 0 },{ 5, 4, 4, 0 },{ 5, 3, 3, 0 } }, 1, 0, 0 },
+
+ { 256000, 0, SBA_FOA_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 90000, 85000, 112000 },{ 70000, 69000, 112000 },{ 50000, 48950, 56000 },{ 36400, 35600, 56000 } },
+ { { 5, 0, 0, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 } }, 1, 2, 0 },
+
+ { 256000, 0, SBA_HOA2_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 84650, 83000, 112000 },{ 65850, 64550, 56000 },{ 47000, 46100, 48000 },{ 28200, 27650, 40000 } },
+ { { 5, 4, 4, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 } }, 1, 2, 0 },
+
+ { 256000, 0, SBA_HOA3_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 76300, 73550, 112000 },{ 59350, 57200, 56000 },{ 42400, 40850, 48000 },{ 25450, 24500, 40000 } },
+ { { 5, 4, 4, 0 },{ 0, 0, 0, 0 }, { 0, 0, 0, 0 } }, 1, 2, 0 },
+
+ { 384000, 0, SBA_FOA_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 128000, 128000, 128000 },{ 100000, 100000, 128000 },{ 79850, 79850, 104000 },{ 66600, 66600, 104000 } },
+ { { 5, 0, 0, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 } }, 1, 2, 0 },
+
+ { 384000, 0, SBA_HOA2_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 128000, 128000, 128000 },{ 105350, 103300, 112000 },{ 75200, 73750, 96000 },{ 45100, 44250, 48000 } },
+ { { 5, 4, 4, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 } }, 1, 2, 0 },
+
+ { 384000, 0, SBA_HOA3_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 124300, 121550, 128000 },{ 96700, 94550, 112000 },{ 69050, 67500, 96000 },{ 41450, 40500, 48000 } },
+ { { 5, 4, 4, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 } }, 1, 2, 0 },
+
+ { 512000, 0, SBA_FOA_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 128000, 128000, 128000 },{ 128000, 128000, 128000 },{ 128000, 128000, 128000 }, {118450, 118450, 128000 } },
+ { { 5, 0, 0, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 } }, 1, 2, 0 },
+
+ { 512000, 0, SBA_HOA2_ORDER, FB, 24000, 4, WYXZ, 0, 0,{ { 124000, 124000, 128000 },{ 124000, 124000, 128000 },{ 125200, 118450, 128000 },{ 76300, 73000, 128000 } },
+ { { 5, 4, 4, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 } }, 1, 2, 0 },
+
+ { 512000, 0, SBA_HOA3_ORDER, FB, 24000, 4, WYXZ, 0, 0, { { 118000, 118000, 128000 },{ 118000, 118000, 128000 },{ 117200, 109250, 128000 },{ 72300, 69000, 128000 } },
+ { { 5, 4, 4, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 } }, 1, 2, 0 },
+};
+
+const ivas_freq_models_t ivas_arith_pred_r_consts[TOTAL_PRED_QUANT_STRATS_ARITH] =
+{
+ /* entry for 1 quantization points */
+ {
+ /* pred_R real */
+ {
+ { 0,16384, },
+ { 0,16384, },
+ { 0,16384, },
+ { 0,16384, },
+ },
+ /* pred_R real differential */
+ {
+ { 0,16384, },
+ { 0,16384, },
+ { 0,16384, },
+ { 0,16384, },
+ },
+ /* pred_R real : values for general and differential */
+ { 0 },{ 0 },
+ /* pred_R real : num dyn models for general and differential */
+ 4, 4
+ },
+ /* entry for 7 quantization points for br_table_idx >= 2 */
+ {
+ /* pred_R real */
+ {
+ { 0,546,1092,2184,8740,2184,1092,546, },
+ { 0,1779,2116,2516,3562,2516,2116,1779, },
+ { 0,1848,2614,5229,2614,1848,1307,924, },
+ { 0,924,1307,1848,2614,5229,2614,1848, },
+ },
+ /* pred_R real differential */
+ {
+ { 0,125,399,1269,12798,1269,399,125, },
+ { 0,744,1327,2365,7512,2365,1327,744, },
+ { 0,1354,2413,7664,2413,1354,760,426, },
+ { 0,426,760,1354,2413,7664,2413,1354, },
+ },
+ /* pred_R real : values for general and differential */
+ { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 },
+ /* pred_R real : num dyn models for general and differential */
+ 4, 4
+ },
+ /* entry for 15 quantization points for br_table_idx >= 2 */
+ {
+ /* pred_R real */
+ {
+ { 0,32,64,128,257,514,1028,2056,8226,2056,1028,514,257,128,64,32, },
+ { 0,565,672,799,950,1130,1344,1598,2268,1598,1344,1130,950,799,672,565, },
+ { 0,353,500,707,1000,1414,2000,4010,2000,1414,1000,707,500,353,250,176, },
+ { 0,176,250,353,500,707,1000,1414,2000,4010,2000,1414,1000,707,500,353, },
+ },
+ /* pred_R real differential */
+ {
+ { 0,1,3,12,39,125,397,1260,12710,1260,397,125,39,12,3,1, },
+ { 0,66,119,212,378,674,1201,2140,6804,2140,1201,674,378,212,119,66, },
+ { 0,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119,67,37, },
+ { 0,37,67,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119, },
+ },
+ /* pred_R real : values for general and differential */
+ { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 },
+ { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 },
+ /* pred_R real : num dyn models for general and differential */
+ 4, 4
+ },
+ /* entry for 21 quantization points for br_table_idx >= 2 */
+ {
+ /* pred_R real */
+ {
+ { 0,4,8,16,32,64,128,256,512,1024,2049,8198,2049,1024,512,256,128,64,32,16,8,4, },
+ { 0,292,348,414,492,585,696,828,984,1171,1392,1980,1392,1171,984,828,696,585,492,414,348,292, },
+ { 0,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119,84,59, },
+ { 0,59,84,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119, },
+ },
+ /* pred_R real differential */
+ {
+ { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, },
+ { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, },
+ { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, },
+ { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, },
+ },
+ /* pred_R real : values for general and differential */
+ { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 },
+ { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 },
+ /* pred_R real : num dyn models for general and differential */
+ 4, 4
+ },
+ /* entry for 31 quantization points */
+ {
+ /* pred real */
+ {
+ { 0,1,1,1,1,2,4,8,16,32,64,128,256,512,1024,2048,8188,2048,1024,512,256,128,64,32,16,8,4,2,1,1,1,1, },
+ { 0,110,131,156,186,221,263,313,373,443,527,627,746,887,1055,1255,1798,1255,1055,887,746,627,527,443,373,313,263,221,186,156,131,110, },
+ { 0,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20,14,10, },
+ { 0,10,14,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20, }
+ },
+ /* pred real differential */
+ {
+ { 0,1,1,1,1,1,1,1,1,1,3,12,39,125,397,1260,12694,1260,397,125,39,12,3,1,1,1,1,1,1,1,1,1, },
+ { 0,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1, },
+ { 0,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1,1, },
+ { 0,1,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1, }
+ },
+ /* pred real : values for general and differential */
+ { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 },
+ { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 },
+ /* pred real : num dyn models for general and differential */
+ 4, 4
+ },
+ /* entry for 7 quantization points for br_table_idx < 2 */
+ {
+ /* pred_R real */
+ {
+ { 0,327,778,1851,10472,1851,778,327, },
+ { 0,1057,1630,2514,5982,2514,1630,1057, },
+ { 0,1668,2572,6122,2572,1668,1081,701, },
+ { 0,701,1081,1668,2572,6122,2572,1668, },
+ },
+ /* pred_R real differential */
+ {
+ { 0,125,399,1269,12798,1269,399,125, },
+ { 0,744,1327,2365,7512,2365,1327,744, },
+ { 0,1354,2413,7664,2413,1354,760,426, },
+ { 0,426,760,1354,2413,7664,2413,1354, },
+ },
+ /* pred_R real : values for general and differential */
+ { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 },
+ /* pred_R real : num dyn models for general and differential */
+ 4, 4
+ },
+ /* entry for 15 quantization points for br_table_idx < 2 */
+ {
+ /* pred real */
+ {
+ { 0,9,23,56,133,318,757,1800,10192,1800,757,318,133,56,23,9, },
+ { 0,156,240,371,573,883,1363,2102,5008,2102,1363,883,573,371,240,156, },
+ { 0,241,372,575,886,1367,2109,5027,2109,1367,886,575,372,241,156,101, },
+ { 0,101,156,241,372,575,886,1367,2109,5027,2109,1367,886,575,372,241, }
+ },
+ /* pred real differential */
+ {
+ { 0,1,3,12,39,125,397,1260,12710,1260,397,125,39,12,3,1, },
+ { 0,66,119,212,378,674,1201,2140,6804,2140,1201,674,378,212,119,66, },
+ { 0,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119,67,37, },
+ { 0,37,67,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119, }
+ },
+ /* pred real : values for general and differential */
+ {-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7},
+ { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 },
+ /* pred real : num dyn models for general and differential */
+ 4, 4
+ },
+ /* entry for 21 quantization points for br_table_idx < 2 */
+ {
+ /* pred_R real */
+ {
+ { 0,1,1,4,9,23,56,133,318,756,1799,10184,1799,756,318,133,56,23,9,4,1,1, },
+ { 0,41,64,98,152,234,362,558,861,1329,2049,4888,2049,1329,861,558,362,234,152,98,64,41, },
+ { 0,64,98,152,235,362,559,862,1330,2051,4891,2051,1330,862,559,362,235,152,98,64,41,26, },
+ { 0,26,41,64,98,152,235,362,559,862,1330,2051,4891,2051,1330,862,559,362,235,152,98,64, },
+ },
+ /* pred_R real differential */
+ {
+ { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, },
+ { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, },
+ { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, },
+ { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, },
+ },
+ /* pred_R real : values for general and differential */
+ { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 },
+ { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 },
+ /* pred_R real : num dyn models for general and differential */
+ 4, 4
+ }
+};
+
+const ivas_freq_models_t ivas_arith_drct_r_consts[TOTAL_DRCT_QUANT_STRATS] =
+{
+ /* entry for 1 quantization points */
+ {
+ /* drct real */
+ {
+ { 0,16384, },
+ { 0,16384, },
+ { 0,16384, },
+ { 0,16384, },
+ },
+ /* drct real differential */
+ {
+ { 0,16384, },
+ { 0,16384, },
+ { 0,16384, },
+ { 0,16384, },
+ },
+ /* drct real : values for general and differential */
+ {0},{ 0 },
+ /* drct real : num dyn models for general and differential */
+ 4, 4
+ },
+ /* entry for 7 quantization points */
+ { /* drct real */
+ {
+ { 0,125,399,1269,12798,1269,399,125, },
+ { 0,744,1327,2365,7512,2365,1327,744, },
+ { 0,988,1244,1568,1976,2489,3136,4983, },
+ { 0,2111,2262,2425,2788,2425,2262,2111, },
+ },
+ /* drct real differential */
+ {
+ { 0,125,399,1269,12798,1269,399,125, },
+ { 0,744,1327,2365,7512,2365,1327,744, },
+ { 0,1354,2413,7664,2413,1354,760,426, },
+ { 0,426,760,1354,2413,7664,2413,1354, },
+ },
+ /* drct real : values for general and differential */
+ { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 },
+ /* drct real : num dyn models for general and differential */
+ 4, 4
+ },
+ /* entry for 9 quantization points */
+ {
+ /* drct real */
+ {
+ { 0,39,125,397,1263,12736,1263,397,125,39, },
+ { 0,397,708,1262,2250,7150,2250,1262,708,397, },
+ { 0,573,722,909,1146,1444,1819,2292,2888,4591, },
+ { 0,1587,1701,1824,1955,2250,1955,1824,1701,1587, },
+ },
+ /* drct real differential */
+ {
+ { 0,39,125,397,1263,12736,1263,397,125,39, },
+ { 0,397,708,1262,2250,7150,2250,1262,708,397, },
+ { 0,716,1276,2274,7225,2274,1276,716,402,225, },
+ { 0,225,402,716,1276,2274,7225,2274,1276,716, }
+ },
+ /* drct real : values for general and differential */
+ { -4,-3,-2,-1,0,1,2,3,4 },{ -4,-3,-2,-1,0,1,2,3,4 },
+ /* drct real : num dyn models for general and differential */
+ 4, 4
+ },
+ /* entry for 11 quantization points */
+ {
+ /* drct real */
+ {
+ { 0,12,39,125,397,1261,12716,1261,397,125,39,12, },
+ { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, },
+ { 0,343,433,546,687,866,1092,1375,1733,2184,2751,4374, },
+ { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, },
+ },
+ /* drct real differential */
+ {
+ { 0,12,39,125,397,1261,12716,1261,397,125,39,12, },
+ { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, },
+ { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, },
+ { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, },
+ },
+ /* drct real : values for general and differential */
+ { -5,-4,-3,-2,-1,0,1,2,3,4,5 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 },
+ /* drct real : num dyn models for general and differential */
+ 4, 4
+ }
+};
+
+const ivas_freq_models_t ivas_arith_decd_r_consts[TOTAL_DECD_QUANT_STRATS] =
+{
+ /* entry for 1 quantization points */
+ {
+ /* decd real */
+ {
+ { 0,16384, },
+ { 0,16384, },
+ { 0,16384, },
+ { 0,16384, },
+ },
+ /* decd real differential */
+ {
+ { 0,16384, },
+ { 0,16384, },
+ { 0,16384, },
+ { 0,16384, },
+ },
+ /* decd real : values for general and differential */
+ { 0 },{ 0 },
+ /* decd real : num dyn models for general and differential */
+ 4, 4
+ },
+ /* entry for 3 quantization points */
+ {
+ /* decd real */
+ {
+ { 0,11917,2978,1489, },
+ { 0,8840,4419,3125, },
+ { 0,4567,7250,4567, },
+ { 0,5203,5978,5203, },
+ },
+ /* decd real differential */
+ {
+ { 0,1356,13672,1356, },
+ { 0,3166,10052,3166, },
+ { 0,10984,3459,1941, },
+ { 0,1941,3459,10984, },
+ },
+ /* decd real : values for general and differential */
+ { 0,1,2 },{-1,0,1},
+ /* decd real : num dyn models for general and differential */
+ 4, 4
+ },
+ /* entry for 5 quantization points */
+ {
+ /* decd real */
+ {
+ { 0,11157,2788,1394,697,348, },
+ { 0,7186,3592,2540,1796,1270, },
+ { 0,2512,3166,5028,3166,2512, },
+ { 0,3048,3267,3754,3267,3048, },
+ },
+ /* decd real differential */
+ {
+ { 0,406,1289,12994,1289,406, },
+ { 0,1460,2601,8262,2601,1460, },
+ { 0,2707,8599,2707,1519,852, },
+ { 0,852,1519,2707,8599,2707, },
+ },
+ /* decd real : values for general and differential */
+ { 0,1,2,3,4 },{ -2,-1,0,1,2 },
+ /* decd real : num dyn models for general and differential */
+ 4, 4
+ },
+ /* entry for 7 quantization points */
+ {
+ /* decd real */
+ {
+ { 0,10983,2744,1372,686,343,171,85, },
+ { 0,6573,3285,2322,1642,1161,821,580, },
+ { 0,1603,2020,2546,4046,2546,2020,1603, },
+ { 0,2111,2262,2425,2788,2425,2262,2111, },
+ },
+ /* decd real differential */
+ {
+ { 0,125,399,1269,12798,1269,399,125, },
+ { 0,744,1327,2365,7512,2365,1327,744, },
+ { 0,1354,2413,7664,2413,1354,760,426, },
+ { 0,426,760,1354,2413,7664,2413,1354, }
+ },
+ /* decd real : values for general and differential */
+ { 0,1,2,3,4,5,6 },{ -3,-2,-1,0,1,2,3 },
+ /* decd real : num dyn models for general and differential */
+ 4, 4
+ },
+ /* entry for 9 quantization points */
+ { /* decd real */
+ {
+ { 0,10941,2734,1367,683,341,170,85,42,21, },
+ { 0,6305,3150,2227,1575,1113,787,556,393,278, },
+ { 0,1101,1388,1749,2203,3502,2203,1749,1388,1101, },
+ { 0,1587,1701,1824,1955,2250,1955,1824,1701,1587, },
+ },
+ /* decd real differential */
+ {
+ { 0,39,125,397,1263,12736,1263,397,125,39, },
+ { 0,397,708,1262,2250,7150,2250,1262,708,397, },
+ { 0,716,1276,2274,7225,2274,1276,716,402,225, },
+ { 0,225,402,716,1276,2274,7225,2274,1276,716, }
+ },
+ /* decd real : values for general and differential */
+ { 0,1,2,3,4,5,6,7,8 },{ -4,-3,-2,-1,0,1,2,3,4 },
+ /* decd real : num dyn models for general and differential */
+ 4, 4
+ },
+ /* entry for 11 quantization points */
+ {
+ /* decd real */
+ {
+ { 0,10932,2731,1365,682,341,170,85,42,21,10,5, },
+ { 0,6181,3086,2182,1543,1091,771,545,385,272,192,136, },
+ { 0,790,995,1254,1580,1991,3164,1991,1580,1254,995,790, },
+ { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, },
+ },
+ /* decd real differential */
+ {
+ { 0,12,39,125,397,1261,12716,1261,397,125,39,12, },
+ { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, },
+ { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, },
+ { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, },
+ },
+ /* decd real : values for general and differential */
+ { 0,1,2,3,4,5,6,7,8,9,10 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 },
+ /* decd real : num dyn models for general and differential */
+ 4, 4
+ }
+};
+
+const ivas_huff_models_t ivas_huff_pred_r_consts[TOTAL_PRED_QUANT_STRATS_HUFF] =
+{
+ /* entry for 1 quantization points for br_table_idx */
+ {{{ 0 }}, {{ 0 }}},
+ /* entry for 7 quantization points for br_table_idx */
+ {
+ /* pred_R codebook */
+ { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, },
+ /* pred_R differential codebook */
+ { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, },
+ },
+ /* entry for 15 quantization points for br_table_idx */
+ {
+ /* pred_r codebook */
+ { { -7,4,2 },{ -6,4,3 },{ -5, 4, 4 },{ -4, 4, 5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },
+ { 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 } },
+ /* pred_r differential codebook */
+ { { -7,4,2 },{ -6,4,3 },{ -5, 4, 4 },{ -4, 4, 5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },
+ { 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 } },
+ },
+ /* entry for 21 quantization points for br_table_idx=0 */
+ {
+ /* pred_r codebook */
+ { {-10,5,22},{-9,5,23},{-8,5,24},{-7,5,25},{-6,5,26}, { -5, 4, 0 },{ -4, 4, 1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },
+ { 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{6,5,27},{7,5,28},{8,5,29},{9,5,30},{10,5,31} },
+ /* pred_r differential codebook */
+ { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5, 4, 0 },{ -4, 4, 1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },
+ { 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 } },
+ },
+
+ /* entry for 31 quantization points for br_table_idx>0 */
+ {
+ /* pred_r codebook */
+ { {-15,5,2},{-14,5,3},{-13,5,4},{-12,5,5},{-11,5,6}, { -10,5,7 },{ -9,5,8 },{ -8,5,9 },
+ { -7,5,10 },{ -6,5,11 },{ -5, 5, 12 },{ -4, 5, 13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },
+ { 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },
+ { 8,5,24 },{ 9,5,25 },{ 10,5,26 },{11,5,27},{12,5,28},{13,5,29},{14,5,30},{15,5,31} },
+ /* pred_r differential codebook */
+ { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },
+ { -7,5,10 },{ -6,5,11 },{ -5, 5, 12 },{ -4, 5, 13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },
+ { 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },
+ { 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 } },
+ },
+ };
+
+const ivas_huff_models_t ivas_huff_drct_r_consts[TOTAL_DRCT_QUANT_STRATS] =
+{
+ /* entry for 1 quantization points */
+ {{{ 0 }}, {{ 0 }}},
+ /* entry for 7 quantization points */
+ {
+ /* drct_r codebook */
+ { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 } },
+ /* drct_r differential codebook */
+ { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 } },
+ },
+ /* entry for 9 quantization points */
+ {
+ /* drct_r codebook */
+ { { -4, 4, 14 },{ -3,3,0 },{ -2,3,1 },{ -1,3,2 },{ 0,3,3 },{ 1,3,4 },{ 2,3,5 },{ 3,3,6 },{ 4,4,15 } },
+ /* drct_r differential codebook */
+ { { -4, 4, 14 },{ -3,3,0 },{ -2,3,1 },{ -1,3,2 },{ 0,3,3 },{ 1,3,4 },{ 2,3,5 },{ 3,3,6 },{ 4,4,15 } },
+ },
+ /* entry for 11 quantization points */
+ {
+ /* drct_r codebook */
+ { { -5, 4, 10 },{ -4, 4, 11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 } },
+ /* drct_r differential codebook */
+ { { -5, 4, 10 },{ -4, 4, 11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 } },
+ },
+};
+
+const ivas_huff_models_t ivas_huff_decd_r_consts[TOTAL_DECD_QUANT_STRATS] =
+{
+ /* entry for 1 quantization points */
+ {{{ 0 }}, {{ 0 }}},
+ /* entry for 3 quantization points */
+ {
+ /* decd_r codebook */
+ { { 0, 2, 2 },{ 1, 1, 0 },{ 2,2,3 } },
+ /* decd_r differential codebook */
+ { { -1, 2, 2 },{ 0, 1, 0 },{ 1,2,3 } },
+ },
+ /* entry for 5 quantization points */
+ {
+ /* decd_r codebook */
+ { { 0,3,6 },{ 1,2,0 },{ 2,2,1 },{ 3,2,2 },{ 4,3,7 } },
+ /* decd_r differential codebook */
+ { { -2,3,6 },{ -1,2,0 },{ 0,2,1 },{ 1,2,2 },{ 2,3,7 } },
+ },
+ /* entry for 7 quantization points */
+ {
+ /* decd_r */
+ { { 0, 3, 2 },{ 1, 3, 3 },{ 2,3,4 },{ 3,3,0 },{ 4,3,5 },{ 5,3,6 },{ 6,3,7 } },
+ /* decd_r codebook differential codebook */
+ { { -3, 3, 2 },{ -2, 3, 3 },{ -1,3,4 },{ 0,3,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 } },
+ },
+ /* entry for 9 quantization points */
+ {
+ /* decd_r codebook */
+ { { 0, 4, 14 },{ 1,3,0 },{ 2,3,1 },{ 3,3,2 },{ 4,3,3 },{ 5,3,4 },{ 6,3,5 },{ 7,3,6 },{ 8,4,15 } },
+ /* decd_r differential codebook */
+ { { -4, 4, 14 },{ -3,3,0 },{ -2,3,1 },{ -1,3,2 },{ 0,3,3 },{ 1,3,4 },{ 2,3,5 },{ 3,3,6 },{ 4,4,15 } },
+ },
+ /* entry for 11 quantization points */
+ {
+ /* decd_r codebook */
+ { { 0, 4, 10 },{ 1, 4, 11 },{ 2,4,12 },{ 3,3,0 },{ 4,3,1 },{ 5,3,2 },{ 6,3,3 },{ 7,3,4 },{ 8,4,13 },{ 9,4,14 },{ 10,4,15 } },
+ /* decd_r differential codebook */
+ { { -5, 4, 10 },{ -4, 4, 11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 } },
+ },
+};
+
+/* DTX quantization and bitstream constants */
+const Word16 dtx_pd_real_q_levels[3][3] = { { 7,7,7 },{ 7,7,0 },{ 3,0,0 } };
+const Word16 dtx_pr_real_q_levels[3][3] = { { 9,9,9 },{ 9,7,9 },{ 9,5,7 } };
+const Word16 pr_pr_idx_pairs[3][3][2] = { { { 0, 0 },{ 0, 0 },{ 0, 0 } },{ { 0, 0 },{ 0, 0 },{ 0, 0 } },{ { 0, 0 },{ 1, 3 },{ 0, 0 } } };
+const Word16 pr_pd_idx_pairs[3][3][2] = { { { 1, 1 },{ 2, 2 },{ 3, 3 } },{ { 1, 1 },{ 3, 2 },{ 2, 0 } },{ { 2, 1 },{ 0, 0 },{ 0, 0 } } };
+
+const Word16 remix_order_set[1][DIRAC_MAX_ANA_CHANS] = { /* WYZX --> WYXZ... */
+ { 0, 1, 3, 2, 4, 5, 6, 7, 8, 9, 10 }
+};
+
+const Word16 HOA_keep_ind[IVAS_SPAR_MAX_FB_IN_CHAN] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15};
+const Word16 HOA_keep_ind_spar[IVAS_SPAR_MAX_CH] = {0, 1, 2, 3, 4, 8, 9, 10, 10, 10, 10};
+const Word16 HOA_keep_ind_spar512[IVAS_SPAR_MAX_CH] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
+
+
+/*----------------------------------------------------------------------*
+* PCA ROM tables
+*-----------------------------------------------------------------------*/
+
+const Word32 ivas_pca_offset_index1[IVAS_PCA_N1 + 1] =
+{
+ 0, 1, 9, 61, 163, 359, 685, 1125, 1747,
+ 2519, 3521, 4713, 6183, 7883, 9809, 12093, 14633, 17575,
+ 20807, 24343, 28181, 32487, 37121, 42097, 47405, 53057, 59061,
+ 65421, 72137, 79205, 86625, 94415, 102345, 110629, 119263, 128017,
+ 137097, 146515, 156043, 165637, 175551, 185515, 195535, 205837, 216183,
+ 226545, 236911, 247273, 257619, 267921, 277941, 287905, 297819, 307413,
+ 316941, 326359, 335439, 344193, 352827, 361111, 369041, 376831, 384251,
+ 391319, 398035, 404395, 410399, 416051, 421359, 426335, 430969, 435275,
+ 439113, 442649, 445881, 448823, 451363, 453647, 455573, 457273, 458743,
+ 459935, 460937, 461709, 462331, 462771, 463097, 463293, 463395, 463447,
+ 463455, 463456
+};
+
+const Word16 ivas_pca_offset_index2[2692] =
+{
+ 0, 1, 0, 1, 7, 8, 0, 1, 7, 19,
+ 33, 45, 51, 52, 0, 1, 9, 23, 41, 61,
+ 79, 93, 101, 102, 0, 1, 7, 21, 39, 61,
+ 85, 111, 135, 157, 175, 189, 195, 196, 0, 1,
+ 7, 19, 37, 59, 85, 115, 147, 179, 211, 241,
+ 267, 289, 307, 319, 325, 326, 0, 1, 7, 21,
+ 41, 65, 95, 127, 163, 201, 239, 277, 313, 345,
+ 375, 399, 419, 433, 439, 440, 0, 1, 7, 19,
+ 37, 61, 91, 125, 163, 203, 245, 289, 333, 377,
+ 419, 459, 497, 531, 561, 585, 603, 615, 621, 622,
+ 0, 1, 7, 21, 41, 67, 97, 133, 173, 217,
+ 263, 311, 361, 411, 461, 509, 555, 599, 639, 675,
+ 705, 731, 751, 765, 771, 772, 0, 1, 7, 19,
+ 37, 61, 91, 127, 167, 211, 259, 309, 363, 417,
+ 473, 529, 585, 639, 693, 743, 791, 835, 875, 911,
+ 941, 965, 983, 995, 1001, 1002, 0, 1, 7, 21,
+ 41, 67, 99, 135, 177, 223, 273, 327, 383, 443,
+ 503, 565, 627, 689, 749, 809, 865, 919, 969, 1015,
+ 1057, 1093, 1125, 1151, 1171, 1185, 1191, 1192, 0, 1,
+ 7, 19, 37, 61, 91, 127, 169, 215, 265, 319,
+ 377, 437, 501, 567, 633, 701, 769, 837, 903, 969,
+ 1033, 1093, 1151, 1205, 1255, 1301, 1343, 1379, 1409, 1433,
+ 1451, 1463, 1469, 1470, 0, 1, 7, 21, 41, 67,
+ 99, 137, 179, 227, 279, 335, 395, 459, 525, 595,
+ 667, 739, 813, 887, 961, 1033, 1105, 1175, 1241, 1305,
+ 1365, 1421, 1473, 1521, 1563, 1601, 1633, 1659, 1679, 1693,
+ 1699, 1700, 0, 1, 9, 23, 43, 69, 101, 139,
+ 183, 231, 285, 343, 405, 471, 541, 613, 689, 765,
+ 843, 923, 1003, 1083, 1161, 1237, 1313, 1385, 1455, 1521,
+ 1583, 1641, 1695, 1743, 1787, 1825, 1857, 1883, 1903, 1917,
+ 1925, 1926, 0, 1, 7, 21, 41, 67, 99, 137,
+ 179, 227, 281, 339, 401, 467, 537, 611, 687, 767,
+ 849, 931, 1015, 1099, 1185, 1269, 1353, 1435, 1517, 1597,
+ 1673, 1747, 1817, 1883, 1945, 2003, 2057, 2105, 2147, 2185,
+ 2217, 2243, 2263, 2277, 2283, 2284, 0, 1, 7, 21,
+ 41, 67, 99, 137, 181, 231, 285, 345, 409, 477,
+ 549, 625, 705, 787, 871, 957, 1045, 1135, 1225, 1315,
+ 1405, 1495, 1583, 1669, 1753, 1835, 1915, 1991, 2063, 2131,
+ 2195, 2255, 2309, 2359, 2403, 2441, 2473, 2499, 2519, 2533,
+ 2539, 2540, 0, 1, 7, 19, 39, 65, 97, 135,
+ 177, 225, 279, 337, 401, 469, 541, 617, 697, 781,
+ 867, 955, 1045, 1137, 1231, 1327, 1423, 1519, 1615, 1711,
+ 1805, 1897, 1987, 2075, 2161, 2245, 2325, 2401, 2473, 2541,
+ 2605, 2663, 2717, 2765, 2807, 2845, 2877, 2903, 2923, 2935,
+ 2941, 2942, 0, 1, 7, 21, 41, 67, 99, 137,
+ 181, 229, 283, 343, 407, 477, 551, 629, 711, 797,
+ 885, 977, 1071, 1167, 1265, 1365, 1465, 1565, 1667, 1767,
+ 1867, 1967, 2065, 2161, 2255, 2347, 2435, 2521, 2603, 2681,
+ 2755, 2825, 2889, 2949, 3003, 3051, 3095, 3133, 3165, 3191,
+ 3211, 3225, 3231, 3232, 0, 1, 7, 21, 41, 67,
+ 99, 137, 181, 231, 287, 347, 413, 483, 559, 639,
+ 723, 811, 903, 997, 1093, 1193, 1295, 1399, 1503, 1609,
+ 1715, 1821, 1927, 2033, 2137, 2241, 2343, 2443, 2539, 2633,
+ 2725, 2813, 2897, 2977, 3053, 3123, 3189, 3249, 3305, 3355,
+ 3399, 3437, 3469, 3495, 3515, 3529, 3535, 3536, 0, 1,
+ 7, 21, 41, 67, 99, 137, 181, 231, 287, 349,
+ 415, 487, 563, 645, 731, 821, 915, 1011, 1111, 1213,
+ 1317, 1423, 1531, 1641, 1751, 1863, 1975, 2087, 2197, 2307,
+ 2415, 2521, 2625, 2727, 2827, 2923, 3017, 3107, 3193, 3275,
+ 3351, 3423, 3489, 3551, 3607, 3657, 3701, 3739, 3771, 3797,
+ 3817, 3831, 3837, 3838, 0, 1, 7, 21, 41, 67,
+ 99, 137, 181, 231, 285, 345, 411, 481, 557, 637,
+ 721, 809, 901, 997, 1097, 1199, 1305, 1413, 1523, 1635,
+ 1749, 1863, 1979, 2095, 2211, 2327, 2443, 2557, 2671, 2783,
+ 2893, 3001, 3107, 3209, 3309, 3405, 3497, 3585, 3669, 3749,
+ 3825, 3895, 3961, 4021, 4075, 4125, 4169, 4207, 4239, 4265,
+ 4285, 4299, 4305, 4306, 0, 1, 7, 21, 41, 67,
+ 99, 137, 181, 231, 287, 347, 413, 485, 561, 643,
+ 729, 819, 913, 1011, 1113, 1217, 1325, 1435, 1547, 1663,
+ 1779, 1897, 2017, 2137, 2257, 2377, 2497, 2617, 2737, 2855,
+ 2971, 3087, 3199, 3309, 3417, 3521, 3623, 3721, 3815, 3905,
+ 3991, 4073, 4149, 4221, 4287, 4347, 4403, 4453, 4497, 4535,
+ 4567, 4593, 4613, 4627, 4633, 4634, 0, 1, 7, 21,
+ 41, 67, 99, 137, 181, 231, 287, 349, 415, 487,
+ 565, 647, 733, 825, 921, 1021, 1125, 1231, 1341, 1453,
+ 1569, 1687, 1807, 1929, 2051, 2175, 2299, 2425, 2551, 2677,
+ 2801, 2925, 3047, 3169, 3289, 3407, 3523, 3635, 3745, 3851,
+ 3955, 4055, 4151, 4243, 4329, 4411, 4489, 4561, 4627, 4689,
+ 4745, 4795, 4839, 4877, 4909, 4935, 4955, 4969, 4975, 4976,
+ 0, 1, 7, 21, 41, 67, 99, 137, 181, 231,
+ 287, 349, 417, 489, 567, 649, 737, 829, 925, 1025,
+ 1129, 1237, 1349, 1463, 1581, 1701, 1823, 1947, 2073, 2201,
+ 2329, 2459, 2589, 2719, 2849, 2979, 3107, 3235, 3361, 3485,
+ 3607, 3727, 3845, 3959, 4071, 4179, 4283, 4383, 4479, 4571,
+ 4659, 4741, 4819, 4891, 4959, 5021, 5077, 5127, 5171, 5209,
+ 5241, 5267, 5287, 5301, 5307, 5308, 0, 1, 7, 21,
+ 41, 67, 99, 137, 181, 231, 287, 349, 417, 489,
+ 567, 651, 739, 831, 929, 1031, 1137, 1247, 1361, 1477,
+ 1597, 1719, 1843, 1969, 2097, 2227, 2359, 2491, 2625, 2759,
+ 2893, 3027, 3161, 3293, 3425, 3555, 3683, 3809, 3933, 4055,
+ 4175, 4291, 4405, 4515, 4621, 4723, 4821, 4913, 5001, 5085,
+ 5163, 5235, 5303, 5365, 5421, 5471, 5515, 5553, 5585, 5611,
+ 5631, 5645, 5651, 5652, 0, 1, 7, 21, 41, 67,
+ 99, 137, 181, 231, 287, 349, 417, 491, 569, 653,
+ 741, 835, 933, 1035, 1141, 1251, 1365, 1483, 1603, 1727,
+ 1853, 1983, 2115, 2249, 2383, 2519, 2657, 2795, 2933, 3071,
+ 3209, 3347, 3485, 3621, 3755, 3889, 4021, 4151, 4277, 4401,
+ 4521, 4639, 4753, 4863, 4969, 5071, 5169, 5263, 5351, 5435,
+ 5513, 5587, 5655, 5717, 5773, 5823, 5867, 5905, 5937, 5963,
+ 5983, 5997, 6003, 6004, 0, 1, 7, 21, 41, 67,
+ 99, 137, 181, 231, 287, 349, 417, 491, 569, 653,
+ 741, 835, 933, 1037, 1145, 1257, 1373, 1491, 1613, 1739,
+ 1867, 1997, 2131, 2267, 2405, 2543, 2683, 2825, 2967, 3109,
+ 3251, 3393, 3535, 3677, 3817, 3955, 4093, 4229, 4363, 4493,
+ 4621, 4747, 4869, 4987, 5103, 5215, 5323, 5427, 5525, 5619,
+ 5707, 5791, 5869, 5943, 6011, 6073, 6129, 6179, 6223, 6261,
+ 6293, 6319, 6339, 6353, 6359, 6360, 0, 1, 7, 21,
+ 41, 67, 99, 137, 181, 231, 287, 349, 417, 491,
+ 569, 653, 743, 837, 935, 1039, 1147, 1259, 1375, 1495,
+ 1619, 1745, 1875, 2007, 2143, 2281, 2421, 2563, 2705, 2849,
+ 2993, 3139, 3285, 3431, 3577, 3723, 3867, 4011, 4153, 4295,
+ 4435, 4573, 4709, 4841, 4971, 5097, 5221, 5341, 5457, 5569,
+ 5677, 5781, 5879, 5973, 6063, 6147, 6225, 6299, 6367, 6429,
+ 6485, 6535, 6579, 6617, 6649, 6675, 6695, 6709, 6715, 6716,
+ 0, 1, 7, 21, 41, 67, 99, 137, 181, 231,
+ 287, 349, 417, 491, 569, 653, 743, 837, 937, 1041,
+ 1149, 1261, 1377, 1497, 1621, 1749, 1879, 2013, 2149, 2287,
+ 2429, 2573, 2717, 2863, 3011, 3159, 3309, 3459, 3609, 3759,
+ 3909, 4057, 4205, 4351, 4495, 4639, 4781, 4919, 5055, 5189,
+ 5319, 5447, 5571, 5691, 5807, 5919, 6027, 6131, 6231, 6325,
+ 6415, 6499, 6577, 6651, 6719, 6781, 6837, 6887, 6931, 6969,
+ 7001, 7027, 7047, 7061, 7067, 7068, 0, 1, 7, 21,
+ 41, 67, 99, 137, 181, 231, 287, 349, 417, 491,
+ 569, 653, 743, 837, 937, 1041, 1149, 1261, 1377, 1497,
+ 1621, 1749, 1881, 2015, 2153, 2293, 2435, 2579, 2725, 2873,
+ 3023, 3175, 3327, 3479, 3633, 3787, 3941, 4093, 4245, 4397,
+ 4547, 4695, 4841, 4985, 5127, 5267, 5405, 5539, 5671, 5799,
+ 5923, 6043, 6159, 6271, 6379, 6483, 6583, 6677, 6767, 6851,
+ 6929, 7003, 7071, 7133, 7189, 7239, 7283, 7321, 7353, 7379,
+ 7399, 7413, 7419, 7420, 0, 1, 7, 21, 41, 67,
+ 99, 137, 181, 231, 287, 349, 417, 489, 567, 651,
+ 741, 835, 935, 1039, 1147, 1259, 1377, 1499, 1625, 1753,
+ 1885, 2021, 2159, 2301, 2445, 2591, 2739, 2889, 3041, 3195,
+ 3349, 3505, 3661, 3817, 3973, 4129, 4285, 4441, 4595, 4749,
+ 4901, 5051, 5199, 5345, 5489, 5631, 5769, 5905, 6037, 6165,
+ 6291, 6413, 6531, 6643, 6751, 6855, 6955, 7049, 7139, 7223,
+ 7301, 7373, 7441, 7503, 7559, 7609, 7653, 7691, 7723, 7749,
+ 7769, 7783, 7789, 7790, 0, 1, 7, 21, 41, 67,
+ 99, 137, 181, 231, 287, 349, 417, 491, 571, 657,
+ 747, 843, 945, 1051, 1161, 1277, 1397, 1521, 1649, 1781,
+ 1915, 2053, 2195, 2339, 2485, 2635, 2787, 2941, 3095, 3251,
+ 3409, 3567, 3725, 3885, 4045, 4205, 4363, 4521, 4679, 4835,
+ 4989, 5143, 5295, 5445, 5591, 5735, 5877, 6015, 6149, 6281,
+ 6409, 6533, 6653, 6769, 6879, 6985, 7087, 7183, 7273, 7359,
+ 7439, 7513, 7581, 7643, 7699, 7749, 7793, 7831, 7863, 7889,
+ 7909, 7923, 7929, 7930, 0, 1, 7, 21, 41, 67,
+ 99, 137, 181, 231, 287, 349, 417, 491, 571, 657,
+ 747, 843, 943, 1049, 1159, 1273, 1393, 1517, 1645, 1777,
+ 1913, 2051, 2193, 2337, 2485, 2635, 2787, 2941, 3097, 3255,
+ 3415, 3575, 3737, 3899, 4061, 4223, 4385, 4547, 4709, 4869,
+ 5029, 5187, 5343, 5497, 5649, 5799, 5947, 6091, 6233, 6371,
+ 6507, 6639, 6767, 6891, 7011, 7125, 7235, 7341, 7441, 7537,
+ 7627, 7713, 7793, 7867, 7935, 7997, 8053, 8103, 8147, 8185,
+ 8217, 8243, 8263, 8277, 8283, 8284, 0, 1, 7, 21,
+ 41, 67, 99, 137, 181, 231, 287, 349, 417, 491,
+ 571, 655, 745, 841, 941, 1047, 1157, 1271, 1389, 1513,
+ 1641, 1773, 1907, 2045, 2187, 2331, 2479, 2629, 2783, 2939,
+ 3097, 3257, 3417, 3579, 3743, 3907, 4071, 4235, 4399, 4563,
+ 4727, 4891, 5055, 5217, 5377, 5537, 5695, 5851, 6005, 6155,
+ 6303, 6447, 6589, 6727, 6861, 6993, 7121, 7245, 7363, 7477,
+ 7587, 7693, 7793, 7889, 7979, 8063, 8143, 8217, 8285, 8347,
+ 8403, 8453, 8497, 8535, 8567, 8593, 8613, 8627, 8633, 8634,
+ 0, 1, 7, 21, 41, 67, 99, 137, 181, 231,
+ 287, 349, 417, 491, 571, 657, 749, 845, 947, 1053,
+ 1165, 1281, 1401, 1527, 1657, 1791, 1929, 2069, 2213, 2361,
+ 2511, 2663, 2819, 2977, 3137, 3299, 3463, 3627, 3793, 3959,
+ 4125, 4293, 4461, 4629, 4795, 4961, 5127, 5291, 5455, 5617,
+ 5777, 5935, 6091, 6243, 6393, 6541, 6685, 6825, 6963, 7097,
+ 7227, 7353, 7473, 7589, 7701, 7807, 7909, 8005, 8097, 8183,
+ 8263, 8337, 8405, 8467, 8523, 8573, 8617, 8655, 8687, 8713,
+ 8733, 8747, 8753, 8754, 0, 1, 7, 21, 41, 67,
+ 99, 137, 181, 231, 287, 349, 417, 491, 571, 657,
+ 747, 843, 943, 1049, 1159, 1275, 1395, 1519, 1647, 1779,
+ 1915, 2055, 2199, 2345, 2495, 2647, 2803, 2961, 3121, 3283,
+ 3447, 3613, 3779, 3947, 4115, 4285, 4455, 4625, 4795, 4965,
+ 5133, 5301, 5467, 5633, 5797, 5959, 6119, 6277, 6433, 6585,
+ 6735, 6881, 7025, 7165, 7301, 7433, 7561, 7685, 7805, 7921,
+ 8031, 8137, 8237, 8333, 8423, 8509, 8589, 8663, 8731, 8793,
+ 8849, 8899, 8943, 8981, 9013, 9039, 9059, 9073, 9079, 9080,
+ 0, 1, 7, 19, 39, 65, 97, 135, 179, 229,
+ 285, 347, 415, 489, 567, 651, 741, 835, 935, 1041,
+ 1151, 1265, 1385, 1509, 1637, 1769, 1905, 2045, 2189, 2335,
+ 2485, 2637, 2793, 2951, 3111, 3273, 3437, 3603, 3771, 3939,
+ 4109, 4279, 4451, 4623, 4795, 4967, 5139, 5309, 5479, 5647,
+ 5815, 5981, 6145, 6307, 6467, 6625, 6781, 6933, 7083, 7229,
+ 7373, 7513, 7649, 7781, 7909, 8033, 8153, 8267, 8377, 8483,
+ 8583, 8677, 8767, 8851, 8929, 9003, 9071, 9133, 9189, 9239,
+ 9283, 9321, 9353, 9379, 9399, 9411, 9417, 9418, 0, 1,
+ 7, 21, 41, 67, 99, 137, 181, 231, 287, 349,
+ 417, 491, 571, 657, 747, 843, 945, 1051, 1163, 1279,
+ 1399, 1525, 1655, 1789, 1927, 2069, 2213, 2361, 2513, 2667,
+ 2825, 2985, 3147, 3311, 3477, 3645, 3815, 3985, 4157, 4329,
+ 4503, 4677, 4851, 5025, 5199, 5371, 5543, 5713, 5883, 6051,
+ 6217, 6381, 6543, 6703, 6861, 7015, 7167, 7315, 7459, 7601,
+ 7739, 7873, 8003, 8129, 8249, 8365, 8477, 8583, 8685, 8781,
+ 8871, 8957, 9037, 9111, 9179, 9241, 9297, 9347, 9391, 9429,
+ 9461, 9487, 9507, 9521, 9527, 9528, 0, 1, 7, 21,
+ 41, 67, 99, 137, 181, 231, 287, 349, 417, 491,
+ 571, 657, 749, 845, 947, 1055, 1167, 1285, 1407, 1533,
+ 1663, 1797, 1935, 2077, 2223, 2373, 2525, 2681, 2839, 3001,
+ 3165, 3331, 3499, 3669, 3839, 4011, 4185, 4359, 4533, 4709,
+ 4885, 5061, 5235, 5409, 5583, 5755, 5925, 6095, 6263, 6429,
+ 6593, 6755, 6913, 7069, 7221, 7371, 7517, 7659, 7797, 7931,
+ 8061, 8187, 8309, 8427, 8539, 8647, 8749, 8845, 8937, 9023,
+ 9103, 9177, 9245, 9307, 9363, 9413, 9457, 9495, 9527, 9553,
+ 9573, 9587, 9593, 9594, 0, 1, 7, 21, 41, 67,
+ 99, 137, 181, 231, 287, 349, 417, 491, 571, 655,
+ 745, 841, 941, 1047, 1157, 1273, 1393, 1517, 1647, 1781,
+ 1919, 2061, 2207, 2355, 2507, 2663, 2821, 2981, 3145, 3311,
+ 3479, 3649, 3821, 3993, 4167, 4341, 4517, 4693, 4869, 5045,
+ 5221, 5397, 5573, 5747, 5921, 6093, 6265, 6435, 6603, 6769,
+ 6933, 7093, 7251, 7407, 7559, 7707, 7853, 7995, 8133, 8267,
+ 8397, 8521, 8641, 8757, 8867, 8973, 9073, 9169, 9259, 9343,
+ 9423, 9497, 9565, 9627, 9683, 9733, 9777, 9815, 9847, 9873,
+ 9893, 9907, 9913, 9914, 0, 1, 7, 21, 41, 67,
+ 99, 137, 181, 231, 287, 349, 417, 491, 571, 657,
+ 747, 843, 945, 1051, 1163, 1279, 1401, 1527, 1657, 1791,
+ 1929, 2071, 2217, 2367, 2519, 2675, 2835, 2997, 3161, 3327,
+ 3495, 3665, 3837, 4011, 4185, 4361, 4537, 4715, 4893, 5071,
+ 5249, 5427, 5603, 5779, 5953, 6127, 6299, 6469, 6637, 6803,
+ 6967, 7129, 7289, 7445, 7597, 7747, 7893, 8035, 8173, 8307,
+ 8437, 8563, 8685, 8801, 8913, 9019, 9121, 9217, 9307, 9393,
+ 9473, 9547, 9615, 9677, 9733, 9783, 9827, 9865, 9897, 9923,
+ 9943, 9957, 9963, 9964, 0, 1, 7, 21, 41, 67,
+ 99, 137, 181, 231, 287, 349, 417, 491, 571, 657,
+ 749, 845, 947, 1055, 1167, 1285, 1407, 1533, 1663, 1799,
+ 1939, 2083, 2229, 2379, 2533, 2689, 2849, 3011, 3177, 3345,
+ 3515, 3687, 3861, 4035, 4211, 4387, 4565, 4743, 4921, 5099,
+ 5277, 5455, 5633, 5809, 5985, 6159, 6333, 6505, 6675, 6843,
+ 7009, 7171, 7331, 7487, 7641, 7791, 7937, 8081, 8221, 8357,
+ 8487, 8613, 8735, 8853, 8965, 9073, 9175, 9271, 9363, 9449,
+ 9529, 9603, 9671, 9733, 9789, 9839, 9883, 9921, 9953, 9979,
+ 9999, 10013, 10019, 10020, 0, 1, 7, 19, 39, 65,
+ 97, 135, 179, 229, 285, 347, 415, 489, 567, 651,
+ 741, 837, 937, 1043, 1153, 1269, 1389, 1513, 1643, 1777,
+ 1915, 2057, 2203, 2351, 2503, 2659, 2817, 2979, 3143, 3309,
+ 3477, 3647, 3819, 3993, 4169, 4345, 4523, 4701, 4881, 5061,
+ 5241, 5421, 5601, 5779, 5957, 6133, 6309, 6483, 6655, 6825,
+ 6993, 7159, 7323, 7485, 7643, 7799, 7951, 8099, 8245, 8387,
+ 8525, 8659, 8789, 8913, 9033, 9149, 9259, 9365, 9465, 9561,
+ 9651, 9735, 9813, 9887, 9955, 10017, 10073, 10123, 10167, 10205,
+ 10237, 10263, 10283, 10295, 10301, 10302, 0, 1, 7, 21,
+ 41, 67, 99, 137, 181, 231, 287, 349, 417, 491,
+ 571, 655, 745, 841, 941, 1047, 1159, 1275, 1395, 1521,
+ 1651, 1785, 1923, 2065, 2211, 2361, 2513, 2669, 2829, 2991,
+ 3155, 3321, 3491, 3663, 3837, 4011, 4187, 4365, 4543, 4723,
+ 4903, 5083, 5263, 5443, 5623, 5803, 5981, 6159, 6335, 6509,
+ 6683, 6855, 7025, 7191, 7355, 7517, 7677, 7833, 7985, 8135,
+ 8281, 8423, 8561, 8695, 8825, 8951, 9071, 9187, 9299, 9405,
+ 9505, 9601, 9691, 9775, 9855, 9929, 9997, 10059, 10115, 10165,
+ 10209, 10247, 10279, 10305, 10325, 10339, 10345, 10346, 0, 1,
+ 7, 21, 41, 67, 99, 137, 181, 231, 287, 349,
+ 417, 491, 571, 655, 745, 841, 943, 1049, 1161, 1277,
+ 1397, 1523, 1653, 1787, 1925, 2067, 2213, 2363, 2517, 2673,
+ 2833, 2995, 3159, 3327, 3497, 3669, 3843, 4019, 4195, 4373,
+ 4551, 4731, 4911, 5091, 5271, 5451, 5631, 5811, 5989, 6167,
+ 6343, 6519, 6693, 6865, 7035, 7203, 7367, 7529, 7689, 7845,
+ 7999, 8149, 8295, 8437, 8575, 8709, 8839, 8965, 9085, 9201,
+ 9313, 9419, 9521, 9617, 9707, 9791, 9871, 9945, 10013, 10075,
+ 10131, 10181, 10225, 10263, 10295, 10321, 10341, 10355, 10361, 10362,
+ 0, 1, 7, 21, 41, 67, 99, 137, 181, 231,
+ 287, 349, 417, 491, 571, 657, 747, 843, 945, 1051,
+ 1163, 1279, 1399, 1525, 1655, 1789, 1927, 2069, 2215, 2365,
+ 2519, 2675, 2835, 2997, 3161, 3329, 3499, 3671, 3845, 4021,
+ 4197, 4375, 4553, 4733, 4913, 5093, 5273, 5453, 5633, 5813,
+ 5991, 6169, 6345, 6521, 6695, 6867, 7037, 7205, 7369, 7531,
+ 7691, 7847, 8001, 8151, 8297, 8439, 8577, 8711, 8841, 8967,
+ 9087, 9203, 9315, 9421, 9523, 9619, 9709, 9795, 9875, 9949,
+ 10017, 10079, 10135, 10185, 10229, 10267, 10299, 10325, 10345, 10359,
+ 10365, 10366
+};
+
+const Word16 ivas_pca_offset_n2[IVAS_PCA_N1] =
+{
+ 0, 2, 6, 14, 24, 38, 56, 76, 100, 126, 156, 188,
+ 224, 262, 302, 346, 392, 442, 494, 548, 604, 664, 726, 790,
+ 856, 924, 994, 1066, 1140, 1216, 1294, 1374, 1454, 1536, 1620, 1704,
+ 1790, 1878, 1966, 2054, 2144, 2234, 2324, 2416, 2508, 2600, 2692, 2784,
+ 2876, 2968, 3058, 3148, 3238, 3326, 3414, 3502, 3588, 3672, 3756, 3838,
+ 3918, 3998, 4076, 4152, 4226, 4298, 4368, 4436, 4502, 4566, 4628, 4688,
+ 4744, 4798, 4850, 4900, 4946, 4990, 5030, 5068, 5104, 5136, 5166, 5192,
+ 5216, 5236, 5254, 5268, 5278, 5286, 5290
+};
+
+const Word16 ph1_q_n2_tbl[IVAS_PCA_N1][2] = { /* ph1_q : Q13, n2 : Q0 */
+ { 0, 1 },
+ { 286, 3 },
+ { 572, 7 },
+ { 858, 9 },
+ { 1144, 13 },
+ { 1430, 17 },
+ { 1716, 19 },
+ { 2002, 23 },
+ { 2288, 25 },
+ { 2574, 29 },
+ { 2860, 31 },
+ { 3146, 35 },
+ { 3431, 37 },
+ { 3717, 39 },
+ { 4003, 43 },
+ { 4289, 45 },
+ { 4575, 49 },
+ { 4861, 51 },
+ { 5147, 53 },
+ { 5433, 55 },
+ { 5719, 59 },
+ { 6005, 61 },
+ { 6291, 63 },
+ { 6577, 65 },
+ { 6863, 67 },
+ { 7149, 69 },
+ { 7435, 71 },
+ { 7721, 73 },
+ { 8007, 75 },
+ { 8293, 77 },
+ { 8579, 79 },
+ { 8865, 79 },
+ { 9151, 81 },
+ { 9437, 83 },
+ { 9722, 83 },
+ { 10008, 85 },
+ { 10294, 87 },
+ { 10580, 87 },
+ { 10866, 87 },
+ { 11152, 89 },
+ { 11438, 89 },
+ { 11724, 89 },
+ { 12010, 91 },
+ { 12296, 91 },
+ { 12582, 91 },
+ { 12868, 91 },
+ { 13154, 91 },
+ { 13440, 91 },
+ { 13726, 91 },
+ { 14012, 89 },
+ { 14298, 89 },
+ { 14584, 89 },
+ { 14870, 87 },
+ { 15156, 87 },
+ { 15442, 87 },
+ { 15728, 85 },
+ { 16013, 83 },
+ { 16299, 83 },
+ { 16585, 81 },
+ { 16871, 79 },
+ { 17157, 79 },
+ { 17443, 77 },
+ { 17729, 75 },
+ { 18015, 73 },
+ { 18301, 71 },
+ { 18587, 69 },
+ { 18873, 67 },
+ { 19159, 65 },
+ { 19445, 63 },
+ { 19731, 61 },
+ { 20017, 59 },
+ { 20303, 55 },
+ { 20589, 53 },
+ { 20875, 51 },
+ { 21161, 49 },
+ { 21447, 45 },
+ { 21733, 43 },
+ { 22019, 39 },
+ { 22304, 37 },
+ { 22590, 35 },
+ { 22876, 31 },
+ { 23162, 29 },
+ { 23448, 25 },
+ { 23734, 23 },
+ { 24020, 19 },
+ { 24306, 17 },
+ { 24592, 13 },
+ { 24878, 9 },
+ { 25164, 7 },
+ { 25450, 3 },
+ { 25736, 1 }
+};
+
+
+/*----------------------------------------------------------------------------------*
+ * Parametric MC ROM tables
+ *----------------------------------------------------------------------------------*/
+
+const Word16 param_mc_band_grouping_20[20 + 1] =
+{
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 17, 20, 23, 27, 33, 40, 52, 60
+};
+
+const Word16 param_mc_coding_band_mapping_20[20] =
+{
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+const Word16 param_mc_bands_coded_20[4] =
+{
+ 10, 14, 18, 20
+};
+
+const Word16 param_mc_band_grouping_14[14 + 1] =
+{
+ 0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 16, 20, 28, 40, 60
+};
+
+const Word16 param_mc_coding_band_mapping_14[14] =
+{
+ 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0
+};
+
+const Word16 param_mc_bands_coded_14[4] =
+{
+ 8, 11, 13, 14
+};
+
+const Word16 param_mc_band_grouping_10[10 + 1] =
+{
+ 0, 1, 2, 3, 5, 7, 10, 14, 20, 40, 60
+};
+
+
+const Word16 param_mc_bands_coded_10[4] =
+{
+ 6, 8, 9, 10
+};
+
+const Word16 param_mc_coding_band_mapping_10[10] =
+{
+ 1, 1, 1, 1, 1, 0, 0, 0, 0, 0
+};
+
+const Word16 Param_MC_index[MAX_CICP_CHANNELS] =
+{
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
+};
+
+const Word32 ivas_param_mc_dmx_fac_CICP6_2tc_fx[12] =
+{
+ 2147483647,0,1518500224,1518500224,2147483647,0, /*Lt*/
+ 0,2147483647,1518500224,1518500224,0,2147483647 /*Rt*/
+};
+
+const Word32 ivas_param_mc_dmx_fac_CICP12_2tc_fx[16] =
+{
+ 2147483647,0,1518500224,1518500224,2147483647,0,2147483647,0, /*Lt*/
+ 0,2147483647,1518500224,1518500224,0,2147483647,0,2147483647 /*Rt*/
+};
+
+const Word32 ivas_param_mc_dmx_fac_CICP12_3tc_fx[24] =
+{
+ 2147483647,0,0,0,2147483647,0,2147483647,0, /*Lt*/
+ 0,2147483647,0,0,0,2147483647,0,2147483647, /*Rt*/
+ 0,0,2147483647,2147483647,0,0,0,0 /*Ct*/
+};
+
+const Word32 ivas_param_mc_dmx_fac_CICP14_2tc_fx[16] =
+{
+ 2147483647,0,1518500224,1518500224,2147483647,0,2147483647,0, /*Lt*/
+ 0,2147483647,1518500224,1518500224,0,2147483647,0,2147483647 /*Rt*/
+};
+const Word32 ivas_param_mc_dmx_fac_CICP14_3tc_fx[24] =
+{
+ 2147483647,0,0,0,2147483647,0,2147483647,0, /*Lt*/
+ 0,2147483647,0,0,0,2147483647,0,2147483647, /*Rt*/
+ 0,0,2147483647,2147483647,0,0,0,0 /*Ct*/
+};
+
+const Word32 ivas_param_mc_dmx_fac_CICP16_3tc_fx[30] =
+{
+ 2147483647,0,0,0,2147483647,0,2147483647,0,2147483647,0, /*Lt*/
+ 0,2147483647,0,0,0,2147483647,0,2147483647,0,2147483647, /*Rt*/
+ 0,0,2147483647,2147483647,0,0,0,0,0,0 /*Ct*/
+};
+
+const Word32 ivas_param_mc_dmx_fac_CICP19_3tc_fx[36] =
+{
+ 2147483647,0,0,0,2147483647,0,2147483647,0,2147483647,0,2147483647,0, /*Lt*/
+ 0,2147483647,0,0,0,2147483647,0,2147483647,0,2147483647,0,2147483647, /*Rt*/
+ 0,0,2147483647,2147483647,0,0,0,0,0,0,0,0 /*Ct*/
+};
+
+//Q15
+const Word16 ivas_param_mc_ild_fac_CICP6_2tc_fx[6] =
+{
+ 12832,
+ 12832,
+ 6820,
+ 10607,
+ 10607,
+ 6820
+};
+
+//Q15
+const Word16 ivas_param_mc_ild_fac_CICP12_2tc_fx[8] =
+{
+ 11965,
+ 11965,
+ 6816,
+ 6877,
+ 6877,
+ 5619,
+ 5619,
+ 6816
+};
+
+//Q15
+const Word16 ivas_param_mc_ild_fac_CICP12_3tc_fx[8] =
+{
+ 16384,
+ 16384,
+ 9502,
+ 9502,
+ 6553,
+ 6553,
+ 32767,
+ 8192
+};
+
+//Q15
+const Word16 ivas_param_mc_ild_fac_CICP14_2tc_fx[8] =
+{
+ 11936,
+ 11936,
+ 5993,
+ 6945,
+ 6945,
+ 8049,
+ 8049,
+ 6816
+};
+
+//Q15
+const Word16 ivas_param_mc_ild_fac_CICP14_3tc_fx[8] =
+{
+ 16291,
+ 16291,
+ 8257,
+ 8257,
+ 9666,
+ 9666,
+ 32767,
+ 8192
+};
+
+//Q15
+const Word16 ivas_param_mc_ild_fac_CICP16_3tc_fx[10] =
+{
+ 11141,
+ 11141,
+ 7209,
+ 7209,
+ 6553,
+ 6553,
+ 5898,
+ 5898,
+ 32767,
+ 8192
+};
+
+//Q15
+const Word16 ivas_param_mc_ild_fac_CICP19_3tc_fx[12] =
+{
+ 9830,
+ 9830,
+ 5570,
+ 5570,
+ 3932,
+ 3932,
+ 6226,
+ 6226,
+ 6226,
+ 6226,
+ 32767,
+ 16384
+};
+
+const PARAM_MC_ILD_MAPPING ivas_param_mc_ild_mapping_CICP6_2tc =
+{
+ 5,
+ 6,
+ {0,1,2,4,5,3},
+ {1,1,2,1,1,2},
+ {{0},{1},{0,1},{0},{1},{0,1}}
+};
+
+const PARAM_MC_ILD_MAPPING ivas_param_mc_ild_mapping_CICP12_2tc =
+{
+ 7,
+ 8,
+ {0,1,2,4,5,6,7,3},
+ {1,1,2,1,1,1,1,2},
+ {{0},{1},{0,1},{0},{1},{0},{1},{0,1}}
+};
+
+const PARAM_MC_ILD_MAPPING ivas_param_mc_ild_mapping_CICP12_3tc =
+{
+ 6,
+ 8,
+ {0,1,4,5,6,7,2,3},
+ {1,1,1,1,1,1,1,1},
+ {{0},{1},{0},{1},{0},{1},{2},{2}}
+};
+
+const PARAM_MC_ILD_MAPPING ivas_param_mc_ild_mapping_CICP14_2tc =
+{
+ 7,
+ 8,
+ {0,1,2,4,5,6,7,3},
+ {1,1,2,1,1,1,1,2},
+ {{0},{1},{0,1},{0},{1},{0},{1},{0,1}}
+};
+
+const PARAM_MC_ILD_MAPPING ivas_param_mc_ild_mapping_CICP14_3tc =
+{
+ 6,
+ 8,
+ {0,1,4,5,6,7,2,3},
+ {1,1,1,1,1,1,1,1},
+ {{0},{1},{0},{1},{0},{1},{2},{2}}
+};
+
+const PARAM_MC_ILD_MAPPING ivas_param_mc_ild_mapping_CICP16_3tc =
+{
+ 8,
+ 10,
+ {0,1,4,5,6,7,8,9,2,3},
+ {1,1,1,1,1,1,1,1,1,1},
+ {{0},{1},{0},{1},{0},{1},{0},{1},{2},{2}}
+};
+
+const PARAM_MC_ILD_MAPPING ivas_param_mc_ild_mapping_CICP19_3tc =
+{
+ 10,
+ 12,
+ {0,1,4,5,6,7,8,9,10,11,2,3},
+ {1,1,1,1,1,1,1,1,1,1,1,1},
+ {{0},{1},{0},{1},{0},{1},{0},{1},{0},{1},{2},{2}}
+};
+
+const PARAM_MC_ICC_MAPPING ivas_param_mc_icc_mapping_CICP6_2tc =
+{
+ 4,
+ 5,
+ { { 0, 4 }, /* L/LS */
+ { 1, 5 }, /* R/RS */
+ { 0, 2 }, /* L/C */
+ { 1, 2 }, /* R/C */
+ { 2, 3 }} /* C/LFE */
+};
+
+const PARAM_MC_ICC_MAPPING ivas_param_mc_icc_mapping_CICP12_2tc =
+{
+ 6,
+ 7,
+ { { 0, 4 }, /* L/LS */
+ { 1, 5 }, /* R/RS */
+ { 0, 2 }, /* L/C */
+ { 1, 2 }, /* R/C */
+ { 2, 6 }, /* C/BLS */
+ { 2, 7 }, /* C/BRS */
+ { 2, 3 } /* C/LFE */
+ }
+};
+
+const PARAM_MC_ICC_MAPPING ivas_param_mc_icc_mapping_CICP12_3tc =
+{
+ 6,
+ 7,
+ { { 0, 4 }, /* L/LS */
+ { 1, 5 }, /* R/RS */
+ { 0, 2 }, /* L/C */
+ { 1, 2 }, /* R/C */
+ { 0, 6 }, /* L/BLS */
+ { 1, 7 }, /* R/BRS */
+ { 2, 3 } /* C/LFE */
+ }
+};
+
+const PARAM_MC_ICC_MAPPING ivas_param_mc_icc_mapping_CICP14_2tc =
+{
+ 6,
+ 7,
+ { { 0, 4 }, /* L/LS */
+ { 1, 5 }, /* R/RS */
+ { 0, 2 }, /* L/C */
+ { 1, 2 }, /* R/C */
+ { 2, 6 }, /* C/UFL */
+ { 2, 7 }, /* C/UFR */
+ { 2, 3 } /* C/LFE */
+ }
+};
+
+const PARAM_MC_ICC_MAPPING ivas_param_mc_icc_mapping_CICP14_3tc =
+{
+ 6,
+ 7,
+ { { 0, 4 }, /* L/LS */
+ { 1, 5 }, /* R/RS */
+ { 0, 2 }, /* L/C */
+ { 1, 2 }, /* R/C */
+ { 0, 6 }, /* L/UFL */
+ { 1, 7 }, /* R/UFR */
+ { 2, 3 } /* C/LFE */
+ }
+};
+
+const PARAM_MC_ICC_MAPPING ivas_param_mc_icc_mapping_CICP16_3tc =
+{
+ 8,
+ 9,
+ { { 0, 4 }, /* L/LS */
+ { 1, 5 }, /* R/RS */
+ { 0, 2 }, /* L/C */
+ { 1, 2 }, /* R/C */
+ { 0, 6 }, /* L/UFL */
+ { 1, 7 }, /* R/UFR */
+ { 4, 8 }, /* LS/UBL */
+ { 5, 9 }, /* RS/UBR */
+ { 2, 3 } /* C/LFE */
+ }
+};
+
+const PARAM_MC_ICC_MAPPING ivas_param_mc_icc_mapping_CICP19_3tc =
+{
+ 10,
+ 11,
+ { { 0, 4 }, /* L/LS */
+ { 1, 5 }, /* R/RS */
+ { 0, 2 }, /* L/C */
+ { 1, 2 }, /* R/C */
+ { 0, 6 }, /* L/LBS */
+ { 1, 7 }, /* R/RBS */
+ { 0, 8 }, /* L/UFL */
+ { 1, 9 }, /* R/UFR */
+ { 6, 10 }, /* LBS/UBL */
+ { 7, 11 }, /* RBS/UBR */
+ { 2, 3 } /* C/LFE */
+ }
+};
+
+const PARAM_MC_CONF ivas_param_mc_conf[PARAM_MC_NUM_CONFIGS] =
+{
+ /* CICP6 48000 */
+ {
+ MC_LS_SETUP_5_1,
+ 6,
+ 2,
+ IVAS_48k,
+ &ivas_param_mc_ild_mapping_CICP6_2tc,
+ &ivas_param_mc_icc_mapping_CICP6_2tc,
+ &ivas_param_mc_ild_fac_CICP6_2tc_fx[0],
+ &ivas_param_mc_dmx_fac_CICP6_2tc_fx[0]
+ },
+ /* CICP6 64000 */
+ {
+ MC_LS_SETUP_5_1,
+ 6,
+ 2,
+ IVAS_64k,
+ &ivas_param_mc_ild_mapping_CICP6_2tc,
+ &ivas_param_mc_icc_mapping_CICP6_2tc,
+ &ivas_param_mc_ild_fac_CICP6_2tc_fx[0],
+ & ivas_param_mc_dmx_fac_CICP6_2tc_fx[0]
+ },
+ /* CICP6 80000 */
+ {
+ MC_LS_SETUP_5_1,
+ 6,
+ 2,
+ IVAS_80k,
+ &ivas_param_mc_ild_mapping_CICP6_2tc,
+ &ivas_param_mc_icc_mapping_CICP6_2tc,
+ &ivas_param_mc_ild_fac_CICP6_2tc_fx[0],
+ & ivas_param_mc_dmx_fac_CICP6_2tc_fx[0]
+ },
+ /* CICP12 48000 */
+ {
+ MC_LS_SETUP_7_1,
+ 8,
+ 2,
+ IVAS_48k,
+ &ivas_param_mc_ild_mapping_CICP12_2tc,
+ &ivas_param_mc_icc_mapping_CICP12_2tc,
+ &ivas_param_mc_ild_fac_CICP12_2tc_fx[0],
+ &ivas_param_mc_dmx_fac_CICP12_2tc_fx[0]
+ },
+ /* CICP12 64000 */
+ {
+ MC_LS_SETUP_7_1,
+ 8,
+ 2,
+ IVAS_64k,
+ &ivas_param_mc_ild_mapping_CICP12_2tc,
+ &ivas_param_mc_icc_mapping_CICP12_2tc,
+ &ivas_param_mc_ild_fac_CICP12_2tc_fx[0],
+ &ivas_param_mc_dmx_fac_CICP12_2tc_fx[0]
+ },
+ /* CICP12 80000 */
+ {
+ MC_LS_SETUP_7_1,
+ 8,
+ 2,
+ IVAS_80k,
+ &ivas_param_mc_ild_mapping_CICP12_2tc,
+ &ivas_param_mc_icc_mapping_CICP12_2tc,
+ &ivas_param_mc_ild_fac_CICP12_2tc_fx[0],
+ &ivas_param_mc_dmx_fac_CICP12_2tc_fx[0],
+ },
+ /* CICP12 96000 */
+ {
+ MC_LS_SETUP_7_1,
+ 8,
+ 3,
+ IVAS_96k,
+ &ivas_param_mc_ild_mapping_CICP12_3tc,
+ &ivas_param_mc_icc_mapping_CICP12_3tc,
+ &ivas_param_mc_ild_fac_CICP12_3tc_fx[0],
+ &ivas_param_mc_dmx_fac_CICP12_3tc_fx[0]
+ },
+ /* CICP14 48000 */
+ {
+ MC_LS_SETUP_5_1_2,
+ 8,
+ 2,
+ IVAS_48k,
+ &ivas_param_mc_ild_mapping_CICP14_2tc,
+ &ivas_param_mc_icc_mapping_CICP14_2tc,
+ &ivas_param_mc_ild_fac_CICP14_2tc_fx[0],
+ &ivas_param_mc_dmx_fac_CICP14_2tc_fx[0]
+ },
+ /* CICP14 64000 */
+ {
+ MC_LS_SETUP_5_1_2,
+ 8,
+ 2,
+ IVAS_64k,
+ &ivas_param_mc_ild_mapping_CICP14_2tc,
+ &ivas_param_mc_icc_mapping_CICP14_2tc,
+ &ivas_param_mc_ild_fac_CICP14_2tc_fx[0],
+ &ivas_param_mc_dmx_fac_CICP14_2tc_fx[0]
+ },
+ /* CICP14 80000 */
+ {
+ MC_LS_SETUP_5_1_2,
+ 8,
+ 2,
+ IVAS_80k,
+ &ivas_param_mc_ild_mapping_CICP14_2tc,
+ &ivas_param_mc_icc_mapping_CICP14_2tc,
+ &ivas_param_mc_ild_fac_CICP14_2tc_fx[0],
+ &ivas_param_mc_dmx_fac_CICP14_2tc_fx[0]
+ },
+ /* CICP14 96000 */
+ {
+ MC_LS_SETUP_5_1_2,
+ 8,
+ 3,
+ IVAS_96k,
+ &ivas_param_mc_ild_mapping_CICP14_3tc,
+ &ivas_param_mc_icc_mapping_CICP14_3tc,
+ &ivas_param_mc_ild_fac_CICP14_3tc_fx[0],
+ &ivas_param_mc_dmx_fac_CICP14_3tc_fx[0]
+ },
+ /* CICP16 96000 */
+ {
+ MC_LS_SETUP_5_1_4,
+ 10,
+ 3,
+ IVAS_96k,
+ &ivas_param_mc_ild_mapping_CICP16_3tc,
+ &ivas_param_mc_icc_mapping_CICP16_3tc,
+ &ivas_param_mc_ild_fac_CICP16_3tc_fx[0],
+ &ivas_param_mc_dmx_fac_CICP16_3tc_fx[0]
+ },
+ /* CICP16 128000 */
+ {
+ MC_LS_SETUP_5_1_4,
+ 10,
+ 3,
+ IVAS_128k,
+ &ivas_param_mc_ild_mapping_CICP16_3tc,
+ &ivas_param_mc_icc_mapping_CICP16_3tc,
+ &ivas_param_mc_ild_fac_CICP16_3tc_fx[0],
+ &ivas_param_mc_dmx_fac_CICP16_3tc_fx[0]
+ },
+ /* CICP19 128000 */
+ {
+ MC_LS_SETUP_7_1_4,
+ 12,
+ 3,
+ IVAS_128k,
+ &ivas_param_mc_ild_mapping_CICP19_3tc,
+ &ivas_param_mc_icc_mapping_CICP19_3tc,
+ &ivas_param_mc_ild_fac_CICP19_3tc_fx[0],
+ &ivas_param_mc_dmx_fac_CICP19_3tc_fx[0]
+ }
+};
+
+
+/* Alphabet for delta coding for the ICCs in Parametric MC processing */
+const UWord16 ivas_param_mc_cum_freq_icc_cicp6_48_16bits[PARAM_MC_SZ_ICC_QUANTIZER + 1] =
+{
+ 0, 24, 224, 20873, 42384, 51699, 57122, 60572, 65535
+};
+
+const UWord16 ivas_param_mc_sym_freq_icc_cicp6_48_16bits[PARAM_MC_SZ_ICC_QUANTIZER] =
+{
+ 24, 200, 20649, 21511, 9315, 5423, 3450, 4963
+};
+
+const UWord16 ivas_param_mc_cum_freq_icc_delta_cicp6_48_16bits[2 * PARAM_MC_SZ_ICC_QUANTIZER] =
+{
+ 0, 4, 9, 124, 447, 1311, 4453, 18116, 48636, 60573, 63692, 64746, 65327, 65531, 65534, 65535
+};
+
+const UWord16 ivas_param_mc_sym_freq_icc_delta_cicp6_48_16bits[2 * PARAM_MC_SZ_ICC_QUANTIZER - 1] =
+{
+ 4, 5, 115, 323, 864, 3142, 13663, 30520, 11937, 3119, 1054, 581, 204, 3, 1
+};
+
+const UWord16 ivas_param_mc_cum_freq_icc_cicp12_48_16bits[PARAM_MC_SZ_ICC_QUANTIZER + 1] =
+{
+ 0, 30, 848, 26611, 47846, 57358, 61679, 63237, 65535
+};
+
+const UWord16 ivas_param_mc_sym_freq_icc_cicp12_48_16bits[PARAM_MC_SZ_ICC_QUANTIZER] =
+{
+ 30, 818, 25763, 21235, 9512, 4321, 1558, 2298
+};
+
+const UWord16 ivas_param_mc_cum_freq_icc_delta_cicp12_48_16bits[2 * PARAM_MC_SZ_ICC_QUANTIZER] =
+{
+ 0, 2, 7, 53, 243, 979, 3994, 16732, 49642, 61343, 64331, 65158, 65438, 65532, 65534, 65535
+};
+
+const UWord16 ivas_param_mc_sym_freq_icc_delta_cicp12_48_16bits[2 * PARAM_MC_SZ_ICC_QUANTIZER - 1] =
+{
+ 2, 5, 46, 190, 736, 3015, 12738, 32910, 11701, 2988, 827, 280, 94, 2, 1
+};
+
+const UWord16 ivas_param_mc_cum_freq_icc_cicp14_48_16bits[PARAM_MC_SZ_ICC_QUANTIZER + 1] =
+{
+ 0, 46, 826, 27798, 49552, 58447, 62046, 63284, 65535
+};
+
+const UWord16 ivas_param_mc_sym_freq_icc_cicp14_48_16bits[PARAM_MC_SZ_ICC_QUANTIZER ]={
+ 46, 780, 26972, 21754, 8895, 3599, 1238, 2251
+};
+
+const UWord16 ivas_param_mc_cum_freq_icc_delta_cicp14_48_16bits[2 * PARAM_MC_SZ_ICC_QUANTIZER] =
+{
+ 0, 3, 8, 36, 172, 763, 3436, 15845, 50168, 62005, 64676, 65298, 65481, 65533, 65534, 65535
+};
+
+const UWord16 ivas_param_mc_sym_freq_icc_delta_cicp14_48_16bits[2* PARAM_MC_SZ_ICC_QUANTIZER - 1] =
+{
+ 3, 5, 28, 136, 591, 2673, 12409, 34323, 11837, 2671, 622, 183, 52, 1, 1
+};
+
+const UWord16 ivas_param_mc_cum_freq_icc_combined_48_16bits[PARAM_MC_SZ_ICC_QUANTIZER + 1] =
+{
+ 0, 34, 552, 24717, 45819, 54772, 59054, 61166, 65535
+};
+
+const UWord16 ivas_param_mc_sym_freq_icc_combined_48_16bits[PARAM_MC_SZ_ICC_QUANTIZER] =
+{
+ 34, 518, 24165, 21102, 8953, 4282, 2112, 4369
+};
+
+const UWord16 ivas_param_mc_cum_freq_icc_delta_combined_48_16bits[2 * PARAM_MC_SZ_ICC_QUANTIZER] =
+{
+ 0, 3, 7, 74, 304, 1009, 3870, 16502, 49834, 61384, 64217, 65020, 65369, 65531, 65534, 65535
+};
+
+const UWord16 ivas_param_mc_sym_freq_icc_delta_combined_48_16bits[2 * PARAM_MC_SZ_ICC_QUANTIZER - 1] =
+{
+ 3, 4, 67, 230, 705, 2861, 12632, 33332, 11550, 2833, 803, 349, 162, 3, 1
+};
+
+const UWord16 ivas_param_mc_cum_freq_ild_cicp6_48_16bits[PARAM_MC_SZ_ILD_QUANTIZER_4BITS + 1] =
+{
+ 0, 1092, 5574, 8315, 10652, 13875, 19656, 27664, 36284, 47058, 56251, 62579, 65118, 65462, 65513, 65532, 65535
+};
+
+const UWord16 ivas_param_mc_sym_freq_ild_cicp6_48_16bits[PARAM_MC_SZ_ILD_QUANTIZER_4BITS] =
+{
+ 1092, 4482, 2741, 2337, 3223, 5781, 8008, 8620, 10774, 9193, 6328, 2539, 344, 51, 19, 3
+};
+
+const UWord16 ivas_param_mc_cum_freq_ild_delta_cicp6_48_16bits[2 * PARAM_MC_SZ_ILD_QUANTIZER_4BITS] =
+{
+ 0, 1, 2, 3, 5, 38, 146, 352, 638, 997, 1559, 2323, 3570, 5859, 10556, 21075, 44682, 55617, 60408, 62739, 63833, 64443, 64809, 65074, 65279, 65400, 65484, 65531, 65532, 65533, 65534, 65535
+};
+
+const UWord16 ivas_param_mc_sym_freq_ild_delta_cicp6_48_16bits[2 * PARAM_MC_SZ_ILD_QUANTIZER_4BITS - 1] =
+{
+ 1, 1, 1, 2, 33, 108, 206, 286, 359, 562, 764, 1247, 2289, 4697, 10519, 23607, 10935, 4791, 2331, 1094, 610, 366, 265, 205, 121, 84, 47, 1, 1, 1, 1
+};
+
+const UWord16 ivas_param_mc_cum_freq_ild_cicp12_48_16bits[PARAM_MC_SZ_ILD_QUANTIZER_4BITS + 1] =
+{
+ 0, 967, 6335, 9941, 12837, 16652, 22416, 29814, 38807, 48497, 57184, 62661, 64916, 65466, 65514, 65530, 65535
+};
+
+const UWord16 ivas_param_mc_sym_freq_ild_cicp12_48_16bits[PARAM_MC_SZ_ILD_QUANTIZER_4BITS] =
+{
+ 967, 5368, 3606, 2896, 3815, 5764, 7398, 8993, 9690, 8687, 5477, 2255, 550, 48, 16, 5
+};
+
+const UWord16 ivas_param_mc_cum_freq_ild_delta_cicp12_48_16bits[2 * PARAM_MC_SZ_ILD_QUANTIZER_4BITS] =
+{
+ 0, 1, 2, 3, 5, 18, 61, 149, 320, 592, 1083, 1793, 2974, 5257, 10133, 21274, 44342, 55891, 60895, 63174, 64244, 64793, 65100, 65287, 65406, 65477, 65517, 65531, 65532, 65533, 65534, 65535
+};
+
+const UWord16 ivas_param_mc_sym_freq_ild_delta_cicp12_48_16bits[2 * PARAM_MC_SZ_ILD_QUANTIZER_4BITS - 1] =
+{
+ 1, 1, 1, 2, 13, 43, 88, 171, 272, 491, 710, 1181, 2283, 4876, 11141, 23068, 11549, 5004, 2279, 1070, 549, 307, 187, 119, 71, 40, 14, 1, 1, 1, 1
+};
+
+const UWord16 ivas_param_mc_cum_freq_ild_cicp14_48_16bits[PARAM_MC_SZ_ILD_QUANTIZER_4BITS + 1] =
+{
+ 0, 229, 7068, 10910, 13856, 17467, 22629, 29174, 36906, 46558, 55579, 61802, 65222, 65505, 65527, 65534, 65535
+};
+
+const UWord16 ivas_param_mc_sym_freq_ild_cicp14_48_16bits[PARAM_MC_SZ_ILD_QUANTIZER_4BITS] =
+{
+ 229, 6839, 3842, 2946, 3611, 5162, 6545, 7732, 9652, 9021, 6223, 3420, 283, 22, 7, 1
+};
+
+const UWord16 ivas_param_mc_cum_freq_ild_delta_cicp14_48_16bits[2 * PARAM_MC_SZ_ILD_QUANTIZER_4BITS] =
+{
+ 0, 1, 2, 3, 4, 12, 56, 153, 278, 475, 856, 1430, 2489, 4723, 9580, 20685, 45423, 56274, 60948, 63097, 64128, 64679, 65002, 65208, 65348, 65445, 65517, 65531, 65532, 65533, 65534, 65535
+};
+
+const UWord16 ivas_param_mc_sym_freq_ild_delta_cicp14_48_16bits[2 * PARAM_MC_SZ_ILD_QUANTIZER_4BITS - 1] =
+{
+ 1, 1, 1, 1, 8, 44, 97, 125, 197, 381, 574, 1059, 2234, 4857, 11105, 24738, 10851, 4674, 2149, 1031, 551, 323, 206, 140, 97, 72, 14, 1, 1, 1, 1
+};
+
+const UWord16 ivas_param_mc_cum_freq_ild_combined_48_16bits[PARAM_MC_SZ_ILD_QUANTIZER_4BITS+1] =
+{
+ 0, 1453, 8326, 12221, 15164, 18764, 24177, 31297, 39520, 49154, 57135, 62460, 64821, 65468, 65514, 65530, 65535
+};
+
+const UWord16 ivas_param_mc_sym_freq_ild_combined_48_16bits[PARAM_MC_SZ_ILD_QUANTIZER_4BITS] =
+{
+ 1453, 6873, 3895, 2943, 3600, 5413, 7120, 8223, 9634, 7981, 5325, 2361, 647, 46, 16, 5
+};
+
+const UWord16 ivas_param_mc_cum_freq_ild_delta_combined_48_16bits[2 * PARAM_MC_SZ_ILD_QUANTIZER_4BITS] =
+{
+ 0, 1, 2, 3, 5, 29, 98, 220, 414, 699, 1186, 1876, 3049, 5304, 10013, 20612, 45247, 56109, 60818, 63022, 64081, 64647, 64977, 65198, 65348, 65443, 65502, 65530, 65532, 65533, 65534, 65535
+};
+
+const UWord16 ivas_param_mc_sym_freq_ild_delta_combined_48_16bits[2 * PARAM_MC_SZ_ILD_QUANTIZER_4BITS - 1] =
+{
+ 1, 1, 1, 2, 24, 69, 122, 194, 285, 487, 690, 1173, 2255, 4709, 10599, 24635, 10862, 4709, 2204, 1059, 566, 330, 221, 150, 95, 59, 28, 2, 1, 1, 1
+};
+
+
+/*----------------------------------------------------------------------------------*
+ * MASA ROM tables
+ *----------------------------------------------------------------------------------*/
+
+const UWord8 ivasmasaFormatDescriptor[8] =
+{
+ 0x49, 0x56, 0x41, 0x53, 0x4D, 0x41, 0x53, 0x41 /* "IVASMASA" */
+};
+
+const Word64 diffuseness_reconstructions_hr_fx[HR_MASA_ER_LEVELS] = { /* Q62 */
+ 0,
+ 65865144550293504,
+ 138485688541642752,
+ 239816680157478912,
+ 355502895585558528,
+ 485544334825881600,
+ 667940119734386688,
+ 902690250311073792,
+ 1225260573621485568,
+ 1635651089665622016,
+ 2011983133527769088,
+ 2354256705207926784,
+ 2741003323208368128,
+ 3172222987529093120,
+ 3693796119373938688,
+ 4305722718742904832,
+};
+
+const Word32 diffuseness_thresholds_hr_fx[HR_MASA_ER_LEVELS + 1] = { /* Q30 */
+ 0,
+ 10223616,
+ 20447232,
+ 44040192,
+ 67633152,
+ 97910784,
+ 128188416,
+ 182845440,
+ 237502464,
+ 333053952,
+ 428605440,
+ 508297216,
+ 587988992,
+ 688390144,
+ 788791296,
+ 931266560,
+ MAX_32 /* out-of-range large value to make searching easier */
+};
+
+const Word16 bits_direction_masa[DIRAC_DIFFUSE_LEVELS] =
+{
+ 11,
+ 11,
+ 10,
+ 9,
+ 7,
+ 6,
+ 5,
+ 3
+};
+
+const Word16 len_cb_dct0_masa[DIRAC_DIFFUSE_LEVELS] = { 7, 6, 5, 4, 4, 4, 3, 2 };
+
+const UWord8 sur_coherence_cb_masa[MASA_MAX_NO_CV_SUR_COH*MASA_NO_CB_SUR_COH] =
+{
+ 16, 99, 0, 0, 0, 0, 0, 0,
+ 12, 64, 167, 0, 0, 0, 0, 0,
+ 10, 45, 100, 218, 0, 0, 0, 0,
+ 8, 34, 70, 124, 235, 0, 0, 0,
+ 7, 27, 55, 90, 141, 242, 0, 0,
+ 7, 23, 45, 71, 105, 153, 247, 0,
+ 6, 20, 38, 60, 86, 119, 165, 249
+};
+
+const Word16 idx_cb_sur_coh_masa[MASA_MAX_NO_CV_SUR_COH] = { 0, 1, 2, 3, 4, 5, 5, 6 };
+
+const Word16 len_huf_masa[MASA_NO_CV_COH1] = { 4, 2, 1, 3, 4 };
+
+const Word16 huff_code_av_masa[MASA_NO_CV_COH1] = { 15, 2, 0, 6, 14 };
+
+const Word16 no_theta_masa[NO_SPHERICAL_GRIDS-2] = /* from 1 to 11 bits */
+{ /*1, 1,*/ 2 ,2 , 4, 5, 6, 7, 10, 14, 19
+ /*0, 2, 8, 6, 7, 12, 14, 16*/
+};
+
+const Word16 no_phi_masa[NO_SPHERICAL_GRIDS][MAX_NO_THETA] = /* from 1 to 11 bits*/
+{
+ { 2 },
+ { 4 },
+ { 4, 2 },
+ { 8, 4 }, /* 8, 4*/
+ { 12, 7, 2, 1 }, /* 12, */
+ { 14, 13, 9, 2, 1 },
+ { 22, 21, 17, 11, 3, 1 },
+ { 33, 32, 29, 23, 17, 9, 1 },
+ { 48, 47, 45, 41, 35, 28, 20, 12, 2, 1 },
+ { 60, 60, 58, 56, 54, 50, 46, 41, 36, 30, 23, 17, 10, 1 },
+ { 89, 89, 88, 86, 84, 81, 77, 73, 68, 63, 57, 51, 44, 38, 30, 23, 15, 8, 1 }
+};
+
+const Word16 MASA_band_grouping_24[24 + 1] =
+{
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 25, 30, 40, 60
+};
+
+const Word16 MASA_band_mapping_24_to_18[18 + 1] =
+{
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 17, 20, 21, 22, 23, 24
+};
+
+const Word16 MASA_band_mapping_24_to_12[12 + 1] =
+{
+ 0, 1, 2, 3, 4, 5, 7, 9, 12, 15, 20, 22, 24
+};
+
+const Word16 MASA_band_mapping_24_to_8[8 + 1] =
+{
+ 0, 1, 2, 3, 5, 8, 12, 20, 24
+};
+
+const Word16 MASA_band_mapping_24_to_5[5 + 1] =
+{
+ 0, 1, 3, 7, 15, 24
+};
+
+const Word16 MASA_grouping_8_to_5[8] =
+{
+ 0, 1, 1, 2, 3, 3, 4, 4
+};
+
+const Word16 MASA_grouping_12_to_5[12] =
+{
+ 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4
+};
+
+const Word16 MASA_grouping_18_to_5[18] =
+{
+ 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4
+};
+
+const Word16 MASA_grouping_24_to_5[24] =
+{
+ 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4
+};
+
+/* IVAS_13k2, IVAS_16k4, IVAS_24k4, IVAS_32k, IVAS_48k, IVAS_64k, IVAS_80k, IVAS_96k, IVAS_128k, IVAS_160k, IVAS_192k, IVAS_256k, IVAS_384k, IVAS_512k */
+const Word16 masa_bits[IVAS_NUM_ACTIVE_BRATES] =
+{
+ 50, 60, 70, 85, 140, 180, 220, 256, 350, 432, 528, 832, 1024, MASA_MAX_BITS
+};
+
+const Word16 masa_bits_LR_stereo[4] =
+{
+ 50, 50, 60, 70
+};
+
+const Word16 mcmasa_bits[IVAS_NUM_ACTIVE_BRATES] =
+{
+ 50, 70, 80, 120, 140, 160, 220, 256, 288, 432, 528, 832, 1024, MASA_MAX_BITS
+};
+
+const UWord8 masa_nbands[IVAS_NUM_ACTIVE_BRATES] =
+{
+ 5, 5, 5, 5, 5, 5, 5, 5, 8, 12, 18, 24, 24, 24
+};
+
+const UWord8 masa_joined_nbands[IVAS_NUM_ACTIVE_BRATES] =
+{
+ 5, 5, 5, 8, 12, 12, 12, 18, 18, 18, 18, 24, 24, 24
+};
+
+const UWord8 masa_twodir_bands[IVAS_NUM_ACTIVE_BRATES] =
+{
+ 0, 0, 0, 0, 0, 1, 1, 1, 3, 4, 6, 6, 9, 24
+};
+
+const UWord8 masa_twodir_bands_joined[IVAS_NUM_ACTIVE_BRATES] =
+{
+ 0, 0, 0, 0, 0, 2, 2, 3, 4, 6, 8, 9, 12, MASA_MAXIMUM_TWO_DIR_BANDS
+};
+
+
+/*----------------------------------------------------------------------------------*
+ * OMASA ROM tables
+ *----------------------------------------------------------------------------------*/
+
+const Word32 sep_object_brate[][MAX_NUM_OBJECTS] =
+{
+ {0, 0, 0, 0}, /* 13k2 */
+ {0, 0, 0, 0}, /* 16k4 */
+ {9600, 0, 0, 0}, /* 24k4 */
+ {IVAS_13k2, 0, 0, 0}, /* 32k */
+ {16000, 11000, 0, 0}, /* 48k */
+ {16000, 11700, 0, 0}, /* 64k */
+ {20000, 16000, 0, 0}, /* 80k */
+ {IVAS_32k, 20000, 20000, 0}, /* 96k */
+ {IVAS_32k, IVAS_24k4, 24000, 24000}, /* 128k */
+ {IVAS_48k, IVAS_32k, IVAS_24k4, 24000}, /* 160k */
+ {IVAS_64k, IVAS_48k, IVAS_32k, IVAS_24k4}, /* 192k */
+ {IVAS_96k, IVAS_64k, IVAS_48k, IVAS_32k}, /* 256k */
+ {IVAS_128k, IVAS_80k, IVAS_64k, IVAS_48k}, /* 384k */
+ {IVAS_128k, IVAS_96k, IVAS_80k, IVAS_64k} /* 512k */
+};
+
+
+/*----------------------------------------------------------------------------------*
+ * Param ISM ROM tables
+ *----------------------------------------------------------------------------------*/
+
+const Word16 Param_ISM_band_grouping[MAX_PARAM_ISM_NBANDS + 1] =
+{
+ 0, 1, 2, 3, 4, 6, 8, 11, 15, 21, 31, 60
+};
+
+
+/*----------------------------------------------------------------------------------*
+ * LFE coding ROM tables
+ *----------------------------------------------------------------------------------*/
+
+const ivas_lfe_freq_models ivas_str_lfe_freq_models =
+{
+ { 16384, 14924, 13463, 12003, 10542, 9082, 7622, 6161,
+ 4701, 4336, 3970, 3605, 3240, 2875, 2510, 2145,
+ 1780, 1689, 1597, 1506, 1415, 1323, 1232, 1141,
+ 1050, 1004, 958, 913, 867, 821, 776, 730,
+ 685, 639, 593, 548, 502, 456, 411, 365,
+ 319, 297, 274, 251, 228, 205, 183, 160,
+ 137, 126, 114, 103, 91, 80, 68, 57,
+ 46, 40, 34, 29, 23, 17, 11, 6, 0 },
+
+ { 16384, 13463, 10542, 7622, 4701, 3970, 3240, 2510,
+ 1780, 1597, 1415, 1232, 1050, 958, 867, 776,
+ 685, 593, 502, 411, 319, 274, 228, 183,
+ 137, 114, 91, 68, 46, 34, 23, 11, 0 },
+
+ { 16384, 4701, 1780, 1050, 685, 319, 137, 46,
+ 0, },
+
+ { 16384, 3277, 0 },
+
+ { 16384, 13463, 10542, 7622, 4701, 3970, 3240, 2510,
+ 1780, 1597, 1415, 1232, 1050, 958, 867, 776,
+ 685, 593, 502, 411, 319, 274, 228, 183,
+ 137, 114, 91, 68, 46, 34, 23, 11,
+ 0 },
+
+ { 16384, 10542, 4701, 3240, 1780, 1415, 1050, 867,
+ 685, 502, 319, 228, 137, 91, 46, 23,
+ 0 },
+
+ { 16384, 4468, 1489, 745, 0 }, 0,
+};
+
+const Word16 ivas_lfe_num_ele_in_coder_models[2][4] =
+{
+ { 63, 31, 7, 1 },{ 31, 15, 3, 0 }
+};
+
+const Word16 ivas_lfe_log2_num_ele_in_coder_models_fx[2][4] =
+{
+ { 6, 5, 3, 1 },{ 5, 4, 2, 0 }
+};
+
+const Word16 ivas_lfe_num_dct_pass_bins_tbl[IVAS_LFE_NUM_COEFFS_IN_SUBGRP] = { 8, 6 };
+
+const Word16 ivas_lfe_min_shift_tbl[IVAS_LFE_NUM_COEFFS_IN_SUBGRP] = { 1, 0 };
+
+const Word16 ivas_lfe_lpf_delay_Q15[2] = { 57, 114 };
+
+const Word32 ivas_lfe_lpf_delay_ns[2] = { 1750000, 3500000 };
+
+const Word16 dirac_gains_P_idx[16] =
+{
+ -1, 1, 0, 1, 4, 3, 2, 3, 4, 8, 7, 6, 5, 6, 7, 8
+};
+
+
+/*----------------------------------------------------------------------------------*
+ * FB ROM tables
+ *----------------------------------------------------------------------------------*/
+
+const Word32 ivas_fb_fcs_12band_1ms_fx[IVAS_FB_BANDS_12] =
+{
+ 17895696, 53687092, 89478488, 125269880,
+ 161061280, 196852672, 232644064, 304226848,
+ 465288128, 715827904, 1091637520, 1735882615
+};/*Q31*/
+
+const Word16 ivas_fb_abs_bins_per_band_12band_1ms[IVAS_NUM_SUPPORTED_FS][IVAS_FB_BANDS_12] =
+{
+ { 24, 30, 30, 30, 30, 30, 42, 76, 124, 182, 291, 367 },
+ { 24, 30, 30, 30, 30, 30, 42, 76, 124, 182, 260, 47 },
+ { 24, 30, 30, 30, 30, 30, 42, 75, 122, 73, 0, 0 }
+};
+
+const Word16 ivas_fb_abs_bins_start_offset_12band_1ms[IVAS_NUM_SUPPORTED_FS][IVAS_FB_BANDS_12] =
+{
+ {0, 9, 25, 41, 57, 73, 88, 110, 158, 246, 380, 593 },
+ {0, 9, 25, 41, 57, 73, 88, 110, 158, 246, 380, 593 },
+ {0, 9, 25, 41, 57, 73, 88, 110, 159, 247, 0, 0 }
+};
+
+const Word16 ivas_fb_bins_per_band_12band_1ms[IVAS_NUM_SUPPORTED_FS][IVAS_FB_BANDS_12] =
+{
+ {
+ IVAS_FB_12_1MS_48K_END_BINS_BAND_0 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_0,
+ IVAS_FB_12_1MS_48K_END_BINS_BAND_1 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_1,
+ IVAS_FB_12_1MS_48K_END_BINS_BAND_2 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_2,
+ IVAS_FB_12_1MS_48K_END_BINS_BAND_3 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_3,
+ IVAS_FB_12_1MS_48K_END_BINS_BAND_4 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_4,
+ IVAS_FB_12_1MS_48K_END_BINS_BAND_5 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_5,
+ IVAS_FB_12_1MS_48K_END_BINS_BAND_6 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_6,
+ IVAS_FB_12_1MS_48K_END_BINS_BAND_7 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_7,
+ IVAS_FB_12_1MS_48K_END_BINS_BAND_8 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_8,
+ IVAS_FB_12_1MS_48K_END_BINS_BAND_9 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_9,
+ IVAS_FB_12_1MS_48K_END_BINS_BAND_10 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_10,
+ IVAS_FB_12_1MS_48K_END_BINS_BAND_11 - IVAS_FB_12_1MS_48K_START_OFFSET_BAND_11
+ },
+ {
+ IVAS_FB_12_1MS_32K_END_BINS_BAND_0 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_0,
+ IVAS_FB_12_1MS_32K_END_BINS_BAND_1 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_1,
+ IVAS_FB_12_1MS_32K_END_BINS_BAND_2 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_2,
+ IVAS_FB_12_1MS_32K_END_BINS_BAND_3 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_3,
+ IVAS_FB_12_1MS_32K_END_BINS_BAND_4 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_4,
+ IVAS_FB_12_1MS_32K_END_BINS_BAND_5 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_5,
+ IVAS_FB_12_1MS_32K_END_BINS_BAND_6 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_6,
+ IVAS_FB_12_1MS_32K_END_BINS_BAND_7 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_7,
+ IVAS_FB_12_1MS_32K_END_BINS_BAND_8 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_8,
+ IVAS_FB_12_1MS_32K_END_BINS_BAND_9 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_9,
+ IVAS_FB_12_1MS_32K_END_BINS_BAND_10 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_10,
+ IVAS_FB_12_1MS_32K_END_BINS_BAND_11 - IVAS_FB_12_1MS_32K_START_OFFSET_BAND_11
+ },
+ {
+ IVAS_FB_12_1MS_16K_END_BINS_BAND_0 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_0,
+ IVAS_FB_12_1MS_16K_END_BINS_BAND_1 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_1,
+ IVAS_FB_12_1MS_16K_END_BINS_BAND_2 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_2,
+ IVAS_FB_12_1MS_16K_END_BINS_BAND_3 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_3,
+ IVAS_FB_12_1MS_16K_END_BINS_BAND_4 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_4,
+ IVAS_FB_12_1MS_16K_END_BINS_BAND_5 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_5,
+ IVAS_FB_12_1MS_16K_END_BINS_BAND_6 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_6,
+ IVAS_FB_12_1MS_16K_END_BINS_BAND_7 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_7,
+ IVAS_FB_12_1MS_16K_END_BINS_BAND_8 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_8,
+ IVAS_FB_12_1MS_16K_END_BINS_BAND_9 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_9,
+ IVAS_FB_12_1MS_16K_END_BINS_BAND_10 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_10,
+ IVAS_FB_12_1MS_16K_END_BINS_BAND_11 - IVAS_FB_12_1MS_16K_START_OFFSET_BAND_11
+ },
+};
+
+const Word16 ivas_fb_bins_start_offset_12band_1ms[IVAS_NUM_SUPPORTED_FS][IVAS_FB_BANDS_12] =
+{
+ {
+ IVAS_FB_12_1MS_48K_START_OFFSET_BAND_0, IVAS_FB_12_1MS_48K_START_OFFSET_BAND_1,
+ IVAS_FB_12_1MS_48K_START_OFFSET_BAND_2, IVAS_FB_12_1MS_48K_START_OFFSET_BAND_3,
+ IVAS_FB_12_1MS_48K_START_OFFSET_BAND_4, IVAS_FB_12_1MS_48K_START_OFFSET_BAND_5,
+ IVAS_FB_12_1MS_48K_START_OFFSET_BAND_6, IVAS_FB_12_1MS_48K_START_OFFSET_BAND_7,
+ IVAS_FB_12_1MS_48K_START_OFFSET_BAND_8, IVAS_FB_12_1MS_48K_START_OFFSET_BAND_9,
+ IVAS_FB_12_1MS_48K_START_OFFSET_BAND_10, IVAS_FB_12_1MS_48K_START_OFFSET_BAND_11
+ },
+ {
+ IVAS_FB_12_1MS_32K_START_OFFSET_BAND_0, IVAS_FB_12_1MS_32K_START_OFFSET_BAND_1,
+ IVAS_FB_12_1MS_32K_START_OFFSET_BAND_2, IVAS_FB_12_1MS_32K_START_OFFSET_BAND_3,
+ IVAS_FB_12_1MS_32K_START_OFFSET_BAND_4, IVAS_FB_12_1MS_32K_START_OFFSET_BAND_5,
+ IVAS_FB_12_1MS_32K_START_OFFSET_BAND_6, IVAS_FB_12_1MS_32K_START_OFFSET_BAND_7,
+ IVAS_FB_12_1MS_32K_START_OFFSET_BAND_8, IVAS_FB_12_1MS_32K_START_OFFSET_BAND_9,
+ IVAS_FB_12_1MS_32K_START_OFFSET_BAND_10, IVAS_FB_12_1MS_32K_START_OFFSET_BAND_11
+ },
+ {
+ IVAS_FB_12_1MS_16K_START_OFFSET_BAND_0, IVAS_FB_12_1MS_16K_START_OFFSET_BAND_1,
+ IVAS_FB_12_1MS_16K_START_OFFSET_BAND_2, IVAS_FB_12_1MS_16K_START_OFFSET_BAND_3,
+ IVAS_FB_12_1MS_16K_START_OFFSET_BAND_4, IVAS_FB_12_1MS_16K_START_OFFSET_BAND_5,
+ IVAS_FB_12_1MS_16K_START_OFFSET_BAND_6, IVAS_FB_12_1MS_16K_START_OFFSET_BAND_7,
+ IVAS_FB_12_1MS_16K_START_OFFSET_BAND_8, IVAS_FB_12_1MS_16K_START_OFFSET_BAND_9,
+ IVAS_FB_12_1MS_16K_START_OFFSET_BAND_10, IVAS_FB_12_1MS_16K_START_OFFSET_BAND_11
+ },
+};
+
+const Word16 ivas_num_active_bands[FB - WB + 1] =
+{
+ IVAS_16K_12BANDS_ACTIVE_BANDS, IVAS_FB_BANDS_12, IVAS_FB_BANDS_12
+};
+
+
+/*------------------------------------------------------------------------------------------*
+ * SNS MSVQ codebooks and means
+ *------------------------------------------------------------------------------------------*/
+
+const Word16 ivas_sns_cdbks_tcx20_levels[SNS_MSVQ_NSTAGES_TCX20] = { 128, 64, 32, 32 };
+const Word16 ivas_sns_cdbks_tcx20_bits[SNS_MSVQ_NSTAGES_TCX20] = { 7, 6, 5, 5 };
+const Word16 ivas_sns_cdbks_tcx10_levels[SNS_MSVQ_NSTAGES_TCX10] = { 128, 32, 8 };
+const Word16 ivas_sns_cdbks_tcx10_bits[SNS_MSVQ_NSTAGES_TCX10] = { 7, 5, 3 };
+
+const Word16 ivas_sns_cdbks_side_tcx20_levels[SNS_MSVQ_NSTAGES_SIDE] = { 32, 32 };
+const Word16 ivas_sns_cdbks_side_tcx20_bits[SNS_MSVQ_NSTAGES_SIDE] = { 5, 5 };
+const Word16 ivas_sns_cdbks_side_tcx10_levels[SNS_MSVQ_NSTAGES_SIDE] = { 32, 8 };
+const Word16 ivas_sns_cdbks_side_tcx10_bits[SNS_MSVQ_NSTAGES_SIDE] = { 5, 3 };
+
+const Word16 sns_1st_cdbk[2][2][8 * 32] =
+{
+ { /* split 1 */
+ { /* TCX 20 */
+ -10900, -11064, -10637, -10471, -9051, -6381, -4688, -2438,
+ -2119, -5087, -6702, -8118, -7586, -6343, -4828, -3406,
+ 2004, -3443, -4289, -3757, -3234, -2952, -2313, -1781,
+ 1749, 5598, 3916, 732, -1472, -2964, -3275, -2332,
+ -11978, -14369, -5600, -545, 981, -929, -57, 1903,
+ 1745, 391, 202, 115, 256, -291, -862, -1637,
+ -4052, 2059, 4709, 6768, 5595, 1975, -1723, -1218,
+ 2093, 7263, 8679, 7576, 3701, -2438, -4389, -2686,
+ -7120, -6279, -5715, -5520, -4752, -3125, -1856, -438,
+ 8131, -2543, -6285, -6723, -5588, -4321, -3264, -2164,
+ -653, -1301, -660, 608, 1598, 1805, 1698, 760,
+ 4882, 9309, 6333, 1734, 284, 364, 560, 1015,
+ -7686, -5737, -3443, -1642, 245, 1531, 1827, 1769,
+ -1468, 3782, 144, -5130, -6883, -5165, -1497, 2072,
+ -12937, -8429, -2619, 2894, 5004, 4710, 4627, 3740,
+ 3198, 3928, 4358, 4554, 3887, 2844, 1299, 129,
+ -13828, -12296, -9364, -7918, -5571, -1909, 307, 2047,
+ -4314, -1211, -559, -1061, -1928, -2228, -2359, -1902,
+ -309, -3224, -3404, -1895, -743, -59, 757, 908,
+ 10914, 5865, 1599, -386, -1392, -2285, -2236, -2042,
+ -11825, -16241, -11402, -3627, 6556, 8953, 6421, 1546,
+ 6102, 777, -301, 536, 902, 541, 210, -429,
+ -3052, 3997, 5389, 1842, -344, 1556, 2667, 2428,
+ 11788, 10894, 7448, 5423, 2372, -677, -2385, -3839,
+ -45, -7602, -8923, -7179, -3273, 65, 4500, 6726,
+ 5895, 626, -1610, -2598, -3240, -3540, -2930, -2156,
+ -971, 461, 1494, 4907, 5859, 5199, 3678, 2502,
+ 10766, 5297, 1844, 1236, 2498, 3503, 2846, 838,
+ -7816, -1212, 891, 2387, 1317, 2225, 1859, 1602,
+ 2376, 5357, 2088, -2719, -3419, -420, 2431, 2943,
+ -8383, -795, 4351, 7026, 7460, 7191, 5262, 3796,
+ 1522, 6283, 8714, 8222, 7434, 5768, 3586, 1499,
+ },
+ { /* TCX 10 */
+ -15596, -16321, -10264, -1002, 5955, 5543, -29, -1688,
+ 17, -3794, -6207, -7356, -6998, -6081, -4453, -2448,
+ -12543, -11530, -10186, -8817, -7083, -4440, -1946, 892,
+ 5198, 2751, -274, -2574, -4561, -6087, -5944, -4600,
+ -683, -2640, -2753, -1195, -239, -217, -286, 90,
+ -1400, -1146, -1853, -2845, -3456, -3788, -3171, -1969,
+ -1835, 392, 1725, 1209, -392, -1640, -2001, -1608,
+ 5770, 7707, 5210, 2112, -382, -2088, -2634, -3007,
+ -10766, -8101, -5137, -3754, -1881, 331, 2339, 3679,
+ -2637, -4640, -5811, -5651, -3790, -1359, 913, 1893,
+ -7793, -4768, -1762, -545, -717, -837, -441, -75,
+ 4030, 1770, 467, 379, 10, -1330, -2398, -2290,
+ -9395, -6952, -2494, 2022, 4753, 5614, 4443, 2642,
+ -1486, 1748, 859, -2586, -3368, -638, 2761, 3269,
+ -2408, 306, 3633, 6567, 5950, 2474, -621, -1421,
+ 5478, 7986, 9498, 8165, 5477, 1244, -523, -1586,
+ -13564, -14673, -10597, -5504, 1575, 8248, 7662, 4025,
+ 4978, -682, -3586, -4305, -3703, -3001, -2227, -1278,
+ -8002, -6831, -5558, -4868, -4243, -3393, -2486, -1110,
+ 11485, 5472, 1645, -533, -1792, -2814, -3169, -2706,
+ 1617, 421, 232, 1382, 2162, 2017, 1318, 744,
+ 3677, 5212, 1990, -1514, -2894, -2441, -451, 592,
+ 731, 4295, 5860, 3756, 1991, 1437, 869, 127,
+ 12736, 11722, 7768, 4682, 1574, -744, -1989, -3131,
+ -3490, -4269, -3681, -1531, 1111, 3327, 4138, 3815,
+ 7344, 1400, -1302, -1502, -1015, 57, 1212, 1498,
+ -4836, -1881, 1071, 2055, 2114, 2465, 2093, 1458,
+ 8569, 5879, 3654, 2879, 2530, 1703, 781, -233,
+ -3709, -990, 2338, 6227, 7083, 7102, 5657, 3401,
+ 3389, 6392, 5267, 1011, 275, 3519, 5236, 4339,
+ 599, 3752, 6943, 9211, 8152, 5568, 3337, 1838,
+ 9885, 9591, 7905, 8068, 7929, 7421, 4234, 757,
+ }
+ },
+ { /* split 2 */
+ { /* TCX 20 */
+ -178, -3476, -5982, -7081, -7548, -7440, -6859, -5798,
+ -3596, -3670, -1501, 770, 812, -286, -2001, -3377,
+ -3998, -5191, -4988, -4421, -3889, -3571, -2738, -1969,
+ -2981, -2687, -1501, -83, 1136, 2377, 3248, 4105,
+ 1842, -41, -1972, -4282, -6779, -8405, -8674, -7835,
+ -259, 571, 2124, 3344, 2959, 1407, -750, -2523,
+ -524, -1956, -2855, -3202, -3939, -4666, -4907, -4782,
+ -5110, -4768, -3017, -663, 4188, 9210, 16602, 21081,
+ 4373, 4846, -603, -6495, -7289, -5540, -4749, -5527,
+ -1448, -1043, -619, -105, 356, 362, 542, 857,
+ 1373, -752, -5334, -6244, -3001, -932, -1040, -3125,
+ -2403, -1397, 612, 2449, 3920, 5231, 6819, 8581,
+ 2183, 1211, -111, -1084, -2836, -4977, -6701, -7284,
+ -751, 1255, 3408, 6474, 7503, 7026, 5413, 4464,
+ 935, 850, 589, 353, 160, -434, -939, -931,
+ 268, 2284, 3884, 5423, 6680, 7996, 9244, 9472,
+ 1075, 113, -1289, -4457, -7512, -5930, -1799, -571,
+ -3689, -4254, -3755, -2995, -1581, -135, 1049, 1589,
+ -1166, -1752, -1790, -1897, -1927, -1831, -1359, -805,
+ -1494, -735, 635, 1993, 2909, 3546, 4226, 4956,
+ 4435, 4299, 4269, 1328, -3731, -7621, -9319, -9170,
+ 1358, 2227, 3873, 4469, 4692, 4057, 2601, 1608,
+ 813, 398, -499, -666, -1286, -2271, -3316, -4025,
+ -3300, -1255, 2181, 6431, 10002, 12760, 13549, 12584,
+ 3714, 4180, 484, -2905, -2864, -1359, -1256, -2477,
+ 308, 868, 1373, 1629, 1793, 1834, 1814, 1746,
+ 1472, 798, -282, -1935, -1818, 320, 2221, 2914,
+ 2281, 3240, 2988, 1400, 2383, 4072, 5667, 6675,
+ 2672, 2678, 2874, 2096, -226, -2301, -3861, -4534,
+ 4988, 7231, 7641, 7731, 7061, 6447, 5411, 3513,
+ 3978, 4156, 4126, 2896, 1469, 759, 368, -68,
+ -264, 4210, 8534, 11008, 11606, 11888, 11072, 8949,
+ },
+ { /* TCX 10 */
+ -2852, -6158, -7231, -7830, -8012, -7922, -7556, -6706,
+ -3911, -5340, -5053, -4741, -4805, -4484, -3727, -3037,
+ -966, -1461, -1694, -2427, -3081, -3037, -2547, -2230,
+ -3455, -3315, -2451, -836, 1383, 3196, 3720, 3379,
+ 3052, 281, -3351, -6866, -9051, -9586, -8983, -8236,
+ -748, -4465, -4314, -2251, 29, -40, -3963, -6195,
+ 200, 1293, 2535, 2803, 1603, -186, -1397, -1697,
+ -1707, -265, 2196, 5295, 5894, 4216, 3440, 3826,
+ -237, -2133, -2279, -3149, -4377, -5638, -6520, -6764,
+ -2407, -2049, -1246, -664, -521, -430, -349, -211,
+ 3874, 1335, -1501, -2055, -1268, -990, -1852, -2871,
+ -1883, -1845, -1681, -484, 384, 2035, 5839, 9597,
+ 275, 380, 1048, 424, -1146, -3012, -4431, -5104,
+ -1699, -484, 756, 1261, 1279, 1377, 1975, 2590,
+ 2139, 4502, 3645, 4975, 6491, 5972, 5012, 4346,
+ -3821, -2581, -433, 2667, 6436, 10038, 11311, 8783,
+ 2359, -2689, -6604, -7039, -5992, -4268, -3711, -4840,
+ -2776, -4251, -4539, -3672, -2494, -1055, 280, 695,
+ 491, 866, 822, -44, -1009, -1165, -831, -538,
+ -1024, 91, 786, 1295, 2433, 3910, 4975, 5403,
+ 3117, 2590, 2337, -667, -4580, -8147, -9400, -9523,
+ -103, -630, -831, 669, 3062, 3398, 549, -1690,
+ 2113, 3467, 4279, 5047, 5344, 3361, 127, -2313,
+ -1199, 1153, 2914, 3688, 4260, 5421, 7471, 8831,
+ 2815, 2184, 316, -3058, -5596, -5564, -4343, -3793,
+ 922, 126, -1414, -1731, -1007, 359, 2029, 3088,
+ 4889, 4619, 2537, 1114, 950, 946, 799, 419,
+ -4271, -3750, -3359, -484, 1448, 4106, 10487, 20479,
+ 3818, 4687, 4064, 2212, -172, -2287, -3535, -4041,
+ 884, 2456, 3394, 2925, 2182, 2323, 2583, 2507,
+ 4767, 8057, 8263, 6461, 5003, 4055, 2923, 1845,
+ 19, 3813, 6926, 8432, 10141, 10850, 9692, 8383,
+ }
+ }
+};
+
+const Word16 sns_1st_means_16k[2][16] =
+{
+ { /* TCX 20 */
+ 14210, 19017, 14362, 9309, 5385, 2674, 1055, -211, -1407, -3059, -4393, -8597, -11180, -11756, -12131, -13281,
+ },
+ { /* TCX 10*/
+ 12018, 15915, 11089, 6015, 847, -705, -539, -1548, -893, -2163, -1806, -4189, -7017, -8670, -8874, -9480,
+ }
+};
+
+const Word16 sns_1st_means_25k6[2][16] =
+{
+ { /* TCX 20 */
+ 14973, 20323, 16461, 9554, 4017, 3103, 1602, 1694, -221, -1401, -6817, -10071, -11503, -11805, -13158, -16749,
+ },
+ { /* TCX 10 */
+ 15560, 19489, 14623, 5595, 2084, 1699, 775, -1312, -2195, -6101, -9078, -9465, -7825, -6603, -7281, -9960,
+ }
+};
+
+const Word16 sns_1st_means_32k[2][16] =
+{
+ { /* TCX 20 */
+ 15041, 20603, 16969, 10289, 4973, 4283, 3003, 3316, 1684, -259, -6614, -9535, -10363, -11834, -16625, -24930,
+ },
+ { /* TCX 10 */
+ 16510, 20660, 16025, 7224, 3921, 3868, 2623, 742, -1316, -6269, -8284, -7288, -6380, -8410, -13351, -20277,
+ }
+};
+
+
+/*----------------------------------------------------------------------*
+ * MC ParamUpmix ROM tables
+ *-----------------------------------------------------------------------*/
+
+const Word16 ivas_param_upmx_mx_qmap[33] =
+{
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0
+};
+
+
+/*----------------------------------------------------------------------*
+ * MDCT/IMDCT tables
+ *-----------------------------------------------------------------------*/
+
#define SHC( x ) ( (Word16) x )
-/* clang-format off */
const Word16 ivas_sin_twiddle_480_fx[ IVAS_480_PT_LEN >> 1 ] = {
SHC( 0xffe6 ), SHC( 0xff0f ), SHC( 0xfe39 ), SHC( 0xfd62 ), SHC( 0xfc8c ), SHC( 0xfbb6 ), SHC( 0xfadf ), SHC( 0xfa09 ),
SHC( 0xf933 ), SHC( 0xf85d ), SHC( 0xf787 ), SHC( 0xf6b1 ), SHC( 0xf5db ), SHC( 0xf505 ), SHC( 0xf42f ), SHC( 0xf35a ),
@@ -327,7 +3184,6 @@ const Word32 dft_res_gains_q_fx[][2] = {
{ (Word32)( 0x00000000 ), (Word32)( 0x635c2900 ) },
{ (Word32)( 0x00000000 ), (Word32)( 0x7fffffff ) },
-
/* column 2 (|ILD| = 2): */
{ (Word32)( 0x0eabf770 ), (Word32)( 0x00000000 ) },
{ (Word32)( 0x0edeb100 ), (Word32)( 0x0ec636b0 ) },
@@ -378,7 +3234,6 @@ const Word32 dft_res_gains_q_fx[][2] = {
{ (Word32)( 0x5ba86100 ), (Word32)( 0x3e65f940 ) },
{ (Word32)( 0x68ba3000 ), (Word32)( 0x49984a00 ) },
-
/* column 7 (|ILD| = 13): */
{ (Word32)( 0x512c1700 ), (Word32)( 0x00000000 ) },
{ (Word32)( 0x51d52c00 ), (Word32)( 0x08e72540 ) },
@@ -399,7 +3254,6 @@ const Word32 dft_res_gains_q_fx[][2] = {
{ (Word32)( 0x710eb280 ), (Word32)( 0x239c9d40 ) },
{ (Word32)( 0x79ba2380 ), (Word32)( 0x27944240 ) },
-
/* column 9 (|ILD| = 19): */
{ (Word32)( 0x662c9080 ), (Word32)( 0x00000000 ) },
{ (Word32)( 0x66ad4f80 ), (Word32)( 0x0562c778 ) },
@@ -420,7 +3274,6 @@ const Word32 dft_res_gains_q_fx[][2] = {
{ (Word32)( 0x79a1fd00 ), (Word32)( 0x12d6a9c0 ) },
{ (Word32)( 0x7e651700 ), (Word32)( 0x14351580 ) },
-
/* column 11 (|ILD| = 25): */
{ (Word32)( 0x725edd00 ), (Word32)( 0x00000000 ) },
{ (Word32)( 0x72aec080 ), (Word32)( 0x02fc829c ) },
@@ -480,7 +3333,6 @@ const Word32 dft_res_gains_q_fx[][2] = {
{ (Word32)( 0x7f9f7700 ), (Word32)( 0x00b70ac4 ) },
{ (Word32)( 0x7fcc0780 ), (Word32)( 0x00c8711d ) },
{ (Word32)( 0x7fff5800 ), (Word32)( 0x00cf398f ) },
-
};
// Q25
@@ -503,13 +3355,6 @@ const Word32 McMASA_LFEGain_vectors_fx[64] = {
-71806484, 8724152, 28185723, 34225521
};
-/*
- This lookup table is calculated from, and therefore
- depends on the following macros:
- - MASA_NTOT2_FAC
- - MASA_ASIN_OFFSET
- - MASA_ANGLE_AT_EQUATOR
-*/
const UWord16 cum_n_for_id_th[122] = {
0, 846, 1690, 2534, 3378, 4222, 5064, 5906, 6746, 7586, 8424, 9260, 10094,
10928, 11760, 12588, 13416, 14240, 15064, 15882, 16700, 17514, 18326, 19134,
@@ -573,9 +3418,10 @@ const Word16 pow_10_q11[128] = {
13540, 13786, 14036, 14291, 14550, 14815, 15084, 15357, 15636, 15920, 16209, 16503, 16803, 17108, 17418, 17734, 18056, 18384, 18718, 19058, 19404, 19756, 20114
};
-
// Q12
-const Word16 icbwe_gsMapping_tbl_fx[16] = { -8192, -5527, -3935, -2907, -2289, -1824, -1404, -1035, -692, -404, -286, -204, -81, 0, 163, 327 };
+const Word16 icbwe_gsMapping_tbl_fx[16] = {
+ -8192, -5527, -3935, -2907, -2289, -1824, -1404, -1035, -692, -404, -286, -204, -81, 0, 163, 327
+};
// Q12
const Word16 icbwe_gsMappingDFT_tbl_fx[128] = {
@@ -590,7 +3436,6 @@ const Word32 pow_10_q23[14] = {
2364231, 2652711, 3339565, 4204263, 5803499, 8011059, 8388608, 6818517, 7222539, 5292854, 4204263, 6977341, 7919357, 8388608
};
-/* clang-format on */
// Q15
const Word16 ivas_tan_panning_gain_dirac_tbl_fx[601] = {
SHC( 0x8000 ),
@@ -2510,297 +5355,6 @@ const Word32 ivas_mdft_coeff_cos_twid_40_fx[IVAS_40_PT_LEN + 1] = {
252409632, 168489632, 84309816, 0
};
-// Q30
-const Word32 dirac_gains_norm_term_int[9] = {
- 1073741824, 759250176, 1073741824, 438353280, 219176688, 1073741824, 309962528, 98018768,
- 40015996
-};
-
-// Q31
-const Word32 dirac_gains_norm_term_fx[9] = {
- 2147483647, 1518500352, 2147483647, 876706560, 438353376, 2147483647, 619925056, 196037536, 80031992
-};
-
-// Q27
-const Word32 dirac_gains_Pnm_int[91][9] = {
- { -134217728, 0, 134217728, 0, 0, -134217728, 0, 0, 0 },
- { -134197288, 2342396, 134156400, -7026119, 122639, -134095104, 14049026, -613106, 10701 },
- { -134135976, 4684105, 133972536, -14043751, 490416, -133727536, 28061840, -2450586, 85575 },
- { -134033784, 7024438, 133666264, -21044428, 1102895, -133115936, 42002312, -5506921, 288606 },
- { -133890784, 9362478, 133238096, -28019012, 1959264, -132262040, 55833192, -9772457, 683351 },
- { -133706992, 11697809, 132688440, -34959892, 3058584, -131167848, 69520408, -15234719, 1332861 },
- { -133482480, 14029564, 132017976, -41858120, 4399464, -129836328, 83027720, -21876818, 2299344 },
- { -133217280, 16357047, 131227600, -48705360, 5980272, -128270864, 96320208, -29678480, 3644062 },
- { -132911536, 18679510, 130318176, -55493180, 7799064, -126475552, 109363520, -38615824, 5427104 },
- { -132565296, 20996256, 129290928, -62213284, 9853607, -124455056, 122123976, -48661468, 7707213 },
- { -132178656, 23306694, 128146968, -68857816, 12141505, -122214432, 134569248, -59785232, 10541761 },
- { -131751776, 25609964, 126887800, -75418320, 14659851, -119759704, 146666688, -71952528, 13986158 },
- { -131284736, 27905410, 125514928, -81886824, 17405570, -117097048, 158385376, -85126080, 18094094 },
- { -130777744, 30192412, 124030024, -88255768, 20375446, -114233392, 169695776, -99266128, 22917396 },
- { -130230888, 32470208, 122434848, -94517128, 23565774, -111176104, 180568608, -114328832, 28505376 },
- { -129644368, 34738112, 120731408, -100663320, 26972664, -107933048, 190976128, -130267952, 34905200 },
- { -129018344, 36995424, 118921736, -106686840, 30591964, -104512608, 200891728, -147034448, 42161440 },
- { -128353056, 39241452, 117008088, -112580368, 34419264, -100923608, 210290720, -164576576, 50316080 },
- { -127648640, 41475572, 114992728, -118336848, 38449984, -97175216, 219149232, -182840512, 59408524 },
- { -126905360, 43697012, 112878208, -123949000, 42679048, -93277184, 227444688, -201769248, 69474696 },
- { -126123408, 45905176, 110666976, -129410248, 47101484, -89239304, 235156848, -221304640, 80548296 },
- { -125303040, 48099312, 108361848, -134713792, 51711740, -85072152, 242266352, -241385344, 92659128 },
- { -124444528, 50278820, 105965584, -139853120, 56504308, -80786280, 248755776, -261949392, 105834368 },
- { -123548080, 52443040, 103481048, -144822272, 61473384, -76392608, 254609280, -282932704, 120097808 },
- { -122614016, 54591264, 100911328, -149614784, 66612780, -71902504, 259812912, -304269024, 135469312 },
- { -121642584, 56722880, 98259536, -154225168, 71916384, -67327280, 264354304, -325891904, 151965872 },
- { -120634104, 58837188, 95528944, -158647504, 77377552, -62678672, 268222720, -347732352, 169600480 },
- { -119588872, 60933588, 92722800, -162876704, 82989840, -57968464, 271409984, -369722464, 188383040 },
- { -118507224, 63011412, 89844624, -166907264, 88746208, -53208660, 273908992, -391791360, 208319200 },
- { -117389480, 65070028, 86897888, -170734608, 94639696, -48411356, 275714624, -413868832, 229411120 },
- { -116235952, 67108864, 83886096, -174353936, 100663296, -43588484, 276824064, -435884832, 251658240 },
- { -115047032, 69127240, 80812992, -177760784, 106809472, -38752388, 277236128, -457767936, 275054816 },
- { -113823072, 71124576, 77682296, -180951136, 113070880, -33915128, 276951296, -479447744, 299592224 },
- { -112564464, 73100224, 74497888, -183920976, 119439696, -29088994, 275972448, -500852768, 325257600 },
- { -111271560, 75053584, 71263600, -186666800, 125908272, -24285974, 274304128, -521913568, 352034976 },
- { -109944736, 76984136, 67983320, -189185120, 132468856, -19517968, 271952224, -542560640, 379905024 },
- { -108584440, 78891192, 64661120, -191472992, 139113184, -14796968, 268925472, -562724864, 408843424 },
- { -107191040, 80774240, 61300996, -193527600, 145833472, -10134552, 265233552, -582338944, 438823936 },
- { -105765016, 82632672, 57907084, -195346384, 152621264, -5542341, 260888528, -601335936, 469815200 },
- { -104306760, 84465968, 54483472, -196927072, 159468512, -1031517, 255903808, -619651456, 501783968 },
- { -102816736, 86273488, 51034412, -198267904, 166366624, 3386773, 250294992, -637221056, 534692032 },
- { -101295408, 88054736, 47564080, -199367280, 173307296, 7701825, 244078832, -653983232, 568498944 },
- { -99743224, 89809192, 44076620, -200223728, 180282192, 11903295, 237274256, -669879040, 603161856 },
- { -98160648, 91536272, 40576356, -200836160, 187282720, 15980983, 229901280, -684849728, 638632640 },
- { -96548144, 93235488, 37067500, -201203920, 194300432, 19925212, 221981760, -698840192, 674862144 },
- { -94906272, 94906272, 33554432, -201326592, 201326592, 23726568, 213539056, -711796992, 711796992 },
- { -93235488, 96548144, 30041364, -201203920, 208352752, 27376188, 204597888, -723670016, 749382016 },
- { -91536272, 98160648, 26532496, -200836160, 215370464, 30865648, 195183856, -734411520, 787559936 },
- { -89809200, 99743208, 23032272, -200223728, 222370864, 34186800, 185324752, -743976000, 826268864 },
- { -88054736, 101295408, 19544786, -199367280, 229345888, 37332284, 175048640, -752322176, 865447872 },
- { -86273488, 102816736, 16074439, -198268032, 236286560, 40294912, 164385440, -759410496, 905030144 },
- { -84465944, 104306784, 12625336, -196927072, 243184800, 43068320, 153365504, -765205632, 944950528 },
- { -82632672, 105765016, 9201773, -195346384, 250031920, 45646496, 142020480, -769675200, 985139200 },
- { -80774256, 107191032, 5807891, -193527600, 256819584, 48024044, 130382952, -772789696, 1025526400 },
- { -78891192, 108584440, 2447739, -191472992, 263540000, 50196224, 118485736, -774524480, 1066041600 },
- { -76984120, 109944720, -874438, -189185120, 270184320, 52158672, 106363224, -774856768, 1106610176 },
- { -75053584, 111271544, -4154720, -186666800, 276744864, 53907864, 94049432, -773768704, 1147159552 },
- { -73100224, 112564464, -7389016, -183920976, 283213504, 55440728, 81579720, -771245696, 1187614080 },
- { -71124568, 113823072, -10573435, -180951136, 289582400, 56754824, 68989160, -767276288, 1227898496 },
- { -69127232, 115047064, -13704140, -177760784, 295843776, 57848416, 56313356, -761853888, 1267938048 },
- { -67108880, 116235952, -16777203, -174353936, 301989888, 58720256, 43588536, -754974720, 1307654528 },
- { -65070028, 117389472, -19788994, -170734608, 308013440, 59369844, 30850226, -746639232, 1346972928 },
- { -63011400, 118507224, -22735772, -166907264, 313906944, 59797272, 18134762, -736851968, 1385816832 },
- { -60933588, 119588872, -25613950, -162876704, 319663424, 60003204, 5477891, -725620736, 1424110464 },
- { -58837172, 120634088, -28420080, -158647504, 325275584, 59989016, -7084927, -712957184, 1461778688 },
- { -56722868, 121642576, -31150674, -154225168, 330736768, 59756660, -19517928, -698877184, 1498746240 },
- { -54591276, 122613992, -33802452, -149614784, 336040384, 59308680, -31786382, -683399744, 1534940800 },
- { -52443040, 123548064, -36372160, -144822272, 341179712, 58648260, -43855684, -666547776, 1570288384 },
- { -50278848, 124444520, -38856688, -139853264, 346148864, 57779188, -55691916, -648348160, 1604717952 },
- { -48099324, 125303040, -41252988, -134713792, 350941376, 56705796, -67261816, -628830848, 1638160896 },
- { -45905160, 126123416, -43558124, -129410240, 355551744, 55433036, -78532848, -608029120, 1670546304 },
- { -43697012, 126905360, -45769332, -123949000, 359974080, 53966400, -89473440, -585980480, 1701810944 },
- { -41475560, 127648632, -47883864, -118336808, 364203168, 52311936, -100052728, -562724992, 1731889152 },
- { -39241464, 128353048, -49899212, -112580408, 368233856, 50476188, -110241232, -538305984, 1760719104 },
- { -36995424, 129018360, -51812888, -106686856, 372061216, 48466224, -120010336, -512769824, 1788240512 },
- { -34738100, 129644368, -53622532, -100663280, 375680512, 46289628, -129332608, -486166400, 1814398208 },
- { -32470208, 130230888, -55325984, -94517088, 379087360, 43954400, -138181984, -458547616, 1839134464 },
- { -30192412, 130777744, -56921148, -88255752, 382277728, 41469052, -146533552, -429968768, 1862399872 },
- { -27905450, 131284752, -58406064, -81886920, 385247552, 38842476, -154363936, -400487584, 1884144384 },
- { -25609950, 131751776, -59778952, -75418272, 387993376, 36083912, -161651424, -370163232, 1904324096 },
- { -23306666, 132178656, -61038128, -68857760, 390511712, 33203050, -168375472, -339058272, 1922894464 },
- { -20996270, 132565280, -62182040, -62213328, 392799456, 30209874, -174517136, -307236864, 1939817984 },
- { -18679498, 132911536, -63209344, -55493124, 394854208, 27114732, -180059392, -274765312, 1955057024 },
- { -16357021, 133217280, -64118736, -48705292, 396672992, 23928188, -184986656, -241711232, 1968580864 },
- { -14029578, 133482472, -64909128, -41858176, 398253664, 20661142, -189285248, -208144320, 1980359808 },
- { -11697849, 133706992, -65579560, -34960012, 399594624, 17324636, -192943088, -174134880, 1990369664 },
- { -9362556, 133890784, -66129224, -28019252, 400693888, 13929935, -195949824, -139755008, 1998589184 },
- { -7024411, 134033784, -66557432, -21044346, 401550304, 10488515, -198297168, -105077560, 2004999424 },
- { -4684126, 134135976, -66863648, -14043818, 402162752, 7011926, -199978640, -70176320, 2009588352 },
- { -2342414, 134197304, -67047540, -7026174, 402530496, 3511839, -200989440, -35125516, 2012346496 },
- { -5, 134217728, -67108864, -17, 402653184, 8, -201326592, -88, 2013265920 }
-};
-
-// Q30
-const Word32 dirac_gains_trg_term_int[181][2] = {
- { -1073741824, 93 },
- { -1073578304, -18739436 },
- { -1073087680, -37473000 },
- { -1072270272, -56195404 },
- { -1071126272, -74900440 },
- { -1069655936, -93582656 },
- { -1067859776, -112236624 },
- { -1065738240, -130856168 },
- { -1063292288, -149436080 },
- { -1060522368, -167970160 },
- { -1057429248, -186453440 },
- { -1054014208, -204879600 },
- { -1050278016, -223243376 },
- { -1046221952, -241539408 },
- { -1041847104, -259761664 },
- { -1037154944, -277904896 },
- { -1032146880, -295963392 },
- { -1026824448, -313931616 },
- { -1021189120, -331804480 },
- { -1015242880, -349576096 },
- { -1008987264, -367241408 },
- { -1002424448, -384794592 },
- { -995556160, -402230656 },
- { -988384640, -419544416 },
- { -980912000, -436730112 },
- { -973140608, -453782944 },
- { -965072832, -470697376 },
- { -956710976, -487468704 },
- { -948057792, -504091296 },
- { -939115840, -520560224 },
- { -929887680, -536871040 },
- { -920376384, -553017856 },
- { -910584576, -568996544 },
- { -900515712, -584801664 },
- { -890172480, -600428672 },
- { -879557888, -615873088 },
- { -868675520, -631129536 },
- { -857528320, -646194048 },
- { -846120128, -661061376 },
- { -834454080, -675727744 },
- { -822533888, -690187904 },
- { -810363392, -704438016 },
- { -797945664, -718473536 },
- { -785285056, -732290112 },
- { -772385152, -745883904 },
- { -759250176, -759250176 },
- { -745883904, -772385152 },
- { -732290112, -785285056 },
- { -718473600, -797945664 },
- { -704438016, -810363392 },
- { -690187904, -822533888 },
- { -675727552, -834454144 },
- { -661061376, -846120128 },
- { -646194048, -857528320 },
- { -631129536, -868675392 },
- { -615873088, -879557760 },
- { -600428672, -890172352 },
- { -584801792, -900515712 },
- { -568996544, -910584576 },
- { -553017856, -920376384 },
- { -536871040, -929887680 },
- { -520560224, -939115776 },
- { -504091296, -948057792 },
- { -487468704, -956710976 },
- { -470697376, -965072832 },
- { -453782944, -973140608 },
- { -436730208, -980911936 },
- { -419544416, -988384640 },
- { -402230784, -995556160 },
- { -384794592, -1002424448 },
- { -367241280, -1008987264 },
- { -349576096, -1015242880 },
- { -331804480, -1021189120 },
- { -313931712, -1026824384 },
- { -295963392, -1032146880 },
- { -277904800, -1037154944 },
- { -259761664, -1041847104 },
- { -241539296, -1046221952 },
- { -223243488, -1050278016 },
- { -204879600, -1054014208 },
- { -186453328, -1057429248 },
- { -167970160, -1060522368 },
- { -149435984, -1063292288 },
- { -130856168, -1065738240 },
- { -112236624, -1067859776 },
- { -93582792, -1069655936 },
- { -74900448, -1071126272 },
- { -56195288, -1072270272 },
- { -37473008, -1073087680 },
- { -18739318, -1073578304 },
- { -46, -1073741824 },
- { 18739350, -1073578304 },
- { 37473052, -1073087680 },
- { 56195320, -1072270272 },
- { 74900480, -1071126272 },
- { 93582824, -1069655936 },
- { 112236512, -1067859776 },
- { 130856168, -1065738240 },
- { 149435984, -1063292288 },
- { 167970272, -1060522368 },
- { 186453328, -1057429248 },
- { 204879504, -1054014208 },
- { 223243488, -1050278016 },
- { 241539296, -1046221952 },
- { 259761664, -1041847104 },
- { 277904896, -1037154944 },
- { 295963392, -1032146880 },
- { 313931712, -1026824448 },
- { 331804480, -1021189120 },
- { 349576096, -1015242880 },
- { 367241408, -1008987264 },
- { 384794720, -1002424320 },
- { 402230784, -995556160 },
- { 419544320, -988384640 },
- { 436730112, -980912000 },
- { 453782848, -973140608 },
- { 470697504, -965072832 },
- { 487468576, -956710976 },
- { 504091296, -948057792 },
- { 520560352, -939115776 },
- { 536870912, -929887680 },
- { 553017920, -920376384 },
- { 568996544, -910584704 },
- { 584801664, -900515712 },
- { 600428800, -890172224 },
- { 615873088, -879557888 },
- { 631129536, -868675392 },
- { 646193920, -857528320 },
- { 661061504, -846120064 },
- { 675727616, -834454144 },
- { 690187904, -822533888 },
- { 704438016, -810363136 },
- { 718473536, -797945792 },
- { 732290176, -785285056 },
- { 745883776, -772385216 },
- { 759250176, -759250176 },
- { 772385216, -745883776 },
- { 785285056, -732290112 },
- { 797945664, -718473536 },
- { 810363264, -704438016 },
- { 822533888, -690187904 },
- { 834454144, -675727616 },
- { 846120128, -661061504 },
- { 857528320, -646193920 },
- { 868675392, -631129536 },
- { 879557888, -615873088 },
- { 890172352, -600428800 },
- { 900515712, -584801792 },
- { 910584704, -568996544 },
- { 920376384, -553017920 },
- { 929887680, -536870912 },
- { 939115776, -520560352 },
- { 948057792, -504091296 },
- { 956710976, -487468576 },
- { 965072832, -470697504 },
- { 973140608, -453782944 },
- { 980911936, -436730112 },
- { 988384640, -419544320 },
- { 995556160, -402230784 },
- { 1002424320, -384794592 },
- { 1008987264, -367241280 },
- { 1015242880, -349576096 },
- { 1021189120, -331804480 },
- { 1026824448, -313931712 },
- { 1032146880, -295963392 },
- { 1037154944, -277904800 },
- { 1041847104, -259761664 },
- { 1046221952, -241539296 },
- { 1050278016, -223243488 },
- { 1054014208, -204879600 },
- { 1057429248, -186453328 },
- { 1060522368, -167970272 },
- { 1063292288, -149435984 },
- { 1065738240, -130856168 },
- { 1067859776, -112236624 },
- { 1069655936, -93582760 },
- { 1071126272, -74900440 },
- { 1072270272, -56195308 },
- { 1073087680, -37473052 },
- { 1073578304, -18739382 },
- { 1073741824, 0 }
-};
-
// Q31
const Word32 dirac_gains_trg_term_fx[181][2] = {
{ ( -2147483647 - 1 ), 187 },
diff --git a/lib_com/ivas_rom_com_fx.h b/lib_com/ivas_rom_com_fx.h
deleted file mode 100644
index 072b6ccffb1c75bcd7844f619f645c68e808b9a9..0000000000000000000000000000000000000000
--- a/lib_com/ivas_rom_com_fx.h
+++ /dev/null
@@ -1,297 +0,0 @@
-/******************************************************************************************************
-
- (C) 2022-2025 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
- Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
- Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
- Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
- contributors to this repository. All Rights Reserved.
-
- This software is protected by copyright law and by international treaties.
- The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB,
- Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
- Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
- Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
- contributors to this repository retain full ownership rights in their respective contributions in
- the software. This notice grants no license of any kind, including but not limited to patent
- license, nor is any license granted by implication, estoppel or otherwise.
-
- Contributors are required to enter into the IVAS codec Public Collaboration agreement before making
- contributions.
-
- This software is provided "AS IS", without any express or implied warranties. The software is in the
- development stage. It is intended exclusively for experts who have experience with such software and
- solely for the purpose of inspection. All implied warranties of non-infringement, merchantability
- and fitness for a particular purpose are hereby disclaimed and excluded.
-
- Any dispute, controversy or claim arising under or in relation to providing this software shall be
- submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in
- accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
- the United Nations Convention on Contracts on the International Sales of Goods.
-
-*******************************************************************************************************/
-
-#ifndef IVAS_ROM_COM_FX_H
-#define IVAS_ROM_COM_FX_H
-
-#include
-#include "options.h"
-#include "cnst.h"
-#include "ivas_cnst.h"
-#include "stat_com.h"
-#include "ivas_stat_com.h"
-
-
-extern const Word16 ivas_sin_twiddle_480_fx[IVAS_480_PT_LEN >> 1];
-extern const Word16 ivas_cos_twiddle_480_fx[IVAS_480_PT_LEN >> 1];
-extern const Word16 ivas_sin_twiddle_320_fx[IVAS_320_PT_LEN >> 1];
-extern const Word16 ivas_cos_twiddle_320_fx[IVAS_320_PT_LEN >> 1];
-extern const Word16 ivas_sin_twiddle_160_fx[IVAS_160_PT_LEN >> 1];
-extern const Word16 ivas_cos_twiddle_160_fx[IVAS_160_PT_LEN >> 1];
-extern const Word16 ivas_sin_twiddle_80_fx[IVAS_80_PT_LEN >> 1];
-extern const Word16 ivas_cos_twiddle_80_fx[IVAS_80_PT_LEN >> 1];
-extern const Word16 nf_tw_smoothing_coeffs_fx[N_LTP_GAIN_MEMS];
-extern const Word32 dft_res_gains_q_fx[][2];
-extern const Word16 dft_res_cod_alpha_fx[STEREO_DFT_BAND_MAX];
-extern const Word16 dft_trigo_12k8_fx[STEREO_DFT_N_12k8_ENC / 4 + 1];
-extern const Word16 dft_trigo_32k_fx[STEREO_DFT_N_32k_ENC / 4 + 1];
-extern const Word16 dft_trigo_48k_fx[STEREO_DFT_N_MAX_ENC / 4 + 1];
-extern const Word16 gridEq_Table[NO_THETA16_MAX];
-extern const Word32 McMASA_LFEGain_vectors_fx[64]; /* Q25 */
-
-extern const Word16 ivas_divde_255[256];
-
-extern const Word32 ism_azimuth_borders_fx[4];
-extern const Word32 ism_elevation_borders_fx[4];
-
-extern const UWord16 cum_n_for_id_th[122];
-
-/* Multi-channel input and output setups */
-
-extern const Word32 ls_azimuth_CICP1_fx[1];
-extern const Word32 ls_elevation_CICP1_fx[1];
-extern const Word32 ls_azimuth_CICP2_fx[2];
-extern const Word32 ls_elevation_CICP2_fx[2];
-extern const Word32 ls_azimuth_CICP6_fx[5];
-extern const Word32 ls_elevation_CICP6_fx[5];
-extern const Word32 ls_azimuth_CICP12_fx[7];
-extern const Word32 ls_elevation_CICP12_fx[7];
-extern const Word32 ls_azimuth_CICP14_fx[7];
-extern const Word32 ls_elevation_CICP14_fx[7];
-extern const Word32 ls_azimuth_CICP16_fx[9];
-extern const Word32 ls_elevation_CICP16_fx[9];
-extern const Word32 ls_azimuth_CICP19_fx[11];
-extern const Word32 ls_elevation_CICP19_fx[11];
-extern const Word16 pow_10_q11[128];
-extern const Word32 pow_10_q23[14];
-extern const Word16 ivas_sin_az_fx[361];
-extern const Word16 ivas_sine_panning_tbl_fx[601];
-extern const Word16 ivas_tan_panning_gain_dirac_tbl_fx[601];
-
-/*----------------------------------------------------------------------------------*
- * Stereo ICA ROM tables
- *----------------------------------------------------------------------------------*/
-
-extern const Word32 ica_sincInterp2_fx[]; // Q31
-extern const Word32 ica_sincInterp4_fx[]; // Q31
-extern const Word32 ica_sincInterp6_fx[]; // Q31
-
-/*----------------------------------------------------------------------------------*
- * Stereo IC-BWE ROM tables
- *----------------------------------------------------------------------------------*/
-
-extern const Word16 pow_10_icbwe_gsMapping_tbl_fx[];
-extern const Word16 pow_10_icbwe_gsMappingDFT_tbl_fx[];
-
-/*----------------------------------------------------------------------------------*
- * TD Stereo ROM tables
- *----------------------------------------------------------------------------------*/
-
-extern const UWord32 tdm_ratio_tabl_fx[TDM_NQ + 1];
-extern const Word32 tdm_ratio_tabl_fx_Q30[TDM_NQ + 1];
-extern const Word32 tdm_ratio_tabl_fx_Q24[TDM_NQ + 1];
-extern const UWord32 tdm_den_ratio_tabl_fx[];
-extern const Word16 icbwe_gsMapping_tbl_fx[]; // Q12
-extern const Word16 icbwe_gsMappingDFT_tbl_fx[]; // Q12
-
-/* LSFs Intra-frame prediction tables */
-extern const Word16 tdm_LSF_MEAN_RE_USE_OUT_fx[M];
-extern const Word16 tdm_LSF_MEAN_RE_USE_IN_fx[M];
-extern const Word16 tdm_LSF_MEAN_RE_USE_fx[M];
-
-extern const Word16 tdm_Beta_Q1bit_re_use_13k2_fx[2];
-extern const Word16 tdm_Beta_Q1bit_re_use_16k4_fx[2];
-extern const Word16 tdm_Beta_Q1bit_re_use_24k4_32k_fx[2];
-extern const Word16 tdm_Beta_Q1bit_re_use_48k_fx[2];
-
-extern const Word16 tdm_RE_USE_adaptive_beta_prd_diag_3_fx[15 + 16 + 15];
-
-extern const Word16 tdm_LSF_MEAN_PRED_QNT_OUT_fx[M];
-extern const Word16 tdm_LSF_MEAN_PRED_QNT_IN_fx[M];
-extern const Word16 tdm_LSF_MEAN_PRED_QNT_fx[M];
-extern const Word16 tdm_PRED_QNT_fixed_beta_prd_diag_3_fx[15 + 16 + 15];
-
-/*----------------------------------------------------------------------------------*
- * Stereo DTX ROM tables
- *----------------------------------------------------------------------------------*/
-
-extern const Word16 dft_cng_alpha_bits_fx[STEREO_DFT_N_COH_ALPHA_STEPS][STEREO_DFT_N_COH_ALPHA_LEVELS];
-extern const Word16 dft_cng_coh_pred_fx[][STEREO_DFT_COH_PRED_COEFFS];
-
-/*----------------------------------------------------------------------------------*
- * DirAC ROM tables
- *----------------------------------------------------------------------------------*/
-
-extern const Word32 diffuseness_reconstructions_fx[DIRAC_DIFFUSE_LEVELS];
-extern const Word32 diffuseness_thresholds_fx[DIRAC_DIFFUSE_LEVELS + 1];
-extern const Masa_Diffuseness_Ratios masa_diffuse_ratios[DIRAC_DIFFUSE_LEVELS][DIRAC_DIFFUSE_LEVELS];
-
-/*------------------------------------------------------------------------------------------*
- * SPAR ROM tables
- *------------------------------------------------------------------------------------------*/
-
-extern const Word32 dtx_pd_real_min_max_fx[2];
-extern const Word32 one_by_q_level[64];
-
-/*----------------------------------------------------------------------------------*
- * Parametric MC ROM tables
- *----------------------------------------------------------------------------------*/
-
-extern const Word16 ivas_param_mc_quant_ild_5d1_48_fx[PARAM_MC_SZ_ILD_QUANTIZER_4BITS];
-extern const Word16 ivas_param_mc_quant_icc_fx[PARAM_MC_SZ_ICC_QUANTIZER];
-
-/*----------------------------------------------------------------------------------*
- * MASA ROM tables
- *----------------------------------------------------------------------------------*/
-
-extern const Word32 no_phi_masa_inv_fx[NO_SPHERICAL_GRIDS][MAX_NO_THETA];
-extern const Word32 azimuth_cb_fx[8];
-extern const Word32 delta_theta_masa_fx[NO_SPHERICAL_GRIDS - 2];
-extern const Word16 coherence_cb0_masa_Q14[DIRAC_DIFFUSE_LEVELS * 2 * MASA_NO_CV_COH];
-extern const Word32 coherence_cb0_masa_fx[DIRAC_DIFFUSE_LEVELS * 2 * MASA_NO_CV_COH];
-extern const Word16 coherence_cb1_masa_Q15[MASA_NO_CV_COH1 * MASA_MAXIMUM_CODING_SUBBANDS]; /* 25 */
-extern const Word32 coherence_cb1_masa_fx[MASA_NO_CV_COH1 * MASA_MAXIMUM_CODING_SUBBANDS]; /* 25 */
-
-/* Multi-channel input and output setups */
-extern const Word16 ls_azimuth_CICP2_idx[2];
-extern const Word16 ls_elevation_CICP2_idx[2];
-extern const Word16 ls_azimuth_CICP6_idx[5];
-extern const Word16 ls_elevation_CICP6_idx[5];
-extern const Word16 ls_azimuth_CICP12_idx[7];
-extern const Word16 ls_elevation_CICP12_idx[7];
-extern const Word16 ls_azimuth_CICP14_idx[7];
-extern const Word16 ls_elevation_CICP14_idx[7];
-extern const Word16 ls_azimuth_CICP16_idx[9];
-extern const Word16 ls_elevation_CICP16_idx[9];
-extern const Word16 ls_azimuth_CICP19_idx[11];
-extern const Word16 ls_elevation_CICP19_idx[11];
-
-extern const Word32 shoebox_sin_cos_tbl_fx[11][2];
-
-extern const Word32 delta_phi_val[90];
-extern const Word32 inv_delta_phi_val[90];
-extern const Word32 dd_val[90];
-extern const Word32 cb_azi_chan_fx[]; // Q22
-extern const Word16 cb_azi_chan_16fx[]; // Q0
-
-/*----------------------------------------------------------------------------------*
- * MASA and ISM (OMASA) combined format ROM tables
- *----------------------------------------------------------------------------------*/
-
-extern const Word32 dct4_fx[];
-extern const Word32 dct5_fx[];
-extern const Word32 dct8_fx[];
-extern const Word32 dct12_fx[];
-
-/*----------------------------------------------------------------------------------*
- * ISM ROM tables
- *----------------------------------------------------------------------------------*/
-
-extern const Word32 ism_azimuth_borders_fx[4];
-extern const Word32 ism_elevation_borders_fx[4];
-
-/*----------------------------------------------------------------------------------*
- * LFE coding ROM tables
- *----------------------------------------------------------------------------------*/
-
-extern const Word32 ivas_lpf_4_butter_16k_sos_fx[IVAS_BIQUAD_FILT_LEN << 2];
-extern const Word16 ivas_lpf_4_butter_16k_sos_e[IVAS_BIQUAD_FILT_LEN << 2];
-extern const Word32 ivas_lpf_4_butter_32k_sos_fx[IVAS_BIQUAD_FILT_LEN << 2];
-extern const Word16 ivas_lpf_4_butter_32k_sos_e[IVAS_BIQUAD_FILT_LEN << 2];
-extern const Word32 ivas_lpf_4_butter_48k_sos_fx[IVAS_BIQUAD_FILT_LEN << 2];
-extern const Word16 ivas_lpf_4_butter_48k_sos_e[IVAS_BIQUAD_FILT_LEN << 2];
-
-extern const Word32 ivas_lfe_window_coeff_48k_fx[IVAS_LFE_FADE_LEN_48K]; // Q31
-extern const Word32 ivas_lfe_window_coeff_32k_fx[IVAS_LFE_FADE_LEN_32K]; // Q31
-extern const Word32 ivas_lfe_window_coeff_16k_fx[IVAS_LFE_FADE_LEN_16K]; // Q31
-
-extern const UWord32 d_hamm_lfe_plc_fx[LFE_PLC_LENANA / 2];
-
-/*------------------------------------------------------------------------------------------*
- * MDFT/iMDFT ROM tables
- *------------------------------------------------------------------------------------------*/
-
-extern const Word32 ivas_mdft_coeff_cos_twid_240_fx[IVAS_240_PT_LEN + 1];
-extern const Word32 ivas_mdft_coeff_cos_twid_160_fx[IVAS_160_PT_LEN + 1];
-extern const Word32 ivas_mdft_coeff_cos_twid_120_fx[IVAS_120_PT_LEN + 1];
-extern const Word32 ivas_mdft_coeff_cos_twid_80_fx[IVAS_80_PT_LEN + 1];
-extern const Word32 ivas_mdft_coeff_cos_twid_40_fx[IVAS_40_PT_LEN + 1];
-extern const Word32 ivas_mdft_coeff_cos_twid_960_fx[IVAS_960_PT_LEN + 1];
-extern const Word32 ivas_mdft_coeff_cos_twid_640_fx[IVAS_640_PT_LEN + 1];
-extern const Word32 ivas_mdft_coeff_cos_twid_320_fx[IVAS_320_PT_LEN + 1];
-extern const Word32 dirac_gains_norm_term_int[9];
-extern const Word32 dirac_gains_norm_term_fx[9];
-extern const Word32 dirac_gains_Pnm_int[91][9];
-extern const Word32 dirac_gains_trg_term_int[181][2];
-extern const Word32 dirac_gains_trg_term_fx[181][2];
-
-/*------------------------------------------------------------------------------------------*
- * FB ROM tables
- *------------------------------------------------------------------------------------------*/
-
-extern const Word16 ivas_fb_cf_4ms_48k_fx[IVAS_FB_4MS_48K_SAMP];
-extern const Word16 ivas_fb_cf_1ms_48k_fx[IVAS_FB_1MS_48K_SAMP];
-extern const Word16 ivas_fb_cf_4ms_32k_fx[IVAS_FB_4MS_32K_SAMP];
-extern const Word16 ivas_fb_cf_1ms_32k_fx[IVAS_FB_1MS_32K_SAMP];
-extern const Word16 ivas_fb_cf_4ms_16k_fx[IVAS_FB_4MS_16K_SAMP];
-extern const Word16 ivas_fb_cf_1ms_16k_fx[IVAS_FB_1MS_16K_SAMP];
-
-extern const Word32 ivas_fb_resp_cheby_ramp_32del_fx[IVAS_FB_1MS_32K_SAMP + 1];
-extern const Word32 ivas_fb_resp_cheby_ramp_16del_fx[IVAS_FB_1MS_16K_SAMP + 1];
-
-/*------------------------------------------------------------------------------------------*
- * SNS MSVQ codebooks and means
- *------------------------------------------------------------------------------------------*/
-
-extern const Word16 *const ivas_sns_cdbks_tcx20_fx[];
-extern const Word16 *const ivas_sns_cdbks_tcx10_fx[];
-
-extern const Word16 *const ivas_sns_cdbks_side_tcx20_fx[];
-extern const Word16 *const ivas_sns_cdbks_side_tcx10_fx[];
-
-/*----------------------------------------------------------------------*
- * MC ParamUpmix ROM tables
- *-----------------------------------------------------------------------*/
-
-extern const ACPL_QUANT_TABLE_FX ivas_mc_paramupmix_alpha_quant_table_fx;
-extern const ACPL_QUANT_TABLE_FX ivas_mc_paramupmix_beta_quant_table_fx[9];
-
-extern const Word32 ivas_han_win_48k_fx[L_FRAME32k];
-extern const Word32 ivas_han_win_32k_fx[L_FRAME32k];
-extern const Word32 ivas_han_win_16k_fx[L_FRAME32k];
-
-extern const Word32 ivas_sine_delay_32_fx[32];
-
-extern const Word32 ivas_sine_frame_len_640_del_32_fx[577];
-extern const Word32 ivas_sine_frame_len_640_del_16_fx[289];
-
-extern const Word32 ivas_fb_fr_12band_1ms_re_fx[IVAS_FB_12_1MS_LEN];
-extern const Word32 ivas_fb_fr_12band_1ms_im_fx[IVAS_FB_12_1MS_LEN];
-
-
-/*----------------------------------------------------------------------*
- * Limiter tables
- *-----------------------------------------------------------------------*/
-
-extern const Word32 release_cnst_table[4][201]; // Q31
-
-#endif
diff --git a/lib_com/ivas_rotation_com.c b/lib_com/ivas_rotation_com_fx.c
similarity index 99%
rename from lib_com/ivas_rotation_com.c
rename to lib_com/ivas_rotation_com_fx.c
index 78a0837ab41197d83544338508a5575c5876201d..a922082f7242efab7483136bb97b39b77346eec8 100644
--- a/lib_com/ivas_rotation_com.c
+++ b/lib_com/ivas_rotation_com_fx.c
@@ -44,6 +44,8 @@
#include "wmc_auto.h"
#include "basop_util.h"
#include "enh64.h"
+
+
/*-------------------------------------------------------------------------
* Euler2Quat()
*
diff --git a/lib_com/ivas_spar_com_fx.c b/lib_com/ivas_spar_com_fx.c
index 0f93bf4d9351d8c919ab812c02e1a8b08337ec71..685d8de54245ba5dc3b79f32e24167c8d77ecb91 100644
--- a/lib_com/ivas_spar_com_fx.c
+++ b/lib_com/ivas_spar_com_fx.c
@@ -44,7 +44,6 @@
#include "basop_util.h"
#include "basop32.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
/*------------------------------------------------------------------------------------------*
diff --git a/lib_com/ivas_spar_com_quant_util_fx.c b/lib_com/ivas_spar_com_quant_util_fx.c
index cfd03a3b3e68d51d66045229266e9f412a564231..8e84e4e374273d2b97988a01283fac18405d859d 100644
--- a/lib_com/ivas_spar_com_quant_util_fx.c
+++ b/lib_com/ivas_spar_com_quant_util_fx.c
@@ -37,7 +37,6 @@
#include "ivas_rom_com.h"
#include
#include "wmc_auto.h"
-#include "ivas_rom_com_fx.h"
#include "ivas_prot_fx.h"
@@ -215,19 +214,17 @@ void ivas_quantise_real_values_enc_fx(
move32();
}
}
+
return;
}
+
/*-----------------------------------------------------------------------------------------*
* Function ivas_spar_get_uniform_quant_strat()
*
* Sets the quant strat values
*-----------------------------------------------------------------------------------------*/
-/*-----------------------------------------------------------------------------------------*
- * Function ivas_spar_get_uniform_quant_strat_fx()
- *
- * Sets the quant strat values
- *-----------------------------------------------------------------------------------------*/
+
void ivas_spar_get_uniform_quant_strat_fx(
ivas_spar_md_com_cfg *pSpar_md_com_cfg,
const Word16 table_idx )
diff --git a/lib_com/ivas_stereo_ica_com_fx.c b/lib_com/ivas_stereo_ica_com_fx.c
index 8548797a4134d1805618080459a0f8ec38631269..11f16d0a5fde3f8b3f14e48230b90860028650ce 100644
--- a/lib_com/ivas_stereo_ica_com_fx.c
+++ b/lib_com/ivas_stereo_ica_com_fx.c
@@ -41,7 +41,6 @@
#include "rom_com.h"
#include "ivas_rom_com.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
/*---------------------------------------------------------------
* interpTargetChannel_fx()
@@ -51,69 +50,89 @@
* ---------------------------------------------------------------*/
#define SPREAD_FACTOR1 ( 1.0f / INTERP_FACTOR1 )
-Word32 table_596[N_MAX_SHIFT_CHANGE + 1] = {
+
+static Word32 table_596[N_MAX_SHIFT_CHANGE + 1] = {
0, 2441216, 1220608, 813738, 610304, 488243, 406869, 348745,
305152, 271246, 244121, 221928, 203434, 187785, 174372, 162747,
152576, 143600, 135623, 128485, 122060
}; // Q12
-Word32 inv_table_596[N_MAX_SHIFT_CHANGE + 1] = {
+static Word32 inv_table_596[N_MAX_SHIFT_CHANGE + 1] = {
0, 7206320, 14412641, 21618962, 28825283, 36031605, 43237924, 50444244,
57650567, 64856889, 72063211, 79269528, 86475849, 93682173, 100888489, 108094813,
115301135, 122507459, 129713778, 136920096, 144126422
}; // Q31
-Word32 tableD1_596[N_MAX_SHIFT_CHANGE + 1] = {
+
+static Word32 tableD1_596[N_MAX_SHIFT_CHANGE + 1] = {
0, 216, 1731, 5842, 13849, 27049, 46741, 74223,
110794, 157752, 216396, 288023, 373932, 475422, 593791, 730337,
886359, 1063155, 1262023, 1484262, 1731170
}; // Q35
-Word32 table_298[N_MAX_SHIFT_CHANGE + 1] = {
+static Word32 table_298[N_MAX_SHIFT_CHANGE + 1] = {
0, 1220608, 610304, 406869, 305152, 244121, 203434, 174372,
152576, 135623, 122060, 110964, 101717, 93892, 87186, 81373,
76288, 71800, 67811, 64242, 61030
}; // Q12
-Word32 inv_table_298[N_MAX_SHIFT_CHANGE + 1] = {
+
+static Word32 inv_table_298[N_MAX_SHIFT_CHANGE + 1] = {
0, 14412641, 28825283, 43237924, 57650567, 72063211, 86475849, 100888489,
115301135, 129713778, 144126422, 158539056, 172951698, 187364347, 201776979, 216189627,
230602270, 245014919, 259427557, 273840192, 288252845
}; // Q31
-Word32 tableD1_298[N_MAX_SHIFT_CHANGE + 1] = {
+
+static Word32 tableD1_298[N_MAX_SHIFT_CHANGE + 1] = {
0, 1731, 13849, 46741, 110794, 216396, 373932, 593791,
886359, 1262023, 1731170, 2304187, 2991462, 3803381, 4750330, 5842699,
7090873, 8505240, 10096185, 11874096, 13849363
}; // Q35
-Word32 table_290[N_MAX_SHIFT_CHANGE + 1] = {
+static Word32 table_290[N_MAX_SHIFT_CHANGE + 1] = {
0, 1187840, 593920, 395946, 296960, 237568, 197973, 169691,
148480, 131982, 118784, 107985, 98986, 91372, 84845, 79189,
74240, 69872, 65991, 62517, 59392
}; // Q12
-Word32 inv_table_290[N_MAX_SHIFT_CHANGE + 1] = {
+
+static Word32 inv_table_290[N_MAX_SHIFT_CHANGE + 1] = {
0, 14810232, 29620464, 44430697, 59240928, 74051160, 88861394, 103671628,
118481856, 133292091, 148102320, 162912554, 177722789, 192533022, 207343256, 222153473,
236963712, 251773958, 266584183, 281394409, 296204640
}; // Q31
-Word32 tableD1_290[N_MAX_SHIFT_CHANGE + 1] = { 0, 1878, 15027, 50717, 120219, 234803, 405740, 644300,
- 961755, 1369374, 1878428, 2500187, 3245924, 4126907, 5154407, 6339694,
- 7694041, 9228719, 10954993, 12884138, 15027425 }; // Q35
+static Word32 tableD1_290[N_MAX_SHIFT_CHANGE + 1] = {
+ 0, 1878, 15027, 50717, 120219, 234803, 405740, 644300,
+ 961755, 1369374, 1878428, 2500187, 3245924, 4126907, 5154407, 6339694,
+ 7694041, 9228719, 10954993, 12884138, 15027425
+}; // Q35
-Word32 table_145[N_MAX_SHIFT_CHANGE + 1] = {
+
+static Word32 table_145[N_MAX_SHIFT_CHANGE + 1] = {
0, 593920, 296960, 197973, 148480, 118784, 98986, 84845,
74240, 65991, 59392, 53992, 49493, 45686, 42422, 39594,
37120, 34936, 32995, 31258, 29696
}; // Q12
-Word32 inv_table_145[N_MAX_SHIFT_CHANGE + 1] = {
+
+static Word32 inv_table_145[N_MAX_SHIFT_CHANGE + 1] = {
0, 29620464, 59240928, 88861394, 118481856, 148102320, 177722789, 207343256,
236963712, 266584183, 296204640, 325825109, 355445578, 385066045, 414686513, 444306946,
473927425, 503547916, 533168367, 562788819, 592409281
}; // Q31
-Word32 tableD1_145[N_MAX_SHIFT_CHANGE + 1] = { 0, 15027, 120219, 405740, 961755, 1878428, 3245924, 5154407,
- 7694041, 10954993, 15027425, 20001503, 25967392, 33015256, 41235259, 50717555,
- 61552334, 73829752, 87639951, 103073111, 120219402 }; // Q35
+
+static Word32 tableD1_145[N_MAX_SHIFT_CHANGE + 1] = {
+ 0, 15027, 120219, 405740, 961755, 1878428, 3245924, 5154407,
+ 7694041, 10954993, 15027425, 20001503, 25967392, 33015256, 41235259, 50717555,
+ 61552334, 73829752, 87639951, 103073111, 120219402
+}; // Q35
+
+
+/*---------------------------------------------------------------
+ * Function interpTargetChannel_fx()
+ *
+ *
+ *---------------------------------------------------------------*/
+
static void interpTargetChannel_fx(
Word32 *target_fx, // qsynth
const Word16 prevShift, // Q0
@@ -269,7 +288,6 @@ static void interpTargetChannel_fx(
x_fx[3] = L_add( x_fx[2], interp_factor2_fx ); // Q12
move32();
-
res_a1 = L_sub( tempF1_fx, x_fx[0] ); // Q12
res_a2 = L_sub( tempF1_fx, x_fx[1] ); // Q12
res_a3 = L_sub( tempF1_fx, x_fx[2] ); // Q12
@@ -320,11 +338,13 @@ static void interpTargetChannel_fx(
return;
}
+
/*---------------------------------------------------------------
* Function targetCh_AlignStereoDFT()
*
* Align target channel in DFT stereo to correct FOR shift variations
* ---------------------------------------------------------------*/
+
static void targetCh_AlignStereoDFT_fx(
Word32 *target_fx, // qsynth
const Word16 prevShift, // Q0
@@ -385,11 +405,13 @@ static void targetCh_AlignStereoDFT_fx(
return;
}
+
/*---------------------------------------------------------------
* adjustTargetSignal()
*
* Target signal correction FOR shift variations.
* ---------------------------------------------------------------*/
+
void adjustTargetSignal_fx(
Word32 *target_fx, // qsynth
const Word16 prevShift, // Q0
diff --git a/lib_com/ivas_stereo_td_bit_alloc_fx.c b/lib_com/ivas_stereo_td_bit_alloc_fx.c
index 149339c61da0d3560930e0f6650eb3b90cdab169..fe18e7bad6caea89ed7c019b09a57943b5499eeb 100644
--- a/lib_com/ivas_stereo_td_bit_alloc_fx.c
+++ b/lib_com/ivas_stereo_td_bit_alloc_fx.c
@@ -40,7 +40,6 @@
#include "prot_fx.h"
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
/*-------------------------------------------------------------------*
diff --git a/lib_com/options_warnings.h b/lib_com/options_warnings.h
deleted file mode 100644
index eaa66e36eea643403623998cfecda8384e5f95c7..0000000000000000000000000000000000000000
--- a/lib_com/options_warnings.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/*Temporary file*/
-
-#define UNUSED_PARAM( ... ) (void) ( __VA_ARGS__ )
diff --git a/lib_com/prot_fx.h b/lib_com/prot_fx.h
index ddd0bfdcc51c73c5048c67f73151a6456d451501..cc60071f21c2cc384c0345479b790fa4a479bb65 100644
--- a/lib_com/prot_fx.h
+++ b/lib_com/prot_fx.h
@@ -391,10 +391,11 @@ Word16 WB_BWE_gain_pred_fx(
Word16 last_extl_fx,
Word16 tilt_wb_fx );
-Word32 calc_tilt_bwe_fx( /* o : Tilt in Q24 */
- const Word16 *sp0, /* i : i signal */
- const Word16 exp, /* i : Exp of inp signal */
- const Word16 N /* i : signal length */
+/* o : Tilt in Q24 */
+Word32 calc_tilt_bwe_fx(
+ const Word16 *sp0, /* i : i signal */
+ const Word16 exp, /* i : Exp of inp signal */
+ const Word16 N /* i : signal length */
);
void calc_norm_envelop_fx(
@@ -556,16 +557,17 @@ void hq_swb_harmonic_calc_norm_envelop_fx(
const Word16 SWB_flength /* i : length of i signal */
);
-Word16 build_nf_codebook_fx( /* o : Number of coefficients in nf codebook */
- const Word16 flag_32K_env_ho, /* i : Envelope attenuation hangover flag */
- const Word16 *coeff, /* i : Coded spectral coefficients */
- const Word16 *sfm_start, /* i : Subband start indices */
- const Word16 *sfmsize, /* i : Subband widths */
- const Word16 *sfm_end, /* i : Subband end indices */
- const Word16 last_sfm, /* i : Last coded band */
- const Word16 *R, /* i : Per-band bit allocation */
- Word16 *CodeBook, /* o : Noise-fill codebook */
- Word16 *CodeBook_mod /* o : Densified noise-fill codebook */
+/* o : Number of coefficients in nf codebook */
+Word16 build_nf_codebook_fx(
+ const Word16 flag_32K_env_ho, /* i : Envelope attenuation hangover flag */
+ const Word16 *coeff, /* i : Coded spectral coefficients */
+ const Word16 *sfm_start, /* i : Subband start indices */
+ const Word16 *sfmsize, /* i : Subband widths */
+ const Word16 *sfm_end, /* i : Subband end indices */
+ const Word16 last_sfm, /* i : Last coded band */
+ const Word16 *R, /* i : Per-band bit allocation */
+ Word16 *CodeBook, /* o : Noise-fill codebook */
+ Word16 *CodeBook_mod /* o : Densified noise-fill codebook */
);
void limit_band_noise_level_calc_fx(
@@ -575,9 +577,10 @@ void limit_band_noise_level_calc_fx(
Word16 *noise_level /* o : noise level Q15 */
);
-Word16 find_last_band_fx( /* o : index of last band */
- const Word16 *bitalloc, /* i : bit allocation */
- const Word16 nb_sfm /* i : number of possibly coded bands */
+/* o : index of last band */
+Word16 find_last_band_fx(
+ const Word16 *bitalloc, /* i : bit allocation */
+ const Word16 nb_sfm /* i : number of possibly coded bands */
);
void apply_noisefill_HQ_fx(
@@ -734,6 +737,7 @@ Word16 calc_nor_delta_hf_fx(
const Word16 *sfm_start, /* i : Start index of bands */
const Word16 core_sfm /* i : index of the end band for core */
);
+
Word16 calc_nor_delta_hf_ivas_fx(
BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
const Word32 *t_audio, /* i : transform-domain coefficients Qx*/
@@ -745,6 +749,7 @@ Word16 calc_nor_delta_hf_ivas_fx(
const Word16 *sfm_start, /* i : Start index of bands */
const Word16 core_sfm /* i : index of the end band for core */
);
+
void hq_bwe_fx(
const Word16 HQ_mode, /* i : HQ mode */
Word32 *coeff_out1, /* i/o: BWE i & temporary buffer */
@@ -799,6 +804,7 @@ void enforce_zero_for_min_envelope_fx(
const Word16 *sfm_start, /* i : Sub band start indices Q0 */
const Word16 *sfm_end /* i : Sub band end indices Q0 */
);
+
void apply_envelope_enc_ivas_fx(
const Word16 *coeff, /* i/o: Coded/noisefilled normalized spectrum Q12 */
const Word16 *norm, /* i : Envelope Q0 */
@@ -807,6 +813,7 @@ void apply_envelope_enc_ivas_fx(
const Word16 *sfm_end, /* i : Sub band end indices Q0 */
Word32 *coeff_out /* o : coded/noisefilled spectrum Q12 */
);
+
void apply_envelope_fx(
const Word16 *coeff, /* i : Coded/noisefilled normalized spectrum Q12 */
const Word16 *norm, /* i : Envelope */
@@ -827,7 +834,10 @@ void apply_envelope_fx(
lsf_tools_fx.c
/========================================================================================================*/
-void compute_poly_product_fx( Word16 *coef, Word32 *p, Word16 order );
+void compute_poly_product_fx(
+ Word16 *coef,
+ Word32 *p,
+ Word16 order );
Word16 xsp_to_xsf(
Word16 lsp );
@@ -836,8 +846,14 @@ Word16 xsf_to_xsp(
Word16 lsf /* Q2.56 */
);
-void lsp_convolve_fx( Word32 x, Word32 *p1, Word32 *p2, Word16 len );
-Word32 poscos_fx( Word16 w );
+void lsp_convolve_fx(
+ Word32 x,
+ Word32 *p1,
+ Word32 *p2,
+ Word16 len );
+
+Word32 poscos_fx(
+ Word16 w );
Word32 sub_lsp2lsf_fx(
const Word16 lsp_i /* i : lsp[m] (range: -1<=val<1) Q15*/
@@ -854,16 +870,32 @@ void E_LPC_lsf_lsp_conversion(
const Word16 m /* i : LPC order */
);
-void E_LPC_f_lsp_a_conversion( const Word16 *lsp, Word16 *a, const Word16 m );
+void E_LPC_f_lsp_a_conversion(
+ const Word16 *lsp,
+ Word16 *a,
+ const Word16 m );
+
void E_LPC_a_isp_conversion(
const Word16 *a, /* i : LP filter coefficients */
Word16 *isp, /* o : Line spectral pairs (in the cosine domain) */
const Word16 *old_isp, /* i : LSP vector from past frame */
const Word16 m /* i : LPC order */
);
-void E_LPC_isp_isf_conversion( const Word16 isp[], Word16 isf[], const Word16 m );
-void E_LPC_isf_isp_conversion( const Word16 isf[], Word16 isp[], const Word16 m );
-void E_LPC_f_isp_a_conversion( const Word16 *isp, Word16 *a, const Word16 m );
+
+void E_LPC_isp_isf_conversion(
+ const Word16 isp[],
+ Word16 isf[],
+ const Word16 m );
+
+void E_LPC_isf_isp_conversion(
+ const Word16 isf[],
+ Word16 isp[],
+ const Word16 m );
+
+void E_LPC_f_isp_a_conversion(
+ const Word16 *isp,
+ Word16 *a,
+ const Word16 m );
void E_LPC_a_lsp_conversion(
const Word16 *a, /* i : LP filter coefficients */
@@ -897,14 +929,21 @@ void E_LPC_a_lsp_conversion(
const Word16 m /* i : LPC order */
);
-void v_sort( Word16 *r, const Word16 lo, const Word16 up );
+void v_sort(
+ Word16 *r,
+ const Word16 lo,
+ const Word16 up );
-void compute_poly_product_fx( Word16 *coef, Word32 *p, Word16 order );
+void compute_poly_product_fx(
+ Word16 *coef,
+ Word32 *p,
+ Word16 order );
void dec_prm_hm_fx(
Decoder_State *st,
Word16 *prm_hm, /* Q0 */
const Word16 L_frame );
+
void msvq_dec(
const Word16 *const *cb, /* i : Codebook (indexed cb[*stages][levels][p]) (0Q15) */
const Word16 dims[], /* i : Dimension of each codebook stage (NULL: full dim.) */
@@ -926,23 +965,22 @@ void lsf_syn_mem_restore_fx(
Word32 gc_threshold_fx, /* i: Q16 */
Word16 *clip_var_bck_fx, /* i: Q(2.56), Q14, Q7, Q0, Q14, Q14 */
Word16 next_force_sf_bck_fx, /* i: */
-
- Word16 *lsp_new, /* o: LSP vector to quantize Q15 */
- Word16 *lsf_new, /* o: quantized LSF vector Q15 */
- Word16 *lsp_mid, /* o: mid-frame LSP vector Q15 */
- Word16 clip_var, /* i: pitch clipping state var Q(2.56) */
- Word16 *mem_AR, /* i: quantizer memory for AR model Q15 */
- Word16 *mem_MA, /* i: quantizer memory for MA model Q15 */
- Word16 *lsp_new_bck, /* i: LSP vector to quantize- backup Q15 */
- Word16 *lsf_new_bck, /* i: quantized LSF vector - backup Q15 */
- Word16 *lsp_mid_bck, /* i: mid-frame LSP vector - backup Q15 */
- Word16 mCb1, /* i: counter for stationary frame after a transition frame */
- Word32 *Bin_E, /* i: FFT Bin energy 128 *2 sets Q_new + Q_SCALE - 2 */
- Word32 *Bin_E_old, /* i: FFT Bin energy 128 sets Q_new + Q_SCALE - 2 */
- Word16 *mem_syn_bck, /* i: synthesis filter memory ( 15 - st_fx->hLPDmem->e_mem_syn ) */
- Word16 mem_w0_bck, /* i: memory of the weighting filter ( 15 - st_fx->hLPDmem->e_mem_syn ) */
- Word16 streaklimit, /* i:LSF quantizer Q15 */
- Word16 pstreaklen /* i:LSF quantizer */
+ Word16 *lsp_new, /* o: LSP vector to quantize Q15 */
+ Word16 *lsf_new, /* o: quantized LSF vector Q15 */
+ Word16 *lsp_mid, /* o: mid-frame LSP vector Q15 */
+ Word16 clip_var, /* i: pitch clipping state var Q(2.56) */
+ Word16 *mem_AR, /* i: quantizer memory for AR model Q15 */
+ Word16 *mem_MA, /* i: quantizer memory for MA model Q15 */
+ Word16 *lsp_new_bck, /* i: LSP vector to quantize- backup Q15 */
+ Word16 *lsf_new_bck, /* i: quantized LSF vector - backup Q15 */
+ Word16 *lsp_mid_bck, /* i: mid-frame LSP vector - backup Q15 */
+ Word16 mCb1, /* i: counter for stationary frame after a transition frame */
+ Word32 *Bin_E, /* i: FFT Bin energy 128 *2 sets Q_new + Q_SCALE - 2 */
+ Word32 *Bin_E_old, /* i: FFT Bin energy 128 sets Q_new + Q_SCALE - 2 */
+ Word16 *mem_syn_bck, /* i: synthesis filter memory ( 15 - st_fx->hLPDmem->e_mem_syn ) */
+ Word16 mem_w0_bck, /* i: memory of the weighting filter ( 15 - st_fx->hLPDmem->e_mem_syn ) */
+ Word16 streaklimit, /* i:LSF quantizer Q15 */
+ Word16 pstreaklen /* i:LSF quantizer */
);
void lsf_syn_mem_restore_ivas_fx(
@@ -1049,25 +1087,28 @@ void lsp2isp_fx(
const Word16 m /* i : order of LP analysis */
);
-Word16 lsf_stab_fx( /* o : LP filter stability Q15*/
- const Word16 *lsf, /* i : LSF vector Q(x2.56)*/
- const Word16 *lsfold, /* i : old LSF vector Q(x2.56)*/
- const Word16 Opt_AMR_WB, /* i : flag indicating AMR-WB IO mode */
- const Word16 L_frame /* i : frame length */
+/* o : LP filter stability Q15*/
+Word16 lsf_stab_fx(
+ const Word16 *lsf, /* i : LSF vector Q(x2.56)*/
+ const Word16 *lsfold, /* i : old LSF vector Q(x2.56)*/
+ const Word16 Opt_AMR_WB, /* i : flag indicating AMR-WB IO mode */
+ const Word16 L_frame /* i : frame length */
);
-Word16 lsf_stab_ivas_fx( /* o : LP filter stability Q15*/
- const Word16 *lsf, /* i : LSF vector Q(x2.56)*/
- const Word16 *lsfold, /* i : old LSF vector Q(x2.56)*/
- const Word16 Opt_AMR_WB, /* i : flag indicating AMR-WB IO mode */
- const Word16 L_frame /* i : frame length */
+/* o : LP filter stability Q15*/
+Word16 lsf_stab_ivas_fx(
+ const Word16 *lsf, /* i : LSF vector Q(x2.56)*/
+ const Word16 *lsfold, /* i : old LSF vector Q(x2.56)*/
+ const Word16 Opt_AMR_WB, /* i : flag indicating AMR-WB IO mode */
+ const Word16 L_frame /* i : frame length */
);
-Word16 lsf_stab_ivas_fx( /* o : LP filter stability Q15*/
- const Word16 *lsf, /* i : LSF vector Q(x2.56)*/
- const Word16 *lsfold, /* i : old LSF vector Q(x2.56)*/
- const Word16 Opt_AMR_WB, /* i : flag indicating AMR-WB IO mode */
- const Word16 L_frame /* i : frame length */
+/* o : LP filter stability Q15*/
+Word16 lsf_stab_ivas_fx(
+ const Word16 *lsf, /* i : LSF vector Q(x2.56)*/
+ const Word16 *lsfold, /* i : old LSF vector Q(x2.56)*/
+ const Word16 Opt_AMR_WB, /* i : flag indicating AMR-WB IO mode */
+ const Word16 L_frame /* i : frame length */
);
void reorder_isf_fx(
@@ -1135,7 +1176,10 @@ Word16 vq_dec_lvq_ivas_fx(
Word16 no_bits /* (i): no. bits for lattice */
);
-void a2rc_fx( const Word16 *a, Word16 *refl, Word16 lpcorder );
+void a2rc_fx(
+ const Word16 *a,
+ Word16 *refl,
+ Word16 lpcorder );
void lsp_weights_fx(
Word16 lsp_nq_fx[],
@@ -1202,14 +1246,56 @@ void autocorr_fx_32(
const Word16 sym_flag /* i : symmetric window flag */
);
-Word16 E_LPC_lev_dur( const Word16 Rh[], const Word16 Rl[], Word16 A[], Word32 epsP[], const Word16 order, Word16 *parcorr );
-Word16 E_LPC_lev_dur_stab( const Word16 Rh[], const Word16 Rl[], Word16 A[], Word32 epsP[], const Word16 order, Word16 *parcorr, Word16 k_max );
-
-Word16 E_LPC_lev_dur_ivas_fx( const Word16 Rh[], const Word16 Rl[], Word16 A[], Word32 epsP[], const Word16 order, Word16 *parcorr );
-Word16 E_LPC_lev_dur_stab_ivas_fx( const Word16 Rh[], const Word16 Rl[], Word16 A[], Word32 epsP[], const Word16 order, Word16 *parcorr, Word16 k_max );
-
-Word16 E_LPC_lev_dur_fx( const Word16 Rh[], const Word16 Rl[], Word32 A[], Word32 epsP[], const Word16 order, Word32 *mem );
-Word16 E_LPC_lev_dur_stab_fx( const Word16 Rh[], const Word16 Rl[], Word32 A[], Word32 epsP[], const Word16 order, Word32 *mem, Word16 k_max );
+Word16 E_LPC_lev_dur(
+ const Word16 Rh[],
+ const Word16 Rl[],
+ Word16 A[],
+ Word32 epsP[],
+ const Word16 order,
+ Word16 *parcorr );
+
+Word16 E_LPC_lev_dur_stab(
+ const Word16 Rh[],
+ const Word16 Rl[],
+ Word16 A[],
+ Word32 epsP[],
+ const Word16 order,
+ Word16 *parcorr,
+ Word16 k_max );
+
+Word16 E_LPC_lev_dur_ivas_fx(
+ const Word16 Rh[],
+ const Word16 Rl[],
+ Word16 A[],
+ Word32 epsP[],
+ const Word16 order,
+ Word16 *parcorr );
+
+Word16 E_LPC_lev_dur_stab_ivas_fx(
+ const Word16 Rh[],
+ const Word16 Rl[],
+ Word16 A[],
+ Word32 epsP[],
+ const Word16 order,
+ Word16 *parcorr,
+ Word16 k_max );
+
+Word16 E_LPC_lev_dur_fx(
+ const Word16 Rh[],
+ const Word16 Rl[],
+ Word32 A[],
+ Word32 epsP[],
+ const Word16 order,
+ Word32 *mem );
+
+Word16 E_LPC_lev_dur_stab_fx(
+ const Word16 Rh[],
+ const Word16 Rl[],
+ Word32 A[],
+ Word32 epsP[],
+ const Word16 order,
+ Word32 *mem,
+ Word16 k_max );
Word16 lev_dur_fx(
Word32 *a_fx, /* o : LP coefficients (a[0] = 1.0) Q(q_a)*/
@@ -1219,10 +1305,16 @@ Word16 lev_dur_fx(
Word16 q_a,
Word16 q_r );
-void E_LPC_a_add_tilt( const Word16 *a /*Qa*/, Word16 *ap /*Qa*/, Word16 gamma /*Q15*/, Word16 m );
-void E_LPC_int_lpc_tcx( const Word16 lsp_old[], /* i : LSPs from past frame (1Q14) */
- const Word16 lsp_new[], /* i : LSPs from present frame (1Q14) */
- Word16 a[] /* o : interpolated LP coefficients (4Q11) */
+void E_LPC_a_add_tilt(
+ const Word16 *a /*Qa*/,
+ Word16 *ap /*Qa*/,
+ Word16 gamma /*Q15*/,
+ Word16 m );
+
+void E_LPC_int_lpc_tcx(
+ const Word16 lsp_old[], /* i : LSPs from past frame (1Q14) */
+ const Word16 lsp_new[], /* i : LSPs from present frame (1Q14) */
+ Word16 a[] /* o : interpolated LP coefficients (4Q11) */
);
Word16 E_LPC_lsp_unweight(
@@ -1233,9 +1325,23 @@ Word16 E_LPC_lsp_unweight(
Word16 lpcorder /* (I): prediction order Q0 */
);
-Word32 E_LPC_schur( Word32 r[] /*Qr*/, Word16 reflCoeff[] /*Q15*/, Word32 epsP[] /*Qr*/, const Word16 m );
-Word32 E_LPC_schur_ivas( Word32 r[] /*Qr*/, Word16 reflCoeff[] /*Q15*/, const Word16 m );
-void E_LPC_a_lsf_isf_conversion( Word16 *lpcCoeffs /*Qx*/, Word16 *lsf /*15Q16*/, const Word16 *old_lsf /*15Q16*/, Word16 lpcOrder, Word8 lpcRep /*Q0*/ );
+Word32 E_LPC_schur(
+ Word32 r[] /*Qr*/,
+ Word16 reflCoeff[] /*Q15*/,
+ Word32 epsP[] /*Qr*/,
+ const Word16 m );
+
+Word32 E_LPC_schur_ivas(
+ Word32 r[] /*Qr*/,
+ Word16 reflCoeff[] /*Q15*/,
+ const Word16 m );
+
+void E_LPC_a_lsf_isf_conversion(
+ Word16 *lpcCoeffs /*Qx*/,
+ Word16 *lsf /*15Q16*/,
+ const Word16 *old_lsf /*15Q16*/,
+ Word16 lpcOrder,
+ Word8 lpcRep /*Q0*/ );
/*========================================================================================================/
@@ -1419,29 +1525,31 @@ void hq_configure_evs_fx(
);
// hp50.c
-void hp20( Word16 signal[], /* i/o: signal to filter any */
- const Word16 stride, /* i : stride to be applied accessing signal */
- const Word16 lg, /* i : length of signal (integer) Q0 */
- Word32 mem[5], /* i/o: static filter memory with this layout: */
- /* mem[0]: y[-2] (32-bit) */
- /* mem[1]; y[-1] (32-bit) */
- /* mem[2]: x[-2] << 16 */
- /* mem[3]: x[-1] << 16 */
- /* Note: mem[0..3] need to be scaled per frame */
- /* mem[4]: states scale */
- const Word32 sFreq );
-
-// get_gain.c
-Word32 get_gain( /* encoder side; enc = 0 -> decoder side */
- Word16 *sign /* i/o: sign of the maximum */
+
+/* o : impulse response energy Q3 */
+Word16 findpulse_fx(
+ const Word16 L_frame, /* i : length of the frame */
+ const Word16 res[], /* i : Residual signal <12 bits */
+ const Word16 T0, /* i : Pitch estimation Q0 */
+ const Word16 enc, /* i : enc = 1 -> encoder side; enc = 0 -> decoder side */
+ Word16 *sign /* i/o: sign of the maximum */
);
-// env_stab_trans.c
void env_stab_transient_detect_fx(
const Word16 is_transient, /* i: Transient flag */
const Word16 length, /* i : Length of spectrum (32 or 48 kHz) */
@@ -1657,8 +1766,6 @@ void env_stab_transient_detect_fx(
const Word16 Qcoeff /* i : Q of coded spectral coefficients */
);
-
-// env_adj.c
void env_adj_fx(
const Word16 *pulses, /* i : number of pulses per band Q0 */
const Word16 length, /* i : length of spectrum Q0 */
@@ -1668,32 +1775,33 @@ void env_adj_fx(
const Word16 *sfmsize /* i : subband sizes Q0 */
);
-
-// env_stab.c
-
-Word16 env_stability_fx( /* in Q15 */
- const Word16 *ynrm, /*i: Norm vector for current frame */
- const Word16 nb_sfm, /*i: Number of sub-bands */
- Word16 *mem_norm, /*i/o: Norm vector memory from past frame */
- Word16 *mem_env_delta, /*i/o: Envelope stability memory for smoothing in Q11 */
- const Word16 core_switching_flag /* i : Core switching flag */
+/* in Q15 */
+Word16 env_stability_fx(
+ const Word16 *ynrm, /*i: Norm vector for current frame */
+ const Word16 nb_sfm, /*i: Number of sub-bands */
+ Word16 *mem_norm, /*i/o: Norm vector memory from past frame */
+ Word16 *mem_env_delta, /*i/o: Envelope stability memory for smoothing in Q11 */
+ const Word16 core_switching_flag /* i : Core switching flag */
);
-Word16 env_stab_smo_fx( /* Q0 */
- Word16 env_stab, /*i : env_stab value Q15 */
- Word16 *env_stab_state_p, /*i/o: env_stab state probabilities Q15 */
- Word16 *ho_cnt /*i/o: hangover counter for speech state */
+/* Q0 */
+Word16 env_stab_smo_fx(
+ Word16 env_stab, /*i : env_stab value Q15 */
+ Word16 *env_stab_state_p, /*i/o: env_stab state probabilities Q15 */
+ Word16 *ho_cnt /*i/o: hangover counter for speech state */
);
-// enr_1_az.c
-Word16 Enr_1_Az_fx( /* o : impulse response energy Q3 */
- const Word16 Aq[], /* i : LP filter coefs Qx based on the fact that Aq[0] == 1.0 */
- const Word16 len /* i : impulse response length Q0 */
+/* o : impulse response energy Q3 */
+Word16 Enr_1_Az_fx(
+ const Word16 Aq[], /* i : LP filter coefs Qx based on the fact that Aq[0] == 1.0 */
+ const Word16 len /* i : impulse response length Q0 */
);
-Word16 Enr_1_Az_fx_o( /* o : impulse response energy Q3 */
- const Word16 Aq[], /* i : LP filter coefs Qx based on the fact that Aq[0] == 1.0 */
- const Word16 len, /* i : impulse response length Q0 */
- Flag *Overflow_out /* o : propagating the Overflow flag to upper level */
+
+/* o : impulse response energy Q3 */
+Word16 Enr_1_Az_fx_o(
+ const Word16 Aq[], /* i : LP filter coefs Qx based on the fact that Aq[0] == 1.0 */
+ const Word16 len, /* i : impulse response length Q0 */
+ Flag *Overflow_out /* o : propagating the Overflow flag to upper level */
);
// gs_gains_fx.c
@@ -1703,6 +1811,7 @@ void Ener_per_band_comp_fx(
const Word16 Q_exc_diff,
const Word16 Mband, /* i : Max band */
const Word16 Eflag );
+
void Ener_per_band_comp_ivas_fx(
const Word16 exc_diff_fx[], /* i : target signal Q_exc_diff */
Word16 y_gain4_fx[], /* o : Energy per band to quantize Q12 */
@@ -1730,7 +1839,6 @@ void Comp_and_apply_gain_ivas_fx(
Word16 Qexc_diff,
Word16 *Q_exc );
-// gs_preech.c
void pre_echo_att_fx(
Word32 *Last_frame_ener_fx, /* i/o: Energy of the last frame 2*Q_new+1*/
Word16 *exc_fx, /* i/o: Excitation of the current frame Q_new*/
@@ -1738,7 +1846,6 @@ void pre_echo_att_fx(
const Word16 Q_new,
const Word16 last_coder_type, /* i : Last coding mode Q0*/
const Word16 L_frame /* i : Frame length Q0*/
-
);
void pre_echo_att_ivas_fx(
@@ -1749,7 +1856,7 @@ void pre_echo_att_ivas_fx(
const Word16 last_coder_type, /* i : Last coding mode Q0*/
const Word16 L_frame /* i : Frame length Q0*/
);
-// wtda_fx.c
+
void tcx_get_windows_mode1(
const Word16 left_mode, /* i: overlap mode of left window half */
const Word16 right_mode, /* i: overlap mode of right window half */
@@ -1893,15 +2000,16 @@ void noise_extr_corcod_fx(
);
void sqrt_32n_16_fx(
- Word32 L_in, /* i : i vector (Word32) */
+ Word32 L_in, /* i : i vector (Word32) */
Word16 Qin, /* i : Q value for L_in */
- Word16 *out_fx, /* o : sqrt i vector (Word16) */
+ Word16 *out_fx, /* o : sqrt i vector (Word16) */
Word16 *Qout /* o : Q value for out_fx */
);
-Word16 div_s_ss( /* o: result of division (Word16 Q0) */
- const Word16 n, /* i: numerator (Word16 Q0 */
- const Word16 d /* i: denominator (Word16 Q0) */
+/* o: result of division (Word16 Q0) */
+Word16 div_s_ss(
+ const Word16 n, /* i: numerator (Word16 Q0 */
+ const Word16 d /* i: denominator (Word16 Q0) */
);
void noiseinj_hf_fx(
@@ -1952,16 +2060,17 @@ void return_bits_normal2_fx(
const Word16 bits_lagIndices_fx[] /* i : bits for lagIndices */
);
-Word16 spectrumsmooth_noiseton_fx( /* o : Qss ss_min */
- Word32 L_spectra[], /* i : Qs core coder */
- /*Word16 Qs,*/ /* i : Q0 Q value for spectra, spectra_ni */
- const Word32 L_spectra_ni[], /* i : Qs core coder with sparse filling */
- Word16 sspectra_fx[], /* o : Qss Smoothed tonal information from core coder */
- Word16 sspectra_diff_fx[], /* o : Qss non tonal infomration for gap filling */
- Word16 sspectra_ni_fx[], /* o : Qss smoothed core coder */
- Word16 *Qss, /* o : Q0 Q value for sspectra* */
- const Word16 fLenLow_fx, /* i : Q0 low frequency boundaries */
- Word16 *ni_seed_fx /* io : Q0 random seed */
+/* o : Qss ss_min */
+Word16 spectrumsmooth_noiseton_fx(
+ Word32 L_spectra[], /* i : Qs core coder */
+ /*Word16 Qs,*/ /* i : Q0 Q value for spectra, spectra_ni */
+ const Word32 L_spectra_ni[], /* i : Qs core coder with sparse filling */
+ Word16 sspectra_fx[], /* o : Qss Smoothed tonal information from core coder */
+ Word16 sspectra_diff_fx[], /* o : Qss non tonal infomration for gap filling */
+ Word16 sspectra_ni_fx[], /* o : Qss smoothed core coder */
+ Word16 *Qss, /* o : Q0 Q value for sspectra* */
+ const Word16 fLenLow_fx, /* i : Q0 low frequency boundaries */
+ Word16 *ni_seed_fx /* io : Q0 random seed */
);
void ton_ene_est_fx(
@@ -2030,26 +2139,23 @@ void get_sigma_fx_har(
);
void genhf_noise_fx(
- const Word16 noise_flr_fx[],
- /* i : Qss smoothed non tonal */ /* sspectra_diff_fx:Qss */
- const Word16 Qss, /* i : Q0 Q value */
- Word32 L_xSynth_har[],
- /* o : QsL hf non tonal components */ /* xSynth_har:QsL */
- const Word16 QsL, /* i : Q0 Q value */
- const Word16 *predBuf_fx,
- /* i : Qss smoothed tonal compone */ /* sspectra:Qss */
- const Word16 bands, /* i : Q0 total number of subbands in a frame */
- const Word16 harmonic_band, /* i : Q0 Number of LF harmonic frames */
- const Word16 har_freq_est2, /* i : Q0 harmonic signal parameter */
- const Word16 pos_max_hfe2, /* i : Q0 last pulse in core coder */
- Word16 *pul_res, /* o : Q0 pulse resolution */
- GainItem_fx pk_sf_fx[], /* o : representative region */
- const Word16 fLenLow, /* i : Q0 low frequency length */
- const Word16 fLenHigh, /* i : Q0 high frequency length */
- const Word16 sbWidth[], /* i : Q0 bandwidth for high bands */
- const Word16 lagIndices[], /* i : Q0 correlation indices for most representative */
- const Word16 subband_offsets[], /* i : Q0 band offsets for HF reconstruction */
- const Word16 subband_search_offset[] /* i : Q0 most representative regions offsets in LF */
+ const Word16 noise_flr_fx[], /* i : Qss smoothed non tonal sspectra_diff_fx:Qss */
+ const Word16 Qss, /* i : Q0 Q value */
+ Word32 L_xSynth_har[], /* o : QsL hf non tonal components xSynth_har:QsL */
+ const Word16 QsL, /* i : Q0 Q value */
+ const Word16 *predBuf_fx, /* i : Qss smoothed tonal compone sspectra:Qss */
+ const Word16 bands, /* i : Q0 total number of subbands in a frame */
+ const Word16 harmonic_band, /* i : Q0 Number of LF harmonic frames */
+ const Word16 har_freq_est2, /* i : Q0 harmonic signal parameter */
+ const Word16 pos_max_hfe2, /* i : Q0 last pulse in core coder */
+ Word16 *pul_res, /* o : Q0 pulse resolution */
+ GainItem_fx pk_sf_fx[], /* o : representative region */
+ const Word16 fLenLow, /* i : Q0 low frequency length */
+ const Word16 fLenHigh, /* i : Q0 high frequency length */
+ const Word16 sbWidth[], /* i : Q0 bandwidth for high bands */
+ const Word16 lagIndices[], /* i : Q0 correlation indices for most representative */
+ const Word16 subband_offsets[], /* i : Q0 band offsets for HF reconstruction */
+ const Word16 subband_search_offset[] /* i : Q0 most representative regions offsets in LF */
);
Word16 har_est_fx(
@@ -2075,23 +2181,19 @@ void FindNBiggest2_simple_fx_har(
Word16 get_usebit_npswb_fx(
Word16 hqswb_clas_fx );
-/*========================================================================================================/
-isf_dec_amr_wb_fx.c
-/========================================================================================================*/
-
void disf_2s_36b_fx(
Word16 *indice, /* i : quantized indices (use indice[0] = -1 in the decoder) */
- Word16 *isf_q, /* (Qx2.56) o : quantized ISFs in the cosine domain */
- Word16 *mem_AR, /* (Qx2.56) i/o: quantizer memory for AR model */
- Word16 *mem_MA, /* (Qx2.56) i/o: quantizer memory for MA model */
+ Word16 *isf_q, /* (Qx2.56) o : quantized ISFs in the cosine domain */
+ Word16 *mem_AR, /* (Qx2.56) i/o: quantizer memory for AR model */
+ Word16 *mem_MA, /* (Qx2.56) i/o: quantizer memory for MA model */
const Word16 enc_dec /* i : encoder (0), decoder (1) G722.2 FER */
);
void disf_2s_46b_fx(
Word16 *indice, /* i : quantized indices (use indice[0] = -1 in the decoder) */
- Word16 *isf_q, /* (Qx2.56) o : quantized ISFs in the cosine domain */
- Word16 *mem_AR, /* (Qx2.56) o : quantizer memory for AR model */
- Word16 *mem_MA, /* (Qx2.56) i/o: quantizer memory for MA model */
+ Word16 *isf_q, /* (Qx2.56) o : quantized ISFs in the cosine domain */
+ Word16 *mem_AR, /* (Qx2.56) o : quantizer memory for AR model */
+ Word16 *mem_MA, /* (Qx2.56) i/o: quantizer memory for MA model */
const Word16 enc_dec /* i : encoder (0), decoder (1) G722.2 FER */
);
@@ -2100,16 +2202,12 @@ void disf_ns_28b_fx(
Word16 *isf_q );
void isf_dec_amr_wb_fx(
- Decoder_State *st, /* i/o: State structure */
- Word16 *Aq, /* Q12 o : quantized A(z) for 4 subframes */
- Word16 *isf_new, /* Qlog2(2.56) o : de-quantized ISF vector */
- Word16 *isp_new /* Q15 o : de-quantized ISP vector */
+ Decoder_State *st, /* i/o: State structure */
+ Word16 *Aq, /* Q12 o : quantized A(z) for 4 subframes */
+ Word16 *isf_new, /* Qlog2(2.56) o : de-quantized ISF vector */
+ Word16 *isp_new /* Q15 o : de-quantized ISP vector */
);
-/*========================================================================================================/
-hq2_noise_inject.c fix part
-/========================================================================================================*/
-
void hq2_noise_inject_fx(
Word32 L_y2[], /* Q12 */
const Word16 band_start[], /* Q0 */
@@ -2135,10 +2233,6 @@ void hq2_noise_inject_fx(
const Word32 bwe_br /* Q0 */
);
-/*========================================================================================================/
-hq2_bit_alloc_fx.c
-/========================================================================================================*/
-
void Bits2indvsb_fx(
const Word32 *L_be, /* i : Qbe Band Energy of sub-band */
const Word16 start_band, /* i : Q0 start band indices */
@@ -2180,10 +2274,6 @@ void reordvct_fx(
Word16 *idx /* o : reordered vector index */
);
-/*========================================================================================================/
-nelp_fx.c
-/========================================================================================================*/
-
Word16 dequantize_uvg_fx(
const Word16 iG1, /* i: gain 1 index */
const Word16 *iG2, /* i: gain 2 index */
@@ -2198,10 +2288,6 @@ void generate_nelp_excitation_fx(
const Word16 gain_fac /* i : gain factor */
);
-/*========================================================================================================/
-ppp_fx.c
-/========================================================================================================*/
-
void Interpol_delay_fx(
Word16 *out_fx, /* Q4 */
Word16 last_fx, /* Q0 */
@@ -2218,9 +2304,6 @@ void deemph_lpc_fx(
const Word16 deemph_old /* Q0 */
);
-/*========================================================================================================/
-hq2_core_com_fx.c
-/========================================================================================================*/
void mdct_spectrum_denorm_fx(
const Word16 inp_vector[], /* i : Q0 : */
Word32 L_y2[], /* i/o : Qs : decoded spectrum */
@@ -2325,7 +2408,6 @@ void bit_allocation_second_fx(
const Word16 *last_bitalloc, /* Q0 */
const Word16 input_frame /* Q0 */
);
-// synth_filt_fix.c
Word32 syn_kern_16(
Word32 L_tmp,
@@ -2376,9 +2458,25 @@ void syn_filt_fx32(
const Word16 update_m /* i : update memory flag Q0 : 0 --> no memory update */
);
-void E_UTIL_synthesis( const Word16 shift, const Word16 a[], const Word16 x[], Word16 y[], const Word16 lg, Word16 mem[], const Word16 update, const Word16 m );
+void E_UTIL_synthesis(
+ const Word16 shift,
+ const Word16 a[],
+ const Word16 x[],
+ Word16 y[],
+ const Word16 lg,
+ Word16 mem[],
+ const Word16 update,
+ const Word16 m );
-void E_UTIL_synthesis_fx( const Word16 shift, const Word32 a[], const Word32 x[], Word32 y[], const Word16 lg, Word32 mem[], const Word16 update, const Word16 m );
+void E_UTIL_synthesis_fx(
+ const Word16 shift,
+ const Word32 a[],
+ const Word32 x[],
+ Word32 y[],
+ const Word16 lg,
+ Word32 mem[],
+ const Word16 update,
+ const Word16 m );
void synth_mem_updt2(
const Word16 L_frame, /* i : frame length */
@@ -2389,6 +2487,7 @@ void synth_mem_updt2(
Word16 mem_syn[], /* o : synthesis filter memory for find_target */
const Word16 dec /* i : flag for decoder indication */
);
+
void ivas_synth_mem_updt2_fx(
const Word16 L_frame, /* i : frame length */
const Word16 last_L_frame, /* i : frame length */
@@ -2398,31 +2497,45 @@ void ivas_synth_mem_updt2_fx(
Word16 mem_syn[], /* o : synthesis filter memory for find_target */
const Word16 dec );
+void lerp(
+ const Word16 *f,
+ Word16 *f_out,
+ Word16 bufferNewSize,
+ Word16 bufferOldSize );
-// lerp.c
-void lerp( const Word16 *f, Word16 *f_out, Word16 bufferNewSize, Word16 bufferOldSize );
-
-void L_lerp_fx_q11( Word32 *f, Word32 *f_out, Word16 bufferNewSize, Word16 bufferOldSize );
+void L_lerp_fx_q11(
+ Word32 *f,
+ Word32 *f_out,
+ Word16 bufferNewSize,
+ Word16 bufferOldSize );
-void L_lerp_fx( Word32 *f, Word32 *f_out, Word16 bufferNewSize, Word16 bufferOldSize, Word16 *q );
+void L_lerp_fx(
+ Word32 *f,
+ Word32 *f_out,
+ Word16 bufferNewSize,
+ Word16 bufferOldSize,
+ Word16 *q );
-// index_pvq_opt.c
-PvqEntry mpvq_encode_vec_fx( /* o : leading_sign_index, index, size, k_val */
- const Word16 *vec_in, /* i : signed pulse train */
- Word16 dim_in, /* i : dimension */
- Word16 k_val_local /* i : nb unit pulses */
+/* o : leading_sign_index, index, size, k_val */
+PvqEntry mpvq_encode_vec_fx(
+ const Word16 *vec_in, /* i : signed pulse train */
+ Word16 dim_in, /* i : dimension */
+ Word16 k_val_local /* i : nb unit pulses */
);
-PvqEntry get_size_mpvq_calc_offset_fx( /* o : size, dim, k_val */
- Word16 dim_in, /* i : dimension */
- Word16 k_val_in, /* i : nb unit pulses */
- UWord32 *h_mem /* o : offsets */
+
+/* o : size, dim, k_val */
+PvqEntry get_size_mpvq_calc_offset_fx(
+ Word16 dim_in, /* i : dimension */
+ Word16 k_val_in, /* i : nb unit pulses */
+ UWord32 *h_mem /* o : offsets */
);
-void mpvq_decode_vec_fx( /* o : void */
- const PvqEntry *entry, /* i : sign_ind, index, dim, k_val */
- UWord32 *h_mem, /* i : A/U offsets */
- Word16 *vec_out /* o : pulse train */
+
+void mpvq_decode_vec_fx(
+ const PvqEntry *entry, /* i : sign_ind, index, dim, k_val */
+ UWord32 *h_mem, /* i : A/U offsets */
+ Word16 *vec_out /* o : pulse train */
);
-// weight_a_fx.c
+
void weight_a_subfr_fx(
const Word16 nb_subfr, /* i : number of subframes Q0 */
const Word16 *A, /* i : LP filter coefficients Q12 */
@@ -2444,6 +2557,7 @@ void weight_a_fx(
const Word16 gamma, /* i: weighting factor Q15 */
const Word16 m /* i: order of LP filter Q0 */
);
+
void E_LPC_a_weight_inv(
const Word16 *a, /* Q12 */
Word16 *ap, /* Q12 */
@@ -2451,7 +2565,6 @@ void E_LPC_a_weight_inv(
const Word16 m /* Q0 */
);
-// residu_fx.c
void Residu3_lc_fx(
const Word16 a[], /* i : prediction coefficients Q12 */
const Word16 m, /* i : order of LP filter Q0 */
@@ -2482,44 +2595,48 @@ void calc_residu_fx(
Word16 *res, /* o : residual signal Qx+1*/
const Word16 *p_Aq /* i : quantized LP filter coefficients Q12*/
);
-// inerpol_lc.c
-Word32 Interpol_lc_fx( /* o : interpolated value Q15 */
- const Word16 *x, /* i : input vector Q0 */
- const Word16 *win, /* i : interpolation window Q14 */
- const Word16 frac, /* i : fraction (0..up_samp) Q0 */
- const Word16 up_samp, /* i : upsampling factor Q0 */
- const Word16 nb_coef /* i : number of coefficients Q0 */
-);
-
-Word16 modify_Fs_ivas_fx( /* o : length of output Q0 */
- const Word16 sigIn_fx[], /* i : signal to decimate Q0 */
- Word16 lg, /* i : length of input Q0 */
- const Word32 fin, /* i : frequency of input Q0 */
- Word16 sigOut_fx[], /* o : decimated signal Q0 */
- const Word32 fout, /* i : frequency of output Q0 */
- Word16 mem_fx[], /* i/o: filter memory Q0 */
- const Word16 nblp, /* i : flag indicating if NB low-pass is applied */
- Word16 *Q_new_inp, /*scaling added on sigOut_fx */
- Word16 *mem_decim_size /*i: size modified for mem_fx*/
-);
-// modif_fs_fx.c
-Word16 modify_Fs_fx( /* o : length of output Q0 */
- const Word16 sigIn_fx[], /* i : signal to decimate Q0 */
- Word16 lg, /* i : length of i Q0 */
- const Word32 fin, /* i : frequency of i Q0 */
- Word16 sigOut_fx[], /* o : decimated signal Q0 */
- const Word32 fout, /* i : frequency of output Q0 */
- Word16 mem_fx[], /* i/o: filter memory Q0 */
- const Word16 nblp /* i : flag indicating if NB low-pass is applied */
-);
-
-Word16 modify_Fs_intcub3m_sup_fx( /* o : length of output */
- const Word16 sigIn[], /* i : signal to decimate with memory of 2 samples (indexes -2 & -1) */
- const Word16 lg, /* i : length of input (suppose that lg is such that lg_out is integer, ex multiple of 5 in case of 16kHz to 12.8 kHz) */
- const Word32 fin, /* i : frequency of input */
- Word16 sigOut[], /* o : decimated signal */
- const Word32 fout, /* i : frequency of output */
- Word16 *delayout /* o : delay of output */
+
+/* o : interpolated value Q15 */
+Word32 Interpol_lc_fx(
+ const Word16 *x, /* i : input vector Q0 */
+ const Word16 *win, /* i : interpolation window Q14 */
+ const Word16 frac, /* i : fraction (0..up_samp) Q0 */
+ const Word16 up_samp, /* i : upsampling factor Q0 */
+ const Word16 nb_coef /* i : number of coefficients Q0 */
+);
+
+/* o : length of output Q0 */
+Word16 modify_Fs_ivas_fx(
+ const Word16 sigIn_fx[], /* i : signal to decimate Q0 */
+ Word16 lg, /* i : length of input Q0 */
+ const Word32 fin, /* i : frequency of input Q0 */
+ Word16 sigOut_fx[], /* o : decimated signal Q0 */
+ const Word32 fout, /* i : frequency of output Q0 */
+ Word16 mem_fx[], /* i/o: filter memory Q0 */
+ const Word16 nblp, /* i : flag indicating if NB low-pass is applied */
+ Word16 *Q_new_inp, /*scaling added on sigOut_fx */
+ Word16 *mem_decim_size /*i: size modified for mem_fx*/
+);
+
+/* o : length of output Q0 */
+Word16 modify_Fs_fx(
+ const Word16 sigIn_fx[], /* i : signal to decimate Q0 */
+ Word16 lg, /* i : length of i Q0 */
+ const Word32 fin, /* i : frequency of i Q0 */
+ Word16 sigOut_fx[], /* o : decimated signal Q0 */
+ const Word32 fout, /* i : frequency of output Q0 */
+ Word16 mem_fx[], /* i/o: filter memory Q0 */
+ const Word16 nblp /* i : flag indicating if NB low-pass is applied */
+);
+
+/* o : length of output */
+Word16 modify_Fs_intcub3m_sup_fx(
+ const Word16 sigIn[], /* i : signal to decimate with memory of 2 samples (indexes -2 & -1) */
+ const Word16 lg, /* i : length of input (suppose that lg is such that lg_out is integer, ex multiple of 5 in case of 16kHz to 12.8 kHz) */
+ const Word32 fin, /* i : frequency of input */
+ Word16 sigOut[], /* o : decimated signal */
+ const Word32 fout, /* i : frequency of output */
+ Word16 *delayout /* o : delay of output */
);
void Decimate_allpass_steep_fx(
@@ -2597,8 +2714,6 @@ void retro_interp4_5_fx(
void retro_interp5_4_fx(
Word16 *pst_old_syn_fx );
-// lag_wind.c
-
void adapt_lag_wind(
Word16 r_h[], /* in/out: autocorrelations */
Word16 r_l[], /* in/out: autocorrelations */
@@ -2665,7 +2780,7 @@ Word16 E_UTIL_f_preemph3_ivas_fx(
Word16 *mem, /* Qx */
Word16 bits /* Q0 */
);
-// swb_bwe_com_fx.c
+
Word16 WB_BWE_gain_pred_fx(
Word16 *WB_fenv, /* o : WB frequency envelopes */
const Word16 *core_dec_freq, /* i : Frequency domain core decoded signal */
@@ -2689,10 +2804,11 @@ void calc_normal_length_fx(
Word16 *prev_L_swb_norm, /*i/o : last normalize length */
Word16 Q_syn );
-Word16 ivas_calc_tilt_bwe_fx( /* o : Tilt in Q24 */
- const Word32 *sp, /* i : i signal */
- const Word16 exp_sp, /* i : Exp of inp signal */
- const Word16 N /* i : signal length */
+/* o : Tilt in Q24 */
+Word16 ivas_calc_tilt_bwe_fx(
+ const Word32 *sp, /* i : i signal */
+ const Word16 exp_sp, /* i : Exp of inp signal */
+ const Word16 N /* i : signal length */
);
void calc_norm_envelop_fx(
@@ -3108,22 +3224,18 @@ void ScaleShapedWB_fx(
const Word16 *win, /* i : window */
const Word16 *subwin, /* i : subframes window */
const Word16 Q_bwe_exc,
- Word16 L_frame /* i : Frame length - determines whether 12.8 or 16kHz core in-use */
- ,
- Word16 dynQ /* i : indicate whether output is dynamic Q, or Q0 */
- ,
- Word16 *Qx /* o : newly computed Q factor for synSHB */
- ,
- Word16 prev_Qx /* i : prev_Qx for memory scaling */
- ,
+ Word16 L_frame, /* i : Frame length - determines whether 12.8 or 16kHz core in-use */
+ Word16 dynQ, /* i : indicate whether output is dynamic Q, or Q0 */
+ Word16 *Qx, /* o : newly computed Q factor for synSHB */
+ Word16 prev_Qx, /* i : prev_Qx for memory scaling */
Word32 *Hilbert_Mem /* i : Hilbert memory used for computing Qx */
);
void non_linearity_fx(
const Word16 i[], /* i : i signal Q_inp */
- Word32 output[], /* o : output signal 2*Q_inp */
+ Word32 output[], /* o : output signal 2*Q_inp */
const Word16 length, /* i : i length */
- Word32 *prev_scale, /* i/o: memory Q30 */
+ Word32 *prev_scale, /* i/o: memory Q30 */
Word16 Q_inp,
Word16 coder_type, /* i : Coder Type */
Word16 *voice_factors, /* i : Voice Factors */
@@ -3132,9 +3244,9 @@ void non_linearity_fx(
void non_linearity_ivas_fx(
const Word16 i[], /* i : i signal Q_inp */
- Word32 output[], /* o : output signal 2*Q_inp */
+ Word32 output[], /* o : output signal 2*Q_inp */
const Word16 length, /* i : i length */
- Word32 *prev_scale, /* i/o: memory Q30 */
+ Word32 *prev_scale, /* i/o: memory Q30 */
Word16 Q_inp,
Word16 coder_type, /* i : Coder Type */
Word16 *voice_factors, /* i : Voice Factors */
@@ -3143,17 +3255,21 @@ void non_linearity_ivas_fx(
void interp_code_5over2_fx(
const Word16 inp_code[], /* i : i vector */
- Word16 interp_code[], /* o : output vector */
+ Word16 interp_code[], /* o : output vector */
const Word16 inp_length /* i : length of i vector */
);
void interp_code_4over2_fx(
const Word16 inp_code_fx[], /* i : i vector Qx */
- Word16 interp_code_fx[], /* o : output vector Qx */
+ Word16 interp_code_fx[], /* o : output vector Qx */
const Word16 inp_length /* i : length of i vector */
);
-void wb_tbe_extras_reset_synth_fx( Word16 state_lsyn_filt_shb[], Word16 state_lsyn_filt_dwn_shb[], Word16 state_32and48k_WB_upsample[], Word16 state_resamp_HB[] );
+void wb_tbe_extras_reset_synth_fx(
+ Word16 state_lsyn_filt_shb[],
+ Word16 state_lsyn_filt_dwn_shb[],
+ Word16 state_32and48k_WB_upsample[],
+ Word16 state_resamp_HB[] );
void elliptic_bpf_48k_generic_fx(
const Word16 element_mode,
@@ -3219,8 +3335,6 @@ Word16 get_tbe_bits_fx(
const Word16 rf_mode /* i : bandwidht mode */
);
-// pvq_com_fx
-
UWord32 intLimCDivPos_fx(
UWord32 NUM, /* Qx */
Word16 DEN /* Q0 */
@@ -3344,15 +3458,16 @@ void srt_vec_ind16_fx(
Word16 length /* Q0 */
);
-Word16 atan2_fx( /* o: Angle between 0 and PI/2 radian (Q14) */
- const Word32 y, /* i : near side (Argument must be positive) (Q15) */
- const Word32 x /* i : opposite side (Q15) */
+/* o: Angle between 0 and PI/2 radian (Q14) */
+Word16 atan2_fx(
+ const Word32 y, /* i : near side (Argument must be positive) (Q15) */
+ const Word32 x /* i : opposite side (Q15) */
);
-// rang_com_fx.c
-Word16 rc_get_bits2_fx( /* o: Number of bits needed Q0*/
- const Word16 N, /* i: Number of bits currently used Q0*/
- const UWord32 range /* i: Range of range coder Q0*/
+/* o: Number of bits needed Q0*/
+Word16 rc_get_bits2_fx(
+ const Word16 N, /* i: Number of bits currently used Q0*/
+ const UWord32 range /* i: Range of range coder Q0*/
);
void rangeCoderFinalizationFBits_fx(
@@ -3361,10 +3476,8 @@ void rangeCoderFinalizationFBits_fx(
Word16 *FBits /* i : Fractional finalization bits Q0*/
);
-// wi_fx.c
-
-ivas_error DTFS_new_fx( DTFS_STRUCTURE **dtfs_out );
-
+ivas_error DTFS_new_fx(
+ DTFS_STRUCTURE **dtfs_out );
void DTFS_copy_fx(
DTFS_STRUCTURE *Xout_fx, /* o: DTFS structure */
@@ -3385,11 +3498,23 @@ Word16 DTFS_alignment_full_fx(
Word16 *C_fx,
Word16 FR_flag );
-void DTFS_phaseShift_fx( DTFS_STRUCTURE *X_fx, Word16 ph, Word16 Lag, Word16 *S_fx, Word16 *C_fx );
+void DTFS_phaseShift_fx(
+ DTFS_STRUCTURE *X_fx,
+ Word16 ph,
+ Word16 Lag,
+ Word16 *S_fx,
+ Word16 *C_fx );
-void Q2phaseShift_fx( DTFS_STRUCTURE *X_fx, Word16 ph, Word16 Lag, Word16 *S_fx, Word16 *C_fx );
+void Q2phaseShift_fx(
+ DTFS_STRUCTURE *X_fx,
+ Word16 ph,
+ Word16 Lag,
+ Word16 *S_fx,
+ Word16 *C_fx );
-void DTFS_zeroPadd_fx( Word16 N_fx, DTFS_STRUCTURE *X_fx );
+void DTFS_zeroPadd_fx(
+ Word16 N_fx,
+ DTFS_STRUCTURE *X_fx );
void DTFS_to_fs_fx(
const Word16 *x, /* i : time domain signal */
@@ -3407,39 +3532,46 @@ void DTFS_zeroFilter_fx(
Word16 *S_fx,
Word16 *C_fx );
-void DTFS_poleFilter_fx_9( DTFS_STRUCTURE *X_fx, Word16 *pf_temp1, Word16 *pf_temp2, Word16 *pf_temp, Word16 *pf_n2_temp1 );
+void DTFS_poleFilter_fx_9(
+ DTFS_STRUCTURE *X_fx,
+ Word16 *pf_temp1,
+ Word16 *pf_temp2,
+ Word16 *pf_temp,
+ Word16 *pf_n2_temp1 );
void DTFS_adjustLag_fx(
DTFS_STRUCTURE *X_DTFS_FX, /* i/o : DTFS to adjust lag for */
Word16 N_fx /* i : Target lag */
);
-Word32 DTFS_getEngy_fx( DTFS_STRUCTURE *X_fx );
+Word32 DTFS_getEngy_fx(
+ DTFS_STRUCTURE *X_fx );
-Word32 DTFS_getEngy_P2A_fx( DTFS_STRUCTURE *X_fx );
+Word32 DTFS_getEngy_P2A_fx(
+ DTFS_STRUCTURE *X_fx );
void DTFS_car2pol_fx(
DTFS_STRUCTURE *X_fx /* i/o : DTFS structure a, b, lag */
);
Word32 DTFS_setEngyHarm_fx(
- Word16 f1_fx, /* i : lower band freq of i to control energy */
- Word16 f2_fx, /* i : upper band freq of i to control energy */
+ Word16 f1_fx, /* i : lower band freq of i to control energy */
+ Word16 f2_fx, /* i : upper band freq of i to control energy */
Word16 g1_fx, /* i : lower band freq of output to control energy */
Word16 g2_fx, /* i : upper band freq of output to control energy */
Word32 en2_fx, /* i : Target Energy to set the DTFS to */
- Word16 Qen2_fx, /* i : Input Q format for en2 */
- Word16 *Qa_fx, /* i : Output Q format for x->a */
+ Word16 Qen2_fx, /* i : Input Q format for en2 */
+ Word16 *Qa_fx, /* i : Output Q format for x->a */
DTFS_STRUCTURE *X_fx /* i/o: DTFS to adjust the energy of */
);
void DTFS_to_erb_fx(
- const DTFS_STRUCTURE X_fx, /* i : DTFS i */
- Word16 *out_fx /* o : ERB output */
+ const DTFS_STRUCTURE X_fx, /* i : DTFS i */
+ Word16 *out_fx /* o : ERB output */
);
void erb_slot_fx(
- Word16 lag_fx, /* i : i lag */
+ Word16 lag_fx, /* i : i lag */
Word16 *out_fx, /* o : ERB slots */
Word16 *mfreq_fx, /* i : ERB frequencies */
Word16 num_erb_fx /* i : number of ERBs */
@@ -3449,8 +3581,8 @@ void DTFS_erb_inv_fx(
Word16 *in_fx, /* i : ERB inpt */
Word16 *slot_fx, /* i : ERB slots filled based on lag */
Word16 *mfreq_fx, /* i : erb frequence edges */
- DTFS_STRUCTURE *X_fx, /* o : DTFS after erb-inv */
- Word16 num_erb_fx /* i : Number of ERB bands */
+ DTFS_STRUCTURE *X_fx, /* o : DTFS after erb-inv */
+ Word16 num_erb_fx /* i : Number of ERB bands */
);
void erb_add_fx(
@@ -3462,7 +3594,13 @@ void erb_add_fx(
Word16 num_erb_fx /* i : number of ERBs */
);
-void quant_target_fx( DTFS_STRUCTURE *X_fx, const Word16 *curr_lpc, Word16 *w, Word16 *target, Word16 *sin_tab, Word16 *cos_tab );
+void quant_target_fx(
+ DTFS_STRUCTURE *X_fx,
+ const Word16 *curr_lpc,
+ Word16 *w,
+ Word16 *target,
+ Word16 *sin_tab,
+ Word16 *cos_tab );
ivas_error WIsyn_fx(
DTFS_STRUCTURE PREVCW_FX, /* i : Prev frame DTFS */
@@ -3496,19 +3634,53 @@ void DTFS_peaktoaverage_fx(
Word16 *Qneg /* o : negative peak to ave Q format */
);
-void rshiftHarmBand_fx( DTFS_STRUCTURE *X_fx, Word16 lband_fx, Word16 hband_fx, Word16 shift_fx );
+void rshiftHarmBand_fx(
+ DTFS_STRUCTURE *X_fx,
+ Word16 lband_fx,
+ Word16 hband_fx,
+ Word16 shift_fx );
-void GetSinCosTab_fx( Word16 L, Word16 *sinTab, Word16 *cosTab );
+void GetSinCosTab_fx(
+ Word16 L,
+ Word16 *sinTab,
+ Word16 *cosTab );
-void r_fft_4_fx( Word16 *farray_ptr_fx, Word16 size, Word16 stage, Word16 isign );
+void r_fft_4_fx(
+ Word16 *farray_ptr_fx,
+ Word16 size,
+ Word16 stage,
+ Word16 isign );
-void copy_phase_fx( DTFS_STRUCTURE *X1_fx, DTFS_STRUCTURE X2_fx, DTFS_STRUCTURE *retX_fx );
+void copy_phase_fx(
+ DTFS_STRUCTURE *X1_fx,
+ DTFS_STRUCTURE X2_fx,
+ DTFS_STRUCTURE *retX_fx );
-Word32 getSpEngyFromResAmp_fx( DTFS_STRUCTURE *X_fx, Word16 lband, Word16 hband, const Word16 *curr_lpc, Word16 *sin_tab, Word16 *cos_tab );
+Word32 getSpEngyFromResAmp_fx(
+ DTFS_STRUCTURE *X_fx,
+ Word16 lband,
+ Word16 hband,
+ const Word16 *curr_lpc,
+ Word16 *sin_tab,
+ Word16 *cos_tab );
-void DTFS_poleFilter_fx( DTFS_STRUCTURE *X_fx, Word16 *LPC, Word16 N, Word16 *S_fx, Word16 *C_fx );
+void DTFS_poleFilter_fx(
+ DTFS_STRUCTURE *X_fx,
+ Word16 *LPC,
+ Word16 N,
+ Word16 *S_fx,
+ Word16 *C_fx );
-void poleFilter_setup_fx( const Word16 *LPC, Word16 N, DTFS_STRUCTURE X_fx, Word16 *S_fx, Word16 *C_fx, Word16 *pf_temp1, Word16 *pf_temp2, Word16 *pf_temp, Word16 *pf_n2_temp1 );
+void poleFilter_setup_fx(
+ const Word16 *LPC,
+ Word16 N,
+ DTFS_STRUCTURE X_fx,
+ Word16 *S_fx,
+ Word16 *C_fx,
+ Word16 *pf_temp1,
+ Word16 *pf_temp2,
+ Word16 *pf_temp,
+ Word16 *pf_n2_temp1 );
Word32 DTFS_getEngy_band_wb_fx(
DTFS_STRUCTURE X_fx,
@@ -3560,32 +3732,35 @@ void ApplyTnsFilter(
Word32 spectrum[],
const Word8 fIsAnalysis );
-Word16 ITF_Detect_fx( Word32 const pSpectrum[],
- const Word16 startLine,
- const Word16 stopLine,
- const Word16 maxOrder,
- Word16 *A,
- Word16 *Q_A,
- Word16 *predictionGain,
- Word16 *curr_order,
- Word16 Q );
-
-Word16 ITF_Detect_ivas_fx( Word32 const pSpectrum[],
- const Word16 startLine,
- const Word16 stopLine,
- const Word16 maxOrder,
- Word16 *A,
- Word16 *Q_A,
- Word16 *predictionGain,
- Word16 *curr_order,
- Word16 Q );
-
-void ITF_Apply_fx( Word32 spectrum[],
- Word16 startLine,
- Word16 stopLine,
- const Word16 *A,
- Word16 Q_A,
- Word16 curr_order );
+Word16 ITF_Detect_fx(
+ Word32 const pSpectrum[],
+ const Word16 startLine,
+ const Word16 stopLine,
+ const Word16 maxOrder,
+ Word16 *A,
+ Word16 *Q_A,
+ Word16 *predictionGain,
+ Word16 *curr_order,
+ Word16 Q );
+
+Word16 ITF_Detect_ivas_fx(
+ Word32 const pSpectrum[],
+ const Word16 startLine,
+ const Word16 stopLine,
+ const Word16 maxOrder,
+ Word16 *A,
+ Word16 *Q_A,
+ Word16 *predictionGain,
+ Word16 *curr_order,
+ Word16 Q );
+
+void ITF_Apply_fx(
+ Word32 spectrum[],
+ Word16 startLine,
+ Word16 stopLine,
+ const Word16 *A,
+ Word16 Q_A,
+ Word16 curr_order );
void const *GetTnsFilterCoeff( void const *p, const Word16 index, Word16 *pValue );
@@ -3749,10 +3924,6 @@ void nelp_encoder_ivas_fx(
Word16 *qIn1,
Word16 reduce_gains );
-/*========================================================================================================/
-swb_bwe_enc_lr_fx.c
-/========================================================================================================*/
-
void swb_bwe_enc_lr_fx(
Encoder_State *st_fx, /* i/o: encoder state structure */
const Word32 L_m_core[], /* i : lowband synthesis */
@@ -3803,10 +3974,6 @@ void swb_bwe_enc_lr_ivas_fx(
Word16 *ni_seed_fx /* i/o: random seed for search buffer NI */
);
-/*========================================================================================================/
-isf_enc_amr_wb_fx.c
-/========================================================================================================*/
-
void isf_enc_amr_wb_fx(
Encoder_State *st, /* i/o: state structure */
Word16 *isf_new, /* i/o: quantized ISF vector */
@@ -3814,20 +3981,12 @@ void isf_enc_amr_wb_fx(
Word16 *Aq /* o : quantized A(z) for 4 subframes */
);
-/*========================================================================================================/
-detect_transient_fx.c
-/========================================================================================================*/
-
Word16 detect_transient_fx(
const Word16 *in_fx, /*Q_new */
const Word16 L, /*Q0*/
Word16 Q_new,
Encoder_State *st_fx );
-/*========================================================================================================/
-codec_tcx_common.c
-/========================================================================================================*/
-
Word16 tcxGetNoiseFillingTilt(
const Word16 A[],
const Word16 lpcorder,
@@ -3865,7 +4024,6 @@ void tcxInvertWindowGrouping(
const Word16 frame_cnt,
const Word16 bfi );
-// mslvq_com
void permute_fx(
Word16 *pTmp1, /* i/o: vector whose components are to be permuted */
const Word16 *perm /* i : permutation info (indexes that should be interchanged), max two perms */
@@ -3913,15 +4071,12 @@ Word16 deindex_lvq_cng_ivas_fx(
Word16 no_bits /* i: number of bits for lattice */
);
-// lsp_convert_poly_fx.c
Word16 lsp_convert_poly_fx(
Word16 w[], /* i/o: LSP or ISP parameters */
const Word16 L_frame, /* i : flag for up or down conversion */
const Word16 Opt_AMRWB /* i : flag for the AMR-WB IO mode */
);
-
-// cng_exe.c
void CNG_exc_fx(
const Word32 core_brate, /* i : core bitrate */
const Word16 L_frame, /* i : length of the frame */
@@ -3990,30 +4145,29 @@ void cng_params_upd_fx(
);
void cng_params_upd_ivas_fx(
- const Word16 lsp_new[], /* i : LSP aprameters Q15 */
- const Word16 exc2[], /* i : current enhanced excitation Q_exc */
- const Word16 L_frame, /* i : frame length Q0 */
- Word16 *ho_circ_ptr, /* i/o: pointer for CNG averaging buffers Q0 */
- Word32 ho_ener_circ[], /* o : energy buffer for CNG averaging Q6 */
- Word16 *ho_circ_size, /* i/o: size of DTX hangover history buffer for averaging Q0 */
- Word16 ho_lsp_circ[], /* o : old LSP buffer for CNG averaging Q15 */
- const Word16 Q_exc, /* i : Q value of excitation */
- const Word16 enc_dec_flag, /* i : Flag indicating encoder or decoder (ENC,DEC) */
- Word32 ho_env_circ[], /* i/o: Envelope buffer */
- Word16 *cng_buf_cnt, /* i/o: Counter of postponed FFT-processing instances */
- Word16 cng_exc2_buf[], /* i/o: Excitation buffer Q_exc */
- Word16 cng_Qexc_buf[], /* i/o: Q_exc buffer Q0 */
- Word32 cng_brate_buf[], /* i/o: last_active_brate buffer Q0 */
- const Word32 last_active_brate /* i : Last active bit rate Q0 */
- ,
- const Word16 element_mode, /* i : Element mode */
- const Word16 bwidth /* i : Audio bandwidth */
+ const Word16 lsp_new[], /* i : LSP aprameters Q15 */
+ const Word16 exc2[], /* i : current enhanced excitation Q_exc */
+ const Word16 L_frame, /* i : frame length Q0 */
+ Word16 *ho_circ_ptr, /* i/o: pointer for CNG averaging buffers Q0 */
+ Word32 ho_ener_circ[], /* o : energy buffer for CNG averaging Q6 */
+ Word16 *ho_circ_size, /* i/o: size of DTX hangover history buffer for averaging Q0 */
+ Word16 ho_lsp_circ[], /* o : old LSP buffer for CNG averaging Q15 */
+ const Word16 Q_exc, /* i : Q value of excitation */
+ const Word16 enc_dec_flag, /* i : Flag indicating encoder or decoder (ENC,DEC) */
+ Word32 ho_env_circ[], /* i/o: Envelope buffer */
+ Word16 *cng_buf_cnt, /* i/o: Counter of postponed FFT-processing instances */
+ Word16 cng_exc2_buf[], /* i/o: Excitation buffer Q_exc */
+ Word16 cng_Qexc_buf[], /* i/o: Q_exc buffer Q0 */
+ Word32 cng_brate_buf[], /* i/o: last_active_brate buffer Q0 */
+ const Word32 last_active_brate, /* i : Last active bit rate Q0 */
+ const Word16 element_mode, /* i : Element mode */
+ const Word16 bwidth /* i : Audio bandwidth */
);
+
Word16 get_cng_mode(
const Word32 last_active_brate /* i : last active bitrate */
);
-// core_com_config.c
/*! r: codec mode */
Word16 get_codec_mode(
const Word32 total_brate /* i : total bitrate */
@@ -4029,13 +4183,13 @@ Word16 getTcxonly_fx(
const Word16 MCT_flag, /* i : hMCT handle allocated (1) or not (0)*/
const Word16 is_ism_format /* i : flag indicating ISM format */
);
+
Word16 getCtxHm(
const Word16 element_mode, /* i : IVAS element mode */
const Word32 total_brate, /* i : total bitrate */
const Word16 rf_flag /* i : flag to signal the RF mode */
);
-
Word16 getResq(
const Word32 total_brate /* i : total bitrate */
);
@@ -4068,7 +4222,8 @@ Word32 getCoreSamplerateMode2(
const IVAS_FORMAT is_ism_format /* i : flag indicating ISM format */
);
-Word16 getTcxBandwidth( const Word16 bandwidth );
+Word16 getTcxBandwidth(
+ const Word16 bandwidth );
Word16 getIgfPresent_fx(
const Word16 element_mode, /* i : IVAS element mode */
@@ -4096,7 +4251,8 @@ Word16 initPitchLagParameters(
Word16 *pit_fr2,
Word16 *pit_max );
-Word16 getNumTcxCodedLines( const Word16 bwidth );
+Word16 getNumTcxCodedLines(
+ const Word16 bwidth );
Word16 getTcxLpcShapedAri(
const Word32 total_brate, /* i : total bitrate */
@@ -4125,8 +4281,8 @@ void mdct_window_aldo(
Word16 n /* Q0 */
);
-// tcx_utils.c
-Word16 getInvFrameLen( const Word16 L_frame ); /* returns 1/L_frame in Q21 format */
+Word16 getInvFrameLen(
+ const Word16 L_frame ); /* returns 1/L_frame in Q21 format */
void tcx_get_windows(
TCX_CONFIG_HANDLE hTcxCfg, /* i : TCX configuration */
@@ -4232,12 +4388,20 @@ void mdct_noiseShaping_interp(
Word16 gains[],
Word16 gains_exp[] );
-void PsychAdaptLowFreqDeemph( Word32 x[],
- const Word16 lpcGains[],
- const Word16 lpcGains_e[],
- Word16 lf_deemph_factors[] );
+void PsychAdaptLowFreqDeemph(
+ Word32 x[],
+ const Word16 lpcGains[],
+ const Word16 lpcGains_e[],
+ Word16 lf_deemph_factors[] );
-void AdaptLowFreqDeemph( Word32 x[], Word16 x_e, Word16 tcx_lpc_shaped_ari, Word16 lpcGains[], Word16 lpcGains_e[], const Word16 lg, Word16 lf_deemph_factors[] );
+void AdaptLowFreqDeemph(
+ Word32 x[],
+ Word16 x_e,
+ Word16 tcx_lpc_shaped_ari,
+ Word16 lpcGains[],
+ Word16 lpcGains_e[],
+ const Word16 lg,
+ Word16 lf_deemph_factors[] );
void tcx_noise_filling(
Word32 *Q,
@@ -4298,15 +4462,16 @@ void SetTnsConfig(
const Word16 isTCX20,
const Word16 isAfterACELP );
-void tcx_get_gain( Word32 *x, /* i: spectrum 1 */
- Word16 x_e, /* i: spectrum 1 exponent */
- Word32 *y, /* i: spectrum 2 */
- Word16 y_e, /* i: spectrum 2 exponent */
- Word16 n, /* i: length */
- Word16 *gain, /* o: gain */
- Word16 *gain_e, /* o: gain exponent */
- Word32 *en_y, /* o: energy of y (optional) */
- Word16 *en_y_e /* o: energy of y exponent (optional) */
+void tcx_get_gain(
+ Word32 *x, /* i: spectrum 1 */
+ Word16 x_e, /* i: spectrum 1 exponent */
+ Word32 *y, /* i: spectrum 2 */
+ Word16 y_e, /* i: spectrum 2 exponent */
+ Word16 n, /* i: length */
+ Word16 *gain, /* o: gain */
+ Word16 *gain_e, /* o: gain exponent */
+ Word32 *en_y, /* o: energy of y (optional) */
+ Word16 *en_y_e /* o: energy of y exponent (optional) */
);
void init_TCX_config(
@@ -4320,7 +4485,6 @@ void init_TCX_config(
void resetTecDec_Fx(
TEC_DEC_HANDLE hTecDec );
-
void resetTecEnc_Fx(
TEC_ENC_HANDLE hTECEnc,
Word16 flag );
@@ -4371,7 +4535,10 @@ void tecEnc_TBE_fx(
const Word16 *voicing,
const Word16 coder_type );
-void set_TEC_TFA_code_fx( const Word16 corrFlag, Word16 *tec_flag, Word16 *tfa_flag );
+void set_TEC_TFA_code_fx(
+ const Word16 corrFlag,
+ Word16 *tec_flag,
+ Word16 *tfa_flag );
// tcx_mdct_fx.c
void TCX_MDCT(
@@ -4427,8 +4594,8 @@ void TCX_MDXT_Inverse_fx(
#define EDCT_FACTOR_SCALE 2
void edct_fx(
const Word32 *x, /* i : i signal Qq */
- Word32 *y, /* o : output transform Qq */
- Word16 length, /* i : length */
+ Word32 *y, /* o : output transform Qq */
+ Word16 length, /* i : length */
Word16 *q /* i : Q value of i signal */
);
@@ -4441,23 +4608,23 @@ void edct_ivas_fx(
void edst_fx(
const Word32 *x, /* i : i signal Qq */
- Word32 *y, /* o : output transform Qq */
- Word16 length, /* i : length */
+ Word32 *y, /* o : output transform Qq */
+ Word16 length, /* i : length */
Word16 *q /* i : Q value of i signal */
);
void edct_16fx(
const Word16 *x, /* i : i signal Qx */
Word16 *y, /* o : output transform Qx */
- Word16 length, /* i : length */
- Word16 bh, /* bit-headroom */
+ Word16 length, /* i : length */
+ Word16 bh, /* bit-headroom */
const Word16 element_mode );
void iedct_short_fx(
const Word32 *in, /* i : i vector */
Word16 *Q, /* i/o: Q value of i */
- Word32 *out, /* o : output vector */
- const Word16 segment_length /* i : length */
+ Word32 *out, /* o : output vector */
+ const Word16 segment_length /* i : length */
);
void edxt_fx(
@@ -4639,28 +4806,32 @@ void cldfbSynthesis_fx(
Word32 *pWorkBuffer /*!< pointer to temporal working buffer */
);
-void configureCldfb( HANDLE_CLDFB_FILTER_BANK h_cldfb, /*!< CLDFB Handle */
- const Word16 no_channels, /*!< Number of critically sampled bands */
- const Word16 frameSize /*!< FrameSize */
+void configureCldfb(
+ HANDLE_CLDFB_FILTER_BANK h_cldfb, /*!< CLDFB Handle */
+ const Word16 no_channels, /*!< Number of critically sampled bands */
+ const Word16 frameSize /*!< FrameSize */
);
-ivas_error openCldfb( HANDLE_CLDFB_FILTER_BANK *h_cldfb, /*!< CLDFB Handle */
- const Word16 type, /*!< analysis or synthesis */
- const Word16 maxCldfbBands, /*!< number of cldfb bands */
- const Word16 frameSize /*!< FrameSize */
+ivas_error openCldfb(
+ HANDLE_CLDFB_FILTER_BANK *h_cldfb, /*!< CLDFB Handle */
+ const Word16 type, /*!< analysis or synthesis */
+ const Word16 maxCldfbBands, /*!< number of cldfb bands */
+ const Word16 frameSize /*!< FrameSize */
);
+
void resampleCldfb(
HANDLE_CLDFB_FILTER_BANK hs, /*!< CLDFB Handle */
const Word16 newCldfbBands, /*!< number of cldfb bands */
const Word16 frameSize, /*!< FrameSize */
const Word8 firstFrame );
-Word16
-AnalysisPostSpectrumScaling_Fx( HANDLE_CLDFB_FILTER_BANK cldfbBank,
- Word32 **rSubband32,
- Word32 **iSubband32,
- Word16 **rSubband16,
- Word16 **iSubband16,
- Word16 *cldfbScale );
+
+Word16 AnalysisPostSpectrumScaling_Fx(
+ HANDLE_CLDFB_FILTER_BANK cldfbBank,
+ Word32 **rSubband32,
+ Word32 **iSubband32,
+ Word16 **rSubband16,
+ Word16 **iSubband16,
+ Word16 *cldfbScale );
void analysisCldfbEncoder_fx(
Encoder_State *st_fx, /* i/o: encoder state structure */
@@ -4673,30 +4844,36 @@ void analysisCldfbEncoder_fx(
Word16 *enerBuffSum_exp,
CLDFB_SCALE_FACTOR *scale );
-void GetEnergyCldfb( Word32 *energyLookahead, /*!< o: Q31 | pointer to the result in the core look-ahead slot */
- Word16 *sf_energyLookahead, /*!< o: pointer to the scalefactor of the result in the core look-ahead slot - apply as negative exponent*/
- const Word16 numLookahead, /*!< i: Q0 the number of look-ahead time-slots */
- Word16 **realValues, /*!< i: Q15 | the real part of the CLDFB subsamples */
- Word16 **imagValues, /*!< i: Q15 | the imaginary part of the CLDFB subsamples */
- Word16 sf_Values, /*!< i: scalefactor of the CLDFB subcamples - apply as a negated Exponent */
- Word16 numberBands, /*!< i: Q0 | number of CLDFB bands */
- Word16 numberCols, /*!< i: Q0 | number of CLDFB subsamples */
- Word32 *energyHF, /*!< o: Q31 | pointer to HF energy */
- Word16 *energyHF_Exp, /*!< o: pointer to exponent of HF energy */
- Word32 *energyValuesSum, /*!< o: Q31 | pointer to sum array of energy values, not initialized*/
- Word16 *energyValuesSum_Exp, /*!< o: pointer to exponents of energyValuesSum, not initialized */
- TEC_ENC_HANDLE hTECEnc );
-
-Word16
-CLDFB_getNumChannels( Word32 sampleRate );
-
-void deleteCldfb( HANDLE_CLDFB_FILTER_BANK *h_cldfb ); /*!< CLDFB Handle */
-
-ivas_error cldfb_save_memory( HANDLE_CLDFB_FILTER_BANK hs ); /* i/o: cldfb handle */
-void cldfb_restore_memory( HANDLE_CLDFB_FILTER_BANK hs ); /* i/o: cldfb handle */
-void cldfb_reset_memory( HANDLE_CLDFB_FILTER_BANK hs ); /* i/o: cldfb handle */
-
-// bits_alloc.c from IVAS
+void GetEnergyCldfb(
+ Word32 *energyLookahead, /*!< o: Q31 | pointer to the result in the core look-ahead slot */
+ Word16 *sf_energyLookahead, /*!< o: pointer to the scalefactor of the result in the core look-ahead slot - apply as negative exponent*/
+ const Word16 numLookahead, /*!< i: Q0 the number of look-ahead time-slots */
+ Word16 **realValues, /*!< i: Q15 | the real part of the CLDFB subsamples */
+ Word16 **imagValues, /*!< i: Q15 | the imaginary part of the CLDFB subsamples */
+ Word16 sf_Values, /*!< i: scalefactor of the CLDFB subcamples - apply as a negated Exponent */
+ Word16 numberBands, /*!< i: Q0 | number of CLDFB bands */
+ Word16 numberCols, /*!< i: Q0 | number of CLDFB subsamples */
+ Word32 *energyHF, /*!< o: Q31 | pointer to HF energy */
+ Word16 *energyHF_Exp, /*!< o: pointer to exponent of HF energy */
+ Word32 *energyValuesSum, /*!< o: Q31 | pointer to sum array of energy values, not initialized*/
+ Word16 *energyValuesSum_Exp, /*!< o: pointer to exponents of energyValuesSum, not initialized */
+ TEC_ENC_HANDLE hTECEnc );
+
+Word16 CLDFB_getNumChannels(
+ Word32 sampleRate );
+
+void deleteCldfb(
+ HANDLE_CLDFB_FILTER_BANK *h_cldfb ); /*!< CLDFB Handle */
+
+ivas_error cldfb_save_memory(
+ HANDLE_CLDFB_FILTER_BANK hs ); /* i/o: cldfb handle */
+
+void cldfb_restore_memory(
+ HANDLE_CLDFB_FILTER_BANK hs ); /* i/o: cldfb handle */
+
+void cldfb_reset_memory(
+ HANDLE_CLDFB_FILTER_BANK hs ); /* i/o: cldfb handle */
+
void BITS_ALLOC_init_config_acelp(
const Word32 bit_rate,
const Word16 narrowBand,
@@ -4720,7 +4897,7 @@ Word16 set_ACELP_flag(
const Word16 bwidth, /* i : audio bandwidth */
const Word16 cng_type /* i : CNG type */
);
-// syn_128_fx.c
+
void syn_12k8_fx(
Word16 L_frame,
const Word16 *Aq, /* i : LP filter coefficients Q12 */
@@ -4732,14 +4909,15 @@ void syn_12k8_fx(
const Word16 Q_exc, /* i : Excitation scaling Q0 */
const Word16 Q_syn /* i : Synthesis scaling Q0 */
);
-// est_tilt_fx.c
-Word16 est_tilt_fx( /* o : tilt of the code Q15 */
- const Word16 *exc, /* i : adaptive excitation vector Qx */
- const Word16 gain_pit, /* i : adaptive gain Q14 */
- const Word16 *code, /* i : algebraic exctitation vector Q9 */
- const Word32 gain_code, /* i : algebraic code gain Q16 */
- Word16 *voice_fac, /* o : voicing factor Q15 */
- const Word16 Q_exc /* i : Scaling factor of excitation Q0 */
+
+/* o : tilt of the code Q15 */
+Word16 est_tilt_fx(
+ const Word16 *exc, /* i : adaptive excitation vector Qx */
+ const Word16 gain_pit, /* i : adaptive gain Q14 */
+ const Word16 *code, /* i : algebraic exctitation vector Q9 */
+ const Word32 gain_code, /* i : algebraic code gain Q16 */
+ Word16 *voice_fac, /* o : voicing factor Q15 */
+ const Word16 Q_exc /* i : Scaling factor of excitation Q0 */
);
/* o : tilt of the code Q15 */
@@ -4754,26 +4932,28 @@ Word16 est_tilt_ivas_fx(
const Word16 flag_tilt /* i : flag for special tilt */
);
-Word16 Est_tilt2( /* o : tilt of the code */
- const Word16 *exc, /* i : adaptive excitation vector Qx */
- const Word16 gain_pit, /* i : adaptive gain Q14 */
- const Word16 *code, /* i : algebraic exctitation vector Q9 */
- const Word32 gain_code, /* i : algebraic code gain Q16 */
- Word16 *voice_fac, /* o : voicing factor Q15 */
- const Word16 Q_exc /* i : Scaling factor of excitation Q0 */
+/* o : tilt of the code */
+Word16 Est_tilt2(
+ const Word16 *exc, /* i : adaptive excitation vector Qx */
+ const Word16 gain_pit, /* i : adaptive gain Q14 */
+ const Word16 *code, /* i : algebraic exctitation vector Q9 */
+ const Word32 gain_code, /* i : algebraic code gain Q16 */
+ Word16 *voice_fac, /* o : voicing factor Q15 */
+ const Word16 Q_exc /* i : Scaling factor of excitation Q0 */
);
-void E_UTIL_voice_factor( Word16 *exc, /* i : pointer to the excitation frame Q_new */
- Word16 i_subfr, /* i : subframe index */
- Word16 *code, /* i : innovative codebook Q9 */
- Word16 gain_pit, /* i : adaptive codebook gain 1Q14 */
- Word32 gain_code, /* i : innovative cb. gain 15Q16 */
- Word16 *voice_fac, /* o : subframe voicing estimation Q15 */
- Word16 *tilt_code, /* o : tilt factor Q15 */
- Word16 L_subfr, /* i : subframe length */
- Word16 flag_tilt, /* i : Flag for triggering new voice factor tilt*/
- Word16 Q_new, /* i : excitation buffer format */
- Word16 shift /* i : scaling to get 12bit */
+void E_UTIL_voice_factor(
+ Word16 *exc, /* i : pointer to the excitation frame Q_new */
+ Word16 i_subfr, /* i : subframe index */
+ Word16 *code, /* i : innovative codebook Q9 */
+ Word16 gain_pit, /* i : adaptive codebook gain 1Q14 */
+ Word32 gain_code, /* i : innovative cb. gain 15Q16 */
+ Word16 *voice_fac, /* o : subframe voicing estimation Q15 */
+ Word16 *tilt_code, /* o : tilt factor Q15 */
+ Word16 L_subfr, /* i : subframe length */
+ Word16 flag_tilt, /* i : Flag for triggering new voice factor tilt*/
+ Word16 Q_new, /* i : excitation buffer format */
+ Word16 shift /* i : scaling to get 12bit */
);
// window_ola_fx.c
@@ -4819,7 +4999,6 @@ void window_ola_ext_fx(
const UWord16 kernel_type /* i : transform kernel type */
);
-// cb_shape_fx.c
void cb_shape_fx(
const Word16 preemphFlag, /* i : flag for pre-emphasis */
const Word16 pitchFlag, /* i : flag for pitch sharpening */
@@ -4836,7 +5015,6 @@ void cb_shape_fx(
const Word16 L_subfr /* i : subframe lenght */
);
-// longarith.c
void longadd(
UWord16 a[], /* i/o: vector of the length lena */
const UWord16 b[], /* i/o: vector of the length lenb */
@@ -4864,7 +5042,6 @@ void longshr(
Word16 bits,
Word16 len );
-// gs_bitallocation.c
void bands_and_bit_alloc_fx(
const Word16 cor_strong_limit, /* i : HF correlation */
const Word16 noise_lev, /* i : dwn scaling factor */
@@ -4887,7 +5064,6 @@ void bands_and_bit_alloc_fx(
const Word16 GSC_IVAS_mode /* i : GSC IVAS mode */
);
-// low_rate_band_att_fx.c
void fine_gain_pred_fx(
const Word16 *sfm_start, /* i : Sub band start indices */
const Word16 *sfm_end, /* i : Sub band end indices */
@@ -4921,6 +5097,7 @@ void get_max_pulses_fx(
Word16 *inp_vector, /* i/o: Encoded shape vectors (int)Q0*/
Word16 *maxpulse /* o : Maximum pulse height per band Q0*/
);
+
void fine_gain_dec_fx(
Decoder_State *st,
const Word16 *ord, /* i : Indices for energy order */
@@ -4929,17 +5106,16 @@ void fine_gain_dec_fx(
Word16 *fg_pred /* i/o: Predicted gains / Corrected gains Q12*/
);
-// fine_gain_bits_fx.c
-Word16 assign_gain_bits_fx( /* o : Number of assigned gain bits */
- const Word16 core, /* i : HQ core */
- const Word16 BANDS, /* i : Number of bands */
- const Word16 *band_width, /* i : Sub band bandwidth */
- Word16 *Rk, /* i/o: Bit allocation/Adjusted bit alloc. Q3 */
- Word16 *gain_bits_array, /* o : Assigned gain bits */
- Word16 *Rcalc /* o : Bit budget for shape quantizer Q3 */
+/* o : Number of assigned gain bits */
+Word16 assign_gain_bits_fx(
+ const Word16 core, /* i : HQ core */
+ const Word16 BANDS, /* i : Number of bands */
+ const Word16 *band_width, /* i : Sub band bandwidth */
+ Word16 *Rk, /* i/o: Bit allocation/Adjusted bit alloc. Q3 */
+ Word16 *gain_bits_array, /* o : Assigned gain bits */
+ Word16 *Rcalc /* o : Bit budget for shape quantizer Q3 */
);
-// gs_noisefill.c
void freq_dnw_scaling_fx(
const Word16 cor_strong_limit, /* i : HF correlation */
const Word16 coder_type, /* i : coder type */
@@ -5014,7 +5190,6 @@ void highband_exc_dct_in_ivas_fx(
const Word16 GSC_IVAS_mode /* i : GSC IVAS mode */
);
-// lsf_dec_bfi_fx.c
void lsf_dec_bfi(
const Word16 codec_mode, /* i: : codec mode: MODE1 | MODE2 */
Word16 *lsf, /*!< o : 14Q1*1.28 quantized ISFs */
@@ -5038,18 +5213,22 @@ void lsf_dec_bfi(
const short bwidth /* i: coded bandwidth */
);
-Word16 const *PlcGetLsfBase( Word16 const lpcQuantization,
- Word16 const narrowBand,
- Word32 const sr_core );
+Word16 const *PlcGetLsfBase(
+ Word16 const lpcQuantization,
+ Word16 const narrowBand,
+ Word32 const sr_core );
-// fd_cng_com.c
/* Create an instance of type FD_CNG */
-ivas_error createFdCngCom_fx( HANDLE_FD_CNG_COM *hFdCngCom );
+ivas_error createFdCngCom_fx(
+ HANDLE_FD_CNG_COM *hFdCngCom );
-void initFdCngCom( HANDLE_FD_CNG_COM hFdCngCom, Word16 scale );
+void initFdCngCom(
+ HANDLE_FD_CNG_COM hFdCngCom,
+ Word16 scale );
/* Delete the instance of type FD_CNG */
-void deleteFdCngCom_fx( HANDLE_FD_CNG_COM *hFdCngCom );
+void deleteFdCngCom_fx(
+ HANDLE_FD_CNG_COM *hFdCngCom );
/* Initialize the spectral partitioning */
void initPartitions(
@@ -5092,27 +5271,28 @@ void expand_range_var_exp(
Word16 *out_exp,
const Word16 len );
-void minimum_statistics( Word16 len, /* i : Total number of partitions (CLDFB or FFT) */
- Word16 lenFFT, /* i : Number of FFT partitions */
- Word16 *psize, /* i : Partition sizes, fractional */
- Word16 *msPeriodog, /* i : Periodogram (energies) */
- Word16 *msNoiseFloor, /* i/o: Noise floors (energies) */
- Word16 *msNoiseEst, /* i/o: Noise estimates (energies) */
- Word32 *msAlpha, /* i/o: Forgetting factors */
- Word16 *msPsd, /* i/o: Power Spectral Density (smoothed periodogram => energies) */
- Word16 *msPsdFirstMoment, /* i/o: PSD statistics of 1st order (energy means) */
- Word32 *msPsdSecondMoment, /* i/o: PSD statistics of 2nd order (energy variances) */
- Word32 *msMinBuf, /* i/o: Buffer of minima (energies) */
- Word32 *msBminWin, /* o : Bias correction factors */
- Word32 *msBminSubWin, /* o : Bias correction factors */
- Word32 *msCurrentMin, /* i/o: Local minima (energies) */
- Word32 *msCurrentMinOut, /* i/o: Local minima (energies) */
- Word32 *msCurrentMinSubWindow, /* i/o: Local minima (energies) */
- Word16 *msLocalMinFlag, /* i : Binary flag */
- Word16 *msNewMinFlag, /* i : Binary flag */
- Word16 *msPeriodogBuf, /* i/o: Buffer of periodograms (energies) */
- Word16 *msPeriodogBufPtr, /* i/o: Counter */
- HANDLE_FD_CNG_COM st /* i/o: FD_CNG structure containing buffers and variables */
+void minimum_statistics(
+ Word16 len, /* i : Total number of partitions (CLDFB or FFT) */
+ Word16 lenFFT, /* i : Number of FFT partitions */
+ Word16 *psize, /* i : Partition sizes, fractional */
+ Word16 *msPeriodog, /* i : Periodogram (energies) */
+ Word16 *msNoiseFloor, /* i/o: Noise floors (energies) */
+ Word16 *msNoiseEst, /* i/o: Noise estimates (energies) */
+ Word32 *msAlpha, /* i/o: Forgetting factors */
+ Word16 *msPsd, /* i/o: Power Spectral Density (smoothed periodogram => energies) */
+ Word16 *msPsdFirstMoment, /* i/o: PSD statistics of 1st order (energy means) */
+ Word32 *msPsdSecondMoment, /* i/o: PSD statistics of 2nd order (energy variances) */
+ Word32 *msMinBuf, /* i/o: Buffer of minima (energies) */
+ Word32 *msBminWin, /* o : Bias correction factors */
+ Word32 *msBminSubWin, /* o : Bias correction factors */
+ Word32 *msCurrentMin, /* i/o: Local minima (energies) */
+ Word32 *msCurrentMinOut, /* i/o: Local minima (energies) */
+ Word32 *msCurrentMinSubWindow, /* i/o: Local minima (energies) */
+ Word16 *msLocalMinFlag, /* i : Binary flag */
+ Word16 *msNewMinFlag, /* i : Binary flag */
+ Word16 *msPeriodogBuf, /* i/o: Buffer of periodograms (energies) */
+ Word16 *msPeriodogBufPtr, /* i/o: Counter */
+ HANDLE_FD_CNG_COM st /* i/o: FD_CNG structure containing buffers and variables */
);
void minimum_statistics_fx(
@@ -5260,9 +5440,12 @@ void ivas_updt_dec_common_fx(
);
/* Random generator with Gaussian distribution with mean 0 and std 1 */
-Word32 rand_gauss( Word16 *seed );
+Word32 rand_gauss(
+ Word16 *seed );
-Word16 rand_gauss_fix( Word16 *x, Word16 *seed );
+Word16 rand_gauss_fix(
+ Word16 *x,
+ Word16 *seed );
void lpc_from_spectrum(
HANDLE_FD_CNG_COM hFdCngCom,
@@ -5295,7 +5478,6 @@ void FdCng_exc(
Word16 *bwe_exc /* o: LP excitation for BWE */
);
-// trans_direct
void direct_transform_fx(
const Word32 in32_fx[],
Word32 out32_fx[],
@@ -5304,7 +5486,6 @@ void direct_transform_fx(
Word16 *Q,
const Word16 element_mode );
-// trans_inv_fx.c
void preecho_sb_fx(
const Word32 brate, /* i Q0 : core bit-rate */
Word32 *wtda_audio_fx, /* i q_sig32 : imdct signal */
@@ -5333,7 +5514,6 @@ void Inverse_Transform(
const Word16 element_mode /* i : IVAS element mode */
);
-// recovernorm
void recovernorm_fx(
const Word16 *idxbuf, /* i : reordered quantization indices Q0*/
Word16 *ynrm, /* o : recovered quantization indices Q0*/
@@ -5341,7 +5521,6 @@ void recovernorm_fx(
const Word16 nb_sfm /* i : number of SFMs Q0*/
);
-// tcq_poition_qeith.c
Word32 ar_div( Word32 num, Word32 denum );
void ar_encoder_start_fx( PARCODEC arInst, TCQ_PBITSTREAM bsInst, const Word32 max_bits );
@@ -5398,11 +5577,17 @@ void decode_magnitude_usq_fx( ARCODEC *pardec, Word16 size, Word16 npulses, Word
void decode_mangitude_tcq_fx( ARCODEC *pardec, Word16 size, Word16 npulses, Word16 nzpos, Word16 *positions, Word16 *out, Word32 *surplus_fx );
void decode_signs_fx( ARCODEC *pardec, Word16 size, Word16 *out );
-Word16 GetScale_fx( Word16 blen, Word32 bits_fx, Word32 *surplus_fx );
+Word16 GetScale_fx(
+ Word16 blen,
+ Word32 bits_fx,
+ Word32 *surplus_fx );
-void srt_vec_ind_fx( const Word32 *linear, Word32 *srt, Word16 *I, Word16 length );
+void srt_vec_ind_fx(
+ const Word32 *linear,
+ Word32 *srt,
+ Word16 *I,
+ Word16 length );
-// fill_spectrum
void fill_spectrum_fx(
Word16 *coeff, /* i/o: normalized MLT spectrum / nf spectrum Q12 */
Word32 *L_coeff_out, /* i/o: Noisefilled MLT spectrum Q12 */
@@ -5442,7 +5627,6 @@ void fill_spectrum_fx(
const Word16 num_env_bands,
const Word16 element_mode );
-// hq_bit_allocation_fx.c"
void hq_bit_allocation_fx(
const Word32 core_brate, /* i : Core bit-rate Q0 */
const Word16 length, /* i : Frame length Q0 */
@@ -5459,14 +5643,12 @@ void hq_bit_allocation_fx(
const Word16 num_env_bands /* i : Number sub bands to be encoded for HQ_SWB_BWE Q0 */
);
-// weight_fx.c
void map_quant_weight_fx(
const Word16 normqlg2[], /* i : quantized norms Q0*/
Word16 wnorm[], /* o : weighted norm Q0*/
const Word16 is_transient /* i : transient flag Q0*/
);
-// bitalloc_fx.c
void bitalloc_fx(
Word16 *y, /* i : reordered norm of sub-vectors Q0 */
Word16 *idx, /* i : reordered sub-vector indices Q0 */
@@ -5477,6 +5659,7 @@ void bitalloc_fx(
const Word16 *sfmsize, /* i : band length Q0 */
const Word16 hqswb_clas /* i : signal classification flag Q0 */
);
+
Word16 BitAllocF_fx(
Word16 *y, /* i : norm of sub-vectors :Q0 */
Word32 bit_rate, /* i : bitrate :Q0 */
@@ -5487,14 +5670,15 @@ Word16 BitAllocF_fx(
const Word16 hqswb_clas, /* i : hq swb class */
const Word16 num_env_bands /* i : Number sub bands to be encoded for HQ_SWB_BWE */
);
-Word16 BitAllocWB_fx( /* o : t Q0*/
- Word16 *y, /* i : norm of sub-vectors Q0*/
- Word16 B, /* i : number of available bits Q0*/
- Word16 N, /* i : number of sub-vectors Q0*/
- Word16 *R, /* o : bit-allocation indicator Q0*/
- Word16 *Rsubband_fx /* o : sub-band bit-allocation vector Q3*/
+
+Word16 BitAllocWB_fx(
+ Word16 *y, /* i : norm of sub-vectors Q0*/
+ Word16 B, /* i : number of available bits Q0*/
+ Word16 N, /* i : number of sub-vectors Q0*/
+ Word16 *R, /* o : bit-allocation indicator Q0*/
+ Word16 *Rsubband_fx /* o : sub-band bit-allocation vector Q3*/
);
-// bitallocsum_fx.c
+
void bitallocsum_fx(
Word16 *R, /* i : bit-allocation vector Q0 */
const Word16 nb_sfm, /* i : number of sub-vectors Q0 */
@@ -5505,8 +5689,6 @@ void bitallocsum_fx(
const Word16 *sfmsize /* i : band length Q0 */
);
-
-// stab_est_fx.c
Word16 stab_est_fx(
Word16 etot, /* i : Total energy of the current frame Q8*/
Word16 *lt_diff_etot, /* i/o : Long term total energy variation Q8*/
@@ -5518,7 +5700,6 @@ Word16 stab_est_fx(
const Word16 vad_flag /* i : VAD flag */
);
-// enhancer_fx.c
void enhancer_fx(
const Word32 core_brate, /* i : decoder bitrate */
const Word16 Opt_AMR_WB, /* i : flag indicating AMR-WB IO mode */
@@ -5575,8 +5756,6 @@ Word16 E_UTIL_enhancer(
Word16 L_frame, /* i : frame size */
Word16 Q_new );
-
-// phase_dispersion_fx.c
void phase_dispersion(
const Word32 gain_code, /* i : gain of code 15Q16 */
const Word16 gain_pit, /* i : gain of pitch Q14 */
@@ -5589,7 +5768,6 @@ void phase_dispersion(
Word16 L_subfr /* i : subframe length [40,64] */
);
-// tcx_ltp_fx.c
void tcx_ltp_get_lpc(
Word16 *x, /* Qx */
const Word16 L, /* Q0 */
@@ -5660,10 +5838,10 @@ void Inac_switch_ematch_fx(
const Word16 element_mode /* i : element mode */
);
-// igf_base_fx.c
-Word16 IGF_ApplyTransFac( /**< out: Q0 | multiplication factor */
- const Word16 val, /**< in: Q15 | input value for multiplication, Q15 */
- const Word16 transFac /**< in: Q14 | multiplicator for variable val, Q14: 1.25f=0x5000, 1.0f=0x4000, 0.5f=0x2000 */
+/**< out: Q0 | multiplication factor */
+Word16 IGF_ApplyTransFac(
+ const Word16 val, /**< in: Q15 | input value for multiplication, Q15 */
+ const Word16 transFac /**< in: Q14 | multiplicator for variable val, Q14: 1.25f=0x5000, 1.0f=0x4000, 0.5f=0x2000 */
);
Word16 IGF_MapBitRateToIndex(
@@ -5673,22 +5851,24 @@ Word16 IGF_MapBitRateToIndex(
const Word16 rf_mode /* i : flag to signal the RF mode */
);
-void IGFCommonFuncsCalcSfbEnergyPowerSpec( const Word16 startSfb, /**< in: Q0 | start sfb index */
- const Word16 stopSfb, /**< in: Q0 | stop sfb index */
- const Word16 *swb_offset, /**< in: Q0 | IGF swb offset table */
- Word32 *pPowerSpectrum, /**< in: Q31 | power spectrum */
- Word16 *pPowerSpectrum_exp, /**< in: | Exponent of PowerSpectrum */
- Word32 *sfbEnergy, /**< out:Q31 | SFB energies , will be initialized inside this function */
- Word16 *sfbEnergy_exp /**< out: | Exponent of PowerSpectrum */
+void IGFCommonFuncsCalcSfbEnergyPowerSpec(
+ const Word16 startSfb, /**< in: Q0 | start sfb index */
+ const Word16 stopSfb, /**< in: Q0 | stop sfb index */
+ const Word16 *swb_offset, /**< in: Q0 | IGF swb offset table */
+ Word32 *pPowerSpectrum, /**< in: Q31 | power spectrum */
+ Word16 *pPowerSpectrum_exp, /**< in: | Exponent of PowerSpectrum */
+ Word32 *sfbEnergy, /**< out:Q31 | SFB energies , will be initialized inside this function */
+ Word16 *sfbEnergy_exp /**< out: | Exponent of PowerSpectrum */
);
-void IGFCommonFuncsMDCTSquareSpec( const Word16 sqrtBgn, /**< in: Q0 | start MDCT subband index */
- const Word16 sqrtEnd, /**< in: Q0 | stop MDCT subband index */
- const Word32 *mdctSpec, /**< in: | MDCT spectrum to square */
- const Word16 mdctSpec_e, /**< in: | exponent of mdctSpectrum */
- Word32 *mdctSquareSpec, /**< out: | MDCT square spectrum */
- Word16 *mdctSquareSpec_e, /**< out: | exponent of mdctSquareSpec */
- Word16 indexOffset /**< in: Q0 | index offset */
+void IGFCommonFuncsMDCTSquareSpec(
+ const Word16 sqrtBgn, /**< in: Q0 | start MDCT subband index */
+ const Word16 sqrtEnd, /**< in: Q0 | stop MDCT subband index */
+ const Word32 *mdctSpec, /**< in: | MDCT spectrum to square */
+ const Word16 mdctSpec_e, /**< in: | exponent of mdctSpectrum */
+ Word32 *mdctSquareSpec, /**< out: | MDCT square spectrum */
+ Word16 *mdctSquareSpec_e, /**< out: | exponent of mdctSquareSpec */
+ Word16 indexOffset /**< in: Q0 | index offset */
);
void IGFCommonFuncsMDCTSquareSpec_ivas(
@@ -5701,12 +5881,6 @@ void IGFCommonFuncsMDCTSquareSpec_ivas(
Word16 indexOffset /**< in: Q0 | index offset */
);
-void IGFCommonFuncsWriteSerialBit(
- BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
- Word16 *pBitOffset, /**< out: Q0 | bit offset */
- Word16 bit /**< in: Q0 | value of bit */
-);
-
Word16 IGFCommonFuncsIGFConfiguration(
const Word32 total_brate, /* i : bitrate in bs e.g. 9600 for 9.6kbs */
const Word16 bwidth, /* i : audio bandwidth */
@@ -5738,22 +5912,31 @@ Word16 IGFCommonFuncsIGFGetCFTables_fx(
const UWord16 **cf_se11, /* o : CF tables for t == 1 and f >= 1 */
const Word16 **cf_off_se11 /* o : offsets for CF tables above */
);
-// ari_fx.c
-Word32 L_multi31x16_X2( Word16 xh, Word16 xl, Word16 y );
+
+Word32 L_multi31x16_X2(
+ Word16 xh,
+ Word16 xl,
+ Word16 y );
+
Word32 mul_sbc_14bits(
Word32 r, /* Q0 */
Word16 c /* Q0 */
);
-// window.c
-void ham_cos_window( Word16 *fh, const Word16 n1, const Word16 n2 );
+void ham_cos_window(
+ Word16 *fh,
+ const Word16 n1,
+ const Word16 n2 );
-void ham_cos_window_ivas( Word16 *fh, const Word16 n1, const Word16 n2 );
+void ham_cos_window_ivas(
+ Word16 *fh,
+ const Word16 n1,
+ const Word16 n2 );
-// arith_coder_fx.c
-Word32 expfp( /* o: Q31 */
- const Word16 x, /* i: mantissa Q-e */
- const Word16 x_e ); /* i: exponent Q0 */
+/* o: Q31 */
+Word32 expfp(
+ const Word16 x, /* i: mantissa Q-e */
+ const Word16 x_e ); /* i: exponent Q0 */
void powfp_odd2(
const Word16 base, /* Q15 */
@@ -5782,21 +5965,23 @@ void tcx_arith_render_envelope(
);
-// gain_inov_fx.c
-Word32 calc_gain_inov( /* returns innovation gain Q16 */
- const Word16 *code, /* i : algebraic excitation Q9 */
- const Word16 lcode, /* i : Subframe size Q0 */
- Word32 *dotp, /* o : intermediate result Q31-e */
- Word16 *dotp_e /* o : intermediate result exponent Q0 */
+/* returns innovation gain Q16 */
+Word32 calc_gain_inov(
+ const Word16 *code, /* i : algebraic excitation Q9 */
+ const Word16 lcode, /* i : Subframe size Q0 */
+ Word32 *dotp, /* o : intermediate result Q31-e */
+ Word16 *dotp_e /* o : intermediate result exponent Q0 */
);
+
///////////////////////////////////
/* Lib_dec */
//////////////////////////////////
-// swb_tbe_dec.c
+
void ResetSHBbuffer_Dec_fx(
TD_BWE_DEC_HANDLE hBWE_TD, /* i/o: TD BWE data handle */
const Word16 extl /* i : BWE extension layer */
);
+
void wb_tbe_dec_fx(
Decoder_State *st_fx, /* i/o: decoder state structure */
const Word16 coder_type, /* i : coding type */
@@ -5922,6 +6107,7 @@ void v_multc_fixed(
Word32 y[], /* o : Output vector that contains c*x */
const Word16 N /* i : Vector length */
);
+
void v_multc_fixed_16(
const Word32 x[], /* i : Input vector */
const Word16 c, /* i : Constant */
@@ -6046,8 +6232,7 @@ void lsf_end_dec_fx(
Word16 *qlsf, /* o : quantized LSFs in the cosine domain Qx2.56*/
Word16 *lpc_param, /* i : LPC parameters Q0*/
Word16 *LSF_Q_prediction, /* o : LSF prediction mode Q0*/
- Word16 *nb_indices /* o : number of indices Q0*/
- ,
+ Word16 *nb_indices, /* o : number of indices Q0*/
const Word16 tdm_lsfQ_PCh[M] /* i : Q LSFs for primary channel Qx*/
);
@@ -6088,7 +6273,6 @@ void td_cng_dec_init_fx(
DEC_CORE_HANDLE st /* i/o: decoder state structure */
);
-// wavadjust_fec_dec_fx.c
void set_state(
Word16 *state,
Word16 num,
@@ -6286,7 +6470,6 @@ ivas_error PsychoacousticParameters_Init(
const Word16 isWarped, /* i : Flag indicating if the scale is linear or warped */
PsychoacousticParameters *pPsychParams );
-// TonalIMDCTconcealment_fx.c
ivas_error TonalMDCTConceal_Init(
TonalMDCTConcealPtr self,
const Word16 nSamples,
@@ -6294,6 +6477,7 @@ ivas_error TonalMDCTConceal_Init(
const Word16 nScaleFactors,
TCX_CONFIG_HANDLE hTcxCfg /* TCX config */
);
+
ivas_error TonalMDCTConceal_Init_ivas_fx(
TonalMDCTConcealPtr hTonalMDCTConc,
const UWord16 nSamples,
@@ -6385,7 +6569,6 @@ void TonalMDCTConceal_SaveTimeSignal_ivas_fx(
Word16 q_timeSignal,
Word16 nNewSamples );
-// decision_matrix_dec_fx.c
void decision_matrix_dec_fx(
Decoder_State *st, /* i/o: decoder state structure */
Word16 *sharpFlag, /* o : formant sharpening flag Q0 */
@@ -6393,10 +6576,10 @@ void decision_matrix_dec_fx(
Word16 *core_switching_flag /* o : ACELP->HQ switching frame flag Q0 */
);
-// hf_synth_fx.c
void hf_synth_init_fx(
ZERO_BWE_DEC_HANDLE hBWE_zero /* o : zero BWE decoder handle */
);
+
void hf_synth_reset_fx(
ZERO_BWE_DEC_HANDLE hBWE_zero /* o : zero BWE decoder handle */
);
@@ -6454,12 +6637,10 @@ void hf_synth_amr_wb_fx(
const Word16 Q_out /* i : Q_syn2-1 */
);
-// dec_post_fx
void Init_post_filter_fx(
PFSTAT_HANDLE hPFstat /* i : core decoder parameters */
); /* i : core decoder parameters */
-
void nb_post_filt_fx(
const Word16 L_frame, /* i : frame length */
PFSTAT_HANDLE hPFstat, /* i : core decoder parameters */
@@ -6483,6 +6664,7 @@ void formant_post_filt_fx(
const Word32 brate, /* (i) : bit-rate */
const Word16 off_flag /* i : off flag */
);
+
void Filt_mu_fx(
Word16 *sig_in, /* i : signal (beginning at sample -1) */
Word16 *sig_out, /* o : signal with tilt */
@@ -6496,6 +6678,7 @@ void Filt_mu_ivas_fx(
Word16 parcor0, /* i : parcor0 (mu = parcor0 * gamma3) */
Word16 L_subfr, /* i : the length of subframe */
const Word16 extl );
+
void scale_st_fx(
const Word16 *sig_in, /* i : postfilter i signal */
Word16 *sig_out, /* i/o: postfilter o signal */
@@ -6507,6 +6690,7 @@ void blend_subfr2_fx(
Word16 *sigIn2, /* i : i signal for fade-in */
Word16 *sigOut /* o : output signal */
);
+
void init_tcx_window_cfg_fx(
TCX_CONFIG_HANDLE hTcxCfg, /* i : TCX Config handle */
const Word32 sr_core, /* i : SR core */
@@ -6537,8 +6721,6 @@ void init_tcx_cfg_fx(
const Word16 MCT_flag /* i : hMCT handle allocated (1) or not (0) */,
const Word16 fscaleFB );
-// syn_outp_fx.c
-
void syn_output_fx(
const Word16 codec_mode, /* i : MODE1 or MODE2 */
Word16 *synth, /* i/o: fixed point synthesis signal Q_syn2 */
@@ -6555,7 +6737,6 @@ void unscale_AGC(
const Word16 n /* i: vector size */
);
-// bass_psfilter_fx.c
void bass_psfilter_init_fx(
BPF_DEC_HANDLE hBPF /* o : BPF data handle */
);
@@ -6573,6 +6754,7 @@ void bass_psfilter_fx(
Word16 Q_syn,
Word16 bpf_noise_buf[] /* o : BPF error signal (at int_fs) Qx*/
);
+
void addBassPostFilter_fx(
const Word16 *harm_timeIn_Fx, /* timeIn_e */
Word32 **rAnalysis_Fx, /* Qx - 5 */
@@ -6585,7 +6767,6 @@ void addBassPostFilter_fx(
const Word16 nBandsTotal, /* Q0 */
CLDFB_SCALE_FACTOR *cldfb_scale );
-// FEC_fx.c
void FEC_exc_estim_fx(
Decoder_State *st_fx, /* i/o: Decoder static memory */
const Word16 L_frame, /* i : length of the frame */
@@ -6601,50 +6782,35 @@ void FEC_exc_estim_fx(
Word16 *tmp_noise /* o : long-term noise energy Q0 */
);
-// pitch_extr_fx.c
void pitch_pred_linear_fit(
- const Word16 /*short*/ bfi_cnt,
- /* i: bfi counter */ /*Q0 */
- const Word16 /*short*/ last_good,
- /* i: last classification type */ /*Q0 */
- Word32 /*float*/ *old_pitch_buf,
- /* i: pitch lag buffer */ /*Q16*/
- Word32 /*float*/ *old_fpitch,
- /* i: */ /*Q16*/
- Word32 /*float*/ *T0_out,
- /* o: estimated close loop pitch */ /*Q16*/
- Word16 /* int*/ pit_min,
- /* i: Minimum pitch lag */ /*Q0 */
- Word16 /* int*/ pit_max,
- /* i: Maximum pitch lag */ /*Q0 */
- Word16 /*float*/ *mem_pitch_gain,
- /* i: pitch gain [0] is the most recent subfr gain */ /*Q0*/
- Word16 /* int*/ limitation,
- Word16 /*short*/ plc_use_future_lag,
- /* i: */ /*Q0 */
- Word16 /*short*/ *extrapolationFailed,
- /* o: flag if extrap decides not to change the pitch */ /*Q0 */
- Word16 nb_subfr /* i: number of ACELP subframes */
+ const Word16 bfi_cnt, /* i: bfi counter Q0 */
+ const Word16 last_good, /* i: last classification type Q0 */
+ Word32 *old_pitch_buf, /* i: pitch lag buffer Q16*/
+ Word32 *old_fpitch, /* i: Q16*/
+ Word32 *T0_out, /* o: estimated close loop pitch Q16*/
+ Word16 pit_min, /* i: Minimum pitch lag Q0 */
+ Word16 pit_max, /* i: Maximum pitch lag Q0 */
+ Word16 *mem_pitch_gain, /* i: pitch gain [0] is the most recent subfr gain Q0*/
+ Word16 limitation,
+ Word16 plc_use_future_lag, /* i: Q0 */
+ Word16 *extrapolationFailed, /* o: flag if extrap decides not to change the pitch Q0 */
+ Word16 nb_subfr /* i: number of ACELP subframes */
);
void get_subframe_pitch(
- Word16 nSubframes,
- /* i: number of subframes */ /* Q0 */
- Word32 pitchStart,
- /* i: starting pitch lag (in subframe -1) */ /*15Q16*/
- Word32 pitchEnd,
- /* i: ending pitch lag (in subframe nSubframes-1) */ /*15Q16*/
- Word32 *pitchBuf /* o: interpolated pitch lag per subframe */ /*15Q16*/
+ Word16 nSubframes, /* i: number of subframes Q0 */
+ Word32 pitchStart, /* i: starting pitch lag (in subframe -1) 15Q16*/
+ Word32 pitchEnd, /* i: ending pitch lag (in subframe nSubframes-1) 15Q16*/
+ Word32 *pitchBuf /* o: interpolated pitch lag per subframe 15Q16*/
);
-// er_sync_exc_fx.c
void PulseResynchronization_fx(
- Word16 /*float*/ const *const src_exc, /*i Q15*/
- Word16 /*float*/ *const dst_exc, /*o Q15*/
- Word16 /*int*/ const nFrameLength, /*i Q0 */
- Word16 /*int*/ const nSubframes, /*i Q0 */
- Word32 /*float*/ const pitchStart, /*i Q16*/
- Word32 /*float*/ const pitchEnd /*i Q16*/
+ Word16 const *const src_exc, /*i Q15*/
+ Word16 *const dst_exc, /*o Q15*/
+ Word16 const nFrameLength, /*i Q0 */
+ Word16 const nSubframes, /*i Q0 */
+ Word32 const pitchStart, /*i Q16*/
+ Word32 const pitchEnd /*i Q16*/
);
void decod_audio_fx(
@@ -6792,7 +6958,6 @@ void gain_dec_amr_wb_fx(
Word32 *norm_gain_code /* o : norm. gain of the codebook excitation */
);
-// dec_higher_acelp_fx.c
void transf_cdbk_dec_fx(
Decoder_State *st_fx, /* i/o: decoder state structure */
const Word16 harm_flag_acelp, /* i : harmonic flag for higher rates ACELP */
@@ -6804,14 +6969,14 @@ void transf_cdbk_dec_fx(
Word16 code_preQ[], /* o : prequantizer excitation (Q8) */
Word16 *unbits /* o : number of AVQ unused bits */
);
-Word16 gain_dequant_fx( /* o: decoded gain */
- Word16 index, /* i: quantization index */
- const Word16 min, /* i: value of lower limit */
- const Word16 max, /* i: value of upper limit */
- const Word16 bits, /* i: number of bits to dequantize */
- Word16 *expg );
-// avq_dec_fx.c
+/* o: decoded gain */
+Word16 gain_dequant_fx(
+ Word16 index, /* i: quantization index */
+ const Word16 min, /* i: value of lower limit */
+ const Word16 max, /* i: value of upper limit */
+ const Word16 bits, /* i: number of bits to dequantize */
+ Word16 *expg );
void AVQ_demuxdec_fx(
Decoder_State *st, /* i/o: decoder state structure */
@@ -6828,8 +6993,6 @@ void AVQ_dec_lpc(
Word16 *nvecq, /* output: vector quantized Q0*/
Word16 Nsv ); /* input: number of subvectors (lg=Nsv*8) Q0*/
-
-// re8_dec_fx.c
void re8_dec_fx(
Word16 n, /* i : codebook number (*n is an integer defined in {0,2,3,4,..,n_max}) */
const UWord16 I, /* i : index of c (pointer to unsigned 16-bit word) */
@@ -6837,10 +7000,11 @@ void re8_dec_fx(
Word16 y[] /* o : point in RE8 (8-dimensional integer vector) */
);
-// lead_deindexing_fx.c
-void re8_decode_base_index_fx( const Word16 n, UWord16 I, Word16 *x );
+void re8_decode_base_index_fx(
+ const Word16 n,
+ UWord16 I,
+ Word16 *x );
-// re8_utils_fx.c
void re8_k2y_fx(
const Word16 *k, /* i : Voronoi index k[0..7] Q0*/
const Word16 m, /* i : Voronoi modulo (m = 2^r = 1<=2) Q0*/
@@ -6855,7 +7019,6 @@ void re8_vor_fx(
Word16 *ka /* o : identifier of absolute leader (to index c) Q0*/
);
-// re8_PPV_fx.c
void re8_PPV_fx(
const Word32 x[], /* i : point in R^8 Q15 */
Word16 y[] /* o : point in RE8 (8-dimensional integer vector) Q0 */
@@ -6876,25 +7039,25 @@ void dec_pit_exc_fx(
const Word16 tdm_Pri_pitch_buf[] /* i : primary channel pitch buffer */
);
-// pit_dec_fx.c
-Word32 Mode2_pit_decode( /* o: pitch value Q16 */
- const Word16 coder_type, /* i: coding model */
- Word16 i_subfr, /* i: subframe index */
- Word16 L_subfr,
- Word16 **pt_indice, /* i/o: quantization indices pointer */
- Word16 *T0, /* i/o: close loop integer pitch Q0 */
- Word16 *T0_frac, /* o: close loop fractional part of the pitch Q0 */
- Word16 *T0_res, /* i/o: pitch resolution Q0 */
- Word16 *T0_min, /* i/o: lower limit for close-loop search Q0 */
- Word16 *T0_min_frac, /* i/o: lower limit for close-loop search Q0 */
- Word16 *T0_max, /* i/o: higher limit for close-loop search Q0 */
- Word16 *T0_max_frac, /* i/o: higher limit for close-loop search Q0 */
- Word16 pit_min,
- Word16 pit_fr1,
- Word16 pit_fr1b,
- Word16 pit_fr2,
- Word16 pit_max,
- Word16 pit_res_max );
+/* o: pitch value Q16 */
+Word32 Mode2_pit_decode(
+ const Word16 coder_type, /* i: coding model */
+ Word16 i_subfr, /* i: subframe index */
+ Word16 L_subfr,
+ Word16 **pt_indice, /* i/o: quantization indices pointer */
+ Word16 *T0, /* i/o: close loop integer pitch Q0 */
+ Word16 *T0_frac, /* o: close loop fractional part of the pitch Q0 */
+ Word16 *T0_res, /* i/o: pitch resolution Q0 */
+ Word16 *T0_min, /* i/o: lower limit for close-loop search Q0 */
+ Word16 *T0_min_frac, /* i/o: lower limit for close-loop search Q0 */
+ Word16 *T0_max, /* i/o: higher limit for close-loop search Q0 */
+ Word16 *T0_max_frac, /* i/o: higher limit for close-loop search Q0 */
+ Word16 pit_min,
+ Word16 pit_fr1,
+ Word16 pit_fr1b,
+ Word16 pit_fr2,
+ Word16 pit_max,
+ Word16 pit_res_max );
void Mode2_abs_pit_dec(
Word16 *T0, /* o: integer pitch lag Q0 */
@@ -6943,9 +7106,8 @@ void pit_Q_dec_fx(
Word16 *T0, /* o : integer pitch lag */
Word16 *T0_frac, /* o : pitch fraction */
Word16 *T0_min, /* i/o: delta search min */
- Word16 *T0_max /* i/o: delta search max */
- ,
- Word16 *BER_detect /* o : BER detect flag */
+ Word16 *T0_max, /* i/o: delta search max */
+ Word16 *BER_detect /* o : BER detect flag */
);
void pit16k_Q_dec_fx(
@@ -6955,9 +7117,8 @@ void pit16k_Q_dec_fx(
Word16 *T0, /* o : integer pitch lag */
Word16 *T0_frac, /* o : pitch fraction */
Word16 *T0_min, /* i/o: delta search min */
- Word16 *T0_max /* i/o: delta search max */
- ,
- Word16 *BER_detect /* o : BER detect flag */
+ Word16 *T0_max, /* i/o: delta search max */
+ Word16 *BER_detect /* o : BER detect flag */
);
void abs_pit_dec_fx(
@@ -6976,7 +7137,6 @@ void delta_pit_dec_fx(
const Word16 T0_min /* i : delta search min */
);
-// limit_t0_fx.c
void limit_T0_fx(
const Word16 L_frame, /* i : length of the frame */
const Word16 delta, /* i : Half the close-loop searched interval */
@@ -7002,7 +7162,6 @@ void limit_T0_voiced(
const Word16 pit_max /* i : Maximum pitch lag */
);
-// inov_dec.c
void inov_decode_fx(
Decoder_State *st_fx, /* i/o: decoder state structure */
const Word32 core_brate, /* i : core bitrate Q0 */
@@ -7030,15 +7189,18 @@ void inov_decode_ivas_fx(
Word16 *code, /* o : algebraic excitation Q12 */
const Word16 L_subfr /* i : subframe length Q0 */
);
-// dec4t64_fx.c
+
void dec_acelp_4t64_fx(
Decoder_State *st_fx, /* i/o: decoder state structure */
Word16 nbbits, /* i : number of bits per codebook */
Word16 code[], /* o : algebraic (fixed) codebook excitation Q9*/
const Word16 Opt_AMR_WB );
-void D_ACELP_decode_43bit_fx( UWord16 idxs[], Word16 code[], Word16 *pulsestrack );
-// dec_acelp_fx.c
+void D_ACELP_decode_43bit_fx(
+ UWord16 idxs[],
+ Word16 code[],
+ Word16 *pulsestrack );
+
void D_ACELP_indexing_fx(
Word16 code[],
PulseConfig config,
@@ -7046,9 +7208,13 @@ void D_ACELP_indexing_fx(
Word16 index[],
Word16 *BER_detect );
-void fcb_pulse_track_joint_decode_fx( UWord16 *idxs, Word16 wordcnt, UWord32 *index_n, Word16 *pulse_num, Word16 track_num );
+void fcb_pulse_track_joint_decode_fx(
+ UWord16 *idxs,
+ Word16 wordcnt,
+ UWord32 *index_n,
+ Word16 *pulse_num,
+ Word16 track_num );
-// dec2t32_fx.c
void dec_acelp_2t32_fx(
Decoder_State *st_fx, /* i/o: decoder state structure */
Word16 code[] /* o: algebraic (fixed) codebook excitation */
@@ -7056,12 +7222,10 @@ void dec_acelp_2t32_fx(
void dec_acelp_1t64_fx(
Decoder_State *st_fx, /* i/o: decoder state structure */
- Word16 code[] /* o: algebraic (fixed) codebook excitation Q12*/
- ,
- const Word16 L_subfr /* i : sub frame lenght*/
+ Word16 code[], /* o: algebraic (fixed) codebook excitation Q12*/
+ const Word16 L_subfr /* i : sub frame lenght*/
);
-// acelp_core_switch)dec_fx.c
ivas_error acelp_core_switch_dec_fx(
Decoder_State *st_fx, /* i/o: decoder state structure */
Word16 *synth_subfr_out, /* o : synthesized ACELP subframe Q_syn*/
@@ -7083,7 +7247,6 @@ ivas_error acelp_core_switch_dec_bfi_ivas_fx(
const Word16 coder_type /* i : coder type */
);
-// pred_lt4_fx.c
void pred_lt4(
const Word16 excI[], /* in : excitation buffer Q_exc*/
Word16 excO[], /* out: excitation buffer Q_exc*/
@@ -7115,7 +7278,6 @@ void pred_lt4_tc_fx(
const Word16 i_subfr /* i : subframe index Q0*/
);
-// pvq_cored_dec
void pvq_decode_frame_fx(
Decoder_State *st_fx,
Word16 *coefs_quant, /* o : quantized coefficients */
@@ -7145,7 +7307,6 @@ Word16 pvq_core_dec_fx(
Word16 *maxpulse,
const Word16 core );
-
Word16 ivas_pvq_core_dec_fx(
Decoder_State *st_fx,
const Word16 *sfm_start,
@@ -7173,18 +7334,19 @@ void decode_energies_fx(
Word16 dim,
const Word16 strict_bits );
-// range_drc_fx.c
void rc_dec_init_fx(
Decoder_State *st_fx, /* i/o: Decoder State */
PVQ_DEC_HANDLE hPVQ, /* i/o: PVQ decoder handle */
Word16 tot_bits /* i : Total bit budget */
);
-UWord32 rc_decode_fx( /* o : Decoded cumulative frequency */
- Word16 *BER_detect, /* o : Bit error detection flag */
- PVQ_DEC_HANDLE hPVQ, /* i/o: PVQ decoder handle */
- UWord32 tot /* i : Total cumulative frequency */
+/* o : Decoded cumulative frequency */
+UWord32 rc_decode_fx(
+ Word16 *BER_detect, /* o : Bit error detection flag */
+ PVQ_DEC_HANDLE hPVQ, /* i/o: PVQ decoder handle */
+ UWord32 tot /* i : Total cumulative frequency */
);
+
void rc_dec_update_fx(
Decoder_State *st_fx, /* i/o: Decoder State */
PVQ_DEC_HANDLE hPVQ, /* i/o: PVQ decoder handle */
@@ -7193,17 +7355,18 @@ void rc_dec_update_fx(
UWord32 sym_freq /* i : Symbol frequency */
);
-Word32 rc_dec_bits_fx( /* i : Decoded value */
- Decoder_State *st_fx, /* i/o: Decoder State */
- PVQ_DEC_HANDLE hPVQ, /* i/o: PVQ decoder handle */
- Word16 bits /* i : Number of bits */
+/* i : Decoded value */
+Word32 rc_dec_bits_fx(
+ Decoder_State *st_fx, /* i/o: Decoder State */
+ PVQ_DEC_HANDLE hPVQ, /* i/o: PVQ decoder handle */
+ Word16 bits /* i : Number of bits */
);
-UWord32 rc_dec_uniform_fx( /* i : Decoded value */
- Decoder_State *st_fx, /* i/o: Decoder State */
- PVQ_DEC_HANDLE hPVQ, /* i/o: PVQ decoder handle */
-
- UWord32 tot /* i : Maximum value */
+/* i : Decoded value */
+UWord32 rc_dec_uniform_fx(
+ Decoder_State *st_fx, /* i/o: Decoder State */
+ PVQ_DEC_HANDLE hPVQ, /* i/o: PVQ decoder handle */
+ UWord32 tot /* i : Maximum value */
);
void rc_dec_finish_fx(
@@ -7211,7 +7374,6 @@ void rc_dec_finish_fx(
PVQ_DEC_HANDLE hPVQ /* i/o: PVQ decoder handle */
);
-// pvq_decode_fx.c
void pvq_decode_fx(
Decoder_State *st_fx,
PVQ_DEC_HANDLE hPVQ, /* i/o: PVQ decoder handle */
@@ -7221,8 +7383,6 @@ void pvq_decode_fx(
const Word16 dim, /* i: Length of vector */
const Word16 neg_gain /* i: Gain (negated to fit 1.0 in Q15 as -1.0) */
);
-
-// nelp_dec_fx.c
void nelp_decoder_fx(
Decoder_State *st_fx, /* i/o: decoder static memory */
Word16 *exc_nelp, /* o : adapt. excitation/total exc Q0 */
@@ -7232,8 +7392,6 @@ void nelp_decoder_fx(
const Word16 coder_type, /* i : coding type Q0 */
Word16 *gain_buf /* Q14 */
);
-
-// dec_nelp_fx.c
void decod_nelp_fx(
Decoder_State *st_fx, /* i/o: decoder static memory */
Word16 *tmp_noise_fx, /* o : long term temporary noise energy */
@@ -7243,12 +7401,10 @@ void decod_nelp_fx(
Word16 *voice_factors, /* o : Voice factor */
Word16 *bwe_exc,
Word16 *Q_exc,
- Word16 bfi /* i : frame error rate */
- ,
+ Word16 bfi, /* i : frame error rate */
Word16 *gain_buf /*Q14*/
);
-// lp_filt_exc_dec_fx
void lp_filt_exc_dec_fx(
Decoder_State *st_fx, /* i/o: decoder state structure */
const Word16 codec_mode, /* i : coder mode */
@@ -7258,7 +7414,6 @@ void lp_filt_exc_dec_fx(
Word16 lp_flag, /* i : operation mode signalling */
Word16 *exc );
-// FEC_lsf_estim_fx.c
void FEC_lsf2lsp_interp(
Decoder_State *st, /* i/o: Decoder static memory */
const Word16 L_frame, /* i : length of the frame */
@@ -7267,16 +7422,16 @@ void FEC_lsf2lsp_interp(
Word16 *lsp /* o : estimated LSP vector */
);
-
-// fd_cng_dec_fx.c
-ivas_error createFdCngDec_fx( HANDLE_FD_CNG_DEC *hFdCngDec );
+ivas_error createFdCngDec_fx(
+ HANDLE_FD_CNG_DEC *hFdCngDec );
void initFdCngDec_fx(
DEC_CORE_HANDLE st, /* i/o: decoder state structure */
Word16 scale );
/* Delete the instance of type FD_CNG */
-void deleteFdCngDec_fx( HANDLE_FD_CNG_DEC *hFdCngDec );
+void deleteFdCngDec_fx(
+ HANDLE_FD_CNG_DEC *hFdCngDec );
/* Configure CLDFB-CNG */
void configureFdCngDec_fx(
@@ -7321,8 +7476,9 @@ void perform_noise_estimation_dec_ivas_fx(
);
/* Decode the CLDFB-CNG bitstream */
-void FdCng_decodeSID_fx( HANDLE_FD_CNG_COM st, /* i/o: FD_CNG structure containing all buffers and variables */
- Decoder_State *corest ); /* i/o: decoder state structure */
+void FdCng_decodeSID_fx(
+ HANDLE_FD_CNG_COM st, /* i/o: FD_CNG structure containing all buffers and variables */
+ Decoder_State *corest ); /* i/o: decoder state structure */
void noisy_speech_detection_fx(
HANDLE_FD_CNG_DEC hFdCngDec, /* i/o: FD_CNG structure */
@@ -7350,10 +7506,11 @@ void generate_comfort_noise_dec_ivas_fx(
const Word16 nchan_out /* i : number of output channels */
);
-void generate_comfort_noise_dec_hf_fx( Word32 **bufferReal, /* o : matrix to real part of i bands */
- Word32 **bufferImag, /* o : matrix to imaginary part of i bands */
- Word16 *bufferScale, /* o : pointer to scalefactor for real and imaginary part of i bands */
- Decoder_State *stdec );
+void generate_comfort_noise_dec_hf_fx(
+ Word32 **bufferReal, /* o : matrix to real part of i bands */
+ Word32 **bufferImag, /* o : matrix to imaginary part of i bands */
+ Word16 *bufferScale, /* o : pointer to scalefactor for real and imaginary part of i bands */
+ Decoder_State *stdec );
void generate_comfort_noise_dec_hf_ivas_fx(
Word32 **bufferReal, /* o : matrix to real part of input bands */
@@ -7364,28 +7521,28 @@ void generate_comfort_noise_dec_hf_ivas_fx(
);
/* Generate the comfort noise based on the target noise level */
-void generate_masking_noise_fx( Word16 *timeDomainBuffer, /* i/o: time-domain signal */
- Word16 Q,
- HANDLE_FD_CNG_COM st /* i/o: FD_CNG structure containing all buffers and variables */
- ,
- Word16 length,
- Word16 core );
+void generate_masking_noise_fx(
+ Word16 *timeDomainBuffer, /* i/o: time-domain signal */
+ Word16 Q,
+ HANDLE_FD_CNG_COM st, /* i/o: FD_CNG structure containing all buffers and variables */
+ Word16 length,
+ Word16 core );
void generate_masking_noise_update_seed_fx(
HANDLE_FD_CNG_COM st /* i/o : pointer to FD_CNG_COM structure */
);
-void generate_masking_noise_mdct_fx( Word32 *mdctBuffer, /* i/o: time-domain signal */
- Word16 *mdctBuffer_e, /* i/o: exponent time-domain signal */
- HANDLE_FD_CNG_COM st /* i/o: FD_CNG structure containing all buffers and variables */
- ,
- Word16 L_frame );
+void generate_masking_noise_mdct_fx(
+ Word32 *mdctBuffer, /* i/o: time-domain signal */
+ Word16 *mdctBuffer_e, /* i/o: exponent time-domain signal */
+ HANDLE_FD_CNG_COM st, /* i/o: FD_CNG structure containing all buffers and variables */
+ Word16 L_frame );
-void generate_masking_noise_mdct_ivas_fx( Word32 *mdctBuffer, /* i/o: time-domain signal */
- Word16 *mdctBuffer_e, /* i/o: exponent time-domain signal */
- HANDLE_FD_CNG_COM st /* i/o: FD_CNG structure containing all buffers and variables */ );
+void generate_masking_noise_mdct_ivas_fx(
+ Word32 *mdctBuffer, /* i/o: time-domain signal */
+ Word16 *mdctBuffer_e, /* i/o: exponent time-domain signal */
+ HANDLE_FD_CNG_COM st /* i/o: FD_CNG structure containing all buffers and variables */ );
-// init_dec_fx.c
ivas_error init_decoder_fx(
Decoder_State *st_fx, /* o: Decoder static variables structure */
const Word16 idchan /* i : channel ID */
@@ -7424,21 +7581,23 @@ Word16 wb_bwe_dec_fx(
Decoder_State *st_fx, /* i/o: decoder state structure */
Word16 *Qpost );
-Word16 swb_bwe_gain_deq_fx( /* o : BWE class */
- Decoder_State *st_fx, /* i/o: decoder state structure */
- const Word16 core, /* i : core */
- Word16 *SWB_tenv, /* o : Q0, time-domain BWE envelope */
- Word16 *SWB_fenv, /* o : Q1, frequency-domain BWE envelope */
- const Word16 hr_flag, /* i : high rate flag */
- const Word16 hqswb_clas /* i : HQ BWE class */
-);
-
-Word16 swb_bwe_dec_fx( /*o :Q_syn_hb*/
- Decoder_State *st_fx, /* i/o: decoder state structure */
- Word16 *synth_fx, /* i/o: ACELP core synthesis/final synthesis (might be rescaled inside wtda() ) Q0/Qpost */
- Word16 *hb_synth_fx, /* o : SHB synthesis/final synthesis Q_syn_hb */
- const Word16 output_frame, /* i : frame length */
- Word16 *Qpost );
+/* o : BWE class */
+Word16 swb_bwe_gain_deq_fx(
+ Decoder_State *st_fx, /* i/o: decoder state structure */
+ const Word16 core, /* i : core */
+ Word16 *SWB_tenv, /* o : Q0, time-domain BWE envelope */
+ Word16 *SWB_fenv, /* o : Q1, frequency-domain BWE envelope */
+ const Word16 hr_flag, /* i : high rate flag */
+ const Word16 hqswb_clas /* i : HQ BWE class */
+);
+
+/*o :Q_syn_hb*/
+Word16 swb_bwe_dec_fx(
+ Decoder_State *st_fx, /* i/o: decoder state structure */
+ Word16 *synth_fx, /* i/o: ACELP core synthesis/final synthesis (might be rescaled inside wtda() ) Q0/Qpost */
+ Word16 *hb_synth_fx, /* o : SHB synthesis/final synthesis Q_syn_hb */
+ const Word16 output_frame, /* i : frame length */
+ Word16 *Qpost );
void fd_bwe_dec_init(
Decoder_State *st_fx, /* i/o: decoder state structure */
@@ -7454,7 +7613,6 @@ void hq_core_enc_ivas_fx(
const Word16 vad_hover_flag /* i : VAD hangover flag Q0*/
);
-// hq_core_dec_fx.c
void hq_core_dec_fx(
Decoder_State *st_fx, /* i/o: decoder state structure fx */
Word16 synth[], /* o : output synthesis Q_synth*/
@@ -7470,9 +7628,15 @@ void HQ_nbfec_init_fx(
HQ_NBFEC_HANDLE hHQ_nbfec /* i/o: HQ NB FEC data handle */
);
-void GetAttackForTCXDecision_fx( Word32 const *pSubblockNrg, Word32 const *pAccSubblockNrg, Word16 nSubblocks, Word16 nPastSubblocks, Word16 attackRatioThreshold, Word16 *pbIsAttackPresent, Word16 *pAttackIndex );
+void GetAttackForTCXDecision_fx(
+ Word32 const *pSubblockNrg,
+ Word32 const *pAccSubblockNrg,
+ Word16 nSubblocks,
+ Word16 nPastSubblocks,
+ Word16 attackRatioThreshold,
+ Word16 *pbIsAttackPresent,
+ Word16 *pAttackIndex );
-// FEC_HQ_phase_ecu_fx.c
void hq_ecu_fx(
const Word16 *prevsynth, /* i : buffer of previously synthesized signal */
Word32 *ecu_rec, /* o : reconstructed frame in tda domain */
@@ -7487,17 +7651,15 @@ void hq_ecu_fx(
const Word16 ph_ecu_HqVoicing,
Word16 *ph_ecu_active, /* i : Phase ECU active flag */
Word16 *gapsynth,
- const Word16 prev_bfi, /* i : indicating burst frame error */
- const Word16 old_is_transient[2], /* i : flags indicating previous transient frames */
- Word16 *mag_chg_1st, /* i/o: per band magnitude modifier for transients*/
- Word16 *Xavg, /* i/o: Frequency group average gain to fade to */
- Word16 *beta_mute, /* o : Factor for long-term mute */
- const Word16 output_frame, /* i : frame length */
- Decoder_State *st_fx /* i/o: decoder state structure */
+ const Word16 prev_bfi, /* i : indicating burst frame error */
+ const Word16 old_is_transient[2], /* i : flags indicating previous transient frames */
+ Word16 *mag_chg_1st, /* i/o: per band magnitude modifier for transients */
+ Word16 *Xavg, /* i/o: Frequency group average gain to fade to */
+ Word16 *beta_mute, /* o : Factor for long-term mute */
+ const Word16 output_frame, /* i : frame length */
+ Decoder_State *st_fx /* i/o: decoder state structure */
);
-
-// hq_lr_dec_fx.c
void hq_lr_dec_fx(
Decoder_State *st_fx, /* i/o: : decoder state structure */
Word32 L_yout[], /* o : Q12 : transform-domain output coefs. */
@@ -7506,16 +7668,15 @@ void hq_lr_dec_fx(
Word16 *is_transient_fx /* o : Q0 : transient flag */
);
-// gq_env_dec_fx.c
-Word16 decode_envelope_indices_fx( /* o : Number of bits Q0*/
- Decoder_State *st_fx, /* i/o: decoder state structure */
- const Word16 start_norm, /* i : starting band index Q0*/
- const Word16 num_sfm, /* i : Number of subbands Q0*/
- const Word16 numnrmibits, /* i : Bitrate of fall-back coding mode Q0*/
- Word16 *difidx, /* o : Diff indices/encoded diff indices Q0*/
- const Word16 flag_HQ2 /* i : indicator of HQ2 core Q0*/
- ,
- const Word16 is_transient /* i : indicator of HQ_TRANSIENT Q0*/
+/* o : Number of bits Q0*/
+Word16 decode_envelope_indices_fx(
+ Decoder_State *st_fx, /* i/o: decoder state structure */
+ const Word16 start_norm, /* i : starting band index Q0*/
+ const Word16 num_sfm, /* i : Number of subbands Q0*/
+ const Word16 numnrmibits, /* i : Bitrate of fall-back coding mode Q0*/
+ Word16 *difidx, /* o : Diff indices/encoded diff indices Q0*/
+ const Word16 flag_HQ2, /* i : indicator of HQ2 core Q0*/
+ const Word16 is_transient /* i : indicator of HQ_TRANSIENT Q0*/
);
void dequantize_norms_fx(
@@ -7527,13 +7688,11 @@ void dequantize_norms_fx(
Word16 *normqlg2 /* o : Log2 of decoded norms Q0*/
);
-// hdecnrm_fx.c
void hdecnrm_fx(
Decoder_State *st_fx, /* i/o: decoder state structure */
const Word16 numNorms, /* (i) number of norms Q0*/
Word16 *index ); /* (o) indices of quantized norms Q0*/
-
Word16 decode_huff_context_fx(
Decoder_State *st_fx, /* i/o: decoder state structure */
const Word16 *hufftab,
@@ -7569,7 +7728,6 @@ void hdecnrm_tran_fx(
Word16 *index /* o : indices of quantized norms Q0*/
);
-// tcq_core_dec_fx.c
void tcq_core_LR_dec_fx(
Decoder_State *st_fx,
Word16 *inp_vector_fx, /*x5 */
@@ -7588,7 +7746,6 @@ void tcq_core_LR_dec_fx(
const Word16 *is_transient /*Q0 */
);
-// FEC_HQ_core_fx.c
void HQ_FEC_processing_fx(
Decoder_State *st_fx, /* i/o: decoder state structure */
Word32 *t_audio_q_fx, /* o : MDCT coeffs. (for synthesis) Q12 */
@@ -7620,13 +7777,12 @@ void HQ_FEC_Mem_update_fx(
void time_domain_FEC_HQ_fx(
Decoder_State *st_fx, /* i : Decoder State */
- Word32 *wtda_audio_fx, /* i : i */
+ Word32 *wtda_audio_fx, /* i : i */
Word16 *out_fx, /* o : output audio */
Word16 mean_en_high_fx, /* i : transient flag */
const Word16 output_frame,
Word16 *Q_synth );
-// hq_hr_dec_fx.c
void hq_pred_hb_bws_fx(
Decoder_State *st_fx, /* i/o: decoder state structure */
const Word16 *ynrm, /* i : norm quantization index vector Q0*/
@@ -7647,16 +7803,15 @@ void hq_hr_dec_fx(
const Word16 core_switching_flag /* i : Core switching flag Q1 */
);
-// hq_classifier_dec_fx.c
-Word16 hq_classifier_dec_fx( /* o : Consumed bits Q0 */
- Decoder_State *st_fx, /* i/o: decoder state structure */
- const Word32 core_brate, /* i : Core bit rate Q0 */
- const Word16 length, /* i : Frame length Q0 */
- Word16 *is_transient, /* o : Transient flag Q0 */
- Word16 *hqswb_clas /* o : HQ class Q0 */
+/* o : Consumed bits */
+Word16 hq_classifier_dec_fx(
+ Decoder_State *st_fx, /* i/o: decoder state structure */
+ const Word32 core_brate, /* i : Core bit rate Q0 */
+ const Word16 length, /* i : Frame length Q0 */
+ Word16 *is_transient, /* o : Transient flag Q0 */
+ Word16 *hqswb_clas /* o : HQ class Q0 */
);
-// peak_vq_dec_fx.c
void hvq_dec_fx(
Decoder_State *st_fx, /* i/o: decoder state structure */
const Word16 num_bits, /* i : Number of available bits */
@@ -7683,7 +7838,6 @@ Word16 hvq_pvq_bitalloc_fx(
Word16 *n_sel_bands /* Q0 o : No. of selected bands for encoding */
);
-// hq_conf_fec_fx.c
void hq_configure_bfi_fx(
Word16 *nb_sfm, /* o : Number of sub bands Q0*/
Word16 *num_Sb, /* o : Number of FEC sub bands ? Q0*/
@@ -7693,7 +7847,6 @@ void hq_configure_bfi_fx(
const Word16 **sfm_end /* o : Subband end coefficients Q0*/
);
-// core_switching_dec_fx.c
void bandwidth_switching_detect_fx(
Decoder_State *st_fx /* i/o: encoder state structure */
);
@@ -7741,7 +7894,6 @@ void core_switching_hq_prepare_dec_fx(
const Word16 output_frame /* i : output frame length Q0*/
);
-// amr_wb_dec_fx.c
ivas_error amr_wb_dec_fx(
Word16 output_sp[], /* o : synthesis output */
Decoder_State *st_fx /* o : Decoder static variables structure */
@@ -7751,7 +7903,6 @@ void amr_wb_dec_init_fx(
AMRWB_IO_DEC_HANDLE hAmrwb_IO /* i/o: AMR-WB IO data handle */
);
-// updt_dec_fx.c
void updt_dec_fx(
Decoder_State *st_fx, /* i/o: state structure */
const Word16 *old_exc_fx, /* i : buffer of excitation */
@@ -7761,9 +7912,8 @@ void updt_dec_fx(
const Word16 *lsf_new_fx, /* i : current frame LSF vector */
const Word16 *lsp_new_fx, /* i : current frame LSP vector */
const Word16 voice_factors[], /* i : voicing factors */
- const Word16 *old_bwe_exc_fx /* i : buffer of excitation */
- ,
- const Word16 *gain_buf /*Q14*/
+ const Word16 *old_bwe_exc_fx, /* i : buffer of excitation */
+ const Word16 *gain_buf /*Q14*/
);
void updt_IO_switch_dec_fx(
@@ -7791,45 +7941,31 @@ void update_decoder_LPD_cng(
Word16 *A,
Word16 *bpf_noise_buf );
-// FEC_clas_estim_fx
void FEC_clas_estim_fx(
- Decoder_State *st_fx, /* i/o: decoder state handle */
- const Word16 Opt_AMR_WB,
- /* i : flag indicating AMR-WB IO mode */ /*A*/
- const Word16 L_frame, /* i : length of the frame */
- Word16 *clas, /* i/o: frame classification */
- const Word16 coder_type, /* i : coder type */
- const Word16 *pitch, /* i : pitch values for each subframe (Q6) */
- Word16 *syn, /* i : synthesis buffer */
- Word16 *lp_speech, /* i/o: long term active speech energy average Q8 */
- Word16 *decision_hyst,
- /* i/o: hysteresis of the music/speech decision */ /*A*/
- Word16 *UV_cnt,
- /* i/o: number of consecutives frames classified as UV */ /*A*/
- Word16 *LT_UV_cnt,
- /* i/o: long term consecutives frames classified as UV */ /*A*/
- Word16 *Last_ener,
- /* i/o: last_energy frame */ /*A*/
- Word16 *locattack,
- /* i/o: detection of attack (mainly to localized speech burst) */ /*A*/
- Word16 *lt_diff_etot,
- /* i/o: long-term total energy variation */ /*A*/
- Word16 *amr_io_class,
- /* i/o: classification for AMR-WB IO mode */ /*A*/
- Word16 Q_syn, /* i : Synthesis scaling */
- Word16 *class_para,
- /* o : classification para. fmerit1 */ /*A*/
- Word16 *mem_syn_clas_estim, /* i/o: memory of the synthesis signal for frame class estimation */
- Word16 *Q_mem_syn,
- /*i/o : exponent for memory of synthesis signal for frame class estimation */ /*B*/
- Word16 LTP_Gain,
- /* i : LTP gain is 0..0.6 or negative Q15*/ /*B*/
- Word16 mode,
- /* i : signal classifier mode */ /*B*/
- Word16 bfi,
- /* i : bad frame indicator */ /*B*/
- Word32 last_core_brate, /* i : bitrate of previous frame */
- const Word16 FEC_mode /* i : ACELP FEC mode */
+ Decoder_State *st_fx, /* i/o: decoder state handle */
+ const Word16 Opt_AMR_WB, /* i : flag indicating AMR-WB IO mode A*/
+ const Word16 L_frame, /* i : length of the frame */
+ Word16 *clas, /* i/o: frame classification */
+ const Word16 coder_type, /* i : coder type */
+ const Word16 *pitch, /* i : pitch values for each subframe (Q6) */
+ Word16 *syn, /* i : synthesis buffer */
+ Word16 *lp_speech, /* i/o: long term active speech energy average Q8 */
+ Word16 *decision_hyst, /* i/o: hysteresis of the music/speech decision A*/
+ Word16 *UV_cnt, /* i/o: number of consecutives frames classified as UV A*/
+ Word16 *LT_UV_cnt, /* i/o: long term consecutives frames classified as UV A*/
+ Word16 *Last_ener, /* i/o: last_energy frame A*/
+ Word16 *locattack, /* i/o: detection of attack (mainly to localized speech burst) A*/
+ Word16 *lt_diff_etot, /* i/o: long-term total energy variation A*/
+ Word16 *amr_io_class, /* i/o: classification for AMR-WB IO mode A*/
+ Word16 Q_syn, /* i : Synthesis scaling */
+ Word16 *class_para, /* o : classification para. fmerit1 A*/
+ Word16 *mem_syn_clas_estim, /* i/o: memory of the synthesis signal for frame class estimation */
+ Word16 *Q_mem_syn, /*i/o : exponent for memory of synthesis signal for frame class estimation B*/
+ Word16 LTP_Gain, /* i : LTP gain is 0..0.6 or negative Q15B*/
+ Word16 mode, /* i : signal classifier mode B*/
+ Word16 bfi, /* i : bad frame indicator B*/
+ Word32 last_core_brate, /* i : bitrate of previous frame */
+ const Word16 FEC_mode /* i : ACELP FEC mode */
);
Word16 FEC_pos_dec_fx(
@@ -7839,7 +7975,6 @@ Word16 FEC_pos_dec_fx(
const Word16 nBits_es_Pred /* i : number of bits for Es_pred Q */
);
-// post_dec.h
void post_decoder(
Decoder_State *st,
Word16 synth_buf[], /* Q0 */
@@ -7865,7 +8000,6 @@ void cldfb_synth_set_bandsToZero(
const Word16 nTimeSlots,
const CLDFB_SCALE_FACTOR scaleFactor );
-// FEC_pitch_estim_fx.c
void FEC_pitch_estim_fx(
const Word16 Opt_AMR_WB, /* i : flag indicating AMR-WB IO mode */
const Word16 last_core, /* i : last core */
@@ -7912,7 +8046,6 @@ void FEC_scale_syn_fx(
const Word16 force_scaling /* i : force scaling */
);
-// LD_music_post_filter_fx.c
void LD_music_post_filter_fx(
MUSIC_POSTFILT_HANDLE hMusicPF, /* i/o: LD music postfilter handle */
const Word16 dtc_in[], /* i : i synthesis Qdct */
@@ -7961,7 +8094,6 @@ void music_postfilt_init(
MUSIC_POSTFILT_HANDLE hMusicPF /* i/o: LD music postfilter handle */
);
-// gs_dec_amr_wb.c
void improv_amr_wb_gs_fx(
const Word16 clas, /* i : signal frame class Q0*/
const Word16 coder_type, /* i : coder type Q0*/
@@ -7983,7 +8115,6 @@ void improv_amr_wb_gs_fx(
const Word16 last_coder_type /* i : Last coder_type Q0*/
);
-// dec_amr_wb_fx.c
void decod_amr_wb_fx(
Decoder_State *st_fx, /* i/o: decoder static memory */
const Word16 *Aq_fx, /* i : LP filter coefficients */
@@ -7995,14 +8126,12 @@ void decod_amr_wb_fx(
Word16 *gain_buf /* o : floating pitch gain for each subframe Q14 */
);
-// rst_dec_fx.c
void CNG_reset_dec_fx(
Decoder_State *st_fx, /* i/o: decoder state structure */
Word16 *pitch_buf, /* o : floating pitch for each subframe Q6*/
Word16 *voice_factors /* o : voicing factors Q15*/
);
-// voiced_dec_fx.c
ivas_error ppp_voiced_decoder_fx(
Decoder_State *st_fx, /* i/o: state structure */
Word16 *out_fx, /* o : residual signal */
@@ -8011,11 +8140,11 @@ ivas_error ppp_voiced_decoder_fx(
Word16 *pitch, /* o : floating pitch values for each subframe */
Word16 bfi /* i : Frame error rate */
);
+
void sc_vbr_dec_init(
SC_VBR_DEC_HANDLE hSC_VBR /* i/o: SC-VBR decoder handle */
);
-// ppp_dec_fx.c
ivas_error ppp_quarter_decoder_fx(
DTFS_STRUCTURE *CURRCW_Q_DTFS_FX, /* i/o: Current CW DTFS */
Word16 prevCW_lag_fx, /* i : Previous lag */
@@ -8028,12 +8157,12 @@ ivas_error ppp_quarter_decoder_fx(
DTFS_STRUCTURE PREV_CW_D_FX, /* i : Previous DTFS */
Decoder_State *st_fx );
-// core_dec_init_fx.c
void open_decoder_LPD_fx(
Decoder_State *st,
const Word32 total_brate, /* Q0 */
const Word16 bwidth /* Q0 */
);
+
void open_decoder_LPD_ivas_fx(
Decoder_State *st, /* i/o: decoder state structure */
const Word32 total_brate, /* i : total bitrate Q0*/
@@ -8054,11 +8183,14 @@ void open_decoder_LPD_ivas_fx(
void reset_tcx_overl_buf_fx(
TCX_DEC_HANDLE hTcxDec /* i/o: TCX decoder handle */
);
+
void acelp_plc_mdct_transition_fx(
Decoder_State *st /* i/o: Decoder state */
);
+
void cldfb_reset_memory_fx(
HANDLE_CLDFB_FILTER_BANK hs /* i/o: filter bank handle */ );
+
void tcxltp_dec_init_fx(
TCX_LTP_DEC_HANDLE hTcxLtpDec, /* Q0 */
const Word16 ini_frame, /* Q0 */
@@ -8066,23 +8198,22 @@ void tcxltp_dec_init_fx(
const Word16 element_mode, /* Q0 */
const Word16 pit_max, /* Q0 */
const Word32 sr_core ); /* Q0 */
-// swb_bwe_dec_hr_fx.c
-Word16 swb_bwe_dec_hr_fx( /* o : Exponent of SHB synthesis */
- Decoder_State *st_fx, /* i/o: decoder state structure */
- const Word16 *syn_12k8_16k_fx, /* i : ACELP core synthesis @16kHz : Q(15 - exp) */
- const Word16 exp, /* i : Exponent of core synthesis */
- Word16 *hb_synth_fx, /* o : SHB synthesis : Q(15 - hb_synth_fx_exp)*/
- const Word16 output_frame, /* i : frame length */
- const Word16 unbits, /* i : number of core unused bits */
- const Word16 pitch_buf[] /* i : pitch buffer : Q6 */
+/* o : Exponent of SHB synthesis */
+Word16 swb_bwe_dec_hr_fx(
+ Decoder_State *st_fx, /* i/o: decoder state structure */
+ const Word16 *syn_12k8_16k_fx, /* i : ACELP core synthesis @16kHz : Q(15 - exp) */
+ const Word16 exp, /* i : Exponent of core synthesis */
+ Word16 *hb_synth_fx, /* o : SHB synthesis : Q(15 - hb_synth_fx_exp)*/
+ const Word16 output_frame, /* i : frame length */
+ const Word16 unbits, /* i : number of core unused bits */
+ const Word16 pitch_buf[] /* i : pitch buffer : Q6 */
);
void hr_bwe_dec_init(
HR_BWE_DEC_HANDLE hBWE_FD_HR /* i/o: HR BWE data handle */
);
-// swb_bwe_com_hr_fx.c
void swb_hr_noise_fill_fx(
const Word16 is_transient, /* i : transient flag */
const Word16 spect_start, /* i : spectrum start point */
@@ -8095,7 +8226,6 @@ void swb_hr_noise_fill_fx(
Word16 *t_audio, /* i/o: mdct spectrum Q_audio */
Word16 Q_audio );
-// stat_noise_uv_dec_fx.c
void stat_noise_uv_dec_fx(
Decoder_State *st_fx, /* i/o: Decoder static memory */
Word16 *lsp_new, /* i : end-frame LSP vector Q15 */
@@ -8105,7 +8235,6 @@ void stat_noise_uv_dec_fx(
const Word16 uc_two_stage_flag /* i : flag indicating two-stage UC */
);
-// stat_noise_uv_mod_fx.c
void stat_noise_uv_mod_fx(
const Word16 coder_type, /* i : Coder type */
Word16 noisiness, /* i : noisiness parameter Q0 */
@@ -8152,15 +8281,13 @@ void stat_noise_uv_mod_ivas_fx(
Word16 *Q_stat_noise_ge /* i/o: noise scaling */
);
-// FEC_adao_codebook_fx.c
Word16 FEC_SinOnset_fx(
- Word16 *exc, /* i/o : exc vector to modify */
- Word16 puls_pos, /* i : last pulse position desired */
- const Word16 T0, /* i : Pitch information of the 1 subfr */
- Word32 enr_q, /* i : energy provide by the encoder */
- Word16 *Aq, /* i : A(z) filter Q12 */
- const Word16 L_frame /* i : frame length */
- ,
+ Word16 *exc, /* i/o : exc vector to modify */
+ Word16 puls_pos, /* i : last pulse position desired */
+ const Word16 T0, /* i : Pitch information of the 1 subfr */
+ Word32 enr_q, /* i : energy provide by the encoder */
+ Word16 *Aq, /* i : A(z) filter Q12 */
+ const Word16 L_frame, /* i : frame length */
const Word16 Qold );
Word16 FEC_enhACB_fx(
@@ -8172,7 +8299,7 @@ Word16 FEC_enhACB_fx(
const Word16 bfi_pitch /* i : Q6 pitch used for concealment */
);
-/*! r: do_WI flag */
+/*! r: do_WI flag */
Word16 FEC_synchro_exc_fx(
const Word16 L_frame, /* i : length of the frame */
Word16 *exc, /* i/o: exc vector to modify */
@@ -8195,7 +8322,6 @@ void decod_unvoiced_fx(
Word16 *bwe_exc_fx, /* Q_X i/o: excitation for SWB TBE */
Word16 *gain_buf );
-// gaus_dec_fx.c
void gaus_dec_fx(
Decoder_State *st_fx, /* i/o: decoder static memory */
const Word16 i_subfr, /* i : subframe index */
@@ -8242,7 +8368,6 @@ ivas_error decod_gen_voic_fx(
const Word16 tdm_Pri_pitch_buf[] /* i : primary channel pitch buffer */
);
-// dec_tran_fx.c
void decod_tran_fx(
Decoder_State *st_fx, /* i/o: decoder static memory */
const Word16 L_frame_fx, /* i : length of the frame */
@@ -8259,7 +8384,6 @@ void decod_tran_fx(
Word16 *gain_buf /*Q14*/
);
-// transition_dec_fx.c
void transition_dec_fx(
Decoder_State *st_fx, /* i/o: decoder state structure */
const Word16 Opt_AMR_WB, /* i : flag indicating AMR-WB IO mode */
@@ -8280,25 +8404,21 @@ void transition_dec_fx(
Word16 tc_classif_fx(
Decoder_State *st_fx, /* i/o: decoder state structure */
- const Word16 L_frame /* i : length of the frame */
+ const Word16 L_frame /* i : length of the frame */
);
-// dec_ppp_fx.c
ivas_error decod_ppp_fx(
- Decoder_State *st_fx, /* i/o: state structure */
- const Word16 Aq_fx[], /* i : 12k8 Lp coefficient */
- Word16 *pitch_buf_fx, /* i/o: fixed pitch values for each subframe */
- Word16 *exc_fx, /* i/o: current non-enhanced excitation */
- Word16 *exc2_fx, /* i/o: current enhanced excitation */
- Word16 bfi /* i : bad frame indicator */
- ,
- Word16 *gain_buf /*Q14*/
- ,
+ Decoder_State *st_fx, /* i/o: state structure */
+ const Word16 Aq_fx[], /* i : 12k8 Lp coefficient */
+ Word16 *pitch_buf_fx, /* i/o: fixed pitch values for each subframe */
+ Word16 *exc_fx, /* i/o: current non-enhanced excitation */
+ Word16 *exc2_fx, /* i/o: current enhanced excitation */
+ Word16 bfi, /* i : bad frame indicator */
+ Word16 *gain_buf, /*Q14*/
Word16 *voice_factors, /* o : voicing factors */
Word16 *bwe_exc_fx /* o : excitation for SWB TBE */
);
-// swb_bwe_dec_lr_fx.c
void swb_bwe_dec_lr_fx(
Decoder_State *st_fx, /* i/o: decoder state structure */
const Word32 L_m_core[], /* i : lowband synthesis : QsL */
@@ -8322,7 +8442,6 @@ void swb_bwe_dec_lr_fx(
Word16 *ni_seed_fx /* i/o: random seed : QsL */
);
-// dec_acelp_tck_main_fx.c
Word16 dec_acelp_tcx_frame_fx(
Decoder_State *st, /* i/o: decoder state structure */
Word16 *concealWholeFrame, /* i/o: concealment flag */
@@ -8334,7 +8453,6 @@ Word16 dec_acelp_tcx_frame_fx(
Word16 pitch_buf[] /* o : floating pitch for each subframe */
);
-// dec_LPD_fx.c
void decoder_LPD_fx(
Word16 signal_out[], /* o : signal with LPD delay (7 subfrs) */
Word16 signal_outFB[], /* o : synthesis @output_FS */
@@ -8349,7 +8467,6 @@ void decoder_LPD_fx(
Word16 *ptr_bwe_exc /* o : excitation for SWB TBE */
);
-// core_dec_switch_fx.c
void mode_switch_decoder_LPD_fx(
Decoder_State *st, /* Q0 */
Word16 bandwidth_in, /* Q0 */
@@ -8374,17 +8491,16 @@ void mode_switch_decoder_LPD_ivas_fx(
Word16 *Q_old_outLB,
Word16 *Q_old_Aq_12_8 );
-// ari_hm_dec.c
-
Word16 DecodeIndex(
Decoder_State *st,
const Word16 Bandwidth, /* o : NB, 1: (S)WB */
Word16 *PeriodicityIndex );
-Word16
-DecodeIndex_fx(
+
+Word16 DecodeIndex_fx(
Decoder_State *st,
const Word16 Bandwidth,
Word16 *PeriodicityIndex );
+
void tcx_hm_decode(
const Word16 L_frame, /* i : number of spectral lines */
Word32 env[], /* i/o: envelope shape (Q16) */
@@ -8395,7 +8511,6 @@ void tcx_hm_decode(
Word16 *hm_bits /* o : bit consumption */
);
-// lsf_msvq_ma_dec_fx.c
Word16 lsf_msvq_ma_decprm(
Decoder_State *st,
Word16 *param_lpc /* Q0 */
@@ -8404,8 +8519,8 @@ Word16 lsf_msvq_ma_decprm(
Word16 lsf_bctcvq_decprm(
Decoder_State *st,
Word16 *param_lpc /* Q0 */
-
);
+
Word16 D_lsf_tcxlpc(
const Word16 indices[], /* i : VQ indices Q0*/
Word16 lsf_q[], /* o : quantized LSF Q1*/
@@ -8422,7 +8537,6 @@ Word16 dec_lsf_tcxlpc(
Word16 cdk /* i : codebook selector Q0*/
);
-// lsf_msvq_ma_fx.c
void midlsf_dec(
const Word16 qlsf0[], /* i: quantized lsf coefficients (3Q12) */
const Word16 qlsf1[], /* i: quantized lsf coefficients (3Q12) */
@@ -8439,8 +8553,6 @@ Word16 lsf_ind_is_active(
const Word16 narrowband,
const Word16 cdk );
-
-// IGFSCFDecoder.c
void IGFSCFDecoderOpen(
IGFSCFDEC_INSTANCE_HANDLE hPublicData, /* i : handle to public data */
H_IGF_INFO hIgfInfo, /* i : IGF info handle */
@@ -8462,14 +8574,17 @@ void IGFSCFDecoderDecode(
if 0 on input the decoder will be forced to encode without a reset */
);
-// ari_dec_fx.c
-Word32 ari_decode_overflow_fx( Tastat *s );
+Word32 ari_decode_overflow_fx(
+ Tastat *s );
void ari_start_decoding_14bits_fx(
Decoder_State *st,
Tastat *s );
-Word16 ari_start_decoding_14bits_prm_fx( const Word16 *ptr, Word16 bp, Tastat *s );
+Word16 ari_start_decoding_14bits_prm_fx(
+ const Word16 *ptr,
+ Word16 bp,
+ Tastat *s );
Word16 ari_decode_14bits_s17_ext_fx(
Decoder_State *st,
@@ -8485,11 +8600,21 @@ Word16 ari_decode_14bits_bit_ext_fx(
Decoder_State *st,
Tastat *s );
-Word16 ari_decode_14bits_pow_fx( Word16 *ptr, Word16 bp, Word16 bits, Word16 *res, Tastat *s, Word16 base );
+Word16 ari_decode_14bits_pow_fx(
+ Word16 *ptr,
+ Word16 bp,
+ Word16 bits,
+ Word16 *res,
+ Tastat *s,
+ Word16 base );
-Word16 ari_decode_14bits_sign_fx( Word16 *ptr, Word16 bp, Word16 bits, Word16 *res, Tastat *s );
+Word16 ari_decode_14bits_sign_fx(
+ Word16 *ptr,
+ Word16 bp,
+ Word16 bits,
+ Word16 *res,
+ Tastat *s );
-// dec_prm_fx.c
void getTCXparam_fx(
Decoder_State *st, /* i/o: Decoder State handle */
Decoder_State *st0, /* i : bitstream */
@@ -8501,6 +8626,7 @@ void getTCXparam_fx(
Word16 p_param[2], /* o : pointer to parameters for next round of bs reading Q0 */
Word16 nTnsBitsTCX10[2], /*Q0*/
const Word16 pre_past_flag /*Q0*/ );
+
void dec_prm_fx(
Word16 *coder_type,
Word16 param[], /* (o) : decoded parameters */
@@ -8517,7 +8643,6 @@ void getLPCparam_fx(
const Word16 ch, /* i : channel Q0 */
const Word16 sns_low_br_mode /* i : SNS low-bitrate mode Q0 */
);
-// ari_hm_fx.c
void UnmapIndex(
const Word16 PeriodicityIndex, /* Q0 */
@@ -8556,24 +8681,25 @@ void tcx_hm_modify_envelope(
Word16 L_frame /* i: number of spectral lines Q0 */
);
-// tns_base_dec_fx.c
-Word16
-ReadTnsData( STnsConfig const *pTnsConfig,
- Decoder_State *st,
- Word16 *pnBits,
- Word16 *stream,
- Word16 *pnSize );
+Word16 ReadTnsData(
+ STnsConfig const *pTnsConfig,
+ Decoder_State *st,
+ Word16 *pnBits,
+ Word16 *stream,
+ Word16 *pnSize );
-void ReadTnsData_ivas_fx( STnsConfig const *pTnsConfig,
- Decoder_State *st,
- Word16 *pnBits,
- Word16 *stream,
- Word16 *pnSize );
+void ReadTnsData_ivas_fx(
+ STnsConfig const *pTnsConfig,
+ Decoder_State *st,
+ Word16 *pnBits,
+ Word16 *stream,
+ Word16 *pnSize );
-Word16 DecodeTnsData( STnsConfig const *pTnsConfig,
- Word16 const *stream,
- Word16 *pnSize,
- STnsData *pTnsData );
+Word16 DecodeTnsData(
+ STnsConfig const *pTnsConfig,
+ Word16 const *stream,
+ Word16 *pnSize,
+ STnsData *pTnsData );
Word16 DecodeTnsData_ivas_fx(
STnsConfig const *pTnsConfig,
@@ -8581,7 +8707,6 @@ Word16 DecodeTnsData_ivas_fx(
Word16 *pnSize,
STnsData *pTnsData );
-// parametr_bitmapping.c using ivas
void GetParameters(
ParamsBitMap const *paramsBitMap,
const Word16 nParams,
@@ -8641,25 +8766,27 @@ void ReadFromBitstream_fx(
Decoder_State *st,
Word16 **pStream,
Word16 *pnSize );
-// igf_dec_fx.c
-void IGFDecReadData( const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Deccoder */
- Decoder_State *st, /**< in: | decoder state */
- const Word16 igfGridIdx, /**< in: Q0 | in case of CELP->TCX switching, use 1.25 framelength */
- const Word16 isIndepFrame /**< in: Q0 | if 1: arith dec force reset, if 0: no reset */
-);
-void IGFDecReadLevel( const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Deccoder */
- Decoder_State *st, /**< in: | decoder state */
- const Word16 igfGridIdx, /**< in: Q0 | in case of CELP->TCX switching, use 1.25 framelength */
- const Word16 isIndepFrame /**< in: Q0 | if 1: arith dec force reset, if 0: no reset */
+void IGFDecReadData(
+ const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Deccoder */
+ Decoder_State *st, /**< in: | decoder state */
+ const Word16 igfGridIdx, /**< in: Q0 | in case of CELP->TCX switching, use 1.25 framelength */
+ const Word16 isIndepFrame /**< in: Q0 | if 1: arith dec force reset, if 0: no reset */
);
-void IGFDecApplyMono( const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Decoder */
- Word32 *spectrum, /**< in/out: | MDCT spectrum */
- Word16 *spectrum_e, /**< in/out: | exponent of spectrum */
- const Word16 igfGridIdx, /**< in: | in case of CELP->TCX switching, use 1.25 framelength */
- Word16 bfi /**< in: | frame loss == 1, frame good == 0 */
+void IGFDecReadLevel(
+ const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Deccoder */
+ Decoder_State *st, /**< in: | decoder state */
+ const Word16 igfGridIdx, /**< in: Q0 | in case of CELP->TCX switching, use 1.25 framelength */
+ const Word16 isIndepFrame /**< in: Q0 | if 1: arith dec force reset, if 0: no reset */
+);
+void IGFDecApplyMono(
+ const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Decoder */
+ Word32 *spectrum, /**< in/out: | MDCT spectrum */
+ Word16 *spectrum_e, /**< in/out: | exponent of spectrum */
+ const Word16 igfGridIdx, /**< in: | in case of CELP->TCX switching, use 1.25 framelength */
+ Word16 bfi /**< in: | frame loss == 1, frame good == 0 */
);
void IGFDecApplyMono_ivas(
@@ -8693,6 +8820,7 @@ void IGFDecSetMode(
const Word16 defaultStopLine, /* i : default stop subband index */
const Word16 rf_mode /* i : flag to signal the RF mode */
);
+
void IGFDecSetMode_ivas_fx(
const IGF_DEC_INSTANCE_HANDLE hIGFDec, /* i : instance handle of IGF Decoder */
const Word32 total_brate, /* i : bitrate */
@@ -8703,8 +8831,9 @@ void IGFDecSetMode_ivas_fx(
const Word16 rf_mode /* i : flag to signal the RF mode */
);
-void IGFDecUpdateInfo( const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Decoder */
- const Word16 igfGridIdx /**< in: | IGF grid index */
+void IGFDecUpdateInfo(
+ const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Decoder */
+ const Word16 igfGridIdx /**< in: | IGF grid index */
);
void IGFDecUpdateInfo_ivas_fx(
@@ -8713,10 +8842,11 @@ void IGFDecUpdateInfo_ivas_fx(
const Word16 igfGridIdx /* i : IGF grid index */
);
-void IGFDecCopyLPCFlatSpectrum( const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Decoder */
- const Word32 *pSpectrumFlat, /**< in: Q31 | LPC flattend spectrum from TCX dec */
- const Word16 pSpectrumFlat_exp, /**< in: | exponent of pSpectrumFlat */
- const Word16 igfGridIdx /**< in: Q0 | IGF grid index */
+void IGFDecCopyLPCFlatSpectrum(
+ const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Decoder */
+ const Word32 *pSpectrumFlat, /**< in: Q31 | LPC flattend spectrum from TCX dec */
+ const Word16 pSpectrumFlat_exp, /**< in: | exponent of pSpectrumFlat */
+ const Word16 igfGridIdx /**< in: Q0 | IGF grid index */
);
void IGFDecCopyLPCFlatSpectrum_fx(
@@ -8726,12 +8856,14 @@ void IGFDecCopyLPCFlatSpectrum_fx(
const Word16 igfGridIdx /**< in: Q0 | IGF grid index */
);
-void IGFDecStoreTCX10SubFrameData( const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Decoder */
- const Word16 subFrameIdx /**< in: Q0 | index of subframe */
+void IGFDecStoreTCX10SubFrameData(
+ const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Decoder */
+ const Word16 subFrameIdx /**< in: Q0 | index of subframe */
);
-void IGFDecRestoreTCX10SubFrameData( const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Decoder */
- const Word16 subFrameIdx /**< in: Q0 | index of subframe */
+void IGFDecRestoreTCX10SubFrameData(
+ const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Decoder */
+ const Word16 subFrameIdx /**< in: Q0 | index of subframe */
);
void IGFDecRestoreTCX10SubFrameData_fx(
@@ -8739,17 +8871,16 @@ void IGFDecRestoreTCX10SubFrameData_fx(
const Word16 subFrameIdx /* i : index of subframe */
);
-
void init_igf_dec(
IGF_DEC_INSTANCE_HANDLE hIGFDec /* i/o: IGF decoder handle */
);
-// dlpc_avq_fx.c
Word16 dlpc_avq_fx(
Word16 *index, /* (i) Quantization indices */
Word16 *LSF_Q, /* (o) Quantized LSF vectors */
Word16 numlpc, /* (i) Number of sets of lpc */
Word32 sr_core );
+
Word16 decode_lpc_avq_fx(
Decoder_State *st, /* i/o: decoder state structure */
const Word16 numlpc, /* i : Number of sets of lpc */
@@ -8757,35 +8888,30 @@ Word16 decode_lpc_avq_fx(
);
Word16 decode_lpc_avq_ivas_fx(
- Decoder_State *st, /* i/o: decoder state structure */
- const Word16 numlpc, /* i : Number of sets of lpc */
- Word16 *param_lpc /* o : lpc parameters */
- ,
+ Decoder_State *st, /* i/o: decoder state structure */
+ const Word16 numlpc, /* i : Number of sets of lpc */
+ Word16 *param_lpc, /* o : lpc parameters */
const Word16 ch, /* i : channel */
const Word16 element_mode, /* i : element mode */
const Word16 sns_low_br_mode /* i : SNS low-bitrate mode */
);
-// vlpc_1st_dec_fx.c
+
void vlpc_1st_dec(
- Word16 index, /* i : codebook index */
+ Word16 index, /* i : codebook index */
Word16 *lsfq ); /* i/o: i:prediction o:quantized lsf */
-
-// vlpc_2st_dec_fx.c
void vlpc_2st_dec(
- Word16 *lsfq, /* i/o: i:1st stage o:1st+2nd stage */
+ Word16 *lsfq, /* i/o: i:1st stage o:1st+2nd stage */
Word16 *indx, /* i : index[] (4 bits per words) */
Word16 mode, /* i : 0=abs, >0=rel */
Word32 sr_core );
-// vlpc_2st_com_fx.c
-void lsf_weight_2st( const Word16 *lsfq, /* input: quantized lsf coefficients (14Q1*1.28) */
- Word16 *w, /* output: weighting function (0Q15*1.28) */
- const Word16 mode /* input: operational mode Q0 */
+void lsf_weight_2st(
+ const Word16 *lsfq, /* input: quantized lsf coefficients (14Q1*1.28) */
+ Word16 *w, /* output: weighting function (0Q15*1.28) */
+ const Word16 mode /* input: operational mode Q0 */
);
-// ACcontextMapping_fx.c
-
/* Returns: index of next coefficient */
Word16 get_next_coeff_mapped(
Word16 ii[2], /* i/o: coefficient indexes Q0*/
@@ -8812,9 +8938,6 @@ Word32 update_mixed_context_ivas_fx(
Word16 a /* Q0 */
);
-
-// ACcontextMapping_dec_fx.c
-
typedef Word16 ( *get_next_coeff_function )(
Word16 ii[2], /* i/o: coefficient indexes */
Word16 *pp, /* o : peak(1)/hole(0) indicator */
@@ -8830,6 +8953,7 @@ Word16 ACcontextMapping_decode2_no_mem_s17_LC(
Word16 resQMaxBits, /* i: residual coding maximum bits*/
CONTEXT_HM_CONFIG *hm_cfg /* i: context-based harmonic model configuration */
);
+
Word16 RCcontextMapping_decode2_no_mem_s17_LCS_fx(
Decoder_State *st, /* i/o: decoder state */
Word16 *x, /* o : decoded spectrum */
@@ -8839,7 +8963,6 @@ Word16 RCcontextMapping_decode2_no_mem_s17_LCS_fx(
CONTEXT_HM_CONFIG *hm_cfg /* i : context-based harmonic model configuration*/
);
-// core_dec_reconf_fx.c
void reconfig_decoder_LPD_fx(
Decoder_State *st, /* i/o: decoder state structure */
Word16 bits_frame, /* i : bit budget Q0*/
@@ -8847,6 +8970,7 @@ void reconfig_decoder_LPD_fx(
Word32 total_brate, /* i : total bitrate Q0*/
Word16 L_frame_old /* i : frame length Q0*/
);
+
void reconfig_decoder_LPD_ivas_fx(
Decoder_State *st, /* i/o: decoder state structure */
const Word16 bits_frame, /* i : bit budget Q0*/
@@ -8855,34 +8979,28 @@ void reconfig_decoder_LPD_ivas_fx(
const Word16 L_frame_old /* i : frame length Q0*/
);
-// er_utils_fx.c
-void minimumStatistics_fx( Word16 *noiseLevelMemory, /* Q15, internal state */
- Word16 *noiseLevelIndex, /* Q0, internal state */
- Word16 *currLevelIndex, /* Q0, internal state (circular buffer) */
- Word16 *noiseEstimate, /* Q15, previous estimate of background noise */
- Word16 *lastFrameLevel, /* Q15, level of the last frame */
- Word16 currentFrameLevel, /* Q15, level of the current frame */
- Word16 *noiseLevelMemory_e, /* scaling factor for noiseLevelMemory */
- Word16 const noiseEstimate_e, /* exponent of noiseEstimate */
- Word16 *new_noiseEstimate_e, /* new exponent of noise Estimate*/
- Word16 *const lastFrameLevel_e, /* exponent of lastFrameLevel */
- Word16 currentFrameLevel_e ); /* exponent of currentFrameLevel */
-
-
-Word16 getLevelSynDeemph_fx( /*10Q5*/
- Word16 h1Init[],
- /* i: i value or vector to be processed */ /* Q15 */
- Word16 const A[],
- /* i: LPC coefficients */ /* Qx */
- Word16 const lpcorder,
- /* i: LPC order */ /* Q0 */
- Word16 const lenLpcExc,
- /* i: length of the LPC excitation buffer */ /* Q0 */
- Word16 const preemph_fac,
- /* i: preemphasis factor */ /* Q15 */
- Word16 const numLoops,
- /* i: number of loops */ /* Q0 */
- Word16 *Exp /* o: exponent of return value Q15 */
+void minimumStatistics_fx(
+ Word16 *noiseLevelMemory, /* Q15, internal state */
+ Word16 *noiseLevelIndex, /* Q0, internal state */
+ Word16 *currLevelIndex, /* Q0, internal state (circular buffer) */
+ Word16 *noiseEstimate, /* Q15, previous estimate of background noise */
+ Word16 *lastFrameLevel, /* Q15, level of the last frame */
+ Word16 currentFrameLevel, /* Q15, level of the current frame */
+ Word16 *noiseLevelMemory_e, /* scaling factor for noiseLevelMemory */
+ Word16 const noiseEstimate_e, /* exponent of noiseEstimate */
+ Word16 *new_noiseEstimate_e, /* new exponent of noise Estimate*/
+ Word16 *const lastFrameLevel_e, /* exponent of lastFrameLevel */
+ Word16 currentFrameLevel_e ); /* exponent of currentFrameLevel */
+
+/*10Q5*/
+Word16 getLevelSynDeemph_fx(
+ Word16 h1Init[], /* i: i value or vector to be processed Q15 */
+ Word16 const A[], /* i: LPC coefficients Qx */
+ Word16 const lpcorder, /* i: LPC order Q0 */
+ Word16 const lenLpcExc, /* i: length of the LPC excitation buffer Q0 */
+ Word16 const preemph_fac, /* i: preemphasis factor Q15 */
+ Word16 const numLoops, /* i: number of loops Q0 */
+ Word16 *Exp /* o: exponent of return value Q15 */
);
void genPlcFiltBWAdap_fx(
@@ -8900,9 +9018,9 @@ void highPassFiltering_fx(
const Word16 l_fir_fer ); /* i: high pass filter length */
-Word16 GetPLCModeDecision_fx( Decoder_State *st );
+Word16 GetPLCModeDecision_fx(
+ Decoder_State *st );
-// dlpc_stoch_fx.c
void lpc_unquantize_fx(
Decoder_State *st,
Word16 *lsf,
@@ -8915,7 +9033,6 @@ void lpc_unquantize_fx(
Word16 *LSF_Q_prediction /* o : LSF prediction mode */
);
-// dlpc_bfi_fx.c
void dlpc_bfi(
const Word16 L_frame,
Word16 *lsf_q, /* o : quantized LSFs */
@@ -8934,7 +9051,6 @@ void dlpc_bfi(
const Word16 *lsfBase, /* i : base for differential LSF coding */
Word8 tcxonly );
-// guided_plc_util_fx.c
void getLookAheadResSig(
Word16 *speechLookAhead, /* Qx */
Word16 *A_3Q12, /* 3Q12 */
@@ -8942,10 +9058,12 @@ void getLookAheadResSig(
const Word16 L_frame, /* Q0 */
const Word16 numSubFrame /* Q0 */
);
+
void updateLSFForConcealment(
PLC_ENC_EVS_HANDLE decState,
Word16 *lsf_14Q1 /* 14Q1 */
);
+
void getConcealedLP(
PLC_ENC_EVS_HANDLE memDecState,
Word16 *AqCon, /* 14Q1 */
@@ -8953,6 +9071,7 @@ void getConcealedLP(
const Word16 last_good, /* Q0 */
const Word16 L_frame /* Q0 */
);
+
void getConcealedLSF(
PLC_ENC_EVS_HANDLE memDecState,
const Word16 lsfBase[], /* Q1 * 1.28 */
@@ -8975,25 +9094,21 @@ void modify_lsf(
const Word16 reset_q /* Q0 */
);
-// er_dec_tcx_fx.c
void con_tcx_fx(
- Decoder_State *st, /* i/o: coder memory state */
- Word16 synth[] /* i/o: synth[] */ /*Q0 */
+ Decoder_State *st, /* i/o: coder memory state */
+ Word16 synth[] /* i/o: synth[] Q0 */
);
-// er_scale_sync.c
-Word16 Damping_fact_fx( /* o : damping factor */ /*Q14*/
- const Word16 coder_type, /* i : coding type in last good received frame */
- const Word16 nbLostCmpt, /* i : counter of consecutive bfi frames */
- const Word16 last_good, /* i : last good frame class */
- const Word16 stab_fac,
- /* i : ISF stability factor */ /*Q15*/
- Word32 *lp_gainp,
- /*i/o: damped pitch gain */ /*Q16 Word32!*/
- const Word16 core /* i : current coding mode */
+/* o : damping factor Q14*/
+Word16 Damping_fact_fx(
+ const Word16 coder_type, /* i : coding type in last good received frame */
+ const Word16 nbLostCmpt, /* i : counter of consecutive bfi frames */
+ const Word16 last_good, /* i : last good frame class */
+ const Word16 stab_fac, /* i : ISF stability factor Q15*/
+ Word32 *lp_gainp, /*i/o: damped pitch gain Q16 Word32!*/
+ const Word16 core /* i : current coding mode */
);
-// dec_tcx_fx.c
void decoder_tcx_fx(
TCX_CONFIG_HANDLE hTcxCfg,
Word16 prm[], /* i : parameters */
@@ -9022,13 +9137,13 @@ void decoder_tcx_ivas_fx(
const Word16 frame_cnt,
const Word16 sba_dirac_stereo_flag );
-void decoder_tcx_post_fx( Decoder_State *st_fx,
- Word16 *synth,
- Word16 *synthFB,
- Word16 *A,
- Word16 bfi );
+void decoder_tcx_post_fx(
+ Decoder_State *st_fx,
+ Word16 *synth,
+ Word16 *synthFB,
+ Word16 *A,
+ Word16 bfi );
-// arith_coder_dec_fx.c
void tcx_arith_decode_envelope_fx(
Word32 q_spectrum[], /* o: quantised MDCT coefficients Q31-e */
Word16 *q_spectrum_e, /* o: MDCT exponent Q0 */
@@ -9043,13 +9158,10 @@ void tcx_arith_decode_envelope_fx(
Word16 tcxltp_pitch, /* i: TCX LTP pitch in FD, -1 if n/a*/
Word16 *arith_bits, /* o: bits used for ari. coding */
Word16 *signaling_bits, /* o: bits used for signaling */
- Word16 *nf_seed /* o: noise filling seed Q0 */
- ,
- Word16 low_complexity /* i: low-complexity flag Q0 */
-
+ Word16 *nf_seed, /* o: noise filling seed Q0 */
+ Word16 low_complexity /* i: low-complexity flag Q0 */
);
-// tcx_utils_dec_fx.c
void tcx_decoder_memory_update(
Word16 *xn_buf, /* i/o: mdct output buffer used also as temporary buffer : Q0 */
Word16 *synthout, /* o: synth : Q0 */
@@ -9086,7 +9198,6 @@ Word16 tcx_res_invQ_spec(
const Word16 lf_deemph_factors[] /*i : LF deemphasis factors Q14*/
);
-// er_dec_acelp_fx.c
void con_acelp_fx(
const Word16 A[], /*mem_syn >rescaling done */
- ,
+ Word16 *Qf_mem_syn, /*mem_syn >rescaling done */
Word16 *pitch_buffer,
Word16 *voice_factors,
Word16 *bwe_exc );
-// dec_ace_fx.c
void decoder_acelp_fx(
Decoder_State *st,
Word16 prm[], /* i : parameters */
@@ -9118,7 +9227,6 @@ void decoder_acelp_fx(
Word16 *bwe_exc /* out: excitation for SWB TBE */
);
-// d_gain2p.c
void decode_acelp_gains_fx(
Word16 *code,
Word16 gains_mode,
@@ -9139,7 +9247,6 @@ void d_gain_pred_fx(
Word16 **pt_indice /* i/o: pointer to the buffer of indices */
);
-// evs_dec_fx.c
ivas_error evs_dec_fx(
Decoder_State *st_fx, /* i/o : Decoder state structure */
Word16 output_sp[], /* o : output synthesis signal */
@@ -9198,14 +9305,14 @@ void v_add_fx(
void v_shr_16(
const Word16 x[], /* i : Input vector */
const Word16 shift, /* i : Constant */
- Word16 y[], /* o : Output vector that contains x >> shift */
+ Word16 y[], /* o : Output vector that contains x >> shift */
const Word16 N /* i : Vector length */
);
void v_shr(
const Word32 x[], /* i : Input vector */
const Word16 shift, /* i : Constant */
- Word32 y[], /* o : Output vector that contains x >> shift */
+ Word32 y[], /* o : Output vector that contains x >> shift */
const Word16 N /* i : Vector length */
);
@@ -9216,42 +9323,38 @@ void cldfbAnalysis_ts_fx(
const Word16 samplesToProcess, /* i : samples to process */
HANDLE_CLDFB_FILTER_BANK h_cldfb,
Word16 *q_cldfb );
-Word16 floor_log_2( Word32 num );
+
+Word16 floor_log_2(
+ Word32 num );
void cldfbAnalysis_ts_fx_var_q(
- const Word32 *timeIn_fx,
- /* i : time buffer */ // q
- Word32 realBuffer_fx[CLDFB_NO_CHANNELS_MAX],
- /* o : real value buffer */ // q_cldfb - 5
- Word32 imagBuffer_fx[CLDFB_NO_CHANNELS_MAX],
- /* o : imag value buffer */ // q_cldfb - 5
- const Word16 samplesToProcess, /* i : samples to process */
- HANDLE_CLDFB_FILTER_BANK h_cldfb, /* i : filterbank state */
+ const Word32 *timeIn_fx, /* i : time buffer q */
+ Word32 realBuffer_fx[CLDFB_NO_CHANNELS_MAX], /* o : real value buffer q_cldfb - 5 */
+ Word32 imagBuffer_fx[CLDFB_NO_CHANNELS_MAX], /* o : imag value buffer q_cldfb - 5 */
+ const Word16 samplesToProcess, /* i : samples to process */
+ HANDLE_CLDFB_FILTER_BANK h_cldfb, /* i : filterbank state */
Word16 *q_cldfb );
void cldfbAnalysis_ts_fx_fixed_q(
- const Word32 *timeIn_fx,
- /* i : time buffer */ // q
- Word32 realBuffer_fx[CLDFB_NO_CHANNELS_MAX],
- /* o : real value buffer */ // q - 5
- Word32 imagBuffer_fx[CLDFB_NO_CHANNELS_MAX],
- /* o : imag value buffer */ // q - 5
- const Word16 samplesToProcess, /* i : samples to process */
- HANDLE_CLDFB_FILTER_BANK h_cldfb, /* i : filterbank state */
+ const Word32 *timeIn_fx, /* i : time buffer q */
+ Word32 realBuffer_fx[CLDFB_NO_CHANNELS_MAX], /* o : real value buffer q - 5 */
+ Word32 imagBuffer_fx[CLDFB_NO_CHANNELS_MAX], /* o : imag value buffer q - 5 */
+ const Word16 samplesToProcess, /* i : samples to process */
+ HANDLE_CLDFB_FILTER_BANK h_cldfb, /* i : filterbank state */
Word16 *q_cldfb );
void configureCldfb_ivas_fx(
HANDLE_CLDFB_FILTER_BANK h_cldfb, /* i/o: filter bank handle */
const Word32 sampling_rate /* i : sampling rate */
);
-// dec4t64.c
+
void dec_acelp_fast_fx(
Decoder_State *st, /* i/o: decoder state structure */
const Word16 cdk_index, /* i : codebook index */
Word16 code[], /* o : algebraic (fixed) codebook excitation */
const Word16 L_subfr /* i : subframe length */
);
-// codec_tcx_common.c
+
void tcx5SpectrumInterleaving_fx(
const Word16 tcx5Size,
Word32 *spectrum );
@@ -9271,7 +9374,6 @@ void tcx5TnsUngrouping_fx(
Word32 *spectrum,
const Word16 enc_dec );
-// bass_psfilter.c
void bpf_pitch_coherence_ivas_fx(
Decoder_State *st, /* i/o: decoder state structure */
const Word32 pitch_buf[] /* i : pitch for each subframe [0,1,2,3] */
@@ -9296,8 +9398,8 @@ void cldfbSynthesis_ivas_fx(
Word32 **imagBuffer_fx, /* i : imag values Qx*/
Word32 *timeOut_fx, /* o : output time domain samples Qx - 1*/
const Word16 samplesToProcess, /* i : number of processed samples */
- const Word16 shift, /* i : scale for state buffer */
- const Word16 out_shift, /* i : scale for output buffer */
+ const Word16 shift, /* i : scale for state buffer */
+ const Word16 out_shift, /* i : scale for output buffer */
HANDLE_CLDFB_FILTER_BANK h_cldfb /* i : filter bank state */
);
@@ -9309,7 +9411,7 @@ void addBassPostFilter_ivas_fx(
Word32 **iAnalysis_fx,
HANDLE_CLDFB_FILTER_BANK cldfb );
-/* o : Q22*/
+/* o : Q22*/
Word32 ism_dequant_meta_fx(
const Word16 idx, /* i : quantizer index */
const Word32 borders_fx[], /* i : level borders Q22*/
@@ -9369,9 +9471,36 @@ void generate_masking_noise_dirac_ivas_fx(
const Word16 fd_cng_flag, /* i : FD-CNG flag for HB */
Word16 q_input,
Word16 *q_cldfb );
-// modif_fs/c
-void IMDCT_fx( Word32 *x, Word16 x_e, Word16 *old_syn_overl, Word16 *syn_Overl_TDAC, Word16 *xn_buf, const Word16 *tcx_aldo_window_1, const PWord16 *tcx_aldo_window_1_trunc, const PWord16 *tcx_aldo_window_2, const PWord16 *tcx_mdct_window_half, const PWord16 *tcx_mdct_window_minimum, const PWord16 *tcx_mdct_window_trans, Word16 tcx_mdct_window_half_length, Word16 tcx_mdct_window_min_length, Word16 index, Word16 left_rect, Word16 tcx_offset, Word16 overlap, Word16 L_frame, Word16 L_frameTCX, Word16 L_spec_TCX5, Word16 L_frame_glob, Word16 frame_cnt, Word16 bfi, Word16 *old_out, Word16 *Q_old_wtda, Decoder_State *st, Word16 fullbandScale, Word16 *acelp_zir );
+void IMDCT_fx(
+ Word32 *x,
+ Word16 x_e,
+ Word16 *old_syn_overl,
+ Word16 *syn_Overl_TDAC,
+ Word16 *xn_buf,
+ const Word16 *tcx_aldo_window_1,
+ const PWord16 *tcx_aldo_window_1_trunc,
+ const PWord16 *tcx_aldo_window_2,
+ const PWord16 *tcx_mdct_window_half,
+ const PWord16 *tcx_mdct_window_minimum,
+ const PWord16 *tcx_mdct_window_trans,
+ Word16 tcx_mdct_window_half_length,
+ Word16 tcx_mdct_window_min_length,
+ Word16 index,
+ Word16 left_rect,
+ Word16 tcx_offset,
+ Word16 overlap,
+ Word16 L_frame,
+ Word16 L_frameTCX,
+ Word16 L_spec_TCX5,
+ Word16 L_frame_glob,
+ Word16 frame_cnt,
+ Word16 bfi,
+ Word16 *old_out,
+ Word16 *Q_old_wtda,
+ Decoder_State *st,
+ Word16 fullbandScale,
+ Word16 *acelp_zir );
void IMDCT_ivas_fx(
Word32 *x_fx,
@@ -9425,7 +9554,6 @@ void configureFdCngDec_fx(
const Word16 last_L_frame,
const Word16 element_mode );
-
Word32 sum2_f_16_fx(
const Word16 *vec, /* i : input vector */
const Word16 lvec /* i : length of input vector */
@@ -9446,8 +9574,8 @@ Word16 vq_dec_lvq_ivas_fx(
Word16 indices[], /* i : Indices */
Word16 stages, /* i : Number of stages */
Word16 N, /* i : Vector dimension */
- Word16 mode, /* (i): mode_lvq, or mode_lvq_p */
- Word16 no_bits /* (i): no. bits for lattice */
+ Word16 mode, /* (i): mode_lvq, or mode_lvq_p */
+ Word16 no_bits /* (i): no. bits for lattice */
);
Word16 deindex_lvq_ivas_fx(
@@ -9458,7 +9586,6 @@ Word16 deindex_lvq_ivas_fx(
Word16 no_bits /* i : number of bits for lattice */
);
-
void deleteCldfb_ivas_fx(
HANDLE_CLDFB_FILTER_BANK *h_cldfb /* i/o: filter bank handle */
);
@@ -9476,7 +9603,7 @@ void stereo_dft_dec_open(
void ivas_bw_switching_pre_proc_fx(
Decoder_State *st, /* i/o: decoder state structure */
const Word32 last_element_brate, /* i : last element bitrate */
- const Word16 nchan_out /* i : number of output channels */,
+ const Word16 nchan_out, /* i : number of output channels */
Word32 *old_syn_12k8_16k_fx,
Word16 Q,
Word16 Q_audio );
@@ -9488,32 +9615,30 @@ UWord32 mvl2s_r(
const Word16 n /* i : vector size */
);
-void decoder_tcx_post_ivas_fx( Decoder_State *st_fx,
- Word16 *synth,
- Word16 *synthFB,
- Word16 Q_syn,
- Word16 *A,
- Word16 bfi,
- Word16 MCT_flag );
+void decoder_tcx_post_ivas_fx(
+ Decoder_State *st_fx,
+ Word16 *synth,
+ Word16 *synthFB,
+ Word16 Q_syn,
+ Word16 *A,
+ Word16 bfi,
+ Word16 MCT_flag );
void con_tcx_ivas_fx(
- Decoder_State *st, /* i/o: coder memory state */
- Word16 synth[],
- /* i/o: synth[] */ /*Q0 */
- const Word16 coh, /* i : coherence of stereo signal */
- Word16 *noise_seed, /* i/o: noise seed for stereo */
- const Word16 only_left, /* i : TD-PLC only in left channel */
- const Word16 *A_cng /* i : CNG LP filter coefficients */
+ Decoder_State *st, /* i/o: coder memory state */
+ Word16 synth[], /* i/o: synth[] Q0 */
+ const Word16 coh, /* i : coherence of stereo signal */
+ Word16 *noise_seed, /* i/o: noise seed for stereo */
+ const Word16 only_left, /* i : TD-PLC only in left channel */
+ const Word16 *A_cng /* i : CNG LP filter coefficients */
);
void ivas_mdct_core_reconstruct_fx(
- CPE_DEC_HANDLE hCPE, /* i/o: CPE decoder structure */
- Word32 *x_fx[][NB_DIV],
- /* i/o: synthesis @internal_FS */ // Q(q_x)
- Word16 signal_outFB_fx[CPE_CHANNELS][L_FRAME_PLUS],
- /* o : synthesis @output_FS */ // e_sig
- Word16 fUseTns[CPE_CHANNELS][NB_DIV], /* i : flage TNS enabled */
- const Word16 MCT_flag, /* i : hMCT handle allocated (1) or not (0)*/
+ CPE_DEC_HANDLE hCPE, /* i/o: CPE decoder structure */
+ Word32 *x_fx[][NB_DIV], /* i/o: synthesis @internal_FS Q(q_x) */
+ Word16 signal_outFB_fx[CPE_CHANNELS][L_FRAME_PLUS], /* o : synthesis @output_FS e_sig */
+ Word16 fUseTns[CPE_CHANNELS][NB_DIV], /* i : flage TNS enabled */
+ const Word16 MCT_flag, /* i : hMCT handle allocated (1) or not (0)*/
Word16 q_x,
Word16 e_sig[CPE_CHANNELS] );
@@ -9542,42 +9667,48 @@ Word16 RCcontextMapping_encode2_estimate_no_mem_s17_LCS_fx(
CONTEXT_HM_CONFIG *hm_cfg /* context-based harmonic model configuration */
);
-Word16 usdequant_fx( /* Qx*/
- const Word16 idx, /* i: quantizer index Q0*/
- const Word16 qlow, /* i: lowest codebook entry (index 0) Qx*/
- const Word16 delta /* i: quantization step Qy*/
+/* Qx*/
+Word16 usdequant_fx(
+ const Word16 idx, /* i: quantizer index Q0*/
+ const Word16 qlow, /* i: lowest codebook entry (index 0) Qx*/
+ const Word16 delta /* i: quantization step Qy*/
);
-Word32 usdequant32_fx( /* Qx*/
- const Word16 idx, /* i: quantizer index Q0*/
- const Word32 qlow, /* i: lowest codebook entry (index 0) Qx*/
- const Word32 delta /* i: quantization step Qy*/
+/* Qx*/
+Word32 usdequant32_fx(
+ const Word16 idx, /* i: quantizer index Q0*/
+ const Word32 qlow, /* i: lowest codebook entry (index 0) Qx*/
+ const Word32 delta /* i: quantization step Qy*/
);
-Word16 usquant_fx( /* o: index of the winning codeword */
- const Word16 x, /* i: scalar value to quantize Qx*/
- Word16 *xq, /* o: quantized value Qx*/
- const Word16 qlow, /* i: lowest codebook entry (index 0) Qx*/
- const Word16 delta, /* i: quantization step Qx-1*/
- const Word16 cbsize /* i: codebook size */
+/* o: index of the winning codeword */
+Word16 usquant_fx(
+ const Word16 x, /* i: scalar value to quantize Qx*/
+ Word16 *xq, /* o: quantized value Qx*/
+ const Word16 qlow, /* i: lowest codebook entry (index 0) Qx*/
+ const Word16 delta, /* i: quantization step Qx-1*/
+ const Word16 cbsize /* i: codebook size */
);
-Word32 Dot_product( /* o : Sum */
- const Word16 x[], /* i : 12bits: x vector */
- const Word16 y[], /* i : 12bits: y vector */
- const Word16 lg /* i : vector length */
+/* o : Sum */
+Word32 Dot_product(
+ const Word16 x[], /* i : 12bits: x vector */
+ const Word16 y[], /* i : 12bits: y vector */
+ const Word16 lg /* i : vector length */
);
-Word32 dotp_fx( /* o : dot product of x[] and y[] */
- const Word16 x[], /* i : vector x[] */
- const Word16 y[], /* i : vector y[] */
- const Word16 n, /* i : vector length */
- Word16 *exp /* (o) : exponent of result (0..+30) */
+/* o : dot product of x[] and y[] */
+Word32 dotp_fx(
+ const Word16 x[], /* i : vector x[] */
+ const Word16 y[], /* i : vector y[] */
+ const Word16 n, /* i : vector length */
+ Word16 *exp /* (o) : exponent of result (0..+30) */
);
-Word32 sum2_fx_mod( /* o : sum of all squared vector elements Q(2x+1)*/
- const Word16 *vec, /* i : i vector Qx*/
- const Word16 lvec /* i : length of i vector */
+/* o : sum of all squared vector elements Q(2x+1)*/
+Word32 sum2_fx_mod(
+ const Word16 *vec, /* i : i vector Qx*/
+ const Word16 lvec /* i : length of i vector */
);
void Copy_Scale_sig(
@@ -9621,19 +9752,23 @@ void Random_Fill(
Word16 scaling /* i : scaling of values */
);
-Word16 mean_fx( /* o : mean of vector */
- const Word16 *vec_fx, /* i : i vector */
- const Word16 lvec_fx /* i : length of i vector */
+/* o : mean of vector */
+Word16 mean_fx(
+ const Word16 *vec_fx, /* i : i vector */
+ const Word16 lvec_fx /* i : length of i vector */
);
-Word16 mean_no_sat_fx( /* o : mean of vector Qx */
- const Word16 *vec_fx, /* i : input vector Qx */
- const Word16 lvec_fx /* i : length of input vector */
+/* o : mean of vector Qx */
+Word16 mean_no_sat_fx(
+ const Word16 *vec_fx, /* i : input vector Qx */
+ const Word16 lvec_fx /* i : length of input vector */
);
-Word32 mean_no_sat_Word32_fx( /* o : mean of vector Qx */
- const Word32 *vec_fx, /* i : input vector Qx */
- const Word16 lvec_fx, /* i : length of input vector */
- const Word16 gb );
+
+/* o : mean of vector Qx */
+Word32 mean_no_sat_Word32_fx(
+ const Word32 *vec_fx, /* i : input vector Qx */
+ const Word16 lvec_fx, /* i : length of input vector */
+ const Word16 gb );
void sort(
UWord16 *x, /* i/o: Vector to be sorted */
UWord16 len /* i/o: vector length */
@@ -9651,52 +9786,60 @@ void sort_32_fx(
const Word16 up /* I : High limit of sorting range */
);
-Word16 minimum_fx( /* o : index of the minimum value in the input vector */
- const Word16 *vec_fx, /* i : input vector */
- const Word16 lvec_fx, /* i : length of input vector */
- Word16 *min_fx /* o : minimum value in the input vector */
+/* o : index of the minimum value in the input vector */
+Word16 minimum_fx(
+ const Word16 *vec_fx, /* i : input vector */
+ const Word16 lvec_fx, /* i : length of input vector */
+ Word16 *min_fx /* o : minimum value in the input vector */
);
-Word16 maximum_fx( /* o : index of the maximum value in the input vector */
- const Word16 *vec_fx, /* i : input vector */
- const Word16 lvec_fx, /* i : length of input vector */
- Word16 *max_fx /* o : maximum value in the input vector */
+/* o : index of the maximum value in the input vector */
+Word16 maximum_fx(
+ const Word16 *vec_fx, /* i : input vector */
+ const Word16 lvec_fx, /* i : length of input vector */
+ Word16 *max_fx /* o : maximum value in the input vector */
);
-Word16 maximum_exp_fx( /* o : index of the maximum value in the input vector */
- const Word16 *vec_fx, /* i : input vector */
- const Word16 *exp_vec, /* i : exponents of input vector */
- const Word16 lvec_fx /* i : length of input vector */
+/* o : index of the maximum value in the input vector */
+Word16 maximum_exp_fx(
+ const Word16 *vec_fx, /* i : input vector */
+ const Word16 *exp_vec, /* i : exponents of input vector */
+ const Word16 lvec_fx /* i : length of input vector */
);
-Word16 maximum_abs_16_fx( /* o : index of the maximum abs value in the input vector */
- const Word16 *vec, /* i : input vector */
- const Word16 lvec, /* i : length of input vector */
- Word16 *max_val /* o : maximum value in the input vector */
+/* o : index of the maximum abs value in the input vector */
+Word16 maximum_abs_16_fx(
+ const Word16 *vec, /* i : input vector */
+ const Word16 lvec, /* i : length of input vector */
+ Word16 *max_val /* o : maximum value in the input vector */
);
-Word16 minimum_abs32_fx( /* o : index of the minimum value in the input vector */
- const Word32 *vec_fx, /* i : input vector */
- const Word16 lvec_fx, /* i : length of input vector */
- Word32 *min_fx /* o : minimum value in the input vector */
+/* o : index of the minimum value in the input vector */
+Word16 minimum_abs32_fx(
+ const Word32 *vec_fx, /* i : input vector */
+ const Word16 lvec_fx, /* i : length of input vector */
+ Word32 *min_fx /* o : minimum value in the input vector */
);
-Word16 minimum_32_fx( /* o : index of the minimum value in the input vector */
- const Word32 *vec_fx, /* i : input vector */
- const Word16 lvec_fx, /* i : length of input vector */
- Word32 *min_fx /* o : minimum value in the input vector */
+/* o : index of the minimum value in the input vector */
+Word16 minimum_32_fx(
+ const Word32 *vec_fx, /* i : input vector */
+ const Word16 lvec_fx, /* i : length of input vector */
+ Word32 *min_fx /* o : minimum value in the input vector */
);
-Word16 maximum_32_fx( /* o : index of the maximum value in the input vector */
- const Word32 *vec, /* i : input vector */
- const Word16 lvec, /* i : length of input vector */
- Word32 *max_val /* o : maximum value in the input vector */
+/* o : index of the maximum value in the input vector */
+Word16 maximum_32_fx(
+ const Word32 *vec, /* i : input vector */
+ const Word16 lvec, /* i : length of input vector */
+ Word32 *max_val /* o : maximum value in the input vector */
);
-Word16 maximum_abs_32_fx( /* o : index of the maximum value in the input vector */
- const Word32 *vec, /* i : input vector */
- const Word16 lvec, /* i : length of input vector */
- Word32 *max_val /* o : maximum value in the input vector */
+/* o : index of the maximum value in the input vector */
+Word16 maximum_abs_32_fx(
+ const Word32 *vec, /* i : input vector */
+ const Word16 lvec, /* i : length of input vector */
+ Word32 *max_val /* o : maximum value in the input vector */
);
/*! r: index of the maximum value in the input vector */
@@ -9723,41 +9866,50 @@ Word16 Exp32Array(
const Word32 *sx /* (i): Data array */
);
-Word32 sum16_32_fx( /* o : sum of all vector elements Qx*/
- const Word16 *vec, /* i : input vector Qx*/
- const Word16 lvec /* i : length of input vector */
+/* o : sum of all vector elements Qx*/
+Word32 sum16_32_fx(
+ const Word16 *vec, /* i : input vector Qx*/
+ const Word16 lvec /* i : length of input vector */
);
-Word32 sum32_sat( /* o : sum of all vector elements Qx*/
- const Word32 *vec, /* i : input vector Qx*/
- const Word16 lvec /* i : length of input vector */
+/* o : sum of all vector elements Qx*/
+Word32 sum32_sat(
+ const Word32 *vec, /* i : input vector Qx*/
+ const Word16 lvec /* i : length of input vector */
);
-Word32 var_fx_32( /* o: variance of vector Qx+16*/
- const Word16 *x, /* i: input vector Qx*/
- const Word16 Qx,
- const Word16 len /* i: length of inputvector */
+/* o: variance of vector Qx+16*/
+Word32 var_fx_32(
+ const Word16 *x, /* i: input vector Qx*/
+ const Word16 Qx,
+ const Word16 len /* i: length of inputvector */
);
-Word32 var_fx_32in_32out( /* o: variance of vector Qx+16*/
- const Word32 *x, /* i: input vector Qx*/
- Word16 *Qx,
- const Word16 len, /* i: length of inputvector */
- const Word16 gb );
-Word16 var_fx( /* o: variance of vector Qx*/
- const Word16 *x, /* i: input vector Qx*/
- const Word16 Qx,
- const Word16 len /* i: length of inputvector */
+
+/* o: variance of vector Qx+16*/
+Word32 var_fx_32in_32out(
+ const Word32 *x, /* i: input vector Qx*/
+ Word16 *Qx,
+ const Word16 len, /* i: length of inputvector */
+ const Word16 gb );
+
+/* o: variance of vector Qx*/
+Word16 var_fx(
+ const Word16 *x, /* i: input vector Qx*/
+ const Word16 Qx,
+ const Word16 len /* i: length of inputvector */
);
-Word16 std_fx( /* o: standard deviation */
- const Word16 x[], /* i: input vector */
- const Word16 len /* i: length of the input vector */
+/* o: variance of vector Qx*/
+Word16 std_fx(
+ const Word16 x[], /* i: input vector */
+ const Word16 len /* i: length of the input vector */
);
-Word32 dot_product_mat_fx( /* o : the dot product x'*A*x */
- const Word16 *x, /* i : vector x Q15 */
- const Word32 *A, /* i : matrix A Q0*/
- const Word16 m /* i : vector & matrix size */
+/* o : the dot product x'*A*x */
+Word32 dot_product_mat_fx(
+ const Word16 *x, /* i : vector x Q15 */
+ const Word32 *A, /* i : matrix A Q0*/
+ const Word16 m /* i : vector & matrix size */
);
@@ -9768,22 +9920,24 @@ void Vr_subt(
Word16 N /* i : Vector lenght */
);
-Word16 vquant_ivas_fx( /* o: index of the winning codevector */
- Word32 x[], /* i: vector to quantize Q25 */
- const Word32 x_mean[], /* i: vector mean to subtract (0 if none) Q25 */
- Word32 xq[], /* o: quantized vector Q25 */
- const Word32 cb[], /* i: codebook Q25 */
- const Word16 dim, /* i: dimension of codebook vectors */
- const Word16 cbsize /* i: codebook size */
+/* o: index of the winning codevector */
+Word16 vquant_ivas_fx(
+ Word32 x[], /* i: vector to quantize Q25 */
+ const Word32 x_mean[], /* i: vector mean to subtract (0 if none) Q25 */
+ Word32 xq[], /* o: quantized vector Q25 */
+ const Word32 cb[], /* i: codebook Q25 */
+ const Word16 dim, /* i: dimension of codebook vectors */
+ const Word16 cbsize /* i: codebook size */
);
-Word16 vquant_fx( /* o: index of the winning codevector */
- Word16 x[], /* i: vector to quantize Q13 */
- const Word16 x_mean[], /* i: vector mean to subtract (0 if none)Q13*/
- Word16 xq[], /* o: quantized vector Q13 */
- const Word16 cb[], /* i: codebook Q13 */
- const Word16 dim, /* i: dimension of codebook vectors */
- const Word16 cbsize /* i: codebook size */
+/* o: index of the winning codevector */
+Word16 vquant_fx(
+ Word16 x[], /* i: vector to quantize Q13 */
+ const Word16 x_mean[], /* i: vector mean to subtract (0 if none)Q13*/
+ Word16 xq[], /* o: quantized vector Q13 */
+ const Word16 cb[], /* i: codebook Q13 */
+ const Word16 dim, /* i: dimension of codebook vectors */
+ const Word16 cbsize /* i: codebook size */
);
Word16 w_vquant_fx(
@@ -9796,36 +9950,42 @@ Word16 w_vquant_fx(
const Word16 rev_vect /* i: reverse codebook vectors */
);
-Word16 emaximum_fx( /* o : return index with max energy value in vector Q0 */
- const Word16 Qvec, /* i : Q of input vector Q0 */
- const Word16 *vec, /* i : input vector Qx */
- const Word16 lvec, /* i : length of input vector Q0 */
- Word32 *ener_max /* o : maximum energy value Q0 */
+/* o : return index with max energy value in vector Q0 */
+Word16 emaximum_fx(
+ const Word16 Qvec, /* i : Q of input vector Q0 */
+ const Word16 *vec, /* i : input vector Qx */
+ const Word16 lvec, /* i : length of input vector Q0 */
+ Word32 *ener_max /* o : maximum energy value Q0 */
);
-Word16 emaximum_32fx( /* o : return index with max energy value in vector Q0 */
- const Word16 Qvec, /* i : Q of input vector Q0 */
- const Word32 *vec, /* i : input vector Qx */
- const Word16 lvec, /* i : length of input vector Q0 */
- Word32 *ener_max /* o : maximum energy value Q0 */
+/* o : return index with max energy value in vector Q0 */
+Word16 emaximum_32fx(
+ const Word16 Qvec, /* i : Q of input vector Q0 */
+ const Word32 *vec, /* i : input vector Qx */
+ const Word16 lvec, /* i : length of input vector Q0 */
+ Word32 *ener_max /* o : maximum energy value Q0 */
);
-Word32 Mean32( /* o : mean of the elements of the vector */
- const Word32 in[], /* i : input vector */
- const Word16 L /* i : length of input vector */
+/* o : mean of the elements of the vector */
+Word32 Mean32(
+ const Word32 in[], /* i : input vector */
+ const Word16 L /* i : length of input vector */
);
-Word32 sum32_fx( /* o : sum of all vector elements Qx*/
- const Word32 *vec, /* i : input vector Qx*/
- const Word16 lvec /* i : length of input vector */
+/* o : sum of all vector elements Qx*/
+Word32 sum32_fx(
+ const Word32 *vec, /* i : input vector Qx*/
+ const Word16 lvec /* i : length of input vector */
);
-Word16 sum16_fx( /* o : sum of all vector elements Qx*/
- const Word16 *vec, /* i : input vector Qx*/
- const Word16 lvec /* i : length of input vector */
+/* o : sum of all vector elements Qx*/
+Word16 sum16_fx(
+ const Word16 *vec, /* i : input vector Qx*/
+ const Word16 lvec /* i : length of input vector */
);
-Word16 own_random2_fx( Word16 seed );
+Word16 own_random2_fx(
+ Word16 seed );
void iDiv_and_mod_32(
const Word32 Numer, /* i : 32 bits numerator */
@@ -9865,16 +10025,17 @@ Word32 root_a_over_b_ivas_fx(
Word16 Q_b,
Word16 *exp_out );
-void fir_fx( const Word16 x[], /* i : input vector Qx*/
- const Word16 h[], /* i : impulse response of the FIR filter Q12*/
- Word16 y[], /* o : output vector (result of filtering) Qx*/
- Word16 mem[], /* i/o: memory of the input signal (L samples) Qx*/
- const Word16 L, /* i : input vector size */
- const Word16 K, /* i : order of the FIR filter (K+1 coefs.) */
- const Word16 upd /* i : 1 = update the memory, 0 = not */
- ,
- Word16 shift /* i : difference between Q15 and scaling of h[] */
+void fir_fx(
+ const Word16 x[], /* i : input vector Qx*/
+ const Word16 h[], /* i : impulse response of the FIR filter Q12*/
+ Word16 y[], /* o : output vector (result of filtering) Qx*/
+ Word16 mem[], /* i/o: memory of the input signal (L samples) Qx*/
+ const Word16 L, /* i : input vector size */
+ const Word16 K, /* i : order of the FIR filter (K+1 coefs.) */
+ const Word16 upd, /* i : 1 = update the memory, 0 = not */
+ Word16 shift /* i : difference between Q15 and scaling of h[] */
);
+
void v_add_32(
const Word32 x1[], /* i : Input vector 1 */
const Word32 x2[], /* i : Input vector 2 */
@@ -9896,7 +10057,6 @@ void v_sub_32(
const Word16 N /* i : Vector length */
);
-
void v_add_16(
const Word16 x1[], /* i : Input vector 1 */
const Word16 x2[], /* i : Input vector 2 */
@@ -9911,12 +10071,12 @@ void v_sub_16(
const Word16 N /* i : Vector length */
);
-
-Word16 squant_fx( /* o: index of the winning codeword */
- const Word16 x, /* i: scalar value to quantize */
- Word16 *xq, /* o: quantized value */
- const Word16 cb[], /* i: codebook */
- const Word16 cbsize /* i: codebook size */
+/* o: index of the winning codeword */
+Word16 squant_fx(
+ const Word16 x, /* i: scalar value to quantize */
+ Word16 *xq, /* o: quantized value */
+ const Word16 cb[], /* i: codebook */
+ const Word16 cbsize /* i: codebook size */
);
Word16 squant_int_fx(
@@ -9988,60 +10148,84 @@ void add_vec_fx(
const Word16 N /* i : Vector lenght */
);
-Word32 Add_flt32_flt32( /* o: Result (Normalized) */
- Word32 a, /* i: 1st Value */
- Word16 exp_a, /* i: Exponent of 1st Value (Q of Value) */
- Word32 b, /* i: 2nd Value */
- Word16 exp_b, /* i: Exponent of 2nd Value (Q of Value) */
- Word16 *exp_out /* o: Exponent of Result */
+/* o: Result (Normalized) */
+Word32 Add_flt32_flt32(
+ Word32 a, /* i: 1st Value */
+ Word16 exp_a, /* i: Exponent of 1st Value (Q of Value) */
+ Word32 b, /* i: 2nd Value */
+ Word16 exp_b, /* i: Exponent of 2nd Value (Q of Value) */
+ Word16 *exp_out /* o: Exponent of Result */
);
-Word32 Mul_flt32_Q15( /* o: Result (Normalized) */
- Word32 value, /* i: Pseudo_float Value */
- Word16 *exp_v, /*i/o: Exponent of Value (Q of Value) */
- Word16 frac /* i: Q15 value */
+/* o: Result (Normalized) */
+Word32 Mul_flt32_Q15(
+ Word32 value, /* i: Pseudo_float Value */
+ Word16 *exp_v, /*i/o: Exponent of Value (Q of Value) */
+ Word16 frac /* i: Q15 value */
);
-Word32 Div_flt32_flt32( /* o: Result (Normalized) */
- Word32 a, /* i: 1st Value */
- Word16 exp_a, /* i: Exponent of 1st Value (Q of Value) */
- Word32 b, /* i: 2nd Value */
- Word16 exp_b, /* i: Exponent of 2nd Value (Q of Value) */
- Word16 *exp_out /* o: Exponent of Result */
+/* o: Result (Normalized) */
+Word32 Div_flt32_flt32(
+ Word32 a, /* i: 1st Value */
+ Word16 exp_a, /* i: Exponent of 1st Value (Q of Value) */
+ Word32 b, /* i: 2nd Value */
+ Word16 exp_b, /* i: Exponent of 2nd Value (Q of Value) */
+ Word16 *exp_out /* o: Exponent of Result */
);
-Word32 Calc_Energy_Autoscaled( /* o: Result (Energy) */
- const Word16 *signal, /* i: Signal */
- Word16 signal_exp, /* i: Exponent of Signal (Q of Signal) */
- Word16 len, /* i: Frame Length */
- Word16 *energy_exp /* o: Exponent of Energy (Q of Energy) */
+/* o: Result (Normalized) */
+Word32 Calc_Energy_Autoscaled(
+ const Word16 *signal, /* i: Signal */
+ Word16 signal_exp, /* i: Exponent of Signal (Q of Signal) */
+ Word16 len, /* i: Frame Length */
+ Word16 *energy_exp /* o: Exponent of Energy (Q of Energy) */
);
-Word16 Find_Max_Norm16( const Word16 *src, Word16 len );
+Word16 Find_Max_Norm16(
+ const Word16 *src,
+ Word16 len );
-Word16 Find_Max_Norm32( const Word32 *src, Word16 len );
+Word16 Find_Max_Norm32(
+ const Word32 *src,
+ Word16 len );
-Word32 Sqrt_Ratio32( /* o: Result in Q31 */
- Word32 L_val1, /* i: Mantisa of Val1 */
- Word16 exp1, /* i: Exp of Val1 (>0: Val was Left Shifted, <0:Right Shifted) */
- Word32 L_val2, /* i: Mantisa of Val2 */
- Word16 exp2, /* i: Exp of Val2 (same as exp1) */
- Word16 *exp /* o: Exp of Result (# of 'L_shl' Req to get to Final Value) */
+/* o: Result in Q31 */
+Word32 Sqrt_Ratio32(
+ Word32 L_val1, /* i: Mantisa of Val1 */
+ Word16 exp1, /* i: Exp of Val1 (>0: Val was Left Shifted, <0:Right Shifted) */
+ Word32 L_val2, /* i: Mantisa of Val2 */
+ Word16 exp2, /* i: Exp of Val2 (same as exp1) */
+ Word16 *exp /* o: Exp of Result (# of 'L_shl' Req to get to Final Value) */
);
-Word16 Invert16( /* result in Q'15 + 'exp' */
- Word16 val,
- Word16 *exp );
+/* result in Q'15 + 'exp' */
+Word16 Invert16(
+ Word16 val,
+ Word16 *exp );
-Word16 find_rem( Word16 n, Word16 m, Word16 *r );
+Word16 find_rem(
+ Word16 n,
+ Word16 m,
+ Word16 *r );
-Word32 find_remd( Word32 n, Word32 m, Word32 *r );
+Word32 find_remd(
+ Word32 n,
+ Word32 m,
+ Word32 *r );
Word16 rint_new_fx(
Word32 x /*Q16 */
);
-Word16 erb_diff_search_fx( Word16 *prev_erb, const Word16 *curr_erb, Word16 *dif_erb, Word16 *pow_spec, const Word16 *cb_fx, Word16 cb_size, Word16 cb_dim, Word16 offset );
+Word16 erb_diff_search_fx(
+ Word16 *prev_erb,
+ const Word16 *curr_erb,
+ Word16 *dif_erb,
+ Word16 *pow_spec,
+ const Word16 *cb_fx,
+ Word16 cb_size,
+ Word16 cb_dim,
+ Word16 offset );
void Acelp_dec_total_exc(
Word16 *exc_fx, /* i/o: adapt. excitation exc */
@@ -10053,11 +10237,18 @@ void Acelp_dec_total_exc(
const Word16 L_subfr /* i : Subframne lenght */
);
-UWord32 UL_inverse( const UWord32 UL_val, Word16 *exp );
+UWord32 UL_inverse(
+ const UWord32 UL_val,
+ Word16 *exp );
-UWord32 UL_div( const UWord32 UL_num, const UWord32 UL_den );
+UWord32 UL_div(
+ const UWord32 UL_num,
+ const UWord32 UL_den );
-Word16 ratio( const Word32 numer, const Word32 denom, Word16 *expo );
+Word16 ratio(
+ const Word32 numer,
+ const Word32 denom,
+ Word16 *expo );
void hp400_12k8_fx(
Word16 signal[], /* i/o: input signal / output is divided by 16 */
@@ -10071,9 +10262,19 @@ void hp400_12k8_ivas_fx(
Word16 mem[] /* i/o: filter memory [6] */
);
-Word16 dot_prod_satcontr( const Word16 *x, const Word16 *y, Word16 qx, Word16 qy, Word16 *qo, Word16 len );
+Word16 dot_prod_satcontr(
+ const Word16 *x,
+ const Word16 *y,
+ Word16 qx,
+ Word16 qy,
+ Word16 *qo,
+ Word16 len );
-void E_UTIL_f_convolve( const Word16 x[], const Word16 h[], Word16 y[], const Word16 size );
+void E_UTIL_f_convolve(
+ const Word16 x[],
+ const Word16 h[],
+ Word16 y[],
+ const Word16 size );
void floating_point_add(
Word32 *mx, /* io: mantissa of the addend Q31 */
@@ -10114,7 +10315,8 @@ Word16 lin_interp_fx(
const Word16 flag_sat /* i : flag to indicate whether to apply saturation */
);
-Word16 ceil_log_2( UWord64 val );
+Word16 ceil_log_2(
+ UWord64 val );
Word32 imax_pos_fx(
const Word32 *y /* i : Input vector for peak interpolation Qx*/
@@ -10362,9 +10564,6 @@ Word16 sr2fscale(
const Word32 sr_core /* i : internal sampling rate */
);
-// pre_proc functions
-/*full implementation pending*/
-
void Copy_Scale_sig32(
const Word32 x[], /* i : signal to scale input Qx */
Word32 y[], /* o : scaled signal output Qx */
@@ -10393,11 +10592,11 @@ void updt_enc_common_ivas_fx(
const Word16 Q_new /* i : CUrrent frame scaling */
);
-// tools.c
-Word32 sum2_f_32_fx( /* o : Q(2x - 31 - gb) */
- const Word32 *vec, /* i : input vector, Qx */
- const Word16 lvec, /* i : length of input vector */
- Word16 gb /* i : guard bits */
+/* o : Q(2x - 31 - gb) */
+Word32 sum2_f_32_fx(
+ const Word32 *vec, /* i : input vector, Qx */
+ const Word16 lvec, /* i : length of input vector */
+ Word16 gb /* i : guard bits */
);
Word32 sum2_16_exp_fx(
@@ -10437,7 +10636,6 @@ void ProcessStereoIGF_fx(
const Word32 element_brate, /* i : element bitrate */
const Word16 mct_on );
-/*igf_enc.c*/
void IGFEncApplyStereo_fx(
STEREO_MDCT_ENC_DATA_HANDLE hStereoMdct, /* i/o: MDCT stereo encoder structure */
Word16 ms_mask[2][MAX_SFB], /* i : bandwise MS mask */
@@ -10469,7 +10667,6 @@ Word16 IGFEncWriteBitstream_ivas_fx(
const Word16 isIndepFlag /* i : if 1 frame is independent, 0 = frame is coded with data from previous frame */
);
-/*igf_scf_enc.c*/
Word16 IGFSCFEncoderEncode_ivas_fx(
IGFSCFENC_INSTANCE_HANDLE hPublicData, /* i/o: handle to public data or NULL in case there was no instance created */
BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
@@ -10479,7 +10676,6 @@ Word16 IGFSCFEncoderEncode_ivas_fx(
const Word16 indepFlag /* i : if 1 frame is independent, 0 = frame is coded with data from previous frame */
);
-/*ari_enc.c*/
Word16 ari_encode_14bits_ext_ivas_fx(
Word16 *ptr, /* Q0 */
Word16 bp, /* Q0 */
@@ -10637,13 +10833,13 @@ void writeTCXparam_fx(
void calculate_hangover_attenuation_gain_ivas_fx(
Encoder_State *st, /* i : encoder state structure */
Word16 *att, /* o : attenuation factor */
- const Word16 vad_hover_flag /* i : VAD hangover flag */
+ const Word16 vad_hover_flag /* i : VAD hangover flag */
);
void init_coder_ace_plus_ivas_fx(
Encoder_State *st, /* i : Encoder state */
const Word32 last_total_brate, /* i : last total bitrate */
- const Word32 igf_brate, /* i : IGF configuration bitrate */
+ const Word32 igf_brate, /* i : IGF configuration bitrate */
const Word16 MCT_flag /* i : hMCT handle allocated (1) or not (0) */
);
@@ -10670,7 +10866,6 @@ Word16 getTcxonly_ivas_fx(
const Word16 is_ism_format /* i : flag indicating ISM format */
);
-
void SetModeIndex_ivas_fx(
Encoder_State *st, /* i : Encoder state */
const Word32 last_total_brate, /* i : last total bitrate Q0*/
@@ -10751,7 +10946,7 @@ void FEC_encode_ivas_fx(
Word16 *last_pulse_pos, /* i/o: Position of the last pulse Q0*/
const Word16 L_frame, /* i : Frame length Q0*/
const Word32 total_brate, /* i : total codec bitrate Q0*/
- const Word16 Q_synth /* i : input scaling */
+ const Word16 Q_synth /* i : input scaling */
);
ivas_error IGF_Reconfig_fx(
@@ -10776,7 +10971,6 @@ void core_switching_post_enc_ivas_fx(
Word16 A_fx[], /* i : unquant. LP filter coefs. */
Word16 Q_new );
-
void residu_ivas_fx(
const Word16 *a, /* i : LP filter coefficients Q31-a_exp*/
const Word16 a_exp,
@@ -10844,10 +11038,12 @@ void set_zero_fx(
Word32 *vec, /* o : input vector */
const Word16 lvec /* i : length of the vector */
);
+
void set_zero2_fx(
Word32 *vec, /* o : input vector */
const Word32 lvec /* i : length of the vector */
);
+
void set16_zero_fx(
Word16 *vec, /* o : input vector */
const Word16 lvec /* i : length of the vector */
@@ -10906,7 +11102,6 @@ void sort_l(
Word16 len /* i/o: vector length */
);
-
ivas_error push_indice(
BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
Word16 id, /* i : ID of the indice */
@@ -11019,12 +11214,6 @@ void mdct_switching_dec_fx(
Word16 print_disclaimer(
FILE *fPtr );
-void fft_rel(
- float x[], /* i/o: input/output vector */
- const Word16 n, /* i : vector length */
- const Word16 m /* i : log2 of vector length */
-);
-
void preemph_ivas_fx(
Word32 *signal, /* i/o: signal Qx*/
const Word16 mu, /* i : preemphasis factor Q15*/
@@ -11106,10 +11295,11 @@ void flip_and_downmix_generic_fx32(
Word16 *phase_state /* i/o: Phase state in case frequency isn't multiple of 50 Hz */
);
-Word16 quant_2p_2N1_fx( /* o: return (2*N)+1 bits */
- const Word16 pos1, /* i: position of the pulse 1 */
- const Word16 pos2, /* i: position of the pulse 2 */
- const Word16 N /* i: number of bits FOR position */
+/* o : Q(2x - 31 - gb) */
+Word16 quant_2p_2N1_fx(
+ const Word16 pos1, /* i: position of the pulse 1 */
+ const Word16 pos2, /* i: position of the pulse 2 */
+ const Word16 N /* i: number of bits FOR position */
);
void bands_and_bit_alloc_ivas_fx(
@@ -11135,24 +11325,17 @@ void bands_and_bit_alloc_ivas_fx(
);
void ivas_find_wsp_fx(
- const Word16 L_frame, /* i : length of the frame Q0*/
- const Word16 L_subfr, /* i : length of subframe Q0*/
- const Word16 nb_subfr, /* i : number of subframes Q0*/
- const Word16 *A_fx,
- /* i : A(z) filter coefficients */ // Q12
- Word16 *Aw_fx,
- /* o : weighted A(z) filter coefficients */ // Q12
- const Word16 *speech_fx,
- /* i : pointer to the denoised speech frame */ // Q_new
- const Word16 tilt_fact,
- /* i : tilt factor */ // Q15
- Word16 *wsp_fx,
- /* o : poitnter to the weighted speech frame */ // Q_new
- Word16 *mem_wsp_fx,
- /* i/o: W(Z) denominator memory */ // Q_new
- const Word16 gamma,
- /* i : weighting factor */ // Q15
- const Word16 L_look /* i : look-ahead Q0*/
+ const Word16 L_frame, /* i : length of the frame Q0*/
+ const Word16 L_subfr, /* i : length of subframe Q0*/
+ const Word16 nb_subfr, /* i : number of subframes Q0*/
+ const Word16 *A_fx, /* i : A(z) filter coefficients Q12 */
+ Word16 *Aw_fx, /* o : weighted A(z) filter coefficients Q12 */
+ const Word16 *speech_fx, /* i : pointer to the denoised speech frame Q_new */
+ const Word16 tilt_fact, /* i : tilt factor Q15 */
+ Word16 *wsp_fx, /* o : poitnter to the weighted speech frame Q_new */
+ Word16 *mem_wsp_fx, /* i/o: W(Z) denominator memory Q_new */
+ const Word16 gamma, /* i : weighting factor Q15 */
+ const Word16 L_look /* i : look-ahead Q0*/
);
Word16 RCcontextMapping_encode2_estimate_bandWise_start_fx(
@@ -11168,14 +11351,12 @@ Word16 RCcontextMapping_encode2_estimate_bandWise_fx(
HANDLE_RC_CONTEXT_MEM hContextMem /* Q0 */
);
-
/*! r: Q15 */
Word16 expfp_evs_fx(
const Word16 x, /* i : mantissa Q15-e */
const Word16 x_e /* i : exponent Q0 */
);
-
void tcx_arith_render_envelope_ivas_fx(
const Word16 A_ind[], /* i : LPC coefficients of signal envelope Q12*/
const Word16 L_frame, /* i : number of spectral lines Q0*/
@@ -11203,7 +11384,6 @@ void tcx_arith_decode_envelope_ivas_fx(
const Word16 low_complexity /* i : low-complexity flag */
);
-
void UnmapIndex_fx(
const Word16 PeriodicityIndex, /* Q0 */
const Word16 Bandwidth, /* Q0 */
@@ -11223,7 +11403,6 @@ Word32 tcx_hm_render_fx(
Word16 p[] /* o: harmonic model Q13 */
);
-
void tcx_hm_modify_envelope_fx(
const Word16 gain, /* i: HM gain Q11 */
const Word32 lag, /* i: pitch lag Q0 */
@@ -11244,8 +11423,8 @@ void tcx_hm_decode(
);
void writeTCXMode_fx(
- Encoder_State *st, /* i/o: encoder state structure */
- BSTR_ENC_HANDLE hBstr, /* i/o: bitstream handle */
+ Encoder_State *st, /* i/o: encoder state structure */
+ BSTR_ENC_HANDLE hBstr, /* i/o: bitstream handle */
const Word16 MCT_flag, /* i : hMCT handle allocated (1) or not (0) Q0*/
Word16 *nbits_start /* o : nbits start Q0*/
);
@@ -11352,10 +11531,6 @@ Word16 is_EVS_bitrate(
Word16 *Opt_AMR_WB /* i : AMR-WB IO flag */
);
-void IGFEncResetTCX10BitCounter_ivas_fx(
- const IGF_ENC_INSTANCE_HANDLE hIGFEnc /* i : instance handle of IGF Encoder */
-);
-
ivas_error IGF_Reconfig(
IGF_ENC_INSTANCE_HANDLE *hIGFEnc, /* i/o: instance handle of IGF Encoder */
const Word16 igf, /* i : IGF on/off */
diff --git a/lib_com/rom_com.c b/lib_com/rom_com.c
deleted file mode 100644
index 0044134699e755b2fc4a031519282c68d0c4c0c1..0000000000000000000000000000000000000000
--- a/lib_com/rom_com.c
+++ /dev/null
@@ -1,31256 +0,0 @@
-/******************************************************************************************************
-
- (C) 2022-2025 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
- Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
- Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
- Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
- contributors to this repository. All Rights Reserved.
-
- This software is protected by copyright law and by international treaties.
- The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB,
- Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
- Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
- Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
- contributors to this repository retain full ownership rights in their respective contributions in
- the software. This notice grants no license of any kind, including but not limited to patent
- license, nor is any license granted by implication, estoppel or otherwise.
-
- Contributors are required to enter into the IVAS codec Public Collaboration agreement before making
- contributions.
-
- This software is provided "AS IS", without any express or implied warranties. The software is in the
- development stage. It is intended exclusively for experts who have experience with such software and
- solely for the purpose of inspection. All implied warranties of non-infringement, merchantability
- and fitness for a particular purpose are hereby disclaimed and excluded.
-
- Any dispute, controversy or claim arising under or in relation to providing this software shall be
- submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in
- accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
- the United Nations Convention on Contracts on the International Sales of Goods.
-
-*******************************************************************************************************/
-
-/*====================================================================================
- EVS Codec 3GPP TS26.443 Nov 04, 2021. Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0
- ====================================================================================*/
-
-#include
-#include "options.h"
-#include "cnst.h"
-#include "rom_com.h"
-#include "prot_fx.h"
-#include "basop_util.h"
-#include "wmc_auto.h"
-
-/* clang-format off */
-
-/*----------------------------------------------------------------------------------*
- * Table of bitrates
- *----------------------------------------------------------------------------------*/
-#define W16(x) ((Word16)x)
-
-const Word32 brate_tbl[SIZE_BRATE_TBL] = // Q0
-{
- ACELP_7k20, ACELP_8k00, ACELP_9k60, ACELP_13k20, ACELP_16k40, ACELP_24k40,
- ACELP_32k, ACELP_48k, ACELP_64k, HQ_96k, HQ_128k
-};
-
-const Word32 brate_intermed_tbl[SIZE_BRATE_INTERMED_TBL] = // Q0
-{
- ACELP_5k00, ACELP_6k15, ACELP_7k20, ACELP_8k00, ACELP_9k60, ACELP_11k60, ACELP_12k15, ACELP_12k85, ACELP_13k20,
- ACELP_14k80, ACELP_16k40, ACELP_22k60, ACELP_24k40, ACELP_29k00, ACELP_29k20, ACELP_30k20,
- ACELP_30k40, ACELP_32k, ACELP_48k, ACELP_64k, HQ_96k, HQ_128k
-};
-
-const Word16 bit_rates_div50[] = /* bit rate values / 50 to Fit in a Word16 */
-{
- ACELP_5k00 / 50, ACELP_6k15 / 50, ACELP_7k20 / 50, ACELP_8k00 / 50, ACELP_9k60 / 50, ACELP_11k60 / 50, ACELP_12k15 / 50,
- ACELP_12k85 / 50, ACELP_13k20 / 50, ACELP_14k80 / 50, ACELP_16k40 / 50, ACELP_22k60 / 50,
- ACELP_24k40 / 50, ACELP_29k00 / 50, ACELP_29k20 / 50, ACELP_30k20 / 50, ACELP_30k40 / 50,
- ACELP_32k / 50, ACELP_48k / 50, ACELP_64k / 50, HQ_96k / 50, HQ_128k / 50
-};
-
-const Word16 bit_rates_16k_div50[] = /* bit rate values / 50 to Fit in a Word16 */
-{
- ACELP_8k00 / 50, ACELP_14k80 / 50, ACELP_22k60 / 50, ACELP_24k40 / 50, ACELP_29k00 / 50,
- ACELP_29k20 / 50, ACELP_30k20 / 50, ACELP_30k40 / 50, ACELP_32k / 50, ACELP_48k / 50, ACELP_64k / 50
-};
-
-/*----------------------------------------------------------------------------------*
- * Frame size and mode configuration tables
- *----------------------------------------------------------------------------------*/
-
-const FrameSizeParams FrameSizeConfig[FRAME_SIZE_NB] =
-{
- /* bits, net bits, trans_bits, trans_mode, band_bits, band_mode_min, band_mode_max, reserved_bits */
- { FRAME_0, FRAME_0, 0, {0,0}, 0, 0, 0, 0}, /* 0 kbps ZERO_FRAME*/
- { FRAME_2_4, FRAME_2_4-2, 1, {1,1}, 1, NB, WB, 0}, /* 2.4kbps VBR(SID)*/
- { FRAME_7_2, FRAME_7_2-1, 0, {0,1}, 1, NB, WB, 0}, /* 7.2kbps VBR/CBR*/
- { FRAME_8, FRAME_8-1, 0, {0,1}, 1, NB, WB, 0}, /* 8 kbps VBR/CBR*/
- { FRAME_9_6, FRAME_9_6-2, 0, {0,1}, 2, NB, SWB, 0}, /* 9.6kbps CBR*/
- { FRAME_13_2, FRAME_13_2-2, 0, {0,1}, 2, NB, SWB, 0}, /* 13.2kbps CBR*/
- { FRAME_16_4, FRAME_16_4-3, 0, {0,1}, 2, NB, FB, 1}, /* 16.4kbps CBR*/
- { FRAME_24_4, FRAME_24_4-3, 0, {0,1}, 2, NB, FB, 1}, /* 24.4kbps CBR*/
- { FRAME_32, FRAME_32-3, 0, {0,1}, 2, WB, FB, 1}, /* 32 kbps CBR*/
- { FRAME_48, FRAME_48-3, 0, {0,1}, 2, WB, FB, 1}, /* 48 kbps CBR*/
- { FRAME_64, FRAME_64-3, 0, {0,1}, 2, WB, FB, 1}, /* 64 kbps CBR*/
- { FRAME_96, FRAME_96-3, 0, {0,1}, 2, WB, FB, 1}, /* 96 kbps CBR*/
- { FRAME_128, FRAME_128-3, 0, {0,1}, 2, WB, FB, 1} /*128 kbps CBR*/
-};
-
-
-/*----------------------------------------------------------------------------------*
- * Conversion of ACELP signaling parameters (ACELP internal Fs, coder type, bandwidth, sharpening flag) to index
- * (to be consulted with the decision matrix)
- *
- * - in order to retrieve the index, each section in this table starts with the bitrate
- * - the second value in each section corresponds to the number of bits
- * - the other values represent indices created by combining different parameters into a single value through the macro SIG2IND()
- *----------------------------------------------------------------------------------*/
-
-const Word32 acelp_sig_tbl[MAX_ACELP_SIG] = // Q0
-{
- /* GENERIC UNVOICED VOICED TRANSITION AUDIO INACTIVE */
- ACELP_7k20, 4,
- SIG2IND(GENERIC, NB, 1, 0), SIG2IND(UNVOICED, NB, 0, 0), SIG2IND(VOICED, NB, 1, 0), SIG2IND(TRANSITION, NB, 1, 0), SIG2IND(AUDIO, NB, 0, 0), SIG2IND(INACTIVE, NB, 0, 0),
- SIG2IND(GENERIC, WB, 1, 0), SIG2IND(UNVOICED, WB, 0, 0), SIG2IND(VOICED, WB, 1, 0), SIG2IND(TRANSITION, WB, 1, 0), SIG2IND(AUDIO, WB, 0, 0), SIG2IND(INACTIVE, WB, 0, 0),
- SIG2IND(GENERIC, NB, 0, 0),
- SIG2IND(GENERIC, WB, 0, 0),
- SIG2IND(LR_MDCT, NB, 0, 0),
-
- ACELP_8k00, 4,
- SIG2IND(GENERIC, NB, 1, 0), SIG2IND(UNVOICED, NB, 0, 0), SIG2IND(VOICED, NB, 1, 0), SIG2IND(TRANSITION, NB, 1, 0), SIG2IND(AUDIO, NB, 0, 0), SIG2IND(INACTIVE, NB, 0, 0),
- SIG2IND(GENERIC, WB, 1, 0), SIG2IND(UNVOICED, WB, 0, 0), SIG2IND(VOICED, WB, 1, 0), SIG2IND(TRANSITION, WB, 1, 0), SIG2IND(AUDIO, WB, 0, 0), SIG2IND(INACTIVE, WB, 0, 0),
- SIG2IND(GENERIC, NB, 0, 0),
- SIG2IND(GENERIC, WB, 0, 0),
- SIG2IND(LR_MDCT, NB, 0, 0),
-
- ACELP_13k20, 5,
- SIG2IND(GENERIC, NB, 1, 0), SIG2IND(VOICED, NB, 1, 0), SIG2IND(TRANSITION, NB, 0, 0), SIG2IND(AUDIO, NB, 0, 0), SIG2IND(INACTIVE, NB, 0, 0),
- SIG2IND(GENERIC, WB, 1, 0), SIG2IND(VOICED, WB, 1, 0), SIG2IND(TRANSITION, WB, 0, 0), SIG2IND(AUDIO, WB, 0, 0), SIG2IND(INACTIVE, WB, 0, 0),
- SIG2IND(GENERIC, SWB, 1, 0), SIG2IND(VOICED, SWB, 1, 0), SIG2IND(TRANSITION, SWB, 0, 0), SIG2IND(AUDIO, SWB, 0, 0), SIG2IND(INACTIVE, SWB, 0, 0),
- SIG2IND(GENERIC, NB, 0, 0), SIG2IND(VOICED, NB, 0, 0),
- SIG2IND(GENERIC, WB, 0, 0), SIG2IND(VOICED, WB, 0, 0),
- SIG2IND(GENERIC, SWB, 0, 0), SIG2IND(VOICED, SWB, 0, 0),
- SIG2IND(GENERIC, WB, 1, 1), SIG2IND(UNVOICED, WB, 0, 1), SIG2IND(VOICED, WB, 1, 1), SIG2IND(INACTIVE, WB, 0, 1),
- SIG2IND(GENERIC, SWB, 1, 1), SIG2IND(UNVOICED, SWB, 0, 1), SIG2IND(VOICED, SWB, 1, 1), SIG2IND(INACTIVE, SWB, 0, 1),
- SIG2IND(LR_MDCT, NB, 0, 0),
- SIG2IND(LR_MDCT, WB, 0, 0),
- SIG2IND(LR_MDCT, SWB, 0, 0),
-
- ACELP_32k, 4,
- SIG2IND(GENERIC, WB, 1, 0), SIG2IND(TRANSITION, WB, 1, 0), SIG2IND(INACTIVE, WB, 0, 0),
- SIG2IND(GENERIC, SWB, 1, 0), SIG2IND(TRANSITION, SWB, 1, 0), SIG2IND(INACTIVE, SWB, 0, 0),
- SIG2IND(GENERIC, FB, 1, 0), SIG2IND(TRANSITION, FB, 1, 0), SIG2IND(INACTIVE, FB, 0, 0),
- SIG2IND(GENERIC, WB, 0, 0), SIG2IND(TRANSITION, WB, 0, 0),
- SIG2IND(GENERIC, SWB, 0, 0), SIG2IND(TRANSITION, SWB, 0, 0),
- SIG2IND(GENERIC, FB, 0, 0), SIG2IND(TRANSITION, FB, 0, 0),
-
- ACELP_64k, 4,
- SIG2IND(GENERIC, WB, 0, 0), SIG2IND(TRANSITION, WB, 0, 0), SIG2IND(INACTIVE, WB, 0, 0),
- SIG2IND(GENERIC, SWB, 1, 0), SIG2IND(TRANSITION, SWB, 1, 0), SIG2IND(INACTIVE, SWB, 0, 0),
- SIG2IND(GENERIC, FB, 1, 0), SIG2IND(TRANSITION, FB, 1, 0), SIG2IND(INACTIVE, FB, 0, 0),
- SIG2IND(GENERIC, SWB, 0, 0), SIG2IND(TRANSITION, SWB, 0, 0),
- SIG2IND(GENERIC, FB, 0, 0), SIG2IND(TRANSITION, FB, 0, 0),
-};
-
-/*----------------------------------------------------------------------------------*
- * ACELP bit allocation tables
- *----------------------------------------------------------------------------------*/
-
-/* bit allocation table for end-frame LSF quantizer */
-const Word16 LSF_bits_tbl[] = // Q0
-{
- /* IC UC VC GC TC AC */
- 22, 31, 24, 29, 24, 22, /* ACELP_5k00 */
- 22, 31, 24, 29, 24, 22, /* ACELP_6k15 */
- 22, 37, 31, 29, 31, 22, /* ACELP_7k20 */
- 22, 40, 36, 33, 34, 22, /* ACELP_8k00 */
- 27, 40, 34, 35, 37, 27, /* ACELP_9k60 */
- 31, 0, 37, 37, 40, 31, /* ACELP_11k60 */
- 31, 0, 39, 39, 41, 31, /* ACELP_12k15 */
- 31, 0, 38, 38, 40, 31, /* ACELP_12k85 */
- 31, 0, 38, 38, 40, 31, /* ACELP_13k20 */
- 31, 0, 37, 42, 42, 31, /* ACELP_14k80 */
- 31, 0, 43, 40, 40, 31, /* ACELP_16k40 */
- 31, 0, 42, 40, 40, 31, /* ACELP_22k60 */
- 31, 0, 46, 41, 41, 31, /* ACELP_24k40 */
- 41, 0, 0, 41, 41, 0, /* ACELP_29k00 */
- 41, 0, 0, 41, 41, 0, /* ACELP_29k20 */
- 41, 0, 0, 41, 41, 0, /* ACELP_30k20 */
- 41, 0, 0, 41, 41, 0, /* ACELP_30k40 */
- 41, 0, 0, 41, 41, 0, /* ACELP_32k */
- 41, 0, 0, 41, 41, 0, /* ACELP_48k */
- 41, 0, 0, 41, 41, 0, /* ACELP_64k */
-};
-
-/* bit allocation table for mid-frame LSF quantizer */
-const Word16 mid_LSF_bits_tbl[] = // Q0
-{
- /* IC UC VC GC TC AC */
- 2, 5, 1, 2, 2, 2, /* ACELP_5k00 */
- 2, 5, 1, 2, 2, 2, /* ACELP_6k15 */
- 2, 5, 4, 5, 5, 2, /* ACELP_7k20 */
- 2, 5, 4, 5, 5, 2, /* ACELP_8k00 */
- 2, 5, 4, 5, 5, 2, /* ACELP_9k60 */
- 2, 5, 4, 5, 5, 2, /* ACELP_11k60 */
- 2, 5, 5, 5, 5, 2, /* ACELP_12k15 */
- 2, 5, 5, 5, 5, 2, /* ACELP_12k85 */
- 2, 5, 5, 5, 5, 2, /* ACELP_13k20 */
- 4, 0, 5, 5, 5, 4, /* ACELP_14k80 */
- 4, 0, 5, 5, 5, 4, /* ACELP_16k40 */
- 5, 0, 5, 5, 5, 5, /* ACELP_22k60 */
- 5, 0, 5, 5, 5, 5, /* ACELP_24k40 */
- 5, 0, 0, 5, 5, 5, /* ACELP_29k00 */
- 5, 0, 0, 5, 5, 5, /* ACELP_29k20 */
- 5, 0, 0, 5, 5, 5, /* ACELP_30k20 */
- 5, 0, 0, 5, 5, 5, /* ACELP_30k40 */
- 5, 0, 0, 5, 5, 5, /* ACELP_32k */
- 5, 0, 0, 5, 5, 5, /* ACELP_48k */
- 5, 0, 0, 5, 5, 5, /* ACELP_64k */
-};
-
-
-/* bit allocation table for scaled innovation energy prediction */
-const Word16 Es_pred_bits_tbl[] = // Q0
-{
-/* UC VC GC TC */
- 0, 0, 0, 4, /* ACELP_5k00 */
- 0, 0, 0, 4, /* ACELP_6k15 */
- 0, 0, 0, 4, /* ACELP_7k20 */
- 0, 0, 0, 4, /* ACELP_8k00 */
- 0, 5, 5, 5, /* ACELP_9k60 */
- 0, 5, 4, 4, /* ACELP_11k60 */
- 0, 5, 5, 5, /* ACELP_12k15 */
- 0, 5, 4, 5, /* ACELP_12k85 */
- 0, 5, 4, 4, /* ACELP_13k20 */
- 0, 5, 5, 5, /* ACELP_14k80 */
- 0, 5, 5, 5, /* ACELP_16k40 */
- 0, 5, 5, 5, /* ACELP_22k60 */
- 0, 5, 5, 5, /* ACELP_24k40 */
- 0, 0, 5, 5, /* ACELP_29k00 */
- 0, 0, 5, 5, /* ACELP_29k20 */
- 0, 0, 5, 5, /* ACELP_30k20 */
- 0, 0, 5, 5, /* ACELP_30k40 */
- 0, 0, 5, 5, /* ACELP_32k */
- 0, 0, 5, 5, /* ACELP_48k */
- 0, 0, 5, 5, /* ACELP_64k */
-};
-
-/* bit allocation table for gain quantizer (ACELP@12.8kHz) */
-/* the 4 values allocated correspond to 4 subframes */
-const Word16 gain_bits_tbl[] = // Q0
-{
-/* UC VC GC TC0_0 TC0_64 TC0_128 TC0_192 TC64 TC128 TC192 */
- 6,6,6,6, 7,6,6,6, 7,6,6,6, 5,5,5,5, 5,5,6,5, 5,3,6,6, 5,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,10, /* ACELP_5k00 */
- 6,6,6,6, 7,6,6,6, 7,6,6,6, 5,5,5,5, 5,5,6,5, 5,3,6,6, 5,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,10, /* ACELP_6k15 */
- 7,7,7,7, 7,6,6,6, 6,6,6,6, 5,5,5,5, 5,5,6,5, 5,3,6,6, 5,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,10, /* ACELP_7k20 */
- 7,7,7,7, 8,7,6,6, 8,7,6,6, 5,5,5,5, 5,6,5,5, 5,3,6,6, 5,3,3,6, 3,5,5,5, 3,3,6,6, 3,3,3,14, /* ACELP_8k00 */
- 7,7,7,7, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,3,6,6, 6,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,10, /* ACELP_9k60 */
- 7,7,7,7, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,3,6,6, 6,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,13, /* ACELP_11k60 */
- 7,7,7,7, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,3,6,6, 6,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,14, /* ACELP_12k15 */
- 7,7,7,7, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,3,6,6, 6,3,3,6, 3,6,6,6, 3,3,6,5, 3,3,3,14, /* ACELP_12k85 */
- 7,7,7,7, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,3,6,6, 6,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,15, /* ACELP_13k20 */
- 7,7,7,7, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,3,6,6, 6,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,15, /* ACELP_14k80 */
- 7,7,7,7, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,3,6,6, 6,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,15, /* ACELP_16k40 */
- 7,7,7,7, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,3,6,6, 6,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,14, /* ACELP_22k60 */
- 7,7,7,7, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,3,6,6, 6,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,15, /* ACELP_24k40 */
-};
-
-
-/* bit allocation table for gain gain quantizer (ACELP@16kHz) */
-/* the 5 values allocated correspond to 5 subframes */
-const Word16 gain_bits_16kHz_tbl[] = // Q0
-{
- /* IC GC TC0 TC64 TC128 TC192 TC256 */
- 0,0,0,0,0, 6,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0, 0, /* ACELP_8k00 */
- 0,0,0,0,0, 6,6,6,6,6, 6,6,6,6,6, 3,6,6,6,6, 3,3,6,6,6, 3,3,3,6,6, 3,3,3,3,15, /* ACELP_14k80 */
- 6,6,6,6,6, 6,6,6,6,6, 6,6,6,6,6, 3,6,6,6,6, 3,3,6,6,6, 3,3,3,6,6, 3,3,3,3,15, /* ACELP_22k60 */
- 6,6,6,6,6, 6,6,6,6,6, 6,6,6,6,6, 3,6,6,6,6, 3,3,6,6,6, 3,3,3,6,6, 3,3,3,3,16, /* ACELP_24k40 */
- 6,6,6,6,6, 6,6,6,6,6, 6,6,6,6,6, 3,6,6,6,6, 3,3,6,6,6, 3,3,3,6,6, 3,3,3,3,14, /* ACELP_29k00 */
- 6,6,6,6,6, 6,6,6,6,6, 6,6,6,6,6, 3,6,6,6,6, 3,3,6,6,6, 3,3,3,6,6, 3,3,3,3,14, /* ACELP_29k20 */
- 6,6,6,6,6, 6,6,6,6,6, 6,6,6,6,6, 3,6,6,6,6, 3,3,6,6,6, 3,3,3,6,6, 3,3,3,3,14, /* ACELP_30k20 */
- 6,6,6,6,6, 6,6,6,6,6, 6,6,6,6,6, 3,6,6,6,6, 3,3,6,6,6, 3,3,3,6,6, 3,3,3,3,14, /* ACELP_30k40 */
- 6,6,6,6,6, 6,6,6,6,6, 6,6,6,6,6, 3,6,6,6,6, 3,3,6,6,6, 3,3,3,6,6, 3,3,3,3,14, /* ACELP_32k */
- 12,12,12,12,12, 12,12,12,12,12, 12,12,12,12,12, 6,12,12,12,12, 6,6,12,12,12, 6,6,6,12,12, 6,6,6,6,12, /* ACELP_48k */
- 12,12,12,12,12, 12,12,12,12,12, 12,12,12,12,12, 6,12,12,12,12, 6,6,12,12,12, 6,6,6,12,12, 6,6,6,6,12 /* ACELP_64k */
-};
-
-/* bit allocation table for adaptive codebook (pitch) (ACELP@12.8kHz) */
-/* the 4 values correspond to 4 subframes */
-const Word16 ACB_bits_tbl[] = // Q0
-{
-/* UC VC GC TC0_0 TC0_64 TC0_128 TC0_192 TC64 TC128 TC192 */
- 0,0,0,0, 9,5,5,5, 8,5, 8,5, 6,5,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,8, /* ACELP_5k00 */
- 0,0,0,0, 9,5,5,5, 8,5, 8,5, 6,5,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,8, /* ACELP_6k15 */
- 0,0,0,0, 9,5,5,5, 8,5, 8,5, 6,5,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,8, /* ACELP_7k20 */
- 0,0,0,0, 10,5,5,5, 9,5, 8,5, 6,5,6,6, 0,7,6,6, 0,0,7,5, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_8k00 */
- 0,0,0,0, 10,5,5,5, 10,6, 9,6, 6,5,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_9k60 */
- 0,0,0,0, 10,5,5,5, 10,6, 9,6, 6,5,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_11k60 */
- 0,0,0,0, 10,5,5,5, 10,6, 9,6, 6,6,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_12k15 */
- 0,0,0,0, 10,5,5,5, 10,6, 9,6, 6,5,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_12k85 */
- 0,0,0,0, 10,5,5,5, 10,6, 9,6, 6,5,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_13k20 */
- 0,0,0,0, 10,5,5,5, 10,6,10,6, 6,6,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_14k80 */
- 0,0,0,0, 10,5,5,5, 10,6,10,6, 6,6,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_16k40 */
- 0,0,0,0, 10,5,5,5, 10,6,10,6, 6,6,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_22k60 */
- 0,0,0,0, 10,5,5,5, 10,6,10,6, 6,6,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_24k40 */
-};
-
-/* bit allocation table for adaptive codebook (pitch) (ACELP@16kHz) */
-/* the 5 values correspond to 5 subframes */
-const Word16 ACB_bits_16kHz_tbl[] = // Q0
-{
- /* IC GC TC0 TC64 TC128 TC192 TC256 */
- 0,0, 0,0,0, 9,0, 0,0,0, 0,0, 0,0,0, 0,0, 0,0,0, 0,0, 0,0,0, 0,0,0, 0,0, 0,0,0,0, 0, /* ACELP_8k00 */
- 0,0, 0,0,0, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10, /* ACELP_14k80 */
- 10,6,10,6,6, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10, /* ACELP_22k60 */
- 10,6,10,6,6, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10, /* ACELP_24k40 */
- 10,6,10,6,6, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10, /* ACELP_29k00 */
- 10,6,10,6,6, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10, /* ACELP_29k20 */
- 10,6,10,6,6, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10, /* ACELP_30k20 */
- 10,6,10,6,6, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10, /* ACELP_30k40 */
- 10,6,10,6,6, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10, /* ACELP_32k */
- 10,6,10,6,6, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10, /* ACELP_48k */
- 10,6,10,6,6, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10 /* ACELP_64k */
-};
-
-/* bit allocation table for algebraic (fixed) codebook (innovation) (ACELP@12.8kHz) */
-/* the 4 values correspond to 4 subframes */
-const Word16 FCB_bits_tbl[] = // Q0
-{
-/* UC VC GC TC0_0 TC0_64 TC0_128 TC0_192 TC64 TC128 TC192 */
- 8,8,8,8, 12,12,12,20, 7, 7, 0, 7, 12, 7,12,12, 12,12, 7,12, 12,12,12,12, 12,12,20,12, 12,12,12,12, 12,12,12,12, 12,12,12,20, /* ACELP_5k00 */
- 10,10,10,10, 12,12,12,20, 12, 7,12, 7, 12, 7,12,12, 12,12, 7,12, 12,12,12,12, 12,12,20,12, 12,12,12,12, 12,12,12,12, 12,12,12,20, /* ACELP_6k15 */
- 13,13,13,13, 12,12,12,20, 12,12,12,20, 12, 7,12,12, 12,12, 7,12, 12,12,12,12, 12,12,20,12, 12,12,12,12, 12,12,12,12, 12,12,12,20, /* ACELP_7k20 */
- 13,13,13,13, 12,20,12,20, 12,20,12,20, 20,12,12,12, 20,12,12,12, 20,12,20,12, 20,12,20,20, 20,12,12,20, 20,12,20,12, 12,20,12,20, /* ACELP_8k00 */
- 13,13,13,13, 20,28,20,28, 20,20,20,28, 20,20,20,20, 20,20,20,20, 20,20,28,20, 20,28,20,28, 20,28,20,20, 20,20,20,28, 20,28,20,28, /* ACELP_9k60 */
- 0, 0, 0, 0, 28,36,28,36, 28,28,28,36, 28,28,28,28, 28,28,28,28, 28,28,36,28, 28,36,28,36, 28,36,28,28, 28,28,28,36, 28,36,28,36, /* ACELP_11k60 */
- 0, 0, 0, 0, 28,36,36,36, 28,36,28,36, 36,28,28,28, 36,28,28,28, 36,28,36,28, 36,36,28,43, 28,36,28,36, 28,36,28,36, 28,36,36,36, /* ACELP_12k15 */
- 0, 0, 0, 0, 36,36,36,43, 36,36,36,36, 36,36,28,36, 36,28,36,36, 36,36,36,36, 36,36,43,43, 36,36,36,36, 36,36,36,43, 36,36,36,43, /* ACELP_12k85 */
- 0, 0, 0, 0, 36,43,36,43, 36,36,36,43, 36,36,36,36, 36,36,36,36, 36,36,43,36, 36,43,43,43, 36,43,36,36, 43,36,43,36, 36,43,36,43, /* ACELP_13k20 */
- 0, 0, 0, 0, 43,50,43,50, 43,43,43,43, 43,43,43,43, 43,43,43,43, 43,43,50,43, 43,50,50,50, 43,43,43,50, 50,43,50,43, 43,50,43,50, /* ACELP_14k80 */
- 0, 0, 0, 0, 50,56,50,56, 50,50,50,56, 56,50,50,50, 56,50,50,50, 56,50,56,56, 56,56,56,56, 50,56,50,56, 50,56,56,56, 50,56,56,56, /* ACELP_16k40 */
- 0, 0, 0, 0, 83,83,83,87, 78,83,83,83, 83,78,83,83, 83,78,83,87, 83,87,83,87, 83,87,87,92, 87,83,87,83, 87,83,87,87, 83,87,87,87, /* ACELP_22k60 */
- 0, 0, 0, 0, 92,92,92,92, 87,92,92,92, 92,87,92,92, 92,87,92,92, 92,92,92,92, 92,92,92,92, 92,92,92,92, 92,92,92,92, 92,92,92,92, /* ACELP_24k40 */
-};
-
-/* bit allocation table for algebraic (fixed) codebook (innovation) (ACELP@16kHz) */
-/* the 5 values correspond to 5 subframes */
-const Word16 FCB_bits_16kHz_tbl[] = // Q0
-{
- /* IC GC TC0 TC64 TC128 TC192 TC256 */
- 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ACELP_8k00 */
- 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ACELP_14k80 */
- 0, 0, 0, 0, 0, 62,56,56,56,62, 62,56,56,56,56, 56,56,56,56,73, 62,56,62,62,62, 56,62,62,62,73, 62,62,62,62,68, /* ACELP_22k60 */
- 0, 0, 0, 0, 0, 68,68,68,73,73, 68,68,68,68,73, 68,73,68,73,73, 73,73,73,73,73, 73,78,73,73,78, 73,78,73,73,78, /* ACELP_24k40 */
- 12,12,12,12,12, 36,28,28,36,36, 36,28,28,36,36, 36,28,28,36,36, 36,28,28,36,36, 36,28,28,36,36, 36,28,28,36,36, /* ACELP_29k00 */
- 12,12,12,12,12, 36,28,28,36,36, 36,28,28,36,36, 36,28,28,36,36, 36,28,28,36,36, 36,28,28,36,36, 36,28,28,36,36, /* ACELP_29k20 */
- 12,12,12,12,12, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, /* ACELP_30k20 */
- 12,12,12,12,12, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, /* ACELP_30k40 */
- 12,12,12,12,12, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, /* ACELP_32k */
- 12,12,12,12,12, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, /* ACELP_48k */
- 12,12,12,12,12, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36 /* ACELP_64k */
-};
-
-/* bit allocation table for AVQ bits in active segments (ACELP@16kHz) */
-const Word16 AVQ_bits_16kHz_tbl[] = // Q0
-{
- /* IC GC TC0 TC64 TC128 TC192 TC256 */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ACELP_8k00 */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ACELP_14k80 */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ACELP_22k60 */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ACELP_24k40 */
- 78, 78, 78, 78, 78, 48, 48, 48, 48, 49, 48, 49, 49, 48, 49, 50, 50, 51, 52, 52, 50, 54, 53, 54, 54, 55, 55, 55, 55, 54, 52, 56, 56, 56, 56, /* ACELP_29k00 */
- 79, 79, 79, 79, 78, 49, 49, 49, 49, 49, 50, 49, 49, 50, 49, 52, 52, 51, 52, 52, 54, 54, 53, 54, 54, 56, 55, 55, 56, 56, 56, 56, 56, 56, 56, /* ACELP_29k20 */
- 78, 78, 78, 78, 78, 50, 50, 50, 50, 49, 51, 50, 50, 50, 50, 53, 53, 53, 52, 52, 55, 55, 55, 54, 54, 57, 57, 56, 56, 56, 57, 57, 57, 57, 56, /* ACELP_30k20 */
- 79, 79, 79, 79, 78, 51, 51, 51, 50, 50, 51, 51, 51, 51, 51, 54, 54, 53, 53, 53, 56, 56, 56, 55, 54, 58, 57, 57, 57, 57, 58, 58, 58, 57, 57, /* ACELP_30k40 */
- 86, 85, 85, 85, 85, 57, 57, 57, 57, 57, 58, 58, 57, 57, 57, 60, 60, 60, 60, 59, 62, 62, 62, 62, 61, 64, 64, 64, 63, 63, 64, 64, 64, 64, 64, /* ACELP_32k */
- 143,142,142,142,142, 116,115,115,115,115, 116,116,115,115,115, 119,119,118,118,118, 121,121,121,121,121, 124,124,123,123,123, 126,126,126,126,126, /* ACELP_48k */
- 207,206,206,206,206, 180,179,179,179,179, 180,180,179,179,179, 183,183,182,182,182, 185,185,185,185,185, 188,188,187,187,187, 190,190,190,190,190 /* ACELP_64k */
-};
-
-/* bit allocation table for reserved bits (ACELP@12.8kHz) */
-const Word16 reserved_bits_tbl[] = // Q0
-{
-/* UC VC GC TC0_0 TC0_64 TC0_128 TC0_192 TC64 TC128 TC192 */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ACELP_5k00 */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ACELP_6k15 */
- 1, 0, 0, 0, 0, 2, 4, 0, 3, 0, /* ACELP_7k20 */
- 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, /* ACELP_8k00 */
- 46, 0, 0, 0, 1, 2, 4, 1, 4, 0, /* ACELP_9k60 */
- 0, 0, 0, 0, 1, 3, 6, 2, 6, 0, /* ACELP_11k60 */
- 0, 0, 0, 0, 2, 4, 0, 3, 7, 0, /* ACELP_12k15 */
- 0, 0, 0, 0, 1, 3, 0, 2, 0, 0, /* ACELP_12k85 */
- 0, 0, 0, 0, 1, 4, 1, 3, 0, 0, /* ACELP_13k20 */
- 0, 0, 0, 0, 2, 5, 2, 4, 1, 1, /* ACELP_14k80 */
- 0, 0, 0, 0, 2, 0, 5, 5, 3, 3, /* ACELP_16k40 */
- 0, 0, 2, 2, 0, 1, 3, 0, 0, 1, /* ACELP_22k60 */
- 0, 0, 1, 1, 3, 8, 19, 7, 11, 11, /* ACELP_24k40 */
-};
-
-/* NRG mode */
-const UWord8 ACELP_NRG_MODE[RATE_MODE_MAX][BANDWIDTH_MODE_MAX][ACELP_MODE_MAX+RF_MODE_MAX] = // Q0
-{
- {{0,0,1,1,0,0,0,0},{2,2,1,1,0,0,0,0}},
- {{1,1,1,1,0,0,0,0},{1,1,1,1,1,1,1,0}},
-};
-
-/* NRG bits : (0/2/3 bits) */
-const UWord8 ACELP_NRG_BITS[3] = { 0, 3, 4 }; // Q0
-
-/* LTP MODE*/
-const UWord8 ACELP_LTP_MODE[RATE_MODE_MAX][BANDWIDTH_MODE_MAX][ACELP_MODE_MAX+RF_MODE_MAX] = // Q0
-{
- {{0,0,1,2,0,0,0,0},{0,0,1,2,0,0,0,0}},
- {{4,4,3,4,0,0,0,0},{4,4,3,4,8,0,9,0}},
-};
-
-/* LTP bits */
-const UWord8 ACELP_LTP_BITS_SFR[8+RF_MODE_MAX][5] = // Q0
-{
- {0,0,0,0,0},
- {8,4,4,4,4},
- {8,5,8,5,5},
- {9,6,6,6,6},
- {9,6,9,6,6},
- {8,5,5,5,5},
- {8,5,8,5,5},
- {8,0,0,0,0},
- {8,5,5,5,5}, /* All-pred mode in RF, rf_frame_type = 0 */
- {8,4,4,4,0}, /* Gen-pred mode in RF, rf_frame_type = 2 */
-};
-
-/* LTF modes (0 - LOW_PASS (LP filtering), 1 - FULL_BAND (no filtering), 2 - NORMAL_OPERATION (adaptive)) */
-/* Mode 2 ACELP: INACTIVE,UNVOICED,VOICED,GENERIC */
-const UWord8 ACELP_LTF_MODE[RATE_MODE_MAX][BANDWIDTH_MODE_MAX][ACELP_MODE_MAX+RF_MODE_MAX] = // Q0
-{
- {{1,1,1,0,0,0,0,0},{1,1,1,0,0,0,0,0}},
- {{0,0,2,0,0,0,0,0},{0,0,2,0,1,1,1,0}},
-};
-
-/* LTF bits */
-const UWord8 ACELP_LTF_BITS[4] = { 0, 0, 4, 0 }; // Q0
-
-/* GAINS ELEMENT */
-/* 5 modes: (EVS: 5b/subframe), (AMRWB: 7b/subframe),(AMRWB: 6b/subframe),(UC: 5b/subframe) */
-const UWord8 ACELP_GAINS_MODE[RATE_MODE_MAX][BANDWIDTH_MODE_MAX][ACELP_MODE_MAX+RF_MODE_MAX] = // Q0
-{
- {{6,6,1,1,0,0,0,0},{7,7,1,1,0,0,0,0}},
- {{2,2,3,3,0,0,0,0},{2,2,3,3,3,2,1,0}},
-};
-
-/* gains bits */
-const UWord8 ACELP_GAINS_BITS[10] = // Q0
-{
- 0, /* skip sub-frame wise gain coding*/
- 5,
- 6,
- 7,
- 6,
- 7,
- 6, /* UC */
- 7, /* GUNVOICED UV (5b ICB/2b Gaussian) */
- 4, /* GNELP UV */
- 5 /* GNELP UV */
-};
-
-/* BPF modes (0 - no filtering, 1 - filtering, 2 - adaptive) */
-const UWord8 ACELP_BPF_MODE[RATE_MODE_MAX][BANDWIDTH_MODE_MAX][ACELP_MODE_MAX+RF_MODE_MAX] = // Q0
-{
- {{1,1,1,1,0,0,0,0},{1,1,1,1,0,0,0,0}},
- {{1,1,2,2,0,0,0,0},{1,1,2,2,1,1,1,1}},
-};
-
-/* BPF bits */
-const UWord8 ACELP_BPF_BITS[3] = { 0, 0, 2 }; // Q0
-const Word16 ACELP_CDK_BITS[ACELP_FIXED_CDK_NB] =
-{
- 7, 10, 12, 15, 17, 20, 24, 26, 28, 30, 32, 34, 36, 40, 43, 46,
- 47, 49, 50, 53, 55, 56, 58, 59, 61, 62, 65, 68, 70, 73, 75, 78, 80, 83,
- 85, 87, 89, 92, 94, 96, 98
-};
-
-/*----------------------------------------------------------------------------------*
- * Perceptual critical bands
- *----------------------------------------------------------------------------------*/
-
-const Word32 crit_bands_fx[] =//Q0
-{
- 100, 200, 300, 400, 510, 630, 770, 920, 1080, 1270, 1480,
- 1720, 2000, 2320, 2700, 3150, 3700, 4400, 5300, 6350, 7700,
- 9500, 12000, 15500, 40000
-};
-
-
-const Word16 crit_bins_corr_fx[CRIT_NOIS_BAND] =
-{//Q15
- /*.9f, .9f, .85f, .8f, .775f, .75f, .725f , .7f , .675f, .65f, .625f , .60f, .6f, .6f, .6f, .6f, .6f, .6f, .6f, .6f, .6f, .6f, .6f*/
- 29491, 29491, 27853, 26214, 25395, 24576, 23577 , 22938, 22118, 21299, 20480,
- 19661, 19661, 19661, 19661, 19661, 19661, 19661, 19661, 19661, 19661, 19661, 19661
-};
-const Word16 crit_bins[CRIT_NOIS_BAND] = // Q0
-{
- 4, 4, 4, 4, 4, 5, 6, 6, 6, 8, 8, 10, 11, 13, 15, 18, 22, 16, 16, 20, 20, 20, 16
-};
-
-
-const Word16 crit_bands_loc_fx[CRIT_NOIS_BAND] =
-{//Q0
- 100, 200, 300, 400, 510, 630, 770, 920, 1080, 1270, 1480, 1720,
- 2000, 2320, 2700, 3150, 3700, 4100, 4500, 5000, 5500, 6000, 6375
-};
-
-const Word16 inv_tbl_fx[146] =//Q15
-{
- 0, 32767, 16384, 10923, 8192, 6554, 5462, 4681,
- 4096, 3641, 3277, 2979, 2731, 2521, 2341, 2185,
- 2048, 1928, 1820, 1725, 1638, 1560, 1489, 1425,
- 1365, 1311, 1260, 1214, 1170, 1130, 1092, 1057,
- 1024, 993, 964, 936, 910, 886, 862, 840,
- 819, 799, 780, 762, 745, 728, 712, 697,
- 683, 669, 655, 643, 630, 618, 607, 596,
- 585, 575, 565, 555, 546, 537, 529, 520,
- 512, 504, 496, 489, 482, 475, 468, 462,
- 455, 449, 443, 437, 431, 426, 420, 415,
- 410, 405, 400, 395, 390, 386, 381, 377,
- 372, 368, 364, 360, 356, 352, 349, 345,
- 341, 338, 334, 331, 328, 324, 321, 318,
- 315, 312, 309, 306, 303, 301, 298, 295,
- 293, 290, 287, 285, 282, 280, 278, 275,
- 273, 271, 269, 266, 264, 262, 260, 258,
- 256, 254, 252, 250, 248, 246, 245, 243,
- 241, 239, 237, 236, 234, 232, 231, 229,
- 228, 226
-};
-
-
-const Word16 hvq_bwe_fac_fx[16] = /* Q15 */
-{
- 16384, 17408, 18432, 19456,
- 20480, 21504, 22528, 23552,
- 24576, 25600, 26624, 27648,
- 28672, 29696, 30720, 31744
-};
-
-const Word16 sqac_headroom_fx[146] = /* Q0 */
-{
- 0 /*not used */, 0, 0, 1, 1, 1, 1, 1, 1, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4
-};
-
-const Word16 inv_N_fx[32] = /* Q15 */
-{
- 0, 1056, 2113, 3170,
- 4227, 5284, 6341, 7398,
- 8455, 9512, 10569, 11626,
- 12683, 13740, 14797, 15854,
- 16912, 17969, 19026, 20083,
- 21140, 22197, 23254, 24311,
- 25368, 26425, 27482, 28539,
- 29596, 30653, 31710, 32767
-};
-
-const Word16 band_len_harm[SFM_N_HARM_FB] =
-{
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 16, 16, 16, 16, 16, 16, 32, 32, 32, 48, 48, 48, 48, 64, 64, 64, 96
-};
-
-const Word32 thren_fx[39] = /* Q8 */
-{
- 28215802, 19951584, 14107901,
- 9975792, 7053951, 4987896,
- 3526975, 2493948, 1763488,
- 1246974, 881744, 623487,
- 440872, 311744, 220436,
- 155872, 110218, 77936,
- 55109, 38968, 27554,
- 19484, 13777, 9742,
- 6889, 4871, 3444,
- 2435, 1722, 1218,
- 861, 609, 431,
- 304, 215, 152,
- 108, 76, 54
-};
-
-const Word16 dicnlg2[40] = // Q0
-{
- 34, 33, 32, 31, 30, 29, 28, 27, 26, 25,
- 24, 23, 22, 21, 20, 19, 18, 17, 16, 15,
- 14, 13, 12, 11, 10, 9, 8, 7, 6, 5,
- 4, 3, 2, 1, 0, -1, -2, -3, -4, -5
-};
-
-/*----------------------------------------------------------------------------------*
- * LD music post-filter
- *----------------------------------------------------------------------------------*/
-
-const Word16 mfreq_loc_LD_fx[] = { 100, 200, 300, 400, 510, 630, 770, 920, 1080, 1270, 1480,//Q0
- 1720, 2000, 2320, 2700, 3150, 3700, 4400, 5300, (6400 - BIN_16kdct_fx)
-};
-
-const Word16 mfreq_bindiv_LD[] = {10, 10, 10, 10, 11, 12, 14, 15, 16, 19, 21, 24, 28, 32, 38, 45, 55, 70, 90, 110}; // Q0
-const Word16 sc_qnoise_fx[] = { 3277, 3277, 3277, 3277, 3277, 3277, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2185, 2185, 2185, 2185, 2185 };//Q15
-const Word16 inv_mfreq_bindiv_LD_fx[] = { 3277, 3277, 3277, 3277, 2979, 2731, 2341, 2185, 2048, 1725, 1560, 1365, 1170, 1024, 862, 728, 596, 468, 364, 298 }; /*Q15 */
-
-const Word16 inv_mfreq_bindiv_LD_M1_fx[] = { 3641, 3641, 3641, 3641, 3277, 2979, 2521, 2341, 2185, 1820, 1638, 1425, 1214, 1057, 886, 745, 607, 475, 368, 301 }; /*Q15 */
-
-const Word16 post_dct_wind_fx[OFFSET2] = /*Q15 */
-{
- 32767, 32766, 32759, 32748, 32733, 32713, 32689, 32660,
- 32627, 32590, 32548, 32502, 32452, 32397, 32338, 32274,
- 32207, 32135, 32059, 31979, 31894, 31805, 31712, 31615,
- 31514, 31409, 31300, 31187, 31070, 30949, 30823, 30695,
- 30562, 30425, 30285, 30141, 29993, 29841, 29686, 29527,
- 29365, 29200, 29030, 28858, 28682, 28503, 28320, 28134,
- 27945, 27753, 27558, 27360, 27159, 26955, 26749, 26539,
- 26327, 26112, 25894, 25674, 25452, 25226, 24999, 24769,
- 24537, 24303, 24067, 23828, 23588, 23345, 23101, 22855,
- 22607, 22358, 22107, 21854, 21600, 21345, 21088, 20830,
- 20570, 20310, 20049, 19786, 19523, 19258, 18993, 18728,
- 18461, 18195, 17927, 17659, 17391, 17123, 16854, 16586,
- 16317, 16048, 15779, 15511, 15243, 14975, 14707, 14440,
- 14173, 13907, 13642, 13377, 13114, 12851, 12589, 12328,
- 12068, 11809, 11552, 11296, 11041, 10787, 10536, 10285,
- 10037, 9790, 9545, 9301, 9060, 8820, 8583, 8348,
- 8115, 7884, 7655, 7429, 7205, 6983, 6765, 6548,
- 6335, 6124, 5916, 5710, 5508, 5308, 5112, 4918,
- 4728, 4540, 4356, 4175, 3998, 3824, 3653, 3485,
- 3321, 3161, 3004, 2851, 2701, 2555, 2413, 2274,
- 2139, 2009, 1882, 1758, 1639, 1524, 1413, 1306,
- 1203, 1104, 1009, 918, 831, 749, 671, 597,
- 527, 461, 400, 343, 291, 242, 199, 159,
- 124, 93, 67, 45, 27, 14, 5, 1
-};
-
-const Word16 MAX_SNR_SNR1_tab_FX[MBANDS_GN_LD] = { 16815, 16815, 16815, 16815, 16815, 16815, 16815, 16815, 16815, 16815, 16815, 16815, 16815, 16815, 16815, 16815, 17096, 17096, 17096, 17096 };//Q14
-
-const Word16 INV_MAX_SNR_tab_FX[MBANDS_GN_LD] = { 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 1425, 1425, 1425, 1425 };//Q15
-
-const Word16 wind_sss_fx[LEN_WIN_SSS] = /*window for subsampling*/
-{//Q15
- 2621, 2627, 2645, 2675, 2717, 2771, 2836, 2914,
- 3003, 3103, 3216, 3340, 3475, 3621, 3779, 3948,
- 4127, 4318, 4519, 4730, 4952, 5184, 5426, 5677,
- 5938, 6209, 6488, 6777, 7074, 7379, 7693, 8015,
- 8344, 8681, 9025, 9375, 9733, 10097, 10466, 10842,
- 11223, 11609, 12000, 12395, 12795, 13198, 13605, 14016,
- 14429, 14845, 15263, 15683, 16105, 16527, 16951, 17376,
- 17800, 18225, 18649, 19072, 19495, 19916, 20335, 20752,
- 21166, 21578, 21987, 22392, 22794, 23191, 23585, 23973,
- 24357, 24735, 25108, 25474, 25835, 26189, 26537, 26877,
- 27210, 27536, 27853, 28163, 28464, 28757, 29041, 29316,
- 29582, 29838, 30085, 30322, 30549, 30765, 30972, 31167,
- 31352, 31526, 31690, 31842, 31983, 32112, 32230, 32337,
- 32432, 32515, 32586, 32646, 32694, 32730, 32754, 32766,
- 32767, 32096, 30111, 26894, 22575, 17333, 11380, 4962
-};
-/*----------------------------------------------------------------------------------*
- * Low-pass FIR filter for low-frequency post-filtering @ 8kHz
- * fir1(240,(3900/32000),hanning(241))*5
- *----------------------------------------------------------------------------------*/
-
-const Word16 filter5_39s320_120_fx[121] = /* Q15 */
-{
- 19968, 19480, 18061, 15834, 12993, 9779, 6458, 3290,
- 506, -1713, -3253, -4075, -4212, -3762, -2873, -1720,
- -488, 654, 1568, 2160, 2389, 2263, 1838, 1201,
- 460, -275, -903, -1348, -1566, -1546, -1312, -914,
- -422, 90, 547, 891, 1083, 1108, 975, 716,
- 376, 9, -331, -599, -762, -805, -732, -562,
- -325, -61, 192, 399, 533, 582, 546, 435,
- 272, 83, -103, -259, -366, -413, -398, -328,
- -218, -86, 46, 161, 243, 283, 280, 238,
- 166, 77, -14, -94, -153, -185, -188, -163,
- -119, -62, -3, 50, 90, 113, 117, 104,
- 78, 44, 9, -23, -47, -62, -65, -58,
- -45, -27, -8, 9, 21, 28, 30, 27,
- 20, 13, 5, -2, -7, -9, -9, -8,
- -6, -3, -1, 0, 1, 1, 1, 0,
- 0
-
-};
-
-
-/*----------------------------------------------------------------------------------*
- * LP analysis windows
- *----------------------------------------------------------------------------------*/
-const Word16 Assym_window_W16fx[L_LP] = /*Q15*/
-{
- 2621, 2624, 2630, 2640, 2655, 2674, 2698, 2725,
- 2757, 2792, 2833, 2877, 2925, 2978, 3034, 3095,
- 3160, 3229, 3302, 3379, 3460, 3545, 3634, 3727,
- 3824, 3925, 4029, 4138, 4250, 4366, 4486, 4609,
- 4737, 4867, 5002, 5140, 5281, 5426, 5575, 5727,
- 5882, 6040, 6202, 6367, 6535, 6707, 6881, 7059,
- 7239, 7422, 7609, 7798, 7990, 8184, 8382, 8581,
- 8784, 8989, 9196, 9406, 9618, 9832, 10049, 10268,
- 10489, 10711, 10936, 11163, 11391, 11622, 11854, 12087,
- 12322, 12559, 12797, 13037, 13278, 13520, 13763, 14007,
- 14253, 14499, 14746, 14994, 15243, 15493, 15743, 15994,
- 16245, 16496, 16748, 17000, 17253, 17505, 17758, 18010,
- 18263, 18515, 18767, 19019, 19270, 19521, 19772, 20022,
- 20271, 20519, 20767, 21014, 21260, 21504, 21748, 21991,
- 22232, 22473, 22711, 22949, 23185, 23419, 23652, 23883,
- 24113, 24340, 24566, 24790, 25012, 25231, 25449, 25664,
- 25878, 26089, 26297, 26503, 26707, 26908, 27107, 27303,
- 27496, 27687, 27874, 28059, 28241, 28420, 28596, 28769,
- 28939, 29105, 29269, 29429, 29586, 29739, 29889, 30036,
- 30179, 30319, 30455, 30588, 30717, 30842, 30964, 31082,
- 31196, 31306, 31413, 31516, 31615, 31709, 31800, 31888,
- 31971, 32050, 32125, 32196, 32263, 32325, 32384, 32439,
- 32489, 32535, 32577, 32615, 32649, 32679, 32704, 32725,
- 32742, 32755, 32763, 32767, 32767, 32758, 32741, 32715,
- 32681, 32638, 32587, 32527, 32458, 32381, 32296, 32203,
- 32101, 31991, 31873, 31746, 31612, 31470, 31320, 31162,
- 30996, 30823, 30642, 30454, 30259, 30056, 29847, 29630,
- 29407, 29177, 28940, 28697, 28448, 28193, 27931, 27664,
- 27391, 27113, 26829, 26540, 26246, 25947, 25643, 25335,
- 25022, 24706, 24385, 24060, 23732, 23401, 23066, 22728,
- 22387, 22043, 21697, 21349, 20999, 20646, 20292, 19937,
- 19580, 19223, 18864, 18505, 18145, 17785, 17425, 17065,
- 16705, 16346, 15988, 15631, 15275, 14920, 14567, 14215,
- 13866, 13519, 13174, 12832, 12492, 12156, 11823, 11493,
- 11166, 10844, 10525, 10210, 9900, 9594, 9292, 8996,
- 8704, 8418, 8137, 7861, 7591, 7327, 7068, 6816,
- 6570, 6330, 6097, 5870, 5650, 5437, 5231, 5032,
- 4840, 4656, 4479, 4310, 4148, 3994, 3848, 3709,
- 3579, 3457, 3343, 3237, 3139, 3050, 2969, 2896,
- 2832, 2776, 2729, 2690, 2660, 2639, 2626, 2621
-};
-
-const Word16 assym_window_16k_fx[L_LP_16k] = /*Q15*/
-{
- 2621, 2623, 2627, 2634, 2643, 2655, 2670, 2688,
- 2708, 2731, 2757, 2785, 2816, 2849, 2886, 2925,
- 2966, 3011, 3058, 3107, 3159, 3214, 3271, 3331,
- 3394, 3459, 3527, 3597, 3670, 3745, 3823, 3903,
- 3985, 4071, 4158, 4248, 4341, 4436, 4533, 4632,
- 4734, 4839, 4945, 5054, 5165, 5279, 5394, 5512,
- 5632, 5754, 5879, 6005, 6134, 6264, 6397, 6531,
- 6668, 6807, 6947, 7090, 7234, 7381, 7529, 7679,
- 7831, 7984, 8140, 8297, 8455, 8616, 8778, 8941,
- 9107, 9273, 9442, 9611, 9782, 9955, 10129, 10304,
- 10481, 10659, 10838, 11019, 11200, 11383, 11567, 11752,
- 11938, 12125, 12313, 12502, 12693, 12883, 13075, 13268,
- 13461, 13655, 13850, 14046, 14242, 14439, 14637, 14835,
- 15033, 15232, 15432, 15631, 15832, 16032, 16233, 16434,
- 16635, 16837, 17039, 17240, 17442, 17644, 17846, 18048,
- 18250, 18452, 18653, 18855, 19056, 19257, 19458, 19658,
- 19858, 20058, 20257, 20456, 20654, 20852, 21049, 21245,
- 21441, 21637, 21831, 22025, 22218, 22410, 22602, 22792,
- 22982, 23170, 23358, 23545, 23730, 23915, 24098, 24280,
- 24461, 24641, 24820, 24997, 25173, 25348, 25521, 25693,
- 25863, 26032, 26200, 26366, 26530, 26693, 26854, 27014,
- 27171, 27328, 27482, 27635, 27786, 27935, 28082, 28227,
- 28371, 28513, 28652, 28790, 28926, 29059, 29191, 29320,
- 29448, 29573, 29697, 29818, 29937, 30053, 30168, 30280,
- 30390, 30498, 30603, 30706, 30807, 30905, 31002, 31095,
- 31186, 31275, 31362, 31446, 31527, 31606, 31683, 31757,
- 31828, 31897, 31963, 32027, 32088, 32147, 32203, 32257,
- 32307, 32356, 32401, 32444, 32484, 32522, 32557, 32589,
- 32619, 32646, 32670, 32692, 32711, 32727, 32741, 32751,
- 32760, 32765, 32767, 32767, 32762, 32751, 32734, 32712,
- 32685, 32652, 32614, 32570, 32521, 32466, 32406, 32341,
- 32270, 32194, 32112, 32026, 31934, 31837, 31735, 31627,
- 31515, 31398, 31275, 31148, 31016, 30878, 30737, 30590,
- 30438, 30282, 30122, 29957, 29787, 29613, 29434, 29252,
- 29065, 28874, 28679, 28480, 28277, 28070, 27859, 27644,
- 27426, 27205, 26980, 26751, 26520, 26285, 26047, 25805,
- 25561, 25314, 25065, 24812, 24557, 24300, 24040, 23777,
- 23513, 23246, 22978, 22707, 22435, 22161, 21885, 21608,
- 21329, 21049, 20768, 20485, 20202, 19918, 19632, 19347,
- 19060, 18773, 18486, 18198, 17911, 17623, 17335, 17047,
- 16760, 16473, 16186, 15900, 15614, 15330, 15046, 14763,
- 14481, 14200, 13921, 13643, 13367, 13092, 12818, 12547,
- 12277, 12010, 11744, 11481, 11220, 10961, 10705, 10451,
- 10200, 9951, 9706, 9463, 9223, 8987, 8754, 8523,
- 8297, 8073, 7854, 7637, 7425, 7216, 7011, 6810,
- 6613, 6420, 6231, 6046, 5865, 5689, 5517, 5350,
- 5187, 5028, 4875, 4726, 4581, 4442, 4307, 4177,
- 4052, 3932, 3818, 3708, 3603, 3503, 3409, 3320,
- 3236, 3157, 3084, 3016, 2953, 2895, 2844, 2797,
- 2756, 2720, 2690, 2665, 2646, 2632, 2624, 2621
-};
-
-const Word16 lag_window_8k[2][16] = /* LAGW_STRONG Q15*/
-{
- /* h */ { 32728, 32619, 32438, 32187, 31867, 31480, 31029, 30517, 29946, 29321, 28645, 27923, 27158, 26356, 25521, 24658 },
- /* l */ { 11904, 17280, 30720, 25856, 24192, 28992, 24384, 7360, 19456, 14720, 22080, 12928, 31040, 27328, 22080, 5184 }
-};
-const Word16 lag_window_12k8[NUM_LAGW_STRENGTHS][2][16] =
-{//Q15
- /* LAGW_WEAK */
- {
- /* h */ { 32763, 32758, 32750, 32739, 32725, 32707, 32687, 32663, 32637, 32607, 32574, 32538, 32498, 32456, 32411, 32362 },
- /* l */ { 4736, 13312, 16896, 15360, 8896, 30464, 14528, 27008, 2496, 6720, 7296, 4480, 31424, 22976, 12160, 32384 }
-},
-/* LAGW_MEDIUM */
-{
- /* h */ { 32758, 32739, 32707, 32663, 32607, 32538, 32456, 32362, 32257, 32139, 32009, 31867, 31714, 31549, 31374, 31187 },
- /* l */ { 13312, 15360, 30464, 27008, 6720, 4480, 22976, 32384, 3520, 5888, 11200, 24192, 17472, 29376, 576, 3136 }
-},
-/* LAGW_STRONG */
-{
- /* h */ { 32750, 32707, 32637, 32538, 32411, 32257, 32075, 31867, 31633, 31374, 31089, 30780, 30449, 30094, 29718, 29321 },
- /* l */ { 16896, 30464, 2496, 4480, 12160, 3520, 24256, 24192, 20736, 576, 18240, 31488, 128, 16704, 11520, 14720 }
-}
-};
-const Word16 lag_window_16k[NUM_LAGW_STRENGTHS][2][16] =
-{//Q15
- /* LAGW_WEAK */
- {
- /* h */ { 32763, 32760, 32755, 32748, 32739, 32728, 32715, 32700, 32682, 32663, 32642, 32619, 32594, 32567, 32538, 32507 },
- /* l */ { 23360, 22272, 20672, 18304, 15360, 11904, 8000, 3648, 31808, 27008, 22080, 17280, 12608, 8256, 4480, 1344 }
-},
-/* LAGW_MEDIUM */
-{
- /* h */ { 32760, 32748, 32728, 32700, 32663, 32619, 32567, 32507, 32438, 32362, 32279, 32187, 32088, 31981, 31867, 31746 },
- /* l */ { 22272, 18304, 11904, 3648, 27008, 17280, 8256, 1344, 30720, 32384, 8256, 25856, 21824, 31360, 24192, 3072 }
-},
-/* LAGW_STRONG */
-{
- /* h */ { 32755, 32728, 32682, 32619, 32538, 32438, 32322, 32187, 32036, 31867, 31682, 31480, 31263, 31029, 30780, 30517 },
- /* l */ { 20672, 11904, 31808, 17280, 4480, 30720, 2944, 25856, 8320, 24192, 16896, 28992, 5824, 24384, 31488, 7360 }
-}
-};
-const Word16 lag_window_25k6[NUM_LAGW_STRENGTHS][2][16] =
-{//Q15
- /* LAGW_WEAK */
- {
- /* h */ { 32764, 32763, 32761, 32758, 32754, 32750, 32745, 32739, 32732, 32725, 32716, 32707, 32698, 32687, 32676, 32663 },
- /* l */ { 10752, 4736, 5568, 13312, 28096, 16896, 12672, 15360, 25024, 8896, 32576, 30464, 2624, 14528, 832, 27008 }
-},
-/* LAGW_MEDIUM */
-{
- /* h */ { 32763, 32758, 32750, 32739, 32725, 32707, 32687, 32663, 32637, 32607, 32574, 32538, 32498, 32456, 32411, 32362 },
- /* l */ { 4736, 13312, 16896, 15360, 8896, 30464, 14528, 27008, 2496, 6720, 7296, 4480, 31424, 22976, 12160, 32384 }
-},
-/* LAGW_STRONG */
-{
- /* h */ { 32761, 32750, 32732, 32707, 32676, 32637, 32591, 32538, 32478, 32411, 32337, 32257, 32169, 32075, 31975, 31867 },
- /* l */ { 5568, 16896, 25024, 30464, 832, 2496, 3328, 4480, 7040, 12160, 21440, 3520, 25728, 24256, 1216, 24192 }
-}
-};
-const Word16 lag_window_32k[NUM_LAGW_STRENGTHS][2][16] =
-{//Q15
- /* LAGW_WEAK */
- {
- /* h */ { 32764, 32763, 32762, 32760, 32758, 32755, 32752, 32748, 32744, 32739, 32734, 32728, 32722, 32715, 32707, 32700 },
- /* l */ { 15424, 23360, 14720, 22272, 13312, 20672, 11328, 18304, 8704, 15360, 5504, 11904, 1792, 8000, 30464, 3648 }
-},
-/* LAGW_MEDIUM */
-{
- /* h */ { 32763, 32760, 32755, 32748, 32739, 32728, 32715, 32700, 32682, 32663, 32642, 32619, 32594, 32567, 32538, 32507 },
- /* l */ { 23360, 22272, 20672, 18304, 15360, 11904, 8000, 3648, 31808, 27008, 22080, 17280, 12608, 8256, 4480, 1344 }
-},
-/* LAGW_STRONG */
-{
- /* h */ { 32762, 32755, 32744, 32728, 32707, 32682, 32653, 32619, 32581, 32538, 32490, 32438, 32382, 32322, 32257, 32187 },
- /* l */ { 14720, 20672, 8704, 11904, 30464, 31808, 16384, 17280, 2240, 4480, 24704, 30720, 23168, 2944, 3520, 25856 }
-}
-};
-const Word16 lag_window_48k[2][16] = /* LAGW_STRONG */
-{//Q15
- /* h */ { 32763, 32760, 32755, 32748, 32739, 32728, 32715, 32700, 32682, 32663, 32642, 32619, 32594, 32567, 32538, 32507 },
- /* l */ { 23360, 22272, 20672, 18304, 15360, 11904, 8000, 3648, 31808, 27008, 22080, 17280, 12608, 8256, 4480, 1344 }
-};
-
-/* 32 bit declarations */
-const Word32 lag_window_8k_32[16] = /* LAGW_STRONG */
-{//Q31
- 2144886016, 2137753344, 2125918208, 2109458944, 2088484096, 2063131264, 2033565312, 1999976832, 1962579968, 1921610496, 1877322880, 1829987584, 1779888768, 1727321472, 1672588416, 1615997056
-};
-
-const Word32 lag_window_12k8_32[NUM_LAGW_STRENGTHS][16] =
-{//Q31
- /* LAGW_WEAK */
- {
- 2147165440, 2146854912, 2146337792, 2145613824, 2144683392, 2143546880, 2142204288, 2140656384, 2138903424, 2136945792, 2134784256, 2132419328, 2129851776, 2127082368, 2124111616, 2120940800
-},
-/* LAGW_MEDIUM */
-{
- 2146854912, 2145613824, 2143546880, 2140656384, 2136945792, 2132419328, 2127082368, 2120940800, 2114001792, 2106273280, 2097764224, 2088484096, 2078443648, 2067654016, 2056127616, 2043877504
-},
-/* LAGW_STRONG */
-{
- 2146337792, 2143546880, 2138903424, 2132419328, 2124111616, 2114001792, 2102115712, 2088484096, 2073141760, 2056127616, 2037485184, 2017261056, 1995505920, 1972273792, 1947621888, 1921610496
-}
-};
-
-const Word32 lag_window_16k_32[NUM_LAGW_STRENGTHS][16] =
-{//Q31
- /* LAGW_WEAK */
- {
- 2147202688, 2147003904, 2146673024, 2146209536, 2145613824, 2144886016, 2144026240, 2143034496, 2141911168, 2140656384, 2139270272, 2137753344, 2136105600, 2134327424, 2132419328, 2130381440
-},
-/* LAGW_MEDIUM */
-{
- 2147003904, 2146209536, 2144886016, 2143034496, 2140656384, 2137753344, 2134327424, 2130381440, 2125918208, 2120940800, 2115453056, 2109458944, 2102962816, 2095969536, 2088484096, 2080512000
-},
-/* LAGW_STRONG */
-{
- 2146673024, 2144886016, 2141911168, 2137753344, 2132419328, 2125918208, 2118260480, 2109458944, 2099527936, 2088484096, 2076345344, 2063131264, 2048863616, 2033565312, 2017261056, 1999976832
-}
-};
-const Word32 lag_window_25k6_32[NUM_LAGW_STRENGTHS][16] =
-{//Q31
- /* LAGW_WEAK */
- {
- 2147243008, 2147165440, 2147036032, 2146854912, 2146622336, 2146337792, 2146001664, 2145613824, 2145174400, 2144683392, 2144140928, 2143546880, 2142901376, 2142204288, 2141456000, 2140656384
-},
-/* LAGW_MEDIUM */
-{
- 2147165440, 2146854912, 2146337792, 2145613824, 2144683392, 2143546880, 2142204288, 2140656384, 2138903424, 2136945792, 2134784256, 2132419328, 2129851776, 2127082368, 2124111616, 2120940800
-},
-/* LAGW_STRONG */
-{
- 2147036032, 2146337792, 2145174400, 2143546880, 2141456000, 2138903424, 2135890432, 2132419328, 2128492288, 2124111616, 2119280512, 2114001792, 2108279040, 2102115712, 2095516032, 2088484096
-}
-};
-const Word32 lag_window_32k_32[NUM_LAGW_STRENGTHS][16] =
-{//Q31
- /* LAGW_WEAK */
- {
- 2147252352, 2147202688, 2147119872, 2147003904, 2146854912, 2146673024, 2146457728, 2146209536, 2145928192, 2145613824, 2145266432, 2144886016, 2144472576, 2144026240, 2143546880, 2143034496
-},
-/* LAGW_MEDIUM */
-{
- 2147202688, 2147003904, 2146673024, 2146209536, 2145613824, 2144886016, 2144026240, 2143034496, 2141911168, 2140656384, 2139270272, 2137753344, 2136105600, 2134327424, 2132419328, 2130381440
-},
-/* LAGW_STRONG */
-{
- 2147119872, 2146673024, 2145928192, 2144886016, 2143546880, 2141911168, 2139979776, 2137753344, 2135232896, 2132419328, 2129314048, 2125918208, 2122233088, 2118260480, 2114001792, 2109458944
-}
-};
-const Word32 lag_window_48k_32[16] = /* LAGW_STRONG */
-{//Q31
- 2147202688, 2147003904, 2146673024, 2146209536, 2145613824, 2144886016, 2144026240, 2143034496, 2141911168, 2140656384, 2139270272, 2137753344, 2136105600, 2134327424, 2132419328, 2130381440
-};
-/*----------------------------------------------------------------------------------*
- * LP analysis - grid of points for evaluating Chebyshev polynomials
- *----------------------------------------------------------------------------------*/
-
-const Word16 grid50_fx[(GRID50_POINTS - 1) / 2 - 1] =
-{//Q15
- 32703, 32510, 32188, 31739, 31164, 30467,
- 29649, 28715, 27667, 26510, 25248, 23887,
- 22431, 20887, 19261, 17558, 15786, 13952,
- 12063, 10126, 8149, 6140, 4107, 2058
-};
-
-const Word16 grid40_fx[(GRID40_POINTS - 1) / 2 - 1] =
-{//Q15
- 32667, 32365, 31863, 31164, 30274, 29197,
- 27939, 26510, 24917, 23170, 21281, 19261,
- 17121, 14876, 12540, 10126, 7650, 5126,
- 2571
-};
-
-/*----------------------------------------------------------------------------------*
- * Sinus & Cosinus - table for the FFT and IFFT of 256 points,
- * dimension of the table = 161
- *----------------------------------------------------------------------------------*/
-const Word16 sincos_t_fx[161] =
-{
- /*Q15 */
- 0,
- 804, 1607, 2410, 3211, 4011,
- 4808, 5602, 6392, 7179, 7961,
- 8739, 9512, 10278, 11039, 11793,
- 12539, 13278, 14010, 14732, 15446,
- 16151, 16846, 17530, 18204, 18868,
- 19519, 20159, 20787, 21403, 22005,
- 22594, 23170, 23732, 24279, 24812,
- 25330, 25832, 26319, 26790, 27245,
- 27684, 28106, 28511, 28898, 29269,
- 29621, 29956, 30273, 30572, 30852,
- 31114, 31357, 31581, 31785, 31971,
- 32138, 32285, 32413, 32521, 32610,
- 32679, 32728, 32758, 32767, 32758,
- 32728, 32679, 32610, 32521, 32413,
- 32285, 32138, 31971, 31785, 31581,
- 31357, 31114, 30852, 30572, 30273,
- 29956, 29621, 29269, 28898, 28511,
- 28106, 27684, 27245, 26790, 26319,
- 25832, 25330, 24812, 24279, 23732,
- 23170, 22594, 22005, 21403, 20787,
- 20159, 19519, 18868, 18204, 17530,
- 16846, 16151, 15446, 14732, 14010,
- 13278, 12539, 11793, 11039, 10278,
- 9512, 8739, 7961, 7179, 6392,
- 5602, 4808, 4011, 3211, 2410,
- 1607, 804, 0, -804, -1607,
- -2410, -3211, -4011, -4808, -5602,
- -6392, -7179, -7961, -8739, -9512,
- -10278, -11039, -11793, -12539, -13278,
- -14010, -14732, -15446, -16151, -16846,
- -17530, -18204, -18868, -19519, -20159,
- -20787, -21403, -22005, -22594, -23170,
-};
-
-
-/*----------------------------------------------------------------------------------*
- * Sinus & Cosinus - table for the FFT and IFFT of 1024 points, value range [0 ... sin(-5pi/4)]
- * dimension of the table = 641=4*256*(5/8)+1
- *----------------------------------------------------------------------------------*/
-
-/* every 4th value is identical to sincos_t above but as sincos_t is also used in SWB TBE a separate table has been defined here */
-const float sincos_t_ext[641] =
-{
- 0.0f,
- 0.006135884649154f, 0.012271538285720f, 0.018406729905805f, 0.024541228522912f, 0.030674803176637f, 0.036807222941359f, 0.042938256934941f, 0.049067674327418f,
- 0.055195244349690f, 0.061320736302209f, 0.067443919563664f, 0.073564563599667f, 0.079682437971430f, 0.085797312344440f, 0.091908956497133f, 0.098017140329561f,
- 0.104121633872055f, 0.110222207293883f, 0.116318630911905f, 0.122410675199216f, 0.128498110793793f, 0.134580708507126f, 0.140658239332849f, 0.146730474455362f,
- 0.152797185258443f, 0.158858143333861f, 0.164913120489970f, 0.170961888760301f, 0.177004220412149f, 0.183039887955141f, 0.189068664149806f, 0.195090322016128f,
- 0.201104634842092f, 0.207111376192219f, 0.213110319916091f, 0.219101240156870f, 0.225083911359793f, 0.231058108280671f, 0.237023605994367f, 0.242980179903264f,
- 0.248927605745720f, 0.254865659604515f, 0.260794117915276f, 0.266712757474898f, 0.272621355449949f, 0.278519689385053f, 0.284407537211272f, 0.290284677254462f,
- 0.296150888243624f, 0.302005949319228f, 0.307849640041535f, 0.313681740398892f, 0.319502030816016f, 0.325310292162263f, 0.331106305759876f, 0.336889853392220f,
- 0.342660717311994f, 0.348418680249435f, 0.354163525420490f, 0.359895036534988f, 0.365612997804774f, 0.371317193951837f, 0.377007410216418f, 0.382683432365090f,
- 0.388345046698826f, 0.393992040061048f, 0.399624199845647f, 0.405241314004990f, 0.410843171057904f, 0.416429560097637f, 0.422000270799800f, 0.427555093430282f,
- 0.433093818853152f, 0.438616238538528f, 0.444122144570429f, 0.449611329654607f, 0.455083587126344f, 0.460538710958240f, 0.465976495767966f, 0.471396736825998f,
- 0.476799230063322f, 0.482183772079123f, 0.487550160148436f, 0.492898192229784f, 0.498227666972782f, 0.503538383725718f, 0.508830142543107f, 0.514102744193222f,
- 0.519355990165590f, 0.524589682678469f, 0.529803624686295f, 0.534997619887097f, 0.540171472729893f, 0.545324988422046f, 0.550457972936605f, 0.555570233019602f,
- 0.560661576197336f, 0.565731810783613f, 0.570780745886967f, 0.575808191417845f, 0.580813958095765f, 0.585797857456439f, 0.590759701858874f, 0.595699304492433f,
- 0.600616479383869f, 0.605511041404326f, 0.610382806276309f, 0.615231590580627f, 0.620057211763289f, 0.624859488142386f, 0.629638238914927f, 0.634393284163645f,
- 0.639124444863776f, 0.643831542889791f, 0.648514401022112f, 0.653172842953777f, 0.657806693297079f, 0.662415777590172f, 0.666999922303637f, 0.671558954847018f,
- 0.676092703575316f, 0.680600997795453f, 0.685083667772700f, 0.689540544737067f, 0.693971460889654f, 0.698376249408973f, 0.702754744457225f, 0.707106781186547f,
- 0.711432195745216f, 0.715730825283819f, 0.720002507961382f, 0.724247082951467f, 0.728464390448225f, 0.732654271672413f, 0.736816568877370f, 0.740951125354959f,
- 0.745057785441466f, 0.749136394523459f, 0.753186799043613f, 0.757208846506485f, 0.761202385484262f, 0.765167265622459f, 0.769103337645580f, 0.773010453362737f,
- 0.776888465673232f, 0.780737228572094f, 0.784556597155575f, 0.788346427626606f, 0.792106577300212f, 0.795836904608884f, 0.799537269107905f, 0.803207531480645f,
- 0.806847553543799f, 0.810457198252595f, 0.814036329705948f, 0.817584813151584f, 0.821102514991105f, 0.824589302785025f, 0.828045045257756f, 0.831469612302545f,
- 0.834862874986380f, 0.838224705554838f, 0.841554977436898f, 0.844853565249707f, 0.848120344803297f, 0.851355193105265f, 0.854557988365401f, 0.857728610000272f,
- 0.860866938637767f, 0.863972856121587f, 0.867046245515693f, 0.870086991108711f, 0.873094978418290f, 0.876070094195407f, 0.879012226428633f, 0.881921264348355f,
- 0.884797098430938f, 0.887639620402854f, 0.890448723244758f, 0.893224301195515f, 0.895966249756185f, 0.898674465693954f, 0.901348847046022f, 0.903989293123443f,
- 0.906595704514915f, 0.909167983090522f, 0.911706032005430f, 0.914209755703531f, 0.916679059921043f, 0.919113851690058f, 0.921514039342042f, 0.923879532511287f,
- 0.926210242138311f, 0.928506080473216f, 0.930766961078984f, 0.932992798834739f, 0.935183509938948f, 0.937339011912575f, 0.939459223602190f, 0.941544065183021f,
- 0.943593458161960f, 0.945607325380521f, 0.947585591017741f, 0.949528180593037f, 0.951435020969008f, 0.953306040354194f, 0.955141168305771f, 0.956940335732209f,
- 0.958703474895872f, 0.960430519415566f, 0.962121404269042f, 0.963776065795440f, 0.965394441697689f, 0.966976471044852f, 0.968522094274417f, 0.970031253194544f,
- 0.971503890986252f, 0.972939952205560f, 0.974339382785576f, 0.975702130038529f, 0.977028142657754f, 0.978317370719628f, 0.979569765685441f, 0.980785280403230f,
- 0.981963869109555f, 0.983105487431216f, 0.984210092386929f, 0.985277642388941f, 0.986308097244599f, 0.987301418157858f, 0.988257567730749f, 0.989176509964781f,
- 0.990058210262297f, 0.990902635427780f, 0.991709753669100f, 0.992479534598710f, 0.993211949234795f, 0.993906970002356f, 0.994564570734255f, 0.995184726672197f,
- 0.995767414467660f, 0.996312612182778f, 0.996820299291166f, 0.997290456678690f, 0.997723066644192f, 0.998118112900149f, 0.998475580573295f, 0.998795456205172f,
- 0.999077727752645f, 0.999322384588350f, 0.999529417501093f, 0.999698818696204f, 0.999830581795823f, 0.999924701839145f, 0.999981175282601f, 1.000000000000000f,
- 0.999981175282601f, 0.999924701839145f, 0.999830581795823f, 0.999698818696204f, 0.999529417501093f, 0.999322384588350f, 0.999077727752645f, 0.998795456205172f,
- 0.998475580573295f, 0.998118112900149f, 0.997723066644192f, 0.997290456678690f, 0.996820299291166f, 0.996312612182778f, 0.995767414467660f, 0.995184726672197f,
- 0.994564570734255f, 0.993906970002356f, 0.993211949234795f, 0.992479534598710f, 0.991709753669100f, 0.990902635427780f, 0.990058210262297f, 0.989176509964781f,
- 0.988257567730749f, 0.987301418157858f, 0.986308097244599f, 0.985277642388941f, 0.984210092386929f, 0.983105487431216f, 0.981963869109555f, 0.980785280403230f,
- 0.979569765685441f, 0.978317370719628f, 0.977028142657754f, 0.975702130038529f, 0.974339382785576f, 0.972939952205560f, 0.971503890986252f, 0.970031253194544f,
- 0.968522094274417f, 0.966976471044852f, 0.965394441697689f, 0.963776065795440f, 0.962121404269042f, 0.960430519415566f, 0.958703474895872f, 0.956940335732209f,
- 0.955141168305771f, 0.953306040354194f, 0.951435020969008f, 0.949528180593037f, 0.947585591017741f, 0.945607325380521f, 0.943593458161960f, 0.941544065183021f,
- 0.939459223602190f, 0.937339011912575f, 0.935183509938948f, 0.932992798834739f, 0.930766961078984f, 0.928506080473216f, 0.926210242138311f, 0.923879532511287f,
- 0.921514039342042f, 0.919113851690058f, 0.916679059921043f, 0.914209755703531f, 0.911706032005430f, 0.909167983090522f, 0.906595704514915f, 0.903989293123443f,
- 0.901348847046022f, 0.898674465693954f, 0.895966249756185f, 0.893224301195515f, 0.890448723244758f, 0.887639620402854f, 0.884797098430938f, 0.881921264348355f,
- 0.879012226428634f, 0.876070094195407f, 0.873094978418290f, 0.870086991108711f, 0.867046245515693f, 0.863972856121587f, 0.860866938637767f, 0.857728610000272f,
- 0.854557988365401f, 0.851355193105265f, 0.848120344803297f, 0.844853565249707f, 0.841554977436898f, 0.838224705554838f, 0.834862874986380f, 0.831469612302545f,
- 0.828045045257756f, 0.824589302785025f, 0.821102514991105f, 0.817584813151584f, 0.814036329705949f, 0.810457198252595f, 0.806847553543799f, 0.803207531480645f,
- 0.799537269107905f, 0.795836904608884f, 0.792106577300212f, 0.788346427626606f, 0.784556597155575f, 0.780737228572095f, 0.776888465673232f, 0.773010453362737f,
- 0.769103337645580f, 0.765167265622459f, 0.761202385484262f, 0.757208846506485f, 0.753186799043613f, 0.749136394523459f, 0.745057785441466f, 0.740951125354959f,
- 0.736816568877370f, 0.732654271672413f, 0.728464390448225f, 0.724247082951467f, 0.720002507961382f, 0.715730825283819f, 0.711432195745217f, 0.707106781186548f,
- 0.702754744457225f, 0.698376249408973f, 0.693971460889654f, 0.689540544737067f, 0.685083667772700f, 0.680600997795453f, 0.676092703575316f, 0.671558954847019f,
- 0.666999922303638f, 0.662415777590172f, 0.657806693297079f, 0.653172842953777f, 0.648514401022113f, 0.643831542889791f, 0.639124444863776f, 0.634393284163645f,
- 0.629638238914927f, 0.624859488142386f, 0.620057211763289f, 0.615231590580627f, 0.610382806276310f, 0.605511041404326f, 0.600616479383869f, 0.595699304492433f,
- 0.590759701858874f, 0.585797857456439f, 0.580813958095765f, 0.575808191417845f, 0.570780745886967f, 0.565731810783613f, 0.560661576197336f, 0.555570233019602f,
- 0.550457972936605f, 0.545324988422046f, 0.540171472729893f, 0.534997619887097f, 0.529803624686295f, 0.524589682678469f, 0.519355990165590f, 0.514102744193222f,
- 0.508830142543107f, 0.503538383725718f, 0.498227666972782f, 0.492898192229784f, 0.487550160148436f, 0.482183772079123f, 0.476799230063322f, 0.471396736825998f,
- 0.465976495767966f, 0.460538710958240f, 0.455083587126344f, 0.449611329654607f, 0.444122144570429f, 0.438616238538528f, 0.433093818853152f, 0.427555093430282f,
- 0.422000270799800f, 0.416429560097637f, 0.410843171057904f, 0.405241314004990f, 0.399624199845647f, 0.393992040061048f, 0.388345046698827f, 0.382683432365090f,
- 0.377007410216418f, 0.371317193951838f, 0.365612997804774f, 0.359895036534988f, 0.354163525420490f, 0.348418680249435f, 0.342660717311994f, 0.336889853392220f,
- 0.331106305759876f, 0.325310292162263f, 0.319502030816016f, 0.313681740398891f, 0.307849640041535f, 0.302005949319228f, 0.296150888243624f, 0.290284677254462f,
- 0.284407537211272f, 0.278519689385053f, 0.272621355449949f, 0.266712757474898f, 0.260794117915276f, 0.254865659604515f, 0.248927605745720f, 0.242980179903264f,
- 0.237023605994367f, 0.231058108280671f, 0.225083911359793f, 0.219101240156870f, 0.213110319916091f, 0.207111376192219f, 0.201104634842092f, 0.195090322016129f,
- 0.189068664149806f, 0.183039887955141f, 0.177004220412149f, 0.170961888760301f, 0.164913120489970f, 0.158858143333861f, 0.152797185258444f, 0.146730474455362f,
- 0.140658239332850f, 0.134580708507126f, 0.128498110793793f, 0.122410675199216f, 0.116318630911905f, 0.110222207293883f, 0.104121633872055f, 0.098017140329561f,
- 0.091908956497133f, 0.085797312344440f, 0.079682437971430f, 0.073564563599668f, 0.067443919563664f, 0.061320736302208f, 0.055195244349690f, 0.049067674327418f,
- 0.042938256934941f, 0.036807222941359f, 0.030674803176637f, 0.024541228522912f, 0.018406729905805f, 0.012271538285720f, 0.006135884649155f, 0.000000000000000f,
- -0.006135884649155f, -0.012271538285720f, -0.018406729905805f, -0.024541228522912f, -0.030674803176637f, -0.036807222941359f, -0.042938256934941f, -0.049067674327418f,
- -0.055195244349690f, -0.061320736302208f, -0.067443919563664f, -0.073564563599667f, -0.079682437971430f, -0.085797312344440f, -0.091908956497133f, -0.098017140329561f,
- -0.104121633872054f, -0.110222207293883f, -0.116318630911904f, -0.122410675199216f, -0.128498110793793f, -0.134580708507126f, -0.140658239332849f, -0.146730474455362f,
- -0.152797185258443f, -0.158858143333861f, -0.164913120489970f, -0.170961888760301f, -0.177004220412149f, -0.183039887955141f, -0.189068664149806f, -0.195090322016128f,
- -0.201104634842092f, -0.207111376192219f, -0.213110319916091f, -0.219101240156870f, -0.225083911359793f, -0.231058108280671f, -0.237023605994367f, -0.242980179903264f,
- -0.248927605745720f, -0.254865659604514f, -0.260794117915276f, -0.266712757474898f, -0.272621355449949f, -0.278519689385053f, -0.284407537211272f, -0.290284677254462f,
- -0.296150888243624f, -0.302005949319228f, -0.307849640041535f, -0.313681740398891f, -0.319502030816016f, -0.325310292162263f, -0.331106305759876f, -0.336889853392220f,
- -0.342660717311994f, -0.348418680249435f, -0.354163525420490f, -0.359895036534988f, -0.365612997804774f, -0.371317193951837f, -0.377007410216418f, -0.382683432365090f,
- -0.388345046698826f, -0.393992040061048f, -0.399624199845647f, -0.405241314004990f, -0.410843171057904f, -0.416429560097637f, -0.422000270799800f, -0.427555093430282f,
- -0.433093818853152f, -0.438616238538527f, -0.444122144570429f, -0.449611329654607f, -0.455083587126344f, -0.460538710958240f, -0.465976495767966f, -0.471396736825998f,
- -0.476799230063322f, -0.482183772079123f, -0.487550160148436f, -0.492898192229784f, -0.498227666972782f, -0.503538383725717f, -0.508830142543107f, -0.514102744193222f,
- -0.519355990165590f, -0.524589682678469f, -0.529803624686295f, -0.534997619887097f, -0.540171472729893f, -0.545324988422046f, -0.550457972936605f, -0.555570233019602f,
- -0.560661576197336f, -0.565731810783613f, -0.570780745886967f, -0.575808191417845f, -0.580813958095764f, -0.585797857456439f, -0.590759701858874f, -0.595699304492433f,
- -0.600616479383869f, -0.605511041404325f, -0.610382806276309f, -0.615231590580627f, -0.620057211763289f, -0.624859488142386f, -0.629638238914927f, -0.634393284163645f,
- -0.639124444863776f, -0.643831542889791f, -0.648514401022112f, -0.653172842953777f, -0.657806693297079f, -0.662415777590172f, -0.666999922303637f, -0.671558954847018f,
- -0.676092703575316f, -0.680600997795453f, -0.685083667772700f, -0.689540544737067f, -0.693971460889654f, -0.698376249408973f, -0.702754744457225f, -0.707106781186547f
-};
-
-const Word16 sincos_t_ext_fx[641] =
-{//Q15
- 0, 201, 402, 603, 804, 1005, 1206, 1407,
- 1608, 1809, 2009, 2210, 2411, 2611, 2811, 3012,
- 3212, 3412, 3612, 3812, 4011, 4211, 4410, 4609,
- 4808, 5007, 5205, 5404, 5602, 5800, 5998, 6195,
- 6393, 6590, 6787, 6983, 7180, 7376, 7571, 7767,
- 7962, 8157, 8351, 8546, 8740, 8933, 9127, 9319,
- 9512, 9704, 9896, 10088, 10279, 10469, 10660, 10850,
- 11039, 11228, 11417, 11605, 11793, 11980, 12167, 12354,
- 12540, 12725, 12910, 13095, 13279, 13463, 13646, 13828,
- 14010, 14192, 14373, 14553, 14733, 14912, 15091, 15269,
- 15447, 15624, 15800, 15976, 16151, 16326, 16500, 16673,
- 16846, 17018, 17190, 17361, 17531, 17700, 17869, 18037,
- 18205, 18372, 18538, 18703, 18868, 19032, 19195, 19358,
- 19520, 19681, 19841, 20001, 20160, 20318, 20475, 20632,
- 20788, 20943, 21097, 21251, 21403, 21555, 21706, 21856,
- 22006, 22154, 22302, 22449, 22595, 22740, 22884, 23028,
- 23170, 23312, 23453, 23593, 23732, 23870, 24008, 24144,
- 24279, 24414, 24548, 24680, 24812, 24943, 25073, 25202,
- 25330, 25457, 25583, 25708, 25833, 25956, 26078, 26199,
- 26320, 26439, 26557, 26674, 26791, 26906, 27020, 27133,
- 27246, 27357, 27467, 27576, 27684, 27791, 27897, 28002,
- 28106, 28209, 28311, 28411, 28511, 28610, 28707, 28803,
- 28899, 28993, 29086, 29178, 29269, 29359, 29448, 29535,
- 29622, 29707, 29792, 29875, 29957, 30038, 30118, 30196,
- 30274, 30350, 30425, 30499, 30572, 30644, 30715, 30784,
- 30853, 30920, 30986, 31050, 31114, 31177, 31238, 31298,
- 31357, 31415, 31471, 31527, 31581, 31634, 31686, 31737,
- 31786, 31834, 31881, 31927, 31972, 32015, 32058, 32099,
- 32138, 32177, 32214, 32251, 32286, 32319, 32352, 32383,
- 32413, 32442, 32470, 32496, 32522, 32546, 32568, 32590,
- 32610, 32629, 32647, 32664, 32679, 32693, 32706, 32718,
- 32729, 32738, 32746, 32753, 32758, 32762, 32766, 32767,
- 32767, 32767, 32766, 32762, 32758, 32753, 32746, 32738,
- 32729, 32718, 32706, 32693, 32679, 32664, 32647, 32629,
- 32610, 32590, 32568, 32546, 32522, 32496, 32470, 32442,
- 32413, 32383, 32352, 32319, 32286, 32251, 32214, 32177,
- 32138, 32099, 32058, 32015, 31972, 31927, 31881, 31834,
- 31786, 31737, 31686, 31634, 31581, 31527, 31471, 31415,
- 31357, 31298, 31238, 31177, 31114, 31050, 30986, 30920,
- 30853, 30784, 30715, 30644, 30572, 30499, 30425, 30350,
- 30274, 30196, 30118, 30038, 29957, 29875, 29792, 29707,
- 29622, 29535, 29448, 29359, 29269, 29178, 29086, 28993,
- 28899, 28803, 28707, 28610, 28511, 28411, 28311, 28209,
- 28106, 28002, 27897, 27791, 27684, 27576, 27467, 27357,
- 27246, 27133, 27020, 26906, 26791, 26674, 26557, 26439,
- 26320, 26199, 26078, 25956, 25833, 25708, 25583, 25457,
- 25330, 25202, 25073, 24943, 24812, 24680, 24548, 24414,
- 24279, 24144, 24008, 23870, 23732, 23593, 23453, 23312,
- 23170, 23028, 22884, 22740, 22595, 22449, 22302, 22154,
- 22006, 21856, 21706, 21555, 21403, 21251, 21097, 20943,
- 20788, 20632, 20475, 20318, 20160, 20001, 19841, 19681,
- 19520, 19358, 19195, 19032, 18868, 18703, 18538, 18372,
- 18205, 18037, 17869, 17700, 17531, 17361, 17190, 17018,
- 16846, 16673, 16500, 16326, 16151, 15976, 15800, 15624,
- 15447, 15269, 15091, 14912, 14733, 14553, 14373, 14192,
- 14010, 13828, 13646, 13463, 13279, 13095, 12910, 12725,
- 12540, 12354, 12167, 11980, 11793, 11605, 11417, 11228,
- 11039, 10850, 10660, 10469, 10279, 10088, 9896, 9704,
- 9512, 9319, 9127, 8933, 8740, 8546, 8351, 8157,
- 7962, 7767, 7571, 7376, 7180, 6983, 6787, 6590,
- 6393, 6195, 5998, 5800, 5602, 5404, 5205, 5007,
- 4808, 4609, 4410, 4211, 4011, 3812, 3612, 3412,
- 3212, 3012, 2811, 2611, 2411, 2210, 2009, 1809,
- 1608, 1407, 1206, 1005, 804, 603, 402, 201,
- 0, -201, -402, -603, -804, -1005, -1206, -1407,
- -1608, -1809, -2009, -2210, -2411, -2611, -2811, -3012,
- -3212, -3412, -3612, -3812, -4011, -4211, -4410, -4609,
- -4808, -5007, -5205, -5404, -5602, -5800, -5998, -6195,
- -6393, -6590, -6787, -6983, -7180, -7376, -7571, -7767,
- -7962, -8157, -8351, -8546, -8740, -8933, -9127, -9319,
- -9512, -9704, -9896, -10088, -10279, -10469, -10660, -10850,
- -11039, -11228, -11417, -11605, -11793, -11980, -12167, -12354,
- -12540, -12725, -12910, -13095, -13279, -13463, -13646, -13828,
- -14010, -14192, -14373, -14553, -14733, -14912, -15091, -15269,
- -15447, -15624, -15800, -15976, -16151, -16326, -16500, -16673,
- -16846, -17018, -17190, -17361, -17531, -17700, -17869, -18037,
- -18205, -18372, -18538, -18703, -18868, -19032, -19195, -19358,
- -19520, -19681, -19841, -20001, -20160, -20318, -20475, -20632,
- -20788, -20943, -21097, -21251, -21403, -21555, -21706, -21856,
- -22006, -22154, -22302, -22449, -22595, -22740, -22884, -23028,
- -23028
-};/*Q15*/
-
-
-const Word16 Asr_LP16_fx[21] =
-{
- /*Q15 */
- 0, 110, 0, -428, 0, 1153, 0, -2832,
- 0, 10199, 16384, 10199, 0, -2832, 0, 1153,
- 0, -428, 0, 110, 0
-};
-
-const Word16 Asr_LP32_fx[41] =
-{
- /*Q15 */
- 0, 24, 55, 58, 0, -113, -214, -198,
- 0, 323, 576, 510, 0, -795, -1416, -1280,
- 0, 2337, 5099, 7334, 8192, 7334, 5099, 2337,
- 0, -1280, -1416, -795, 0, 510, 576, 323,
- 0, -198, -214, -113, 0, 58, 55, 24,
- 0
-};
-
-const Word16 Asr_LP48_fx[61] =
-{
- /*Q17 */
- 0, 38, 93, 146, 167, 123, 0, -192,
- -408, -571, -592, -407, 0, 564, 1143, 1537,
- 1546, 1035, 0, -1391, -2801, -3776, -3843, -2635,
- 0, 3919, 8679, 13599, 17887, 20809, 21845, 20809,
- 17887, 13599, 8679, 3919, 0, -2635, -3843, -3776,
- -2801, -1391, 0, 1035, 1546, 1537, 1143, 564,
- 0, -407, -592, -571, -408, -192, 0, 123,
- 167, 146, 93, 38, 0
-};
-
-const Word16 fft256_read_indexes[]= // Q0
-{
- 0, 128, 64, 192, 32, 160, 96, 224, 16, 144, 80, 208, 48, 176, 112, 240,
- 8, 136, 72, 200, 40, 168, 104, 232, 24, 152, 88, 216, 56, 184, 120, 248,
- 4, 132, 68, 196, 36, 164, 100, 228, 20, 148, 84, 212, 52, 180, 116, 244,
- 12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252,
- 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82, 210, 50, 178, 114, 242,
- 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250,
- 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86, 214, 54, 182, 118, 246,
- 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254,
- 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81, 209, 49, 177, 113, 241,
- 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249,
- 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85, 213, 53, 181, 117, 245,
- 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253,
- 3, 131, 67, 195, 35, 163, 99, 227, 19, 147, 83, 211, 51, 179, 115, 243,
- 11, 139, 75, 203, 43, 171, 107, 235, 27, 155, 91, 219, 59, 187, 123, 251,
- 7, 135, 71, 199, 39, 167, 103, 231, 23, 151, 87, 215, 55, 183, 119, 247,
- 15, 143, 79, 207, 47, 175, 111, 239, 31, 159, 95, 223, 63, 191, 127, 255
-};
-
-
-/*----------------------------------------------------------------------------------*
- * Sinus & Cosinus - table for the DCT-IV based 2
- *----------------------------------------------------------------------------------*/
-
-const Word16 sin_table256_fx[] =
-{//Q15
- 101, 302, 503, 704, 905, 1106, 1307, 1507, 1708,
- 1909, 2110, 2310, 2511, 2711, 2912, 3112, 3312, 3512,
- 3712, 3911, 4111, 4310, 4510, 4709, 4907, 5106, 5305,
- 5503, 5701, 5899, 6097, 6294, 6491, 6688, 6885, 7081,
- 7278, 7473, 7669, 7864, 8059, 8254, 8449, 8643, 8836,
- 9030, 9223, 9416, 9608, 9800, 9992, 10183, 10374, 10565,
- 10755, 10945, 11134, 11323, 11511, 11699, 11887, 12074, 12261,
- 12447, 12633, 12818, 13003, 13187, 13371, 13554, 13737, 13919,
- 14101, 14282, 14463, 14643, 14823, 15002, 15180, 15358, 15535,
- 15712, 15888, 16064, 16239, 16413, 16587, 16760, 16932, 17104,
- 17275, 17446, 17616, 17785, 17953, 18121, 18288, 18455, 18621,
- 18786, 18950, 19114, 19277, 19439, 19601, 19761, 19921, 20081,
- 20239, 20397, 20554, 20710, 20865, 21020, 21174, 21327, 21479,
- 21631, 21781, 21931, 22080, 22228, 22375, 22522, 22668, 22812,
- 22956, 23099, 23241, 23383, 23523, 23663, 23801, 23939, 24076,
- 24212, 24347, 24481, 24614, 24746, 24878, 25008, 25138, 25266,
- 25394, 25520, 25646, 25771, 25894, 26017, 26139, 26259, 26379,
- 26498, 26616, 26733, 26848, 26963, 27077, 27190, 27301, 27412,
- 27522, 27630, 27738, 27844, 27950, 28054, 28158, 28260, 28361,
- 28461, 28560, 28658, 28755, 28851, 28946, 29040, 29132, 29224,
- 29314, 29404, 29492, 29579, 29665, 29750, 29833, 29916, 29997,
- 30078, 30157, 30235, 30312, 30388, 30462, 30536, 30608, 30680,
- 30750, 30819, 30886, 30953, 31018, 31082, 31146, 31207, 31268,
- 31328, 31386, 31443, 31499, 31554, 31608, 31660, 31711, 31761,
- 31810, 31858, 31904, 31950, 31994, 32037, 32078, 32119, 32158,
- 32196, 32233, 32268, 32303, 32336, 32368, 32398, 32428, 32456,
- 32483, 32509, 32534, 32557, 32579, 32600, 32620, 32638, 32656,
- 32672, 32686, 32700, 32712, 32723, 32733, 32742, 32749, 32756,
- 32760, 32764, 32767, 32767
-};
-/*----------------------------------------------------------------------------------*
- * 1/4 resolution interpolation filter (-3 dB at 0.913*fs/2)
- *----------------------------------------------------------------------------------*/
-
-const Word16 inter4_2_fx[] =
-{//evs table , some mismatch in values compared to float is observed
- 0, 1, 2, 1,
- -2, -7, -10, -7,
- 4, 19, 28, 22,
- -2, -33, -55, -49,
- -10, 47, 91, 92,
- 38, -52, -133, -153,
- -88, 43, 175, 231,
- 165, -9, -209, -325,
- -275, -60, 226, 431,
- 424, 175, -213, -544,
- -619, -355, 153, 656,
- 871, 626, -16, -762,
- -1207, -1044, -249, 853,
- 1699, 1749, 780, -923,
- -2598, -3267, -2147, 968,
- 5531, 10359, 14031, 15401,
- 14031, 10359, 5531, 968,
- -2147, -3267, -2598, -923,
- 780, 1749, 1699, 853,
- -249, -1044, -1207, -762,
- -16, 626, 871, 656,
- 153, -355, -619, -544,
- -213, 175, 424, 431,
- 226, -60, -275, -325,
- -209, -9, 165, 231,
- 175, 43, -88, -153,
- -133, -52, 38, 92,
- 91, 47, -10, -49,
- -55, -33, -2, 22,
- 28, 19, 4, -7,
- -10, -7, -2, 1,
- 2, 1, 0, 0
-};
-
-/* 1/4 resolution interpolation filter (-3 dB at 0.856*fs/2) */
-const Word32 L_pitch_inter4_2[PIT_FIR_SIZE2] = { /* Q31 */
- 2018634624, 1839083520, 1357785216, 724904576, 126856152, -281447072,
- -428193216, -340524320, -121030032, 102233104, 229241728, 222704784,
- 111802296, -32603096, -136805440, -158183648, -99851544, -2110976,
- 82091856, 114123720, 86026048, 19988778, -46544560, -81104016,
- -71266392, -27977416, 22982370, 55621972, 56517476, 29680372,
- -7827578, -36105644, -42638288, -27414776, -1138166, 21646636,
- 30326764, 22885734, 5570572, -11516955, -20066088, -17396766,
- -6833293, 5003637, 12101070, 11944304, 6107443, -1346472, -6427418,
- -7219840, -4389456, -249108, 2823941, 3633542, 2471753, 556198,
- -895500, -1327144, -932007, -285615, 135291, 210453, 103079, 15032, 0
-};
-const Word16 pitch_inter4_2[PIT_FIR_SIZE2] =
-{
- /* cut-off frequency at 0.94*fs/2 */
- 30802/*0.940000f Q15*/,
- 28062/*0.856390f Q15*/, 20718/*0.632268f Q15*/, 11061/*0.337560f Q15*/, 1936/*0.059072f Q15*/,
- -4295/*-0.131059f Q15*/, -6534/*-0.199393f Q15*/, -5196/*-0.158569f Q15*/, -1847/*-0.056359f Q15*/,
- 1560/*0.047606f Q15*/, 3498/*0.106749f Q15*/, 3398/*0.1037059f Q15*/, 1706/*0.052062f Q15*/,
- -497/*-0.015182f Q15*/, -2087/*-0.063705f Q15*/, -2414/*-0.073660f Q15*/, -1524/*-0.046497f Q15*/,
- -32/*-0.000983f Q15*/, 1253/*0.038227f Q15*/, 1741/*0.053143f Q15*/, 1313/*0.040059f Q15*/,
- 305/*0.009308f Q15*/, -710/*-0.021674f Q15*/, -1238/*-0.037767f Q15*/, -1087/*-0.033186f Q15*/,
- -427/*-0.013028f Q15*/, 351/*0.010702f Q15*/, 849/*0.025901f Q15*/, 862/*0.026318f Q15*/,
- 453/*0.013821f Q15*/, -119/*-0.003645f Q15*/, -551/*-0.016813f Q15*/, -651/*-0.019855f Q15*/,
- -418/*-0.012766f Q15*/, -17/*-0.000530f Q15*/, 330/*0.010080f Q15*/, 463/*0.014122f Q15*/,
- 349/*0.010657f Q15*/, 85/*0.002594f Q15*/, -176/*-0.005363f Q15*/, -306/*-0.009344f Q15*/,
- -265/*-0.008101f Q15*/, -104/*-0.003182f Q15*/, 76/*0.002330f Q15*/, 185/*0.005635f Q15*/,
- 182/*0.005562f Q15*/, 93/*0.002844f Q15*/, -21/*-0.000627f Q15*/, -98/*-0.002993f Q15*/,
- -110/*-0.003362f Q15*/, -67/*-0.002044f Q15*/, -4/*-0.000116f Q15*/, 43/*0.001315f Q15*/,
- 55/*0.001692f Q15*/, 38/*0.001151f Q15*/, 8/*0.000259f Q15*/, -14/*-0.000417f Q15*/,
- -20/*-0.000618f Q15*/, -14/*-0.000434f Q15*/, -4/*-0.000133f Q15*/, 2/*0.000063f Q15*/,
- 3/*0.000098f Q15*/, 2/*0.000048f Q15*/, 0/*0.000007f Q15*/, 0/*0.000000f Q15*/
-};
-/* 1/4 resolution interpolation filter (-3 dB at 0.791*fs/2) */
-const Word32 L_pitch_inter4_1[UP_SAMP * L_INTERPOL1 + 1] = /* Q31 */
-{
- 1932735283, 1758701061, 1298905484, 711630983, 180298432, -162768528,
- -280712608, -226956816, -100446400, 9592809, 59676424, 55065776,
- 26996016, 4138201, -3373696, -1617055, 0
-};
-/* 1/4 resolution interpolation filter (-3 dB at 0.791*fs/2) */
-const Word16 pitch_inter4_1[UP_SAMP * L_INTERPOL1 + 1] =
-{
- 29491/*0.900000F Q15*/,
- 26836/*0.818959F Q15*/, 19820/* 0.604850F Q15*/, 10859/* 0.331379F Q15*/, 2751/* 0.083958F Q15*/,
- -2484/*-0.075795F Q15*/, -4283/* -0.130717F Q15*/, -3463/*-0.105685F Q15*/, -1533/*-0.046774F Q15*/,
- 146/*0.004467F Q15*/, 911/* 0.027789F Q15*/, 840/* 0.025642F Q15*/, 412/* 0.012571F Q15*/,
- 63/*0.001927F Q15*/, -51/* -0.001571F Q15*/, -25/*-0.000753F Q15*/, 0/* 0.000000f Q15*/
-};
-
-/*----------------------------------------------------------------------------------*
- * 1/6 resolution interpolation filter (-3 dB at 0.95*fs/2)
- *----------------------------------------------------------------------------------*/
-
-/* 1/6 resolution interpolation filter (-3 dB at 0.95*fs/2) */
-const Word16 pitch_inter6_2[PIT_FIR_SIZE6_2] =
-{
- 31129/*0.949986374119862f Q15*/,
- 29854/*0.911081104469830f Q15*/,
- 26218/*0.800115099292852f Q15*/,
- 20753/*0.633320673120883f Q15*/,
- 14240/*0.434558462154083f Q15*/,
- 7575/*0.231177017786780f Q15*/,
- 1618/*0.049378173063717f Q15*/,
- -2950/*-0.090039611811170f Q15*/,
- -5727/*-0.174782560924477f Q15*/,
- -6635/*-0.202477516286360f Q15*/,
- -5905/*-0.180218293244902f Q15*/,
- -4012/*-0.122429229978978f Q15*/,
- -1558/*-0.047552067127379f Q15*/,
- 843/*0.025733669494145f Q15*/,
- 2687/*0.081995376731897f Q15*/,
- 3656/*0.111581381838187f Q15*/,
- 3663/*0.111781798292302f Q15*/,
- 2834/*0.086499988914996f Q15*/,
- 1462/*0.044629684447068f Q15*/,
- -79/*-0.002416435594242f Q15*/,
- -1423/*-0.043440027386915f Q15*/,
- -2289/*-0.069857782812169f Q15*/,
- -2533/*-0.077293683967992f Q15*/,
- -2166/*-0.066098268486336f Q15*/,
- -1336/*-0.040782649068098f Q15*/,
- -282/*-0.008590773415008f Q15*/,
- 734/*0.022397654632128f Q15*/,
- 1480/*0.045171360007974f Q15*/,
- 1811/*0.055274128677739f Q15*/,
- 1690/*0.051578034020076f Q15*/,
- 1187/*0.036232016917169f Q15*/,
- 454/*0.013869500422767f Q15*/,
- -317/*-0.009680698856947f Q15*/,
- -945/*-0.028843394410080f Q15*/,
- -1296/*-0.039560663181280f Q15*/,
- -1314/*-0.040095747151623f Q15*/,
- -1023/*-0.031231107680685f Q15*/,
- -520/*-0.015866154815425f Q15*/,
- 60/*0.001841532922707f Q15*/,
- 575/*0.017553701334759f Q15*/,
- 910/*0.027778555138199f Q15*/,
- 1003/*0.030612329573745f Q15*/,
- 853/*0.026046143652186f Q15*/,
- 518/*0.015803012695681f Q15*/,
- 91/*0.002782973481834f Q15*/,
- -319/*-0.009720124055079f Q15*/,
- -617/*-0.018826488463900f Q15*/,
- -744/*-0.022710487805852f Q15*/,
- -686/*-0.020936374578238f Q15*/,
- -473/*-0.014436620433404f Q15*/,
- -169/*-0.005169079181373f Q15*/,
- 145/*0.004437651243491f Q15*/,
- 397/*0.012100372954920f Q15*/,
- 531/*0.016207075406240f Q15*/,
- 529/*0.016135389123271f Q15*/,
- 403/*0.012306629559665f Q15*/,
- 196/*0.005986734945567f Q15*/,
- -36/*-0.001094950878591f Q15*/,
- -236/*-0.007200842219958f Q15*/,
- -360/*-0.010998212848124f Q15*/,
- -388/*-0.011835179448280f Q15*/,
- -322/*-0.009826566540474f Q15*/,
- -188/*-0.005747665080695f Q15*/,
- -26/*-0.000780600030751f Q15*/,
- 125/*0.003810613287985f Q15*/,
- 229/*0.006990479233404f Q15*/,
- 268/*0.008174249796791f Q15*/,
- 240/*0.007317375965949f Q15*/,
- 159/*0.004864690818765f Q15*/,
- 52/*0.001587005259212f Q15*/,
- -54/*-0.001642504305841f Q15*/,
- -133/*-0.004070609517416f Q15*/,
- -171/*-0.005230670504649f Q15*/,
- -164/*-0.005019147682711f Q15*/,
- -120/*-0.003673879223241f Q15*/,
- -55/*-0.001671460853812f Q15*/,
- 14/*0.000420750005150f Q15*/,
- 69/*0.002095384947391f Q15*/,
- 99/*0.003020513665060f Q15*/,
- 101/*0.003095468528243f Q15*/,
- 80/*0.002441025550729f Q15*/,
- 44/*0.001335514431569f Q15*/,
- 4/*0.000120805384516f Q15*/,
- -29/*-0.000893340757369f Q15*/,
- -49/*-0.001501610712267f Q15*/,
- -54/*-0.001636887611783f Q15*/,
- -45/*-0.001362571776250f Q15*/,
- -27/*-0.000832126175863f Q15*/,
- -8/*-0.000232033375863f Q15*/,
- 9/*0.000273627139471f Q15*/,
- 19/*0.000582092683087f Q15*/,
- 22/*0.000666445711949f Q15*/,
- 19/*0.000566088888178f Q15*/,
- 12/*0.000360374058147f Q15*/,
- 4/*0.000136306914913f Q15*/,
- -1/*-0.000038864994777f Q15*/,
- -4/*-0.000132755824518f Q15*/,
- -5/*-0.000148377158880f Q15*/,
- -4/*-0.000112937171810f Q15*/,
- -2/*-0.000061132514471f Q15*/,
- -1/*-0.000019974224468f Q15*/,
- 0/*-0.000000460344975f Q15*/,
- 0/*0.000001976848453f Q15*/
-};
-
-
-/*----------------------------------------------------------------------------------*
- * Low-pass FIR filter for low-frequency post-filtering @ 16kHz
- * response : -6dB @ 50Hz, -3dB @ 500Hz, -6dB @ 6.4kHz)
- * L_FILT=15 @ 16kHz (1+4x15=61 coef)
- * L_FILT=12 @ 12.8kHz (1+5x12=61 coef)
- * filter parameters: fs/2=32000, fc=6400, gain=5.0, n=61
- *----------------------------------------------------------------------------------*/
-
-const Word16 filter_LP12_180H_fx[] = /* Sincfilt.m: N=180*2+1, Fmin=0, Fmax=1/12, hann( N )' */
-{//Q14
- 16384, 16196, 15641, 14741, 13533, 12067,
- 10402, 8604, 6742, 4887, 3105, 1459,
- 0, -1230, -2202, -2900, -3322, -3478,
- -3392, -3095, -2628, -2037, -1371, -676,
- 0, 618, 1143, 1550, 1822, 1954,
- 1946, 1811, 1565, 1233, 842, 421,
- 0, -394, -736, -1008, -1196, -1294,
- -1299, -1217, -1059, -839, -576, -290,
- 0, 274, 514, 707, 842, 913,
- 920, 865, 755, 600, 413, 208,
- 0, -197, -371, -511, -609, -662,
- -667, -627, -548, -436, -300, -151,
- 0, 143, 270, 371, 443, 481,
- 485, 456, 398, 316, 217, 109,
- 0, -104, -195, -268, -319, -346,
- -348, -326, -284, -225, -155, -78,
- 0, 73, 137, 189, 224, 242,
- 243, 227, 198, 156, 107, 54,
- 0, -50, -94, -128, -151, -163,
- -163, -152, -131, -103, -70, -35,
- 0, 32, 60, 82, 96, 103,
- 102, 95, 81, 64, 43, 21,
- 0, -19, -36, -48, -56, -59,
- -58, -53, -45, -35, -23, -11,
- 0, 10, 18, 24, 28, 29,
- 28, 25, 21, 16, 10, 5,
- 0, -4, -7, -9, -10, -10,
- -9, -8, -6, -5, -3, -1,
- 0, 1, 1, 2, 2, 1,
- 1, 1, 0, 0, 0, 0,
- 0
-};
-const Word16 filter_LP12_180H_13b_fx[] = /*Q13 Sincfilt.m: N=180*2+1, Fmin=0, Fmax=1/12, hann( N )*/
-{//Q13
- 8192, 8098, 7820, 7370, 6766, 6033,
- 5201, 4302, 3371, 2443, 1553, 729,
- 0, -615, -1101, -1450, -1661, -1739,
- -1696, -1547, -1314, -1019, -685, -338,
- 0, 309, 571, 775, 911, 977,
- 973, 905, 783, 616, 421, 210,
- 0, -197, -368, -504, -598, -647,
- -649, -608, -529, -420, -288, -145,
- 0, 137, 257, 353, 421, 457,
- 460, 432, 377, 300, 206, 104,
- 0, -99, -185, -255, -305, -331,
- -333, -314, -274, -218, -150, -76,
- 0, 72, 135, 186, 221, 240,
- 242, 228, 199, 158, 109, 55,
- 0, -52, -97, -134, -159, -173,
- -174, -163, -142, -113, -77, -39,
- 0, 37, 69, 94, 112, 121,
- 121, 114, 99, 78, 53, 27,
- 0, -25, -47, -64, -76, -81,
- -81, -76, -66, -52, -35, -18,
- 0, 16, 30, 41, 48, 52,
- 51, 47, 41, 32, 21, 11,
- 0, -10, -18, -24, -28, -30,
- -29, -27, -23, -17, -12, -6,
- 0, 5, 9, 12, 14, 14,
- 14, 13, 10, 8, 5, 2,
- 0, -2, -4, -5, -5, -5,
- -5, -4, -3, -2, -1, -1,
- 0, 0, 1, 1, 1, 1,
- 0, 0, 0, 0, 0, 0,
- 0
-};
-
-const Word16 filter_LP15_180H_fx[] = /* Sincfilt.m: N=180*2+1, Fmin=0, Fmax=1/15, hann( N )' */
-{//Q14
- 16384, 16263, 15904, 15317, 14516, 13524,
- 12366, 11073, 9678, 8216, 6723, 5236,
- 3790, 2416, 1144, 0, -997, -1831,
- -2492, -2976, -3285, -3425, -3408, -3248,
- -2966, -2583, -2123, -1610, -1070, -526,
- 0, 487, 919, 1281, 1564, 1761,
- 1869, 1891, 1830, 1695, 1496, 1244,
- 954, 641, 318, 0, -300, -569,
- -799, -982, -1113, -1188, -1209, -1176,
- -1094, -969, -809, -623, -420, -209,
- 0, 198, 377, 531, 653, 741,
- 793, 807, 786, 732, 649, 543,
- 418, 282, 140, 0, -133, -253,
- -356, -438, -497, -531, -540, -526,
- -489, -433, -362, -278, -187, -93,
- 0, 88, 167, 234, 288, 325,
- 347, 352, 342, 317, 280, 233,
- 179, 120, 59, 0, -56, -105,
- -147, -180, -203, -215, -217, -210,
- -194, -170, -141, -107, -72, -35,
- 0, 33, 61, 85, 103, 116,
- 122, 122, 117, 107, 93, 76,
- 58, 38, 19, 0, -17, -31,
- -43, -51, -57, -59, -58, -55,
- -49, -42, -34, -25, -16, -8,
- 0, 7, 12, 16, 19, 20,
- 21, 20, 18, 16, 13, 10,
- 7, 4, 2, 0, -1, -2,
- -3, -3, -3, -3, -2, -2,
- -1, -1, 0, 0, 0, 0,
- 0
-};
-
-const Word16 filter_LP15_180H_13b_fx[6 * 31] = /*Q13 Sincfilt.m: N=180*2+1, Fmin=0, Fmax=1/12, hann( N )'*/
-{//Q13
- 8192, 8132, 7952, 7658, 7258, 6762,
- 6183, 5536, 4839, 4108, 3362, 2618,
- 1895, 1208, 572, 0, -498, -915,
- -1246, -1488, -1643, -1713, -1704, -1624,
- -1483, -1291, -1061, -805, -535, -263,
- 0, 244, 459, 640, 782, 880,
- 935, 945, 915, 848, 748, 622,
- 477, 320, 159, 0, -150, -285,
- -400, -491, -556, -594, -604, -588,
- -547, -485, -405, -312, -210, -104,
- 0, 99, 189, 265, 327, 371,
- 396, 404, 393, 366, 325, 271,
- 209, 141, 70, 0, -66, -127,
- -178, -219, -248, -266, -270, -263,
- -245, -217, -181, -139, -94, -46,
- 0, 44, 83, 117, 144, 163,
- 173, 176, 171, 158, 140, 116,
- 89, 60, 30, 0, -28, -53,
- -74, -90, -101, -108, -109, -105,
- -97, -85, -70, -54, -36, -18,
- 0, 16, 31, 43, 52, 58,
- 61, 61, 58, 53, 47, 38,
- 29, 19, 9, 0, -8, -16,
- -21, -26, -28, -29, -29, -27,
- -25, -21, -17, -13, -8, -4,
- 0, 3, 6, 8, 10, 10,
- 10, 10, 9, 8, 6, 5,
- 3, 2, 1, 0, -1, -1,
- -1, -2, -2, -1, -1, -1,
- -1, 0, 0, 0, 0, 0,
- 0
-};
-
-const Word16 filter_LP24_90H_fx[] =
-{//Q14
-
- 10240, 10208, 10111, 9951, 9731,
- 9452, 9119, 8734, 8304, 7834,
- 7328, 6794, 6237, 5664, 5081,
- 4495, 3913, 3339, 2780, 2241,
- 1727, 1242, 791, 376, 0,
- -335, -629, -880, -1089, -1256,
- -1383, -1471, -1523, -1540, -1527,
- -1487, -1422, -1337, -1235, -1119,
- -994, -862, -727, -592, -460,
- -333, -212, -101, 0, 90,
- 167, 232, 285, 325, 354,
- 371, 378, 376, 366, 349,
- 326, 299, 269, 236, 203,
- 171, 139, 109, 81, 56,
- 34, 15, 0, -12, -21,
- -27, -30, -31, -31, -29,
- -26, -22, -18, -14, -10,
- -7, -4, -2, -1, 0,
- 0, 0, 0, 0, 0,
- 0,
- 0
-
-};
-
-const Word16 filter_LP24_90H_13b_fx[] =
-{//Q13
-
- 5120, 5104, 5056, 4976, 4865,
- 4726, 4559, 4367, 4152, 3917,
- 3664, 3397, 3119, 2832, 2541,
- 2248, 1956, 1669, 1390, 1120,
- 863, 621, 396, 188, 0,
- -168, -315, -440, -545, -628,
- -691, -735, -761, -770, -764,
- -743, -711, -668, -617, -560,
- -497, -431, -364, -296, -230,
- -166, -106, -51, 0, 45,
- 84, 116, 143, 163, 177,
- 186, 189, 188, 183, 174,
- 163, 149, 134, 118, 102,
- 85, 69, 54, 40, 28,
- 17, 8, 0, -6, -10,
- -13, -15, -16, -15, -14,
- -13, -11, -9, -7, -5,
- -3, -2, -1, 0, 0,
- 0, 0, 0, 0, 0,
- 0,
- 0
-};
-
-const Word16 filter_LP3_90H_fx[] = /* Sincfilt.m: N=90*2+1, Fmin=0, Fmax=1/3, hann( N )' */
-{//Q14
- 16384, 13545, 6766, 0, -3371, -2689,
- 0, 1907, 1661, 0, -1314, -1187,
- 0, 990, 911, 0, -783, -729,
- 0, 638, 598, 0, -529, -499,
- 0, 445, 421, 0, -377, -357,
- 0, 321, 305, 0, -274, -260,
- 0, 234, 221, 0, -199, -188,
- 0, 169, 159, 0, -142, -134,
- 0, 119, 112, 0, -99, -93,
- 0, 81, 76, 0, -66, -61,
- 0, 52, 48, 0, -41, -37,
- 0, 31, 28, 0, -23, -20,
- 0, 16, 14, 0, -10, -9,
- 0, 6, 5, 0, -3, -2,
- 0, 1, 1, 0, 0, 0,
- 0
-};
-
-const Word16 filter_LP15_360H_13b_fx[] = /* Sincfilt.m: N=360*2+1, Fmin=0, Fmax=1/15, hann( N )' */
-{//Q13
-
- 8192, 8132, 7954, 7662, 7265, 6772, 6196, 5552,
- 4857, 4127, 3381, 2636, 1911, 1220, 579, 0,
- -506, -931, -1269, -1519, -1681, -1757, -1752, -1674,
- -1533, -1339, -1104, -840, -560, -276, 0, 258,
- 488, 682, 836, 946, 1008, 1024, 996, 927,
- 821, 687, 529, 357, 178, 0, -170, -325,
- -458, -567, -646, -694, -710, -696, -652, -581,
- -489, -379, -257, -129, 0, 124, 238, 338,
- 420, 481, 518, 533, 523, 492, 440, 372,
- 289, 197, 99, 0, -96, -184, -262, -326,
- -374, -405, -417, -410, -386, -346, -293, -228,
- -156, -78, 0, 76, 147, 209, 260, 299,
- 324, 334, 329, 310, 279, 236, 184, 125,
- 63, 0, -62, -119, -169, -211, -243, -263,
- -271, -268, -252, -227, -192, -150, -102, -52,
- 0, 50, 97, 138, 173, 198, 215, 222,
- 219, 207, 186, 157, 123, 84, 42, 0,
- -41, -80, -113, -142, -163, -176, -182, -180,
- -170, -152, -129, -101, -69, -35, 0, 34,
- 65, 93, 116, 133, 144, 149, 147, 139,
- 125, 106, 82, 56, 28, 0, -28, -53,
- -76, -95, -109, -118, -121, -120, -113, -101,
- -86, -67, -46, -23, 0, 22, 43, 61,
- 77, 88, 95, 98, 97, 91, 82, 69,
- 54, 37, 19, 0, -18, -35, -49, -61,
- -70, -76, -78, -77, -73, -65, -55, -43,
- -29, -15, 0, 14, 27, 39, 48, 55,
- 60, 62, 61, 57, 51, 43, 33, 23,
- 11, 0, -11, -21, -30, -37, -43, -46,
- -48, -47, -44, -39, -33, -26, -17, -9,
- 0, 8, 16, 23, 28, 32, 35, 36,
- 35, 33, 29, 25, 19, 13, 6, 0,
- -6, -12, -17, -21, -24, -25, -26, -25,
- -24, -21, -18, -14, -9, -5, 0, 4,
- 8, 12, 14, 16, 18, 18, 17, 16,
- 14, 12, 9, 6, 3, 0, -3, -6,
- -8, -10, -11, -11, -12, -11, -10, -9,
- -8, -6, -4, -2, 0, 2, 3, 5,
- 6, 6, 7, 7, 7, 6, 5, 4,
- 3, 2, 1, 0, -1, -2, -3, -3,
- -3, -3, -3, -3, -3, -3, -2, -2,
- -1, 0, 0, 0, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0
-
-};
-
-static const Word16 filter_LP30_300K_fx[LFE_PLC_FDEL + 1] =
-{//Q14
-16395,16364,16273,16123,15913,15646,15323,14947,14520,14045,13524,12963,12363,11730,11067,10379,9669,
-8943,8205,7460,6712,5965,5225,4495,3779,3082,2408,1759,1140,552,0,-515,-991,-1426,-1819,-2169,-2475,
--2736,-2953,-3126,-3257,-3345,-3392,-3400,-3371,-3307,-3210,-3083,-2928,-2749,-2547,-2327,-2091,-1842,
--1584,-1319,-1051,-782,-515,-254,0,244,476,695,897,1083,1249,1397,1523,1628,1712,1774,1815,1834,1833,
-1811,1771,1712,1637,1546,1442,1325,1197,1060,916,767,614,459,304,150,0,-145,-285,-417,-541,-655,-758,
--850,-930,-997,-1051,-1092,-1119,-1134,-1136,-1125,-1102,-1068,-1023,-968,-904,-832,-753,-668,-578,
--484,-388,-290,-192,-95,0,92,181,266,345,418,484,543,594,638,672,699,717,727,728,721,707,685,656,621,580,
-534,483,428,371,311,249,186,123,61,0,-59,-116,-170,-220,-267,-309,-347,-379,-407,-429,-445,-456,-462,-463,
--458,-448,-434,-416,-393,-367,-337,-305,-270,-233,-195,-156,-117,-77,-38,0,37,72,106,137,166,192,215,234,251,
-264,274,280,283,283,280,274,264,253,238,222,204,184,162,140,117,93,69,46,22,0,-21,-42,-62,-80,-97,-112,-125,-136,
--146,-153,-158,-161,-163,-162,-160,-156,-150,-143,-135,-125,-114,-103,-91,-78,-65,-51,-38,-25,-12,0,11,23,33,43,
-52,59,66,72,76,80,82,84,84,83,82,79,76,72,67,62,57,51,44,38,31,25,18,12,5,0,-5,-10,-15,-19,-23,-27,-29,-32,-34,
--35,-36,-36,-36,-35,-34,-33,-31,-29,-27,-24,-22,-19,-17,-14,-11,-9,-6,-4,-2,0
-
-};
-
-const Resampling_cfg resampling_cfg_tbl[] =
-{
- /* fin fout up.fact. den.fac. len.out filter coefs. filter length/2 filter mem./2 flags */
- { 8000, 12800, 8, 5, 256, /*filter5_39s320_120,*/ filter5_39s320_120_fx, 15, RS_INV_FAC },
- { 12800, 8000, 5, 8, 160, /*filter5_39s320_120,*/ filter5_39s320_120_fx, L_FILT_UP8k, RS_INV_FAC },
- { 16000, 8000, 6, 12, 160, /*filter_LP12_180H,*/ filter_LP12_180H_fx, 180 / 6, 0 },
- { 12800, 16000, 15, 12, 320, /*filter_LP15_180H,*/ filter_LP15_180H_fx, L_FILT_UP16k, 0 },
- { 12800, 32000, 15, 6, 640, /*filter_LP15_180H,*/ filter_LP15_180H_fx, L_FILT_UP32k, 0 },
- { 12800, 48000, 15, 4, 960, /*filter_LP15_180H,*/ filter_LP15_180H_fx, L_FILT_UP48k, 0 },
-
- { 16000, 12800, 12, 15, 256, /*filter_LP15_180H,*/ filter_LP15_180H_fx, L_FILT16k, 0, },
- { 16000, 32000, 12, 6, 640, /*filter_LP12_180H, */ filter_LP12_180H_fx, L_FILT16k, 0, },
- { 16000, 48000, 12, 4, 960, /*filter_LP12_180H,*/ filter_LP12_180H_fx, L_FILT16k, 0, },
-
- { 32000, 12800, 6, 15, 256, /*filter_LP15_180H,*/ filter_LP15_180H_13b_fx, L_FILT32k, 0, },
- { 32000, 16000, 6, 12, 320, /*filter_LP12_180H,*/ filter_LP12_180H_13b_fx, L_FILT32k, 0, },
- { 32000, 25600, 12, 15, 512, /*filter_LP15_360H,*/ filter_LP15_360H_13b_fx, L_FILT32k, 0, },
- { 32000, 48000, 3, 2, 960, /*filter_LP3_90H,*/ filter_LP3_90H_fx, L_FILT32k, 0, },
-
- { 48000, 12800, 4, 15, 256, /*filter_LP15_180H,*/ filter_LP15_180H_13b_fx, L_FILT48k, 0, },
- { 48000, 16000, 4, 12, 320, /*filter_LP12_180H,*/ filter_LP12_180H_13b_fx, L_FILT48k, 0, },
- { 48000, 25600, 8, 15, 512, /*filter_LP15_360H,*/ filter_LP15_360H_13b_fx, L_FILT48k, 0, },
- { 48000, 32000, 2, 3, 640, /*filter_LP3_90H,*/ filter_LP3_90H_fx, L_FILT48k, 0, },
-
- /* configs with NB 4kHz low-pass */
- { 16000, 12800, 12, 15, 256, /*filter_LP24_90H,*/ filter_LP24_90H_fx, L_FILT16k, 0, },
- { 32000, 12800, 6, 15, 256, /*filter_LP24_90H,*/ filter_LP24_90H_13b_fx, L_FILT32k, 0, },
- { 48000, 12800, 4, 15, 256, /*filter_LP24_90H,*/ filter_LP24_90H_13b_fx, L_FILT48k, 0, },
-
- /* entry for LFE PLC */
- { 1600, 48000, 30, 1, 960, /*filter_LP30_300K,*/ filter_LP30_300K_fx, LFE_PLC_FDEL / 30, 0, },
- { 0, 0, 0, 0, 0, /* 0, */ 0, 0, 0, } /* trailing entry (just to calculate the length of this table) */
-};
-
-//den fac value for last entry is calculated as den.fac = (num.fac*fin)/fout
-//lg_out value for last entry is calculated as = fout/50 = ((fin/50)*num.fac)/den.fac
-//filter_LP30_300K_fx has been calculated with Q14
-
-/*----------------------------------------------------------------------------------*
- * LSP interpolation coefficients
- *----------------------------------------------------------------------------------*/
-
-
-const Word16 interpol_frac2_fx[NB_SUBFR] = {//Q15
- 16384, 16384, 32767, 32767
-};
-
-const Word16 interpol_frac2_mid_fx[NB_SUBFR * 3] = {//Q15
- 8191, 24575, 0,
- 8191, 24575, 0,
- 0, 8191, 24575,
- 0, 8191, 24575
-};/*Q15*/
-
-
-const Word16 interpol_frac_12k8_fx[NB_SUBFR] = {//Q15
- 8191, 16383, 24575, 32767
-};
-
-const Word16 interpol_frac_fx[NB_SUBFR] = { 8192, 16384, 24576,32767 };/*Q15*/
-
-const Word16 interpol_isp_amr_wb_fx[] = { 14746, 26214, 31457, 32767 };/*Q15*/
-
-const Word16 interpol_frac_16k_fx[NB_SUBFR16k] = { 6554, 13107, 19661, 26214, 32767 };//Q15
-
-const Word16 interpol_frac_mid_fx[NB_SUBFR * 3] = { 16384, 16384, 0,//Q15
- 0, 32767, 0,
- 0, 16384, 16384,
- 0, 0, 32767
-};/*Q15*/
-
-const Word16 interpol_frac_mid_16k_fx[NB_SUBFR16k * 3] = { 18022, 14746, 0,//Q15
- 4915, 27853, 0,
- 0, 24576, 8192,
- 0, 11469, 21299,
- 0, 0, 32767
-};
-
-const Word16 interpol_frac_mid_relaxprev_12k8_fx[NB_SUBFR * 3] = { 0, 22938, 9830,//Q15
- 0, 0, 32767,
- 0, 0, 32767,
- 0, 0, 32767
-};/*Q15*/
-
-const Word16 interpol_frac_mid_FEC_fx[NB_SUBFR * 3] = { 8192, 18022, 6554,//Q15
- 0, 22938, 9830,
- 0, 14746, 18022,
- 0, 0, 32767
-};/*Q15*/
-
-const Word16 interpol_frac_mid_relaxprev_pred_12k8_fx[NB_SUBFR * 3] = { 4915, 22938, 4915,//Q15
- 1638, 21299, 9830,
- 0, 16384, 16384,
- 0, 0, 32767
-};
-
-const Word16 interpol_frac_mid_relaxprev_16k_fx[NB_SUBFR16k * 3] = { 0, 22938, 9830,//Q15
- 0, 0, 32767,
- 0, 0, 32767,
- 0, 0, 32767,
- 0, 0, 32767
-};/*Q15*/
-
-const Word16 interpol_frac_mid_16k_FEC_fx[NB_SUBFR16k * 3] = { 13107, 13107, 6554,//Q15
- 0, 26214, 6554,
- 0, 21299, 11469,
- 0, 4915, 27853,
- 0, 0, 32767
-};/*Q15*/
-
-const Word16 interpol_frac_mid_relaxprev_pred_16k_fx[NB_SUBFR16k * 3] = { 4915, 22938, 4915,//Q15
- 1638, 21299, 9830,
- 0, 16384, 16384,
- 0, 4915, 27853,
- 0, 0, 32767
-};/*Q15*/
-
-/*----------------------------------------------------------------------------------*
- * Innovative codebook
- *----------------------------------------------------------------------------------*/
-
-/* Innovative codebook config */
-const PulseConfig PulseConfTable[] =
-{
- /* Design rules:
- * ---> "fixed" + "tried-pair-pos"*2 = pulses & 0xfe
- * ---> tracks with pulses % 3 == 0, have always TRACKPOS_FIXED_FIRST */
- /* bits,iter,alp,pulses,fixed,tried-pair-pos,codetrack */
- { 7, 4, 16384/*2.0f Q13*/, 1, 0, {8}, TRACKPOS_FREE_ONE }, /* 7 bits, 1 pulses, 4 tracks, 1000 free track */
- { 10, 4, 16384/*2.0f Q13*/, 2, 0, {8}, TRACKPOS_FIXED_EVEN }, /* 10 bits, 2 pulses, 4 tracks 1010 (used only even tracks designed for NB) */
- { 12, 4, 16384/*2.0f Q13*/, 2, 0, {8}, TRACKPOS_FIXED_TWO }, /* 12 bits, 2 pulses, 2 tracks 11 used all tracks ala AMR-WB 6.6 */
- { 15, 4, 16384/*2.0f Q13*/, 3, 0, {8}, TRACKPOS_FIXED_FIRST }, /* 15 bits, 3 pulses, 4 tracks 1110 fixed track to first ? */
- { 17, 6, 16384/*2.0f Q13*/, 3, 0, {8}, TRACKPOS_FREE_THREE }, /* 17 bits, 3 pulses, 4 tracks (used all tracks) - 1110, 1101, 1011, 0111 */
- { 20, 4, 16384/*2.0f Q13*/, 4, 0, {4, 8}, TRACKPOS_FIXED_FIRST }, /* 20 bits, 4 pulses, 4 tracks 1111 */
- { 24, 4, 16384/*2.0f Q13*/, 5, 0, {4, 8}, TRACKPOS_FIXED_FIRST }, /* 24 bits, 5 pulses, 4 tracks 2111 fixed track to first */
- { 26, 4, 16384/*2.0f Q13*/, 5, 0, {4, 8}, TRACKPOS_FREE_ONE }, /* 26 bits, 5 pulses, 4 tracks 2111 one free track ? */
- { 28, 4, 12288/*1.5f Q13*/, 6, 0, {4, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 28 bits, 6 pulses, 4 tracks 2211 */
- { 30, 4, 12288/*1.5f Q13*/, 6, 0, {4, 8, 8}, TRACKPOS_FIXED_TWO }, /* 30 bits, 6 pulses, 4 tracks 2211 free consecutive track positions ? */
- { 32, 4, 12288/*1.5f Q13*/, 7, 0, {4, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 32 bits, 6 pulses, 4 tracks 2221 fixed ?*/
- { 34, 4, 12288/*1.5f Q13*/, 7, 0, {4, 8, 8}, TRACKPOS_FREE_THREE }, /* 34 bits, 6 pulses, 4 tracks 2221 free track positions ? */
- { 36, 4, 8192/*1.0f Q13*/, 8, 2, {4, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 36 bits, 8 pulses, 4 tracks 2222 */
- { 40, 4, 8192/*1.0f Q13*/, 9, 2, {4, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 40 bits, 9 pulses, 4 tracks 3222 fixed ?*/
- { 43, 4, 8192/*1.0f Q13*/, 10, 2, {4, 6, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 44 bits, 10 pulses, 4 tracks 3322 */
- { 46, 4, 8192/*1.0f Q13*/, 10, 2, {4, 6, 8, 8}, TRACKPOS_FIXED_TWO }, /* 46 bits, 10 pulses, 4 tracks 3322 free consecutive tracks ? */
- { 47, 4, 8192/*1.0f Q13*/, 11, 2, {4, 6, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 47 bits, 10 pulses, 4 tracks 3332 fixed ? */
- { 49, 4, 8192/*1.0f Q13*/, 11, 2, {4, 6, 8, 8}, TRACKPOS_FREE_THREE }, /* 49 bits, 10 pulses, 4 tracks 3332 free three track positions ? */
- { 50, 4, 8192/*1.0f Q13*/, 12, 4, {4, 6, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 50 bits, 12 pulses, 4 tracks 3333 */
- { 53, 4, 8192/*1.0f Q13*/, 13, 4, {4, 6, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 53 bits, 13 pulses, 4 tracks 4333 fixed ? */
- { 55, 4, 8192/*1.0f Q13*/, 13, 4, {4, 6, 8, 8}, TRACKPOS_FREE_ONE }, /* 55 bits, 13 pulses, 4 tracks 4333 free one ? */
- { 56, 4, 8192/*1.0f Q13*/, 14, 4, {4, 6, 6, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 56 bits, 14 pulses, 4 tracks 4433 fixed ?!?! */
- { 58, 4, 8192/*1.0f Q13*/, 14, 4, {4, 6, 6, 8, 8}, TRACKPOS_FIXED_TWO }, /* 58 bits, 14 pulses, 4 tracks 4433 free consecutive ? */
- { 59, 4, 8192/*1.0f Q13*/, 15, 4, {4, 6, 6, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 59 bits, 15 pulses, 4 tracks 4443 fixed ? */
- { 61, 4, 8192/*1.0f Q13*/, 15, 4, {4, 6, 6, 8, 8}, TRACKPOS_FREE_THREE }, /* 61 bits, 15 pulses, 4 tracks 4443 free ? */
- { 62, 3, 6554/*0.8f Q13*/, 16, 4, {4, 4, 6, 6, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 62 bits, 16 pulses, 4 tracks 4444 */
- { 65, 3, 6554/*0.8f Q13*/, 17, 4, {4, 4, 6, 6, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 65 bits, 17 pulses, 4 tracks 5444 fixed ?*/
- { 68, 3, 6144/*0.75f Q13*/, 18, 4, {2, 3, 4, 5, 6, 7, 8}, TRACKPOS_FIXED_FIRST }, /* 68 bits, 18 pulses, 4 tracks 5544 */
- { 70, 3, 6144/*0.75f Q13*/, 19, 4, {2, 3, 4, 5, 6, 7, 8}, TRACKPOS_FIXED_FIRST }, /* 70 bits, 19 pulses, 4 tracks 5554 fixed ? */
- { 73, 3, 6144/*0.75f Q13*/, 20, 4, {2, 3, 4, 5, 6, 7, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 73 bits, 20 pulses, 4 tracks 5555 fixed ? */
- { 75, 3, 6144/*0.75f Q13*/, 21, 4, {2, 3, 4, 5, 6, 7, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 75 bits, 21 pulses, 4 tracks 6555 fixed ? */
- { 78, 3, 6144/*0.75f Q13*/, 22, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 78 bits, 22 pulses, 4 tracks 6655 fixed ? */
- { 80, 3, 6144/*0.75f Q13*/, 23, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 80 bits, 23 pulses, 4 tracks 6665 fixed ? */
- { 83, 2, 2458/*0.30f Q13*/, 24, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8, 8}, TRACKPOS_FIXED_FIRST}, /* 83 bits, 24 pulses, 4 tracks 6666 */
- { 85, 2, 2458/*0.30f Q13*/, 25, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8, 8}, TRACKPOS_FIXED_FIRST}, /* 85 bits, 25 pulses, 4 tracks 7666 */
- { 87, 2, 2048/*0.25f Q13*/, 26, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8, 8, 8}, TRACKPOS_FIXED_FIRST}, /* 87 bits, 26 pulses, 4 tracks 7766 */
- { 89, 2, 2048/*0.25f Q13*/, 27, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8, 8, 8}, TRACKPOS_FIXED_FIRST}, /* 89 bits, 27 pulses, 4 tracks 7776 */
- { 92, 2, 2048/*0.25f Q13*/, 28, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8, 8, 8, 8}, TRACKPOS_FIXED_FIRST}, /* 92 bits, 28 pulses, 4 tracks 7777 */
- { 94, 2, 2048/*0.25f Q13*/, 29, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8, 8, 8, 8}, TRACKPOS_FIXED_FIRST}, /* 94 bits, 29 pulses, 4 tracks 8777 */
- { 96, 1, 1638/*0.20f Q13*/, 30, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8, 8, 8, 8, 8}, TRACKPOS_FIXED_FIRST}, /* 96 bits, 30 pulses, 4 tracks 8877 */
- { 98, 1, 1638/*0.20f Q13*/, 31, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8, 8, 8, 8, 8}, TRACKPOS_FIXED_FIRST}, /* 98 bits, 31 pulses, 4 tracks 8887 */
-};
-
-
-/* Number of pulses & positions to the number of unique states that can be achieved with those pulses */
-const UWord32 pulsestostates[17][9] =
-{
- { 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 2, 2, 2, 2, 2, 2, 2, 2, 2},
- { 4, 8, 12, 16, 20, 24, 28, 32, 36},
- { 6, 18, 38, 66, 102, 146, 198, 258, 326},
- { 8, 32, 88, 192, 360, 608, 952, 1408, 1992},
- { 10, 50, 170, 450, 1002, 1970, 3530, 5890, 9290},
- { 12, 72, 292, 912, 2364, 5336, 10836, 20256, 35436},
- { 14, 98, 462, 1666, 4942, 12642, 28814, 59906, 115598},
- { 16, 128, 688, 2816, 9424, 27008, 68464, 157184, 332688},
- { 18, 162, 978, 4482, 16722, 53154, 148626, 374274, 864146},
- { 20, 200, 1340, 6800, 28004, 97880, 299660, 822560, 2060980},
- { 22, 242, 1782, 9922, 44726, 170610, 568150, 1690370, 4573910},
- { 24, 288, 2312, 14016, 68664, 284000, 1022760, 3281280, 9545560},
- { 26, 338, 2938, 19266, 101946, 454610, 1761370, 6065410, 18892250},
- { 28, 392, 3668, 25872, 147084, 703640, 2919620, 10746400, 35704060},
- { 30, 450, 4510, 34050, 207006, 1057730, 4680990, 18347010, 64797470},
- { 32, 512, 5472, 44032, 285088, 1549824, 7288544, 30316544, 113461024},
-};
-
-/*----------------------------------------------------------------------------------*
- * Gain quantization table for memory-less gain quantizer
- *----------------------------------------------------------------------------------*/
-
-const Word16 gain_qua_mless_7b_fx[128*2] =
-{//Q14
- 419, 28,
- 1499, 607,
- 1586, 322,
- 1632, 144,
- 1686, 229,
- 1745, 495,
- 2182, 409,
- 2515, 716,
- 2772, 824,
- 3069, 1069,
- 3211, 936,
- 3218, 89,
- 3477, 1244,
- 3755, 272,
- 3865, 549,
- 3881, 348,
- 4171, 181,
- 4414, 627,
- 4419, 472,
- 4909, 1429,
- 5238, 404,
- 5241, 1651,
- 5721, 85,
- 5833, 250,
- 5846, 693,
- 5897, 325,
- 6036, 544,
- 6088, 779,
- 6459, 1889,
- 6650, 157,
- 6678, 462,
- 6798, 879,
- 6922, 993,
- 6929, 1130,
- 7352, 620,
- 7461, 386,
- 7864, 232,
- 7999, 314,
- 8136, 536,
- 8398, 712,
- 8680, 459,
- 8797, 1276,
- 9046, 806,
- 9198, 86,
- 9434, 398,
- 9730, 587,
- 9735, 267,
- 9742, 175,
- 9917, 917,
- 10042, 509,
- 10053, 655,
- 10132, 1030,
- 10238, 339,
- 10694, 1560,
- 10817, 447,
- 10964, 723,
- 11405, 1149,
- 11526, 549,
- 11582, 386,
- 11602, 791,
- 11618, 286,
- 11883, 862,
- 11954, 607,
- 12057, 214,
- 12104, 496,
- 12170, 1397,
- 12437, 668,
- 12616, 335,
- 12668, 952,
- 12684, 435,
- 12983, 112,
- 13235, 742,
- 13399, 549,
- 13525, 380,
- 13527, 270,
- 13625, 1044,
- 13733, 482,
- 13820, 617,
- 14036, 817,
- 14041, 1257,
- 14295, 425,
- 14346, 684,
- 14367, 319,
- 14416, 199,
- 14644, 898,
- 14944, 518,
- 15090, 364,
- 15154, 578,
- 15309, 462,
- 15360, 1933,
- 15362, 756,
- 15381, 262,
- 15566, 1127,
- 15699, 639,
- 15804, 410,
- 16081, 316,
- 16161, 993,
- 16359, 701,
- 16451, 828,
- 16500, 543,
- 16540, 491,
- 16617, 1729,
- 16630, 196,
- 16749, 369,
- 16959, 1530,
- 17028, 442,
- 17139, 603,
- 17369, 898,
- 17393, 268,
- 17972, 763,
- 17985, 1361,
- 18016, 333,
- 18032, 667,
- 18234, 406,
- 18270, 105,
- 18299, 554,
- 18342, 488,
- 18747, 1207,
- 19027, 1073,
- 19530, 216,
- 19566, 963,
- 19751, 835,
- 19794, 615,
- 19810, 298,
- 19988, 710,
- 19990, 449,
- 20005, 374,
- 20149, 531,
-};
-
-const Word16 gain_qua_mless_6b_stereo_fx[64 * 2] =
-{//Q14
- 570, 695,
- 932, 535,
- 972, 913,
- 1305, 165,
- 1503, 343,
- 1942, 2102,
- 2763, 440,
- 2957, 1204,
- 3163, 621,
- 3232, 760,
- 4215, 255,
- 4415, 533,
- 4884, 873,
- 5395, 429,
- 5601, 664,
- 5724, 1615,
- 6847, 1057,
- 6849, 535,
- 6889, 3303,
- 7086, 335,
- 7135, 766,
- 8267, 616,
- 8601, 907,
- 8690, 442,
- 9501, 1264,
- 9517, 728,
- 10050, 73,
- 10243, 514,
- 10723, 861,
- 10884, 641,
- 11005, 339,
- 11919, 1623,
- 11976, 1037,
- 12219, 564,
- 12286, 770,
- 12858, 413,
- 12944, 8191,
- 13347, 684,
- 13751, 502,
- 13802, 873,
- 13812, 1207,
- 14417, 615,
- 14633, 392,
- 15119, 732,
- 15214, 521,
- 15247, 976,
- 15509, 290,
- 15936, 1440,
- 16101, 603,
- 16157, 448,
- 16277, 799,
- 16358, 2544,
- 16863, 4652,
- 17010, 1093,
- 17073, 350,
- 17348, 659,
- 17583, 509,
- 17853, 854,
- 19087, 1756,
- 19109, 405,
- 19348, 727,
- 19553, 566,
- 19553, 1240,
- 19659, 953
-};
-
-const Word16 gain_qua_mless_6b_fx[64 * 2] =
-{//Q14
- 1676, 71,
- 2128, 198,
- 2318, 491,
- 2348, 339,
- 2798, 625,
- 2893, 785,
- 3911, 1099,
- 4779, 244,
- 4781, 427,
- 5115, 935,
- 5294, 1509,
- 5767, 114,
- 6018, 543,
- 6152, 335,
- 6205, 675,
- 6234, 1822,
- 6740, 1251,
- 7034, 802,
- 7782, 434,
- 8005, 230,
- 9232, 622,
- 9337, 336,
- 9388, 520,
- 9770, 1038,
- 9865, 734,
- 10224, 879,
- 10617, 118,
- 10776, 426,
- 11518, 249,
- 11708, 1399,
- 12044, 587,
- 12270, 501,
- 12277, 348,
- 12498, 684,
- 13020, 786,
- 13097, 1196,
- 13530, 422,
- 13818, 917,
- 14123, 290,
- 14500, 1039,
- 14538, 636,
- 14636, 556,
- 14667, 484,
- 14931, 362,
- 15055, 210,
- 15653, 1594,
- 15830, 1874,
- 15868, 717,
- 15897, 828,
- 16153, 434,
- 16540, 294,
- 16874, 608,
- 16936, 513,
- 17182, 373,
- 17644, 1337,
- 17696, 126,
- 18342, 1122,
- 18461, 944,
- 18991, 242,
- 19114, 795,
- 19187, 674,
- 19256, 449,
- 19485, 557,
- 19515, 344,
-};
-
-const Word16 gain_qua_mless_5b_fx[32 * 2] =
-{//Q14
- 2695, 109,
- 3444, 271,
- 3529, 433,
- 4284, 801,
- 4365, 607,
- 4935, 1089,
- 6896, 1407,
- 7722, 324,
- 7913, 146,
- 8090, 468,
- 9049, 913,
- 9499, 600,
- 9894, 741,
- 9942, 1840,
- 11906, 382,
- 12008, 1103,
- 12349, 243,
- 12429, 501,
- 13687, 630,
- 13974, 896,
- 14510, 748,
- 15160, 322,
- 15424, 428,
- 15679, 541,
- 15832, 1574,
- 15999, 1281,
- 17223, 211,
- 17719, 1029,
- 18185, 649,
- 18432, 818,
- 18638, 353,
- 18889, 493,
-};
-
-const Word16 E_ROM_qua_gain5b_const[NB_QUA_GAIN5B * 2]=
-{//Q0
- 1774,577,
- 2090,1805,
- 2103,3371,
- 3908,1116,
- 4834,2500,
- 6030,4763,
- 6838,1334,
- 7490,2033,
- 8585,3036,
- 9845,1575,
- 10437,2320,
- 10649,3739,
- 11298,945,
- 12108,1920,
- 12310,5108,
- 12391,2758,
- 12659,1237,
- 13729,1557,
- 13798,2201,
- 13972,3275,
- 14881,993,
- 15175,1776,
- 15409,16190,
- 15551,2395,
- 15879,4048,
- 16341,1335,
- 16988,2918,
- 18317,7449,
- 18368,2026,
- 19114,1364,
- 19991,4472,
- 20644,2790,
-};
-
-const Word16 E_ROM_qua_gain6b_const[NB_QUA_GAIN6B * 2] =
-{//Q0
- 0,2758,
- 143,3562,
- 397,2146,
- 544,4306,
- 952,1726,
- 1236,724,
- 1779,3158,
- 1820,5448,
- 1975,2473,
- 2121,1343,
- 3049,3912,
- 3081,1885,
- 3289,8261,
- 3416,2843,
- 3495,2204,
- 3831,3386,
- 4295,4590,
- 4300,2476,
- 4345,1545,
- 4913,1122,
- 5198,2080,
- 5200,3079,
- 5448,3714,
- 5482,2689,
- 5546,1817,
- 5783,17318,
- 5934,6236,
- 6156,2320,
- 6481,4225,
- 6828,3351,
- 6832,5045,
- 6888,2895,
- 7186,2559,
- 7214,1663,
- 7373,2052,
- 7906,3819,
- 8192,1372,
- 8452,3063,
- 8464,2354,
- 9021,4468,
- 9037,2715,
- 9175,1874,
- 9219,3463,
- 9831,2155,
- 10523,5383,
- 10557,9061,
- 10618,3093,
- 10633,3949,
- 10890,2465,
- 11141,1654,
- 12132,2790,
- 12180,3477,
- 12376,2079,
- 12494,4560,
- 14430,2468,
- 14573,3914,
- 14576,3111,
- 15043,1827,
- 15207,1329,
- 16073,6155,
- 17519,4719,
- 18345,2148,
- 18554,2784,
- 18576,3563,
-};
-
-const Word16 E_ROM_qua_gain7b_const[NB_QUA_GAIN7B * 2] =
-{//Q0
- 123,2777,
- 369,2102,
- 404,4368,
- 693,3486,
- 1107,719,
- 1222,1679,
- 1657,1293,
- 1667,5547,
- 1805,2425,
- 2369,3075,
- 2489,12063,
- 2681,1901,
- 2693,3984,
- 3031,7547,
- 3248,990,
- 3466,2672,
- 3674,2165,
- 3718,1513,
- 3844,3456,
- 4120,4656,
- 4748,2967,
- 4821,19622,
- 4855,2400,
- 4912,1776,
- 5245,3860,
- 5312,6282,
- 5500,1176,
- 5713,2056,
- 5872,3287,
- 5960,2662,
- 6170,9756,
- 6364,5021,
- 6545,1476,
- 6788,2283,
- 6796,4163,
- 7038,2949,
- 7216,1831,
- 7274,3516,
- 7707,2510,
- 8123,5762,
- 8361,4485,
- 8376,2110,
- 8594,3135,
- 8611,3755,
- 8634,1570,
- 8636,2748,
- 8683,8222,
- 9274,335,
- 9512,2404,
- 9640,5020,
- 9690,1893,
- 9778,3361,
- 9808,15435,
- 9936,4029,
- 10194,2767,
- 10306,6510,
- 10325,1252,
- 10686,2186,
- 10844,32767,
- 10913,4453,
- 10968,3078,
- 11044,1666,
- 11076,3609,
- 11398,2509,
- 11423,5160,
- 11848,1994,
- 11997,2823,
- 12002,3880,
- 12084,7573,
- 12129,3325,
- 12214,5867,
- 12331,1496,
- 12450,4245,
- 12458,2283,
- 12768,901,
- 12896,4741,
- 12898,1811,
- 12902,2569,
- 12983,2959,
- 13173,3331,
- 13413,2059,
- 13416,3734,
- 13429,10641,
- 13448,1148,
- 13615,5340,
- 13674,1425,
- 13779,2332,
- 13847,4264,
- 13909,2657,
- 13958,6488,
- 14047,3085,
- 14130,1648,
- 14547,1915,
- 14554,3684,
- 14749,2739,
- 14868,5017,
- 14875,2216,
- 14898,3197,
- 14988,1085,
- 15026,4246,
- 15375,7971,
- 15421,1446,
- 15548,2462,
- 15722,5920,
- 15882,3449,
- 15960,1782,
- 15994,2863,
- 16365,3977,
- 16419,4754,
- 16472,2162,
- 17378,3101,
- 17410,2550,
- 17743,1339,
- 17856,5485,
- 17979,1982,
- 17996,3628,
- 18041,7110,
- 18242,4381,
- 18602,22207,
- 19373,12827,
- 19533,2777,
- 19640,1678,
- 19728,2272,
- 19795,8861,
- 20065,3275,
- 20133,4881,
- 20198,3947,
- 20290,6128,
-};
-
-/*----------------------------------------------------------------------------------*
- * MA predicition coefficients for gain quantizer
- *----------------------------------------------------------------------------------*/
-
-const Word16 pred_gain_fx[GAIN_PRED_ORDER] = { 8192, 6554, 4915, 3277 };//Q14
-
-/*----------------------------------------------------------------------------------*
- * 6-bit gain quantization table (only for AMR-WB IO mode)
- *----------------------------------------------------------------------------------*/
-
-const Word16 t_qua_gain6b_fx[64 * 2] =
-{//Q14
- 1566, 1332,
- 1577, 3557,
- 3071, 6490,
- 4193, 10163,
- 4496, 2534,
- 5019, 4488,
- 5586, 15614,
- 5725, 1422,
- 6453, 580,
- 6724, 6831,
- 7657, 3527,
- 8072, 2099,
- 8232, 5319,
- 8827, 8775,
- 9740, 2868,
- 9856, 1465,
- 10087, 12488,
- 10241, 4453,
- 10859, 6618,
- 11321, 3587,
- 11417, 1800,
- 11643, 2428,
- 11718, 988,
- 12312, 5093,
- 12523, 8413,
- 12574, 26214,
- 12601, 3396,
- 13172, 1623,
- 13285, 2423,
- 13418, 6087,
- 13459, 12810,
- 13656, 3607,
- 14111, 4521,
- 14144, 1229,
- 14425, 1871,
- 14431, 7234,
- 14445, 2834,
- 14628, 10036,
- 14860, 17496,
- 15161, 3629,
- 15209, 5819,
- 15299, 2256,
- 15518, 4722,
- 15663, 1060,
- 15759, 7972,
- 15939, 11964,
- 16020, 2996,
- 16086, 1707,
- 16521, 4254,
- 16576, 6224,
- 16894, 2380,
- 16906, 681,
- 17213, 8406,
- 17610, 3418,
- 17895, 5269,
- 18168, 11748,
- 18230, 1575,
- 18607, 32767,
- 18728, 21684,
- 19137, 2543,
- 19422, 6577,
- 19446, 4097,
- 19450, 9056,
- 20371, 14885
-};
-
-
-/*----------------------------------------------------------------------------------*
- * 7-bit gain quantization table (only for AMR-WB IO mode)
- *----------------------------------------------------------------------------------*/
-
-const Word16 t_qua_gain7b_fx[128 * 2] =
-{//Q14
- 204, 441,
- 464, 1977,
- 869, 1077,
- 1072, 3062,
- 1281, 4759,
- 1647, 1539,
- 1845, 7020,
- 1853, 634,
- 1995, 2336,
- 2351, 15400,
- 2661, 1165,
- 2702, 3900,
- 2710, 10133,
- 3195, 1752,
- 3498, 2624,
- 3663, 849,
- 3984, 5697,
- 4214, 3399,
- 4415, 1304,
- 4695, 2056,
- 5376, 4558,
- 5386, 676,
- 5518, 23554,
- 5567, 7794,
- 5644, 3061,
- 5672, 1513,
- 5957, 2338,
- 6533, 1060,
- 6804, 5998,
- 6820, 1767,
- 6937, 3837,
- 7277, 414,
- 7305, 2665,
- 7466, 11304,
- 7942, 794,
- 8007, 1982,
- 8007, 1366,
- 8326, 3105,
- 8336, 4810,
- 8708, 7954,
- 8989, 2279,
- 9031, 1055,
- 9247, 3568,
- 9283, 1631,
- 9654, 6311,
- 9811, 2605,
- 10120, 683,
- 10143, 4179,
- 10245, 1946,
- 10335, 1218,
- 10468, 9960,
- 10651, 3000,
- 10951, 1530,
- 10969, 5290,
- 11203, 2305,
- 11325, 3562,
- 11771, 6754,
- 11839, 1849,
- 11941, 4495,
- 11954, 1298,
- 11975, 15223,
- 11977, 883,
- 11986, 2842,
- 12438, 2141,
- 12593, 3665,
- 12636, 8367,
- 12658, 1594,
- 12886, 2628,
- 12984, 4942,
- 13146, 1115,
- 13224, 524,
- 13341, 3163,
- 13399, 1923,
- 13549, 5961,
- 13606, 1401,
- 13655, 2399,
- 13782, 3909,
- 13868, 10923,
- 14226, 1723,
- 14232, 2939,
- 14278, 7528,
- 14439, 4598,
- 14451, 984,
- 14458, 2265,
- 14792, 1403,
- 14818, 3445,
- 14899, 5709,
- 15017, 15362,
- 15048, 1946,
- 15069, 2655,
- 15405, 9591,
- 15405, 4079,
- 15570, 7183,
- 15687, 2286,
- 15691, 1624,
- 15699, 3068,
- 15772, 5149,
- 15868, 1205,
- 15970, 696,
- 16249, 3584,
- 16338, 1917,
- 16424, 2560,
- 16483, 4438,
- 16529, 6410,
- 16620, 11966,
- 16839, 8780,
- 17030, 3050,
- 17033, 18325,
- 17092, 1568,
- 17123, 5197,
- 17351, 2113,
- 17374, 980,
- 17566, 26214,
- 17609, 3912,
- 17639, 32767,
- 18151, 7871,
- 18197, 2516,
- 18202, 5649,
- 18679, 3283,
- 18930, 1370,
- 19271, 13757,
- 19317, 4120,
- 19460, 1973,
- 19654, 10018,
- 19764, 6792,
- 19912, 5135,
- 20040, 2841,
- 21234, 19833
-};
-
-/*----------------------------------------------------------------------------------*
- * Quantization table for scaled innovation energy prediciton
- *----------------------------------------------------------------------------------*/
-
-const Word16 Es_pred_qua_5b_fx[32] =
-{//Q8
- -2048,
- -525,
- 642,
- 1688,
- 2547,
- 3326,
- 4026,
- 4647,
- 5211,
- 5740,
- 6221,
- 6661,
- 7067,
- 7447,
- 7815,
- 8170,
- 8518,
- 8865,
- 9204,
- 9551,
- 9912,
- 10284,
- 10669,
- 11077,
- 11509,
- 11976,
- 12486,
- 13049,
- 13695,
- 14434,
- 15354,
- 16640,
-};
-
-const Word16 Es_pred_qua_4b_fx[16] =
-{//Q8
- -2048,
- -36,
- 1828,
- 3284,
- 4584,
- 5742,
- 6821,
- 7834,
- /*8779, */
- 8778,
- 9701,
- 10610,
- 11524,
- 12487,
- 13560,
- 14862,
- 16640
-};
-
-const Word16 Es_pred_qua_3b_fx[8] =
-{
- 1521/* 5.9422f Q8*/,
- 3909/*15.2711f Q8*/,
- 5987/*23.3857f Q8*/,
- 7816/*30.5310f Q8*/,
- 9477/*37.0190f Q8*/,
- 11124/*43.4539f Q8*/,
- 12863/*50.2442f Q8*/,
- 15031/*58.7164f Q8*/
-};
-
-const Word16 Es_pred_qua_4b_no_ltp_fx[16] =
-{
- -1280/*-5.f Q8*/,
- 0/* 0.f Q8*/,
- 1280/* 5.f Q8*/,
- 2560/*10.f Q8*/,
- 3840/*15.f Q8*/,
- 5120/*20.f Q8*/,
- 6400/*25.f Q8*/,
- 7680/*30.f Q8*/,
- 8960/*35.f Q8*/,
- 10240/*40.f Q8*/,
- 11520/*45.f Q8*/,
- 12800/*50.f Q8*/,
- 14080/*55.f Q8*/,
- 15360/*60.f Q8*/,
- 16640/*65.f Q8*/,
- 17920/*70.f Q8*/
-};
-/*----------------------------------------------------------------------------------*
- * Gain estimation constants (for gain quantizer at 7.2 and 8.0 kbps)
- *----------------------------------------------------------------------------------*/
-
-const Word16 b_1sfr_fx[2] = /*Q12 */
-{
- 9697, -920
-};
-
-const Word16 b_2sfr_fx[4] = /*Q12 */
-{
- -1, 70, 3763, 542
-};
-
-const Word16 b_3sfr_fx[6] =//Q12
-{
- -478, 110, 553, 3264, 92, 730
-};
-
-const Word16 b_4sfr_fx[8] =//Q12
-{
- -381, 65, -271, 836, 3246, 34, 143, 650
-};
-
-/*----------------------------------------------------------------------------------*
- * Gain codebooks (for gain quantizer at 7.2 and 8.0 kbps)
- *----------------------------------------------------------------------------------*/
-
-const Word16 gp_gamma_3sfr_7b_fx[2 * 128] = //Q14/Q9
-{
- 141, 207,
- 268, 836,
- 355, 385,
- 470, 124,
- 944, 265,
- 1202, 503,
- 1308, 640,
- 1384, 150,
- 1399, 75,
- 1534, 323,
- 1835, 1252,
- 1872, 216,
- 2297, 443,
- 2495, 122,
- 2697, 358,
- 2849, 181,
- 2920, 274,
- 2937, 552,
- 3353, 2982,
- 3666, 394,
- 3759, 1755,
- 3790, 972,
- 3838, 225,
- 3929, 758,
- 3973, 143,
- 4075, 313,
- 4329, 471,
- 4689, 625,
- 4938, 178,
- 5073, 266,
- 5216, 379,
- 5519, 520,
- 6089, 321,
- 6149, 221,
- 6247, 432,
- 6254, 1083,
- 6556, 131,
- 6751, 733,
- 6773, 587,
- 7140, 17402,
- 7257, 366,
- 7295, 269,
- 7314, 483,
- 8121, 204,
- 8214, 1515,
- 8332, 538,
- 8386, 842,
- 8483, 314,
- 8484, 660,
- 8503, 395,
- 9079, 455,
- 9543, 249,
- 9687, 1056,
- 9724, 11493,
- 9727, 336,
- 9862, 603,
- 10141, 158,
- 10278, 498,
- 10347, 393,
- 10380, 751,
- 10899, 287,
- 11239, 564,
- 11377, 210,
- 11389, 437,
- 11531, 926,
- 11565, 339,
- 11594, 684,
- 11635, 7228,
- 12176, 509,
- 12240, 1235,
- 12467, 381,
- 12631, 254,
- 12758, 809,
- 12877, 458,
- 12881, 620,
- 13160, 313,
- 13243, 1692,
- 13441, 533,
- 13620, 420,
- 13855, 718,
- 13895, 998,
- 14047, 354,
- 14150, 199,
- 14170, 586,
- 14358, 477,
- 14770, 280,
- 14777, 143,
- 14810, 397,
- 14965, 857,
- 14984, 655,
- 15112, 524,
- 15406, 330,
- 15535, 442,
- 15599, 1120,
- 15635, 4946,
- 15823, 582,
- 15891, 736,
- 16161, 374,
- 16216, 229,
- 16265, 493,
- 16607, 638,
- 16610, 2511,
- 16905, 803,
- 16906, 433,
- 16911, 310,
- 16924, 1415,
- 17161, 543,
- 17656, 951,
- 17694, 680,
- 17736, 375,
- 17982, 479,
- 18345, 287,
- 18372, 586,
- 18469, 3627,
- 18649, 183,
- 18898, 2002,
- 18925, 403,
- 18959, 712,
- 19244, 857,
- 19306, 245,
- 19447, 1203,
- 19455, 334,
- 19458, 526,
- 19600, 455,
- 19699, 623,
- 19724, 1583,
- 19788, 1001,
- 20031, 749,
-};
-
-const Word16 gp_gamma_4sfr_7b_fx[2 * 128] = /*Q14/Q9 */
-{
- 101, 174,
- 228, 542,
- 400, 269,
- 735, 418,
- 799, 111,
- 1146, 802,
- 1250, 345,
- 1291, 1138,
- 1327, 224,
- 1478, 1705,
- 1557, 491,
- 1947, 295,
- 1988, 639,
- 2343, 386,
- 2386, 213,
- 2541, 133,
- 2904, 2881,
- 3198, 455,
- 3204, 736,
- 3219, 276,
- 3463, 549,
- 3709, 343,
- 3741, 177,
- 4431, 226,
- 4480, 927,
- 4516, 396,
- 4547, 622,
- 4900, 290,
- 5011, 503,
- 5601, 742,
- 5616, 173,
- 5688, 428,
- 5975, 337,
- 6196, 5865,
- 6293, 253,
- 6294, 580,
- 6305, 1053,
- 6792, 480,
- 6951, 391,
- 7151, 212,
- 7298, 671,
- 7475, 317,
- 7757, 534,
- 7917, 856,
- 8195, 1449,
- 8198, 437,
- 8228, 261,
- 8434, 154,
- 8493, 622,
- 8552, 358,
- 9324, 493,
- 9373, 744,
- 9391, 217,
- 9410, 296,
- 9711, 14146,
- 9711, 405,
- 9724, 598,
- 10128, 1140,
- 10248, 8800,
- 10391, 344,
- 10530, 883,
- 10541, 542,
- 10559, 257,
- 10772, 441,
- 11075, 664,
- 11463, 304,
- 11510, 196,
- 11551, 2230,
- 11574, 501,
- 11611, 391,
- 12154, 784,
- 12205, 576,
- 12304, 133,
- 12413, 343,
- 12457, 84,
- 12468, 445,
- 12734, 247,
- 12970, 639,
- 13072, 1411,
- 13142, 983,
- 13159, 499,
- 13356, 386,
- 13460, 298,
- 13838, 710,
- 13850, 550,
- 13930, 429,
- 14446, 343,
- 14449, 170,
- 14511, 467,
- 14530, 857,
- 14697, 623,
- 14770, 4569,
- 14833, 229,
- 15086, 512,
- 15112, 387,
- 15527, 574,
- 15552, 1126,
- 15573, 764,
- 15662, 291,
- 15677, 442,
- 16056, 648,
- 16200, 508,
- 16322, 369,
- 16719, 586,
- 16832, 936,
- 16835, 450,
- 16969, 702,
- 17188, 315,
- 17425, 538,
- 17680, 395,
- 17808, 209,
- 17855, 791,
- 18054, 1861,
- 18122, 471,
- 18273, 632,
- 18425, 3478,
- 18630, 1239,
- 18947, 143,
- 18948, 2576,
- 19051, 264,
- 19068, 349,
- 19112, 502,
- 19303, 1530,
- 19502, 836,
- 19558, 422,
- 19571, 692,
- 19667, 1014,
- 19685, 569
-};
-
-const Word16 gp_gamma_1sfr_8b_fx[2 * 256] = /*Q14/Q9 */
-{
- 305, 152,
- 333, 37,
- 352, 556,
- 573, 82,
- 652, 12,
- 694, 207,
- 808, 389,
- 915, 776,
- 986, 1089,
- 987, 1583,
- 1055, 60,
- 1202, 2779,
- 1205, 20,
- 1346, 127,
- 1432, 332,
- 1689, 6554,
- 1715, 261,
- 1820, 49,
- 2041, 698,
- 2179, 4032,
- 2199, 100,
- 2272, 1303,
- 2317, 461,
- 2340, 175,
- 2562, 26,
- 2574, 14814,
- 2657, 2101,
- 2732, 66,
- 2818, 9,
- 2836, 296,
- 2929, 938,
- 3479, 130,
- 3510, 220,
- 3651, 3154,
- 3667, 717,
- 3720, 384,
- 3783, 530,
- 3811, 10744,
- 3883, 5385,
- 3941, 1609,
- 3964, 46,
- 4120, 80,
- 4402, 15,
- 4440, 1181,
- 4485, 173,
- 4740, 311,
- 4848, 31,
- 5125, 7642,
- 5147, 110,
- 5167, 908,
- 5237, 252,
- 5323, 623,
- 5376, 2514,
- 5590, 7,
- 5595, 4475,
- 5634, 64,
- 5654, 461,
- 5822, 22,
- 5893, 140,
- 5905, 1810,
- 6177, 367,
- 6268, 201,
- 6352, 1092,
- 6567, 752,
- 6626, 50,
- 6734, 95,
- 6758, 295,
- 6882, 3085,
- 6962, 1363,
- 7274, 540,
- 7413, 166,
- 7635, 2120,
- 7642, 38,
- 7671, 393,
- 7730, 227,
- 7860, 75,
- 7980, 115,
- 8011, 955,
- 8092, 3687,
- 8120, 17,
- 8146, 5902,
- 8453, 672,
- 8524, 1602,
- 8583, 58,
- 8679, 275,
- 8873, 332,
- 8920, 454,
- 8969, 9712,
- 9129, 2566,
- 9159, 196,
- 9193, 1127,
- 9219, 142,
- 9300, 9,
- 9302, 828,
- 9409, 91,
- 9736, 26,
- 9872, 574,
- 10066, 246,
- 10131, 1352,
- 10154, 1971,
- 10196, 399,
- 10238, 15785,
- 10255, 4254,
- 10401, 67,
- 10439, 43,
- 10511, 116,
- 10531, 7399,
- 10706, 998,
- 10798, 722,
- 10845, 171,
- 10848, 304,
- 10876, 2981,
- 11069, 28204,
- 11139, 507,
- 11280, 12,
- 11427, 388,
- 11459, 214,
- 11647, 1174,
- 11710, 5061,
- 11742, 1614,
- 11793, 806,
- 11816, 82,
- 11890, 132,
- 11996, 2301,
- 12000, 603,
- 12060, 55,
- 12232, 256,
- 12299, 33,
- 12438, 338,
- 12452, 458,
- 12627, 3563,
- 12646, 9489,
- 12665, 934,
- 12801, 1329,
- 12802, 190,
- 12877, 683,
- 12941, 103,
- 13038, 1890,
- 13209, 6209,
- 13222, 12674,
- 13318, 21,
- 13374, 283,
- 13385, 149,
- 13391, 383,
- 13453, 545,
- 13564, 1064,
- 13596, 2561,
- 13771, 810,
- 13834, 1481,
- 13874, 69,
- 14027, 226,
- 14093, 4429,
- 14147, 7,
- 14171, 609,
- 14185, 47,
- 14223, 3051,
- 14273, 434,
- 14321, 314,
- 14415, 120,
- 14443, 1252,
- 14500, 173,
- 14557, 933,
- 14616, 1696,
- 14639, 8229,
- 14724, 89,
- 14837, 703,
- 14902, 2072,
- 14917, 366,
- 15000, 487,
- 15009, 30,
- 15095, 256,
- 15138, 1119,
- 15228, 3580,
- 15371, 1386,
- 15387, 5525,
- 15398, 17932,
- 15462, 149,
- 15471, 791,
- 15551, 569,
- 15554, 2467,
- 15559, 201,
- 15616, 14,
- 15664, 319,
- 15798, 401,
- 15811, 974,
- 15874, 41,
- 15929, 1649,
- 15945, 79,
- 16046, 111,
- 16225, 647,
- 16230, 1240,
- 16297, 4110,
- 16328, 10499,
- 16331, 278,
- 16355, 3003,
- 16383, 455,
- 16404, 169,
- 16435, 2172,
- 16438, 850,
- 16745, 7090,
- 16776, 354,
- 16801, 1063,
- 16803, 62,
- 16812, 223,
- 16927, 530,
- 16951, 721,
- 17039, 1447,
- 17208, 1837,
- 17233, 135,
- 17371, 4642,
- 17570, 406,
- 17608, 267,
- 17696, 906,
- 17702, 2529,
- 17705, 23239,
- 17709, 1209,
- 17745, 592,
- 17800, 92,
- 17858, 35,
- 17860, 3360,
- 17866, 9,
- 17978, 184,
- 18035, 321,
- 18255, 754,
- 18274, 480,
- 18320, 18,
- 18406, 55,
- 18582, 13017,
- 18677, 1516,
- 18726, 1998,
- 18904, 25,
- 18914, 6103,
- 19020, 8567,
- 19022, 1116,
- 19025, 349,
- 19147, 239,
- 19224, 604,
- 19251, 160,
- 19270, 4870,
- 19358, 3789,
- 19394, 126,
- 19394, 103,
- 19433, 72,
- 19444, 46,
- 19448, 2842,
- 19489, 430,
- 19575, 815,
- 19628, 1306,
- 19631, 972,
- 19637, 202,
- 19642, 289,
- 19660, 527,
- 19717, 1697,
- 19731, 2263,
- 19754, 676,
- 19854, 382,
-};
-
-const Word16 gp_gamma_1sfr_7b_fx[2 * 128] = /*Q14/Q9 */
-{
- 350, 85,
- 428, 24,
- 438, 681,
- 642, 195,
- 1071, 2012,
- 1080, 402,
- 1148, 1236,
- 1159, 62,
- 1424, 12,
- 1662, 134,
- 1985, 299,
- 2100, 34,
- 2163, 3168,
- 2219, 538,
- 2393, 6580,
- 2499, 967,
- 2882, 221,
- 2974, 12743,
- 3251, 98,
- 3294, 51,
- 3586, 1560,
- 3711, 411,
- 3721, 700,
- 3862, 21,
- 3947, 169,
- 4001, 2249,
- 4198, 4632,
- 4372, 8,
- 4993, 70,
- 5022, 265,
- 5568, 1194,
- 5664, 495,
- 5698, 115,
- 5885, 854,
- 6115, 2990,
- 6266, 153,
- 6376, 39,
- 6432, 16,
- 6601, 345,
- 7108, 1957,
- 7231, 660,
- 7491, 202,
- 7687, 93,
- 8054, 3882,
- 8108, 9624,
- 8186, 1424,
- 8243, 59,
- 8354, 935,
- 8358, 6401,
- 8383, 439,
- 8794, 285,
- 8940, 124,
- 9643, 25,
- 9643, 581,
- 9670, 2709,
- 10065, 160,
- 10218, 9,
- 10240, 1728,
- 10249, 80,
- 10418, 1113,
- 10497, 373,
- 10650, 236,
- 11095, 44,
- 11095, 756,
- 11284, 4978,
- 11290, 16722,
- 11815, 2299,
- 11882, 482,
- 12059, 114,
- 12332, 8550,
- 12363, 1394,
- 12392, 186,
- 12517, 336,
- 12549, 3413,
- 12694, 953,
- 13096, 614,
- 13185, 71,
- 13247, 262,
- 13479, 1914,
- 13791, 14,
- 13805, 30,
- 14064, 138,
- 14182, 420,
- 14212, 1175,
- 14477, 765,
- 14605, 2745,
- 14612, 6324,
- 14730, 4199,
- 14833, 301,
- 14842, 203,
- 14910, 12790,
- 15171, 100,
- 15191, 1625,
- 15289, 532,
- 15405, 52,
- 15550, 985,
- 16096, 357,
- 16175, 2113,
- 16284, 232,
- 16333, 669,
- 16363, 22999,
- 16396, 156,
- 16443, 1270,
- 16455, 3482,
- 16543, 8,
- 16650, 5425,
- 16878, 452,
- 16989, 84,
- 17024, 9676,
- 17194, 876,
- 17730, 20,
- 17780, 1442,
- 17864, 38,
- 17874, 254,
- 17929, 526,
- 18011, 2403,
- 18751, 7153,
- 18786, 117,
- 18820, 4420,
- 19002, 63,
- 19099, 401,
- 19111, 183,
- 19197, 776,
- 19202, 2953,
- 19236, 1052,
- 19255, 301,
- 19354, 1760,
- 19432, 593,
-};
-
-const Word16 gp_gamma_1sfr_6b_fx[2 * 64] = /*Q14/Q9 */
-{
- 436, 182,
- 473, 63,
- 962, 16,
- 992, 647,
- 1258, 1582,
- 1447, 351,
- 1711, 125,
- 1809, 46,
- 2569, 4173,
- 2607, 957,
- 2826, 251,
- 2904, 12481,
- 3248, 26,
- 3594, 2254,
- 3664, 78,
- 3715, 483,
- 4232, 8,
- 4681, 188,
- 5066, 6623,
- 5232, 1273,
- 6232, 695,
- 6234, 49,
- 6238, 113,
- 6312, 318,
- 7012, 17,
- 7327, 3183,
- 8008, 1739,
- 8692, 446,
- 8769, 163,
- 8923, 1019,
- 9094, 81,
- 10358, 286,
- 10491, 28,
- 10612, 9788,
- 10715, 760,
- 11045, 4822,
- 11319, 2403,
- 11684, 56,
- 12314, 108,
- 12460, 556,
- 12580, 9,
- 12716, 213,
- 12821, 1336,
- 14202, 374,
- 14325, 16971,
- 14612, 838,
- 14625, 3285,
- 14668, 6231,
- 14919, 39,
- 15131, 137,
- 15476, 1847,
- 16056, 255,
- 16277, 494,
- 16290, 66,
- 16582, 1048,
- 16859, 17,
- 17220, 8723,
- 17443, 4295,
- 18069, 2499,
- 18212, 176,
- 18499, 91,
- 18517, 1445,
- 18522, 332,
- 18596, 663,
-};
-
-const Word16 gp_gamma_2sfr_7b_fx[2 * 128] = /*Q14/Q9 */
-{
- 99, 1224,
- 156, 243,
- 168, 579,
- 290, 355,
- 437, 441,
- 475, 187,
- 734, 738,
- 930, 93,
- 1133, 153,
- 1136, 298,
- 1490, 508,
- 1946, 401,
- 1978, 16790,
- 2098, 224,
- 2117, 962,
- 2407, 119,
- 2686, 339,
- 2929, 555,
- 3404, 271,
- 3465, 171,
- 3469, 422,
- 3714, 663,
- 4436, 494,
- 4494, 332,
- 4571, 220,
- 4583, 2182,
- 4997, 848,
- 5346, 380,
- 5419, 108,
- 5570, 579,
- 5758, 266,
- 5875, 442,
- 5927, 170,
- 6204, 3338,
- 6394, 6435,
- 6515, 328,
- 6638, 730,
- 6687, 1472,
- 7045, 1056,
- 7101, 498,
- 7123, 210,
- 7163, 9668,
- 7345, 386,
- 7598, 280,
- 7853, 627,
- 8462, 442,
- 8648, 331,
- 8822, 236,
- 8887, 551,
- 8953, 906,
- 9317, 136,
- 9587, 386,
- 9651, 691,
- 9796, 286,
- 9852, 489,
- 10005, 1215,
- 10041, 192,
- 10623, 576,
- 10758, 329,
- 10840, 425,
- 10944, 792,
- 11038, 257,
- 11190, 1870,
- 11541, 501,
- 11729, 642,
- 11873, 367,
- 12064, 163,
- 12332, 216,
- 12339, 1100,
- 12339, 295,
- 12478, 444,
- 12561, 568,
- 12665, 845,
- 13257, 396,
- 13317, 677,
- 13411, 511,
- 13709, 324,
- 13710, 1547,
- 13711, 246,
- 14054, 991,
- 14112, 447,
- 14246, 580,
- 14355, 748,
- 14394, 175,
- 14453, 99,
- 14604, 363,
- 14887, 491,
- 15074, 282,
- 15110, 637,
- 15242, 1292,
- 15351, 413,
- 15430, 843,
- 15700, 541,
- 15776, 204,
- 15964, 335,
- 15992, 688,
- 16077, 453,
- 16315, 4617,
- 16406, 1032,
- 16549, 595,
- 16666, 384,
- 16850, 776,
- 16851, 482,
- 16916, 253,
- 17234, 309,
- 17307, 2128,
- 17469, 546,
- 17666, 643,
- 17699, 421,
- 17852, 882,
- 17870, 146,
- 18146, 1244,
- 18457, 489,
- 18478, 346,
- 18588, 723,
- 18826, 208,
- 19011, 1731,
- 19042, 586,
- 19286, 281,
- 19428, 944,
- 19446, 382,
- 19555, 444,
- 19689, 792,
- 19755, 1111,
- 19762, 527,
- 19769, 1405,
- 19774, 657,
- 19780, 2675,
-};
-
-const Word16 gp_gamma_2sfr_6b_fx[2 * 64] = /*Q14/Q9 */
-{
- 185, 306,
- 435, 519,
- 458, 145,
- 1000, 211,
- 1217, 394,
- 1241, 751,
- 1788, 93,
- 2026, 1234,
- 2162, 265,
- 2397, 158,
- 2617, 472,
- 3324, 340,
- 3391, 623,
- 3835, 207,
- 4503, 17210,
- 4628, 407,
- 4939, 897,
- 5102, 275,
- 5300, 120,
- 5560, 511,
- 6309, 1909,
- 6571, 335,
- 6770, 205,
- 6990, 642,
- 7085, 5087,
- 7500, 428,
- 8357, 827,
- 8452, 261,
- 9079, 537,
- 9289, 354,
- 9854, 1176,
- 9864, 165,
- 10436, 8580,
- 10549, 437,
- 10615, 677,
- 11010, 282,
- 11940, 530,
- 12183, 367,
- 12475, 920,
- 12865, 225,
- 13359, 618,
- 13431, 441,
- 13521, 1623,
- 14177, 341,
- 14299, 130,
- 14452, 775,
- 14799, 508,
- 15250, 276,
- 15715, 1130,
- 15757, 660,
- 15879, 422,
- 16355, 3256,
- 16439, 187,
- 16751, 562,
- 16906, 331,
- 17178, 827,
- 17889, 471,
- 18219, 2175,
- 18786, 248,
- 18985, 1354,
- 19067, 703,
- 19220, 384,
- 19349, 954,
- 19422, 553,
-};
-const Word16 gp_gamma_3sfr_6b_fx[2 * 64] = /*Q14/Q9 */
-{
- 195, 150,
- 817, 288,
- 1152, 616,
- 1366, 188,
- 1377, 410,
- 1526, 902,
- 1570, 98,
- 2258, 238,
- 2489, 518,
- 2935, 338,
- 3142, 161,
- 3456, 1705,
- 3990, 432,
- 4159, 709,
- 4187, 270,
- 4374, 1236,
- 5283, 526,
- 5431, 131,
- 5507, 356,
- 5762, 211,
- 6792, 620,
- 6842, 446,
- 6969, 304,
- 7671, 807,
- 8362, 245,
- 8448, 530,
- 8610, 380,
- 9314, 1088,
- 9828, 170,
- 9921, 7010,
- 10026, 459,
- 10193, 312,
- 10261, 658,
- 11554, 394,
- 11739, 882,
- 11791, 542,
- 11985, 4329,
- 11996, 246,
- 12762, 13441,
- 12844, 1512,
- 13131, 465,
- 13135, 339,
- 13215, 740,
- 14138, 608,
- 14524, 417,
- 14780, 1030,
- 14823, 283,
- 15016, 171,
- 15264, 527,
- 15823, 2706,
- 15943, 699,
- 15959, 360,
- 16350, 473,
- 17211, 573,
- 17366, 901,
- 17517, 238,
- 17799, 414,
- 18069, 1415,
- 18630, 1920,
- 18887, 634,
- 19018, 318,
- 19304, 495,
- 19400, 1114,
- 19413, 767,
-};
-
-
-const Word16 gp_gamma_4sfr_6b_fx[2 * 64] = /*Q14/Q9 */
-{
- 153, 141,
- 282, 501,
- 399, 239,
- 783, 369,
- 1110, 744,
- 1430, 183,
- 1440, 1748,
- 1524, 1091,
- 1602, 296,
- 1828, 99,
- 2000, 439,
- 2678, 228,
- 2815, 600,
- 3084, 347,
- 3861, 477,
- 4154, 163,
- 4214, 285,
- 4428, 733,
- 4976, 384,
- 5482, 566,
- 5552, 234,
- 6158, 929,
- 6536, 470,
- 6560, 326,
- 7288, 173,
- 7429, 663,
- 7447, 10616,
- 7871, 407,
- 8457, 266,
- 8559, 550,
- 8679, 1421,
- 9457, 356,
- 9533, 785,
- 9854, 471,
- 10584, 5781,
- 10792, 3815,
- 10813, 206,
- 10829, 302,
- 10986, 606,
- 11380, 433,
- 11468, 1073,
- 12485, 356,
- 12726, 520,
- 12783, 721,
- 13554, 259,
- 13763, 139,
- 13884, 430,
- 14060, 2592,
- 14266, 599,
- 14332, 925,
- 14997, 337,
- 15355, 485,
- 15526, 712,
- 16440, 587,
- 16504, 395,
- 16626, 204,
- 17228, 1287,
- 17563, 805,
- 17629, 517,
- 18159, 1814,
- 18320, 303,
- 19228, 437,
- 19263, 636,
- 19417, 989,
-};
-
-
-
-/*----------------------------------------------------------------------------------*
- * Transition coding - gain quantization table
- *----------------------------------------------------------------------------------*/
-const Word16 tbl_gain_code_tc_fx[N_GAIN_CODE_TC] = /*q13 */
-{
- 2966,
- 5930,
- 7924,
- 9712,
- 11566,
- 13754,
- 16993,
- 27280
-};
-const Word16 tbl_gain_code_tc_quant_mean[N_GAIN_CODE_TC - 1] =
-{
- 4448, 6927, 8818, 10639,
- 12660, 15374, 22136
-}; /* Q13 */
-/*-----------------------------------------------------------------*
- * Transition coding - gain quantization table for g_trans
- *-----------------------------------------------------------------*/
-const Word16 tbl_gain_trans_tc_fx[N_GAIN_TC] =
-{
- 4588, 11109, 19212, 29862,/*<- Q7
-Q4 ->*/ 5536, 8184, 13115, 24000
-};
-/*-----------------------------------------------------------------*
- * Transition coding - table of prototype glottal impulses
- *-----------------------------------------------------------------*/
-
-const Word16 Glottal_cdbk_fx[L_IMPULSE*NUM_IMPULSE] = /*Q13*/
-{
- /* impulse 0 */
- -715, -1690, -2903, -1742, -1295, -4266,
- -4893, 1725, 8192, 5812, -628, -1956,
- 581, 936, -81, 831, 1517,
-
- /* impulse 1 */
- -2168, -1356, -404, -2715, -4469, -2164,
- -2180, -8058, -9140, 1163, 10343, 6677,
- -1758, -2839, 377, 326, -490,
-
- /* impulse 2 */
- 360, 561, 4184, 2533, -3326, -2549,
- 2059, -2112, -9542, -6134, 1307, 124,
- -3421, -1465, 475, -886, -1262,
-
- /* impulse 3 */
- -1294, -715, -184, -1544, -1638, -219,
- -3503, -9409, -7955, -1407, -285, -2494,
- 305, 4658, 3289, 116, 1488,
-
- /* impulse 4 */
- 837, 2523, 2444, 2679, 5962, 6935,
- -924, -9907, -7565, 643, 1350, -2577,
- -2100, -277, -1546, -2279, -882,
-
- /* impulse 5 */
- -418, -886, -48, -494, -2368, -2060,
- -1233, -5271,-10430, -6955, 3301, 7578,
- 2599, -1665, -461, 735, -181,
-
- /* impulse 6 */
- -467, -1865, -1455, -127, -1881, -3776,
- 822, 8335, 8192, 863, -2762, -375,
- 757, -558, -285, 653, 150,
-
- /* impulse 7 */
- 1087, 471, -618, 706, 1546, -1605,
- -3256, 2396, 8060, 5189, -99, -37,
- 1105, -668, -1434, -59, -81
-};
-
-/*----------------------------------------------------------------------------------*
- * AMR-WB IO WB BWE - deemphasis
- *----------------------------------------------------------------------------------*/
-const Word16 deem_tab_fx[56] =
-{//Q15
- 20668, 20625, 20583, 20541, 20501, 20462, 20423, 20385,
- 20348, 20313, 20277, 20243, 20210, 20177, 20146, 20115,
- 20085, 20055, 20027, 19999, 19972, 19946, 19921, 19896,
- 19873, 19850, 19827, 19806, 19785, 19766, 19746, 19728,
- 19710, 19693, 19677, 19662, 19647, 19633, 19620, 19607,
- 19596, 19585, 19574, 19565, 19556, 19548, 19540, 19533,
- 19527, 19522, 19518, 19514, 19510, 19508, 19506, 19505
-};
-
-
-const Word16 filt_hp_fx[56] =
-{//Q15
- 53, 153, 274, 415, 578, 765, 978, 1217, 1483, 1778, 2102,
- 2457, 2843, 3261, 3710, 4192, 4706, 5252, 5829, 6438, 7077,
- 7746, 8443, 9168, 9918, 10693, 11489, 12306, 13141, 13992,
- 14856, 15732, 16615, 17504, 18395, 19287, 20174, 21056, 21928,
- 22787, 23631, 24456, 25260, 26039, 26791, 27512, 28201, 28853,
- 29468, 30043, 30574, 31061, 31502, 31894, 32237, 32529
-};
-
-/* table of values exp(-j*w*i) */
-
-const Word16 exp_tab_q_fx[34] = /*Q14 */
-{
- 16384, -16068, 15137, -13622,
- 11585, -9101, 6270, -3195,
- 0, 3196, -6269, 9102,
- -11584, 13623, -15136, 16069,
- -16383, 0, -3195, 6270,
- -9101, 11585, -13622, 15137,
- -16068, 16384, -16068, 15137,
- -13622, 11585, -9101, 6270,
- -3195, 0
-};
-
-
-const Word16 exp_tab_p_fx[34] = /*Q14 */
-{
- 16384, -11584, 0, 11585,
- -16383, 11585, 0, -11584,
- 16384, -11584, 0, 11585,
- -16383, 11585, 0, -11584,
- 16384, 0, -11584, 16384,
- -11584, 0, 11585, -16383,
- 11585, 0, -11584, 16384,
- -11584, 0, 11585, -16383,
- 11585, 0
-};
-/* gains for 23k85 mode */
-
-const Word16 HP_gain_fx[16] =
-{//Q15
- 3624, 4673, 5597, 6479, 7425, 8378, 9324, 10264,
- 11210, 12206, 13391, 14844, 16770, 19655, 24289, 32728
-};
-/* band-pass 6-8kHz filter */
-
-const Word16 fir_6k_7k_fx[31] =
-{//Q15
- -32, 47, 32, -27, -369,
- 1122, -1421, 0, 3798, -8880,
- 12349, -10984, 3548, 7766, -18001,
- 22118, -18001, 7766, 3548, -10984,
- 12349, -8880, 3798, 0, -1421,
- 1122, -369, -27, 32, 47,
- -32
-};
-const Word16 no_lead_fx[][MAX_NO_SCALES * 2] =
-{//Q0
- { 1, 0, 0, 1, 0, 0, }, /* 14 */
- { 2, 0, 0, 1, 0, 0, }, /* 15 */
- { 4, 2, 0, 1, 0, 0, }, /* 18 */
- { 4, 2, 0, 2, 0, 0, }, /* 19 */
- { 7, 5, 2, 5, 4, 2, }, /* 25 */
- { 8, 8, 3, 8, 6, 2, }, /* 28 */ /* mode UV WB*/
- { 4, 2, 0, 1, 0, 0, }, /* 18 */
- { 4, 0, 0, 2, 1, 0, }, /* 19 */
- { 9, 8, 8, 2, 2, 1, }, /* 24 */
- { 8, 5, 2, 5, 2, 1, }, /* 25 */
- { 18, 16, 8, 5, 5, 1, }, /* 29 */
- { 24, 21, 10, 8, 8, 2, }, /* 32 */ /* mode UV NB*/
-
- { 2, 0, 0, 2, 0, 0, }, /* 17 */
- { 4, 2, 0, 1, 0, 0, }, /* 18 */
- { 7, 5, 2, 2, 0, 0, }, /* 21 */
- { 5, 2, 1, 4, 1, 0, }, /* 22 */
- { 8, 5, 2, 5, 2, 0, }, /* 25 */
- { 8, 7, 4, 5, 3, 2, },
- { 8, 8, 4, 6, 5, 2, },
- { 13, 8, 5, 6, 5, 2, },
- { 13, 8, 5, 8, 6, 2, },
- { 13, 8, 5, 11, 8, 2, }, /* 30 */
- { 24, 21, 8, 9, 8, 2, }, /* 32 */
- { 23, 18, 8, 13, 11, 3, },
- { 23, 21, 8, 17, 13, 4, }, /* 34 */
- { 31, 31, 17, 26, 25, 9, }, /* 37 */ /* mode V WB*/
- { 2, 0, 0, 2, 2, 0, }, /* 17 */
- { 4, 2, 0, 1, 0, 0, }, /* 18 */
- { 7, 5, 2, 2, 2, 0, }, /* 22 */
- { 8, 7, 2, 2, 2, 0, }, /* 23 */
- { 11, 8, 2, 2, 2, 0, }, /* 24 */
- { 13, 13, 9, 2, 2, 0, }, /* 25 */
- { 13, 11, 7, 5, 2, 0, }, /* 27 */
- { 18, 14, 9, 5, 5, 2, }, /* 29 */
- { 31, 31, 14, 11, 11, 5, }, /* 34 */
- { 31, 31, 27, 24, 21, 14, }, /* 37 */ /* mode V NB */
- { 5, 4, 0, 0, 0, 0, }, /* 12 (11.883) */
- { 2, 0, 0, 2, 0, 0, }, /* 16 (15.826) */
- { 4, 2, 0, 2, 0, 0, }, /* 19 (18.572) */
- { 5, 4, 0, 2, 0, 0, }, /* 20 (19.796) */
- { 7, 5, 2, 2, 0, 0, }, /* 21 (20.910) */
- { 8, 7, 2, 2, 0, 0, }, /* 22 (21.776) */
- { 5, 5, 2, 4, 2, 0, }, /* 23 (22.959) */
- { 8, 8, 5, 4, 2, 0, }, /* 25 (24.992) */
- { 8, 8, 7, 5, 2, 0, }, /* 26 (25.904) */
- { 13, 9, 8, 5, 2, 0, }, /* 27 (26.829) */
- { 13, 11, 8, 5, 5, 1, }, /* 28 (27.989) */
- { 13, 9, 8, 8, 5, 2, }, /* 29 (28.984) */
- { 22, 16, 10, 6, 5, 2, }, /* 30 (29.980) */
- { 21, 14, 10, 8, 7, 2, }, /* 31 (30.966) */
- { 24, 21, 10, 8, 8, 2, }, /* 32 (31.995) */ /* G WB*/
-
- { 5, 4, 1, 0, 0, 0, }, /* 12 (11.925) */
- { 2, 0, 0, 2, 0, 0, }, /* 16 (15.826) */
- { 5, 4, 1, 1, 0, 0, }, /* 19 (18.745) */
- { 5, 4, 1, 2, 0, 0, }, /* 20 (19.838) */
- { 7, 5, 2, 2, 0, 0, }, /* 21 (20.910) */
- { 8, 5, 2, 2, 1, 0, }, /* 22 (21.985) */
- { 9, 8, 5, 2, 1, 0, }, /* 23 (22.815) */
- { 14, 13, 8, 2, 2, 0, }, /* 25 (24.996) */
- { 13, 8, 7, 4, 2, 0, }, /* 26 (25.993) */
- { 13, 9, 8, 5, 2, 2, }, /* 27 (26.954) */
- { 18, 13, 8, 5, 2, 2, }, /* 28 (27.992) */
- { 21, 13, 11, 5, 3, 2, }, /* 29 (28.996) */
- { 22, 21, 13, 5, 5, 2, }, /* 30 (29.988) */
- { 23, 21, 17, 7, 5, 2, }, /* 31 (30.962) */
- { 27, 23, 21, 8, 5, 2, }, /* 32 (31.987) */ /* G NB*/
- { 2, 0, 0, 2, 0, 0, }, /* 17 */
- { 4, 2, 0, 1, 0, 0, }, /* 18 */
- { 4, 1, 0, 4, 0, 0, }, /* 21 */
- { 5, 2, 0, 4, 1, 0, }, /* 22 */
- { 8, 5, 2, 4, 0, 0, }, /* 24 */
- { 8, 5, 2, 5, 2, 0, }, /* 25 */
- { 14, 10, 5, 5, 5, 1, }, /* 28 */
- { 14, 10, 5, 8, 8, 4, }, /* 30 */
- { 13, 10, 5, 13, 8, 8, },
- { 23, 21, 8, 8, 8, 4, },
- { 23, 18, 5, 13, 8, 8, }, /* 33 */
- /* mode T WB */
- { 2, 0, 0, 2, 2, 0, }, /* 17 */
- { 4, 2, 0, 1, 0, 0, }, /* 18 */
- { 7, 5, 2, 2, 2, 0, }, /* 22 */
- { 8, 7, 4, 2, 2, 0, }, /* 23 */
- { 11, 8, 5, 2, 2, 0, }, /* 24 */
- { 18, 8, 5, 2, 2, 0, }, /* 25 */
- { 16, 8, 5, 5, 5, 2, }, /* 28 */
- { 28, 23, 8, 5, 5, 5, }, /* 31 */
- { 31, 31, 8, 5, 5, 7, }, /* 32 */ /* mode T NB */
-
- { 18, 18, 11, 9, 6, 5, }, /* 31 */
- { 24, 23, 13, 9, 6, 5, }, /* 32 */ /* mode G 16k */
-
- { 24, 23, 13, 9, 6, 5, }, /* 32 (31.998) */
- { 36, 31, 18, 9, 6, 5, }, /* 33 (32.983) */ /* T 16k */
-
- { 2, 0, 0, 2, 2, 0, }, /* 17 */
- { 7, 5, 2, 2, 0, 0, }, /* 21 */
- { 7, 5, 2, 2, 2, 0, }, /* 22 */
- { 9, 8, 3, 4, 2, 0, }, /* 25 */
- { 11, 9, 8, 4, 2, 0, }, /* 26 */
- { 48, 48, 34, 13, 11, 9 }, /* 36 */ /* mode AUDIO_WB 36 + 4 + 1 */
-
- { 22, 10, 3, 0, 0, 0 }, /* 17 */
- { 6, 6, 2, 2, 0, 0 }, /* 21 */
- { 6, 6, 2, 2, 2, 0 }, /* 22 */
- { 23, 10, 3, 2, 2, 0 }, /* 26 */
- { 32, 16, 3, 2, 2, 0 }, /* 27 */ /* AUDIO_NB */
- { 39, 30, 12, 2, 2, 0 }, /* 28 */ /* AUDIO_NB */
- { 11, 9, 8, 4, 2, 0, }, /* 26 */
- { 48, 48, 48, 13, 9, 8 }, /* 36 */ /* mode AUDIO_WB 16k 15-36 + 4 + 1*/
- { 8, 7, 2, 2, 0, 0, }, /* 22 (21.776) */
- { 13, 13, 5, 5, 5, 0, }, /* 28 (27.994) */
- { 18, 17, 5, 5, 5, 1, }, /* 29 (28.996) */
- { 17, 13, 5, 8, 6, 2, }, /* 30 (29.991) */
- { 23, 21, 8, 9, 8, 3, }, /* 32 (31.992) */
- { 31, 29, 16, 8, 8, 3, }, /* 33 (32.993) */
- { 31, 25, 16, 12, 8, 8, }, /* 34 (33.968) */
- { 46, 48, 18, 18, 18, 12, }, /* 37 (36.995) */ /* VOICED 16k */
- { 14, 12, 9, 2, 2, 0, }, /* 25 (24.980) */
- { 15, 13, 3, 2, 2, 0, }, /* 25 (24.974) */
- { 17, 3, 0, 2, 2, 1, }, /* 25 (24.852) */
- { 13, 10, 3, 2, 2, 2, }, /* 25 (24.994) */
- { 14, 13, 8, 2, 2, 0, }, /* 25 (24.996) */
- { 7, 3, 0, 5, 3, 1, }, /* 25 (24.671) */
- { 4, 3, 2, 6, 6, 5, }, /* 25 (24.936) */
- { 4, 2, 0, 9, 9, 3, }, /* 25 (24.955) */
- { 4, 2, 0, 9, 8, 2, }, /* 25 (24.853) */
- { 4, 2, 0, 9, 7, 6, }, /* 25 (24.881) */
- { 6, 3, 0, 6, 3, 2, }, /* 25 (24.939) */
- { 3, 2, 0, 9, 8, 5, }, /* 25 (24.996) */
- { 2, 2, 0, 15, 3, 3, }, /* 25 (24.310) */
- { 4, 2, 0, 9, 9, 3, }, /* 25 (24.955) */
- { 4, 4, 2, 7, 6, 3, }, /* 25 (24.984) */
- { 3, 2, 0, 9, 7, 6, }, /* 25 (24.866) */
-
-};
-
-const Word16 no_lead_p_fx[][MAX_NO_SCALES * 2] = // Q0
-{
-
- { 2, 1, 0, 0, 0, 0, }, /* 9 (8.464) */
- { 4, 2, 0, 2, 0, 0, }, /* 19 (18.572) */
- { 5, 5, 2, 4, 2, 0, }, /* 23 (22.959) */
- { 8, 5, 2, 4, 0, 0, }, /* 24 (23.949) */
- { 8, 8, 5, 4, 2, 0, }, /* 25 (24.992) */
- { 13, 11, 5, 5, 2, 0, }, /* 27 (26.902) */
- { 11, 10, 5, 6, 5, 2, }, /* 28 (27.996) */
- { 14, 13, 5, 7, 5, 2, }, /* 29 (28.937) */
- { 16, 13, 5, 8, 7, 2, }, /* 30 (29.954) */
- { 21, 21, 5, 8, 5, 2, }, /* 31 (30.978) */
- { 24, 21, 5, 8, 8, 4, }, /* 32 (31.978) */
- { 32, 23, 5, 13, 11, 5, }, /* 34 (33.975) */
- { 36, 31, 8, 16, 13, 5, }, /* 35 (34.975) */
- { 45, 35, 16, 18, 13, 5, }, /* 36 (35.889) */
- { 45, 35, 16, 38, 31, 8, }, /* 39 (38.488) */ /* V WB*/ /* 14 */
-
- { 2, 0, 0, 0, 0, 0, }, /* 8 (7.913) */
- { 4, 2, 0, 2, 0, 0, }, /* 19 (18.572) */
- { 8, 7, 2, 2, 2, 0, }, /* 23 (22.773) */
- { 13, 11, 5, 2, 1, 0, }, /* 24 (23.999) */
- { 8, 8, 5, 4, 2, 0, }, /* 25 (24.992) */
- { 13, 11, 5, 5, 2, 1, }, /* 27 (26.962) */
- { 13, 11, 5, 5, 5, 2, }, /* 28 (27.835) */
- { 14, 13, 5, 7, 5, 2, }, /* 29 (28.937) */
- { 23, 21, 5, 5, 5, 2, }, /* 30 (29.969) */
- { 23, 18, 5, 8, 5, 2, }, /* 31 (30.952) */
- { 24, 21, 5, 8, 8, 4, }, /* 32 (31.978) */
- { 43, 41, 13, 9, 8, 5, }, /* 34 (33.992) */
- { 43, 36, 13, 13, 10, 5, }, /* 35 (35.000) */
- { 43, 40, 13, 17, 13, 9, }, /* 36 (35.980) */
- { 43, 42, 13, 31, 30, 18, }, /* 39 (38.512) */ /* V NB*/ /* 29 */
-
- { 2, 0, 0, 1, 0, 0, }, /* 15 (14.733) */
- { 5, 4, 1, 1, 0, 0, }, /* 19 (18.745) */
- { 8, 7, 2, 2, 0, 0, }, /* 22 (21.776) */
- { 10, 9, 5, 2, 0, 0, }, /* 23 (22.791) */
- { 14, 13, 8, 2, 0, 0, }, /* 24 (23.999) */
- { 14, 13, 8, 2, 2, 0, }, /* 25 (24.996) */
- { 18, 17, 13, 2, 2, 0, }, /* 26 (25.934) */
- { 14, 13, 8, 5, 4, 0, }, /* 28 (27.969) */
- { 18, 17, 13, 5, 4, 2, }, /* 29 (28.996) */
- { 22, 21, 13, 5, 5, 2, }, /* 30 (29.988) */
- { 31, 23, 21, 5, 5, 2, }, /* 31 (30.931) */
- { 27, 23, 21, 8, 5, 2, }, /* 32 (31.987) */
- { 31, 23, 21, 9, 8, 5, }, /* 33 (32.982) */
- { 32, 31, 24, 11, 8, 5, }, /* 34 (33.967) */
- { 32, 32, 28, 13, 11, 8, }, /* 35 (34.994) */ /* G WB*/ /* 44 */
-
- { 2, 0, 0, 1, 0, 0, }, /* 15 (14.733) */
- { 5, 4, 2, 1, 0, 0, }, /* 19 (18.792) */
- { 8, 5, 2, 2, 1, 0, }, /* 22 (21.985) */
- { 8, 7, 2, 2, 2, 0, }, /* 23 (22.773) */
- { 13, 11, 2, 2, 1, 0, }, /* 24 (23.932) */
- { 16, 13, 2, 2, 2, 0, }, /* 25 (24.955) */
- { 21, 17, 2, 2, 2, 0, }, /* 26 (25.991) */
- { 13, 12, 2, 5, 5, 2, }, /* 28 (27.979) */
- { 18, 16, 2, 5, 5, 2, }, /* 29 (28.878) */
- { 23, 21, 2, 5, 5, 2, }, /* 30 (29.954) */
- { 32, 28, 2, 5, 5, 2, }, /* 31 (30.893) */
- { 38, 31, 2, 7, 5, 2, }, /* 32 (31.963) */
- { 33, 31, 2, 8, 8, 4, }, /* 33 (32.997) */
- { 42, 31, 2, 9, 9, 8, }, /* 34 (33.986) */
- { 42, 31, 2, 13, 11, 9, }, /* 35 (34.952) */ /* G NB*/ /* 59 */
-
- { 7, 5, 2, 2, 0, 0, }, /* 21 (20.910) */
- { 8, 8, 5, 4, 2, 0, }, /* 25 (24.992) */
- { 13, 8, 5, 4, 2, 0, }, /* 26 */
- { 13, 8, 5, 8, 6, 2, }, /* 29 */
- { 13, 8, 5, 9, 8, 5, }, /* 30 */
- { 48, 48, 48, 36, 36, 28 }, /* 40 */ /* mode 7 AUDIO_WB */ /* 65*/
-
- { 7, 5, 2, 2, 0, 0 }, /* 21 */
- { 13, 13, 9, 2, 2, 0 }, /* 25 */
- { 18, 18, 9, 2, 2, 0 }, /* 26 */
- { 24, 23, 10, 5, 4, 2 }, /* 30 */
- { 31, 31, 12, 5, 5, 2 }, /* 31 */ /*AUDIO_NB */ /* 70 */
- { 43, 34, 12, 5, 5, 4 }, /* 32 */ /*AUDIO_NB */ /* 71 */
- { 13, 8, 5, 9, 8, 5, }, /* 30 */
- { 48, 48, 45, 45, 31, 25 }, /* 40 */ /* mode AUDIO_WB 16k */ /* 73*/
-
- { 2, 0, 0, 2, 2, 0, }, /* 17 (16.823) */
- { 7, 5, 2, 2, 0, 0, }, /* 21 (20.910) */
- { 7, 5, 2, 2, 2, 0, }, /* 22 (21.907) */
- { 13, 11, 10, 2, 2, 0, }, /* 25 (24.863) */
- { 18, 18, 10, 2, 2, 0, }, /* 26 (25.921) */
- { 13, 9, 9, 5, 2, 0, }, /* 27 (26.837) */
- { 40, 28, 25, 18, 17, 2, }, /* 36 (35.998) */ /* INACTIVE NB*/ /* 80*/
-
- { 18, 17, 11, 0, 0, 0, }, /* 17 (16.932) */
- { 7, 5, 2, 2, 0, 0, }, /* 21 (20.910) */
- { 8, 5, 2, 2, 1, 0, }, /* 22 (21.985) */
- { 13, 13, 9, 2, 2, 0, }, /* 25 (24.845) */
- { 18, 18, 12, 2, 2, 0, }, /* 26 (25.999) */
- { 23, 23, 16, 2, 2, 0, }, /* 27 (26.981) */
- { 36, 32, 24, 17, 13, 13, }, /* 36 (35.929) */ /* INACTIVE WB */ /* 87 */
-
- { 2, 2, 0, 2, 0, 0, }, /* 17 (16.823) */
- { 7, 5, 2, 2, 0, 0, }, /* 21 (20.910) */
- { 8, 5, 2, 2, 1, 0, }, /* 22 (21.985) */
- { 13, 13, 9, 2, 2, 0, }, /* 25 (24.845) */
- { 18, 17, 13, 2, 2, 0, }, /* 26 (25.934) */
- { 23, 22, 17, 2, 2, 0, }, /* 27 (26.914) */
- { 34, 32, 24, 16, 16, 13, }, /* 36 (35.915) */ /* INACTIVE WB 16k*/ /* 94 */
-
- { 4, 2, 0, 1, 0, 0, }, /* 18 (17.479) */
- { 5, 4, 0, 1, 0, 0, }, /* 19 (18.703) */
- { 8, 7, 2, 2, 0, 0, }, /* 22 (21.776) */
- { 10, 9, 5, 2, 0, 0, }, /* 23 (22.791) */
- { 15, 13, 5, 2, 0, 0, }, /* 24 (23.999) */
- { 18, 16, 8, 5, 5, 1, }, /* 29 (28.966) */
- { 42, 32, 31, 5, 5, 2, }, /* 32 (31.990) */ /* UNVOICED NB*/ /* 100 */
-
- { 1, 0, 0, 1, 0, 0, }, /* 14 (13.640) */
- { 2, 0, 0, 1, 0, 0, }, /* 15 (14.733) */
- { 4, 2, 0, 1, 0, 0, }, /* 18 (17.479) */
- { 4, 2, 0, 2, 0, 0, }, /* 19 (18.572) */
- { 5, 4, 0, 2, 0, 0, }, /* 20 (19.796) */
- { 8, 8, 5, 4, 2, 0, }, /* 25 (24.992) */
- { 11, 10, 5, 6, 5, 2, }, /* 28 (27.996) */ /* UNVOICED WB */ /* 106 */
- { 9, 3, 0, 4, 0, 0, }, /* 24 (23.818) */
- { 18, 13, 10, 8, 3, 0, }, /* 30 (29.992) */
- { 24, 18, 10, 9, 3, 0, }, /* 31 (30.998) */
- { 32, 25, 10, 9, 3, 0, }, /* 32 (31.987) */
- { 42, 31, 10, 12, 3, 2, }, /* 34 (33.994) */
- { 44, 32, 27, 15, 3, 2, }, /* 35 (35.000) */
- { 44, 32, 25, 19, 3, 2, }, /* 36 (35.994) */
- { 48, 39, 32, 35, 15, 3, }, /* 39 (38.301) */ /* VOICED 16k */
- { 11, 10, 5, 4, 2, 0, }, /* 26 (25.917) */ /* 107 */
- { 23, 23, 17, 8, 7, 2, }, /* 32 (31.980) */
- { 32, 31, 18, 9, 7, 5, }, /* 33 (32.990) */
- { 31, 31, 18, 11, 9, 8, }, /* 34 (33.974) */
- { 32, 32, 20, 13, 12, 8, }, /* 35 (34.989) */
- { 32, 32, 23, 18, 17, 8, }, /* 36 (35.988) */
- { 32, 32, 23, 23, 22, 10, }, /* 37 (36.989) */ /* GENERIC 16k*/ /* 113 */
-
- { 2, 0, 0, 2, 0, 0, }, /* 16 (15.826) */ /* 114 */
- { 7, 5, 2, 2, 0, 0, }, /* 21 (20.910) */
- { 14, 13, 8, 2, 0, 0, }, /* 24 (23.999) */
- { 8, 8, 5, 4, 2, 0, }, /* 25 (24.992) */
- { 11, 10, 5, 4, 2, 0, }, /* 26 (25.917) */
- { 16, 13, 8, 4, 2, 0, }, /* 27 (26.883) */
- { 13, 13, 8, 5, 4, 2, }, /* 28 (27.901) */
- { 23, 18, 13, 5, 5, 2, }, /* 30 (29.916) */
- { 23, 23, 13, 7, 5, 2, }, /* 31 (30.993) */
- { 23, 23, 17, 8, 7, 2, }, /* 32 (31.980) */
- { 32, 31, 24, 8, 7, 2, }, /* 33 (32.958) */
- { 42, 32, 31, 9, 9, 4, }, /* 34 (33.987) */
- { 40, 32, 29, 12, 9, 9, }, /* 35 (34.994) */
- { 40, 32, 31, 17, 11, 11, }, /* 36 (35.968) */
- { 41, 32, 31, 20, 18, 13, }, /* 37 (36.971) */ /* GENERIC 12.8k MA*/ /* 128 */
-
- { 11, 10, 5, 4, 2, 0, }, /* 26 (25.917) */ /* 129 */
- { 23, 23, 17, 8, 7, 2, }, /* 32 (31.980) */
- { 31, 31, 18, 9, 8, 2, }, /* 33 (32.995) */
- { 48, 32, 24, 9, 8, 3, }, /* 34 (33.993) */
- { 48, 32, 28, 11, 10, 3, }, /* 35 (34.992) */
- { 48, 37, 32, 16, 12, 4, }, /* 36 (35.997) */
- { 48, 37, 32, 18, 17, 12, }, /* 37 (36.961) */ /* AUDIO 16k */
-};
-
-/*----------------------------------------------------------------------------------*
- * Enhacer - 2.0 - 6.4 kHz impulse response with phase dispersion in freq. domain
- *----------------------------------------------------------------------------------*/
-const Word16 low_H[64] = /* (1Q14) */
-{
- 16388, 16380, 16386, 16381, 16382, 16382, 16381, 16383, 16385, 10265,
- 10154, 9894, 14051, 16342, -531, 13216, 16372, 15509, 9406, 15948,
- 4726, 14593, 10404, 9795, -16337, -1815, -10624, 12646, 14555, -12684,
- 11388, 8175, 16382, -14198, 11781, 10378, 7515, 10423, -12473, 16284,
- -1200, -13137, 12658, -7446, 15683, -3764, -13419, -5281, 521, -9686,
- -16375, -1219, 8435, -13059, -12862, -12775, -1, 2, 0, -3,
- -1, -1, -2, 1
-};
-
-const Word16 low_H16k[80] = /* (1Q14) */
-{
- 16388, 16380, 16386, 16381, 16382, 16382, 16381, 16383, 16385, 10265,
- 10154, 9894, 14051, 16342, -531, 13216, 16372, 15509, 9406, 15948,
- 4726, 14593, 10404, 9795, -16337, -1815, -10624, 12646, 14555, -12684,
- 11388, 8175, -4121, -13408, 10605, -12308, 16358, 4699, 7640, -7360,
- 16382, -14639, -14494, 15695, -907, -10815, -12489, 9416, 15857,
- -14198, 11781, 10378, 7515, 10423, -12473, 16284, -1200, -13137, 12658,
- -7446, 15683, -3764, -13419, -5281, 521, -9686, -16375, -1219, 8435,
- -13059, -12862, -12775, -1, 2, 0, -3, -1, -1, -2, 1
-};
-/*----------------------------------------------------------------------------------*
- * Enhancer - 3.2 - 6.4 kHz impulse response with phase dispersion in freq. domain
- *----------------------------------------------------------------------------------*/
-
-const Word16 mid_H[64] = /* (1Q14) */
-{
- 16382, 16381, 16384, 16384, 16385, 16387, 16386, 16382, 16387, 16382,
- 16385, 16385, 16385, 16384, 16382, 16388, 14847, 9629, 13248, 14486,
- 10995, 642, 13817, 13779, 6468, 8664, 11634, 9780, -14636, -982,
- 11746, -722, 16385, -16366, -11423, 16354, 7362, 13147, -11538, -13904,
- -15052, -8862, 8811, -16371, -12146, 7660, -9638, -13254, -6923, 3,
- -5, -2, -6, 1, 6, 5, -8, -2, 3, -5,
- 0, -2, -4, 3
-};
-
-const Word16 mid_H16k[80] = /* (1Q14) */
-{
- 16382, 16381, 16384, 16384, 16385, 16387, 16386, 16382, 16387, 16382,
- 16385, 16385, 16385, 16384, 16382, 16388, 14847, 9629, 13248, 14486,
- 10995, 642, 13817, 13779, 6468, 8664, 11634, 9780, -14636, -982,
- 11746, -722, 108, -16195, -13199, -13289, 5114, 12941, 7110, 8873,
- 16385, -13774, -14761, 10047, -15566, -9584, 9707, 2483, 16383,
- -16366, -11423, 16354, 7362, 13147, -11538, -13904, -15052, -8862,
- 8811, -16371, -12146, 7660, -9638, -13254, -6923, 3, -5, -2, -6,
- 1, 6, 5, -8, -2, 3, -5, 0, -2, -4, 3
-};
-
-/*-------------------------------------------------------------------*
- * Low-pass FIR filter for low-freq post-filtering
- * response : 0dB @ 50Hz, -6dB @ 500Hz, -45dB @ 1kHz)
- * filter parameters: fs/2=8000, fc=500, gain=1.0, n=16
- *-------------------------------------------------------------------*/
-
-/*-------------------------------------------------------------------*
- * Bass post-filter
- *-------------------------------------------------------------------*/
-
-/* For bass post filter */
-const Word16 filt_lp_fx[1 + L_FILT] =
-{
- 2892/*0.088250f Q15*/, 2831/*0.086410f Q15*/, 2657/*0.081074f Q15*/, 2384/*0.072768f Q15*/,
- 2041/*0.062294f Q15*/, 1659/*0.050623f Q15*/, 1271/*0.038774f Q15*/, 907/*0.027692f Q15*/,
- 594/*0.018130f Q15*/, 347/*0.010578f Q15*/, 171/*0.005221f Q15*/, 64/*0.001946f Q15*/,
- 13/*0.000385f Q15*/
-};
-
-const Word16 filt_lp_16kHz_fx[1 + L_FILT16k] =
-{
- 2340/*0.071410f Q15*/, 2308/*0.070433f Q15*/, 2214/*0.067568f Q15*/, 2064/*0.062999f Q15*/,
- 1868/*0.057020f Q15*/, 1639/*0.050005f Q15*/, 1389/*0.042378f Q15*/, 1133/*0.034577f Q15*/,
- 885/*0.027022f Q15*/, 658/*0.020078f Q15*/, 460/*0.014031f Q15*/, 297/*0.009070f Q15*/,
- 173/*0.005276f Q15*/, 86/*0.002625f Q15*/, 33/*0.000999f Q15*/, 7/*0.000205f Q15*/
-};
-
-/*-------------------------------------------------------------------*
- * Pulse indexing tables for ACELP innovation coding
- *-------------------------------------------------------------------*/
-
-const Word32 PI_select_table[23][8] = // Q0
-{
- {1, 0, 0, 0, 0, 0, 0, 0},
- {1, 1, 0, 0, 0, 0, 0, 0},
- {1, 2, 1, 0, 0, 0, 0, 0},
- {1, 3, 3, 1, 0, 0, 0, 0},
- {1, 4, 6, 4, 1, 0, 0, 0},
- {1, 5, 10, 10, 5, 1, 0, 0},
- {1, 6, 15, 20, 15, 6, 1, 0},
- {1, 7, 21, 35, 35, 21, 7, 1},
- {1, 8, 28, 56, 70, 56, 28, 8},
- {1, 9, 36, 84, 126, 126, 84, 36},
- {1, 10, 45, 120, 210, 252, 210, 120},
- {1, 11, 55, 165, 330, 462, 462, 330},
- {1, 12, 66, 220, 495, 792, 924, 792},
- {1, 13, 78, 286, 715, 1287, 1716, 1716},
- {1, 14, 91, 364, 1001, 2002, 3003, 3432},
- {1, 15, 105, 455, 1365, 3003, 5005, 6435},
- {1, 16, 120, 560, 1820, 4368, 8008, 11440},
- {1, 17, 136, 680, 2380, 6188, 12376, 19448},
- {1, 18, 153, 816, 3060, 8568, 18564, 31824},
- {1, 19, 171, 969, 3876, 11628, 27132, 50388},
- {1, 20, 190, 1140, 4845, 15504, 38760, 77520},
- {1, 21, 210, 1330, 5985, 20349, 54264, 116280},
- {1, 22, 231, 1540, 7315, 26334, 74613, 1705444}
-};
-
-const Word32 PI_offset[8][8] = // Q0
-{
- /* for 0p(0). */
- {0x00000,0x00000,0x00000,0x00000,0x00000,0x00000,0x00000,0x00000},
- /* for 1p(1). */
- {0x00000,0x00000,0x00000,0x00000,0x00000,0x00000,0x00000,0x00000},
- /* for 2p(2,1). */
- {0x00000,0x00000,0x00000,0x00000,0x00000,0x00000,0x00000,0x00000},
- /* for 3p(3,2,1). */
- {0x00000,0x00000,0x01180,0x01540,0x00000,0x00000,0x00000,0x00000},
- /* for 4p(4,3,2,1). */
- {0x00000,0x00000,0x071C0,0x0A640,0x0ABE0,0x00000,0x00000,0x00000},
- /* for 5p(5,4,3,2,1). */
- {0x00000,0x00000,0x22200,0x3E900,0x45200,0x45980,0x00000,0x00000},
- /* for 6p(6,5,4,3,2,1). */
- {0x00000,0x00000,0x07d200,0x127c00,0x16ed80,0x179c80,0x17a5e0,0x00000},
- /* for 7p(7,6,5,4,3,2,1). */
- {0x00000,0x00000,0x165800,0x454400,0x654200,0x6E2500,0x6F2B80,0x6F36C0}
-};
-
-const Word16 PI_factor[7] = {0,0,120,560,1820,4368,8008}; // Q0
-
-/* ACELP pulse coding */
-const Word16 hi_to_low_tmpl[10] = { 0, 0, 0, 3, 9, 5, 3, 1, 8, 8 }; // Q0
-const UWord16 low_len[10] = { 0, 0, 8, 5, 7,11,13,15,16,16 }; // Q0
-const UWord16 low_mask[10] = { 0, 0, 255,31,127,2047,8191,32767,65535,65535 }; // Q0
-const UWord16 indx_fact[10] = { 0, 0,2,172,345,140,190,223,463,1732 }; // Q0
-const Word16 index_len[3] = { 0, 5, 9 }; // Q0
-const Word16 index_mask_ACELP[3] = { 0, 31, 511 }; // Q0
-
-
-/*------------------------------------------------------------------------------*
- * EDCT tables
- *------------------------------------------------------------------------------*/
-
-//Fix
-const Word16 edct_table_80_fx[80] = /*Q16 */
-{
- 21911, 21903, 21886, 21860, 21827, 21784, 21734, 21675,
- 21608, 21532, 21448, 21356, 21255, 21147, 21030, 20905,
- 20772, 20631, 20482, 20325, 20161, 19988, 19808, 19621,
- 19425, 19222, 19012, 18795, 18570, 18338, 18099, 17853,
- 17600, 17340, 17074, 16801, 16522, 16236, 15944, 15646,
- 15341, 15031, 14715, 14394, 14067, 13734, 13396, 13053,
- 12705, 12352, 11994, 11632, 11265, 10894, 10519, 10139,
- 9756, 9369, 8978, 8584, 8186, 7786, 7382, 6975,
- 6566, 6155, 5741, 5324, 4906, 4486, 4064, 3640,
- 3215, 2789, 2362, 1934, 1505, 1075, 645, 215
-};
-
-const Word16 edct_table_100_fx[] =
-{/*Q16 */
- 20723, 20718, 20708, 20692, 20672, 20646, 20616, 20580,
- 20539, 20493, 20442, 20386, 20325, 20259, 20188, 20112,
- 20031, 19946, 19855, 19759, 19658, 19553, 19443, 19328,
- 19208, 19083, 18954, 18820, 18681, 18538, 18390, 18238,
- 18081, 17920, 17754, 17584, 17410, 17231, 17048, 16861,
- 16670, 16474, 16275, 16071, 15864, 15652, 15437, 15218,
- 14995, 14768, 14538, 14304, 14067, 13826, 13582, 13335,
- 13084, 12830, 12573, 12312, 12049, 11783, 11513, 11241,
- 10966, 10689, 10409, 10126, 9841, 9553, 9263, 8971,
- 8676, 8379, 8081, 7780, 7477, 7173, 6867, 6559,
- 6249, 5938, 5625, 5311, 4996, 4679, 4362, 4043,
- 3723, 3403, 3081, 2759, 2436, 2112, 1788, 1464,
- 1139, 814, 488, 163
-};
-
-const Word16 edct_table_120_fx[120] = /*Q16 */
-{
- 19800, 19797, 19790, 19780, 19766, 19749, 19729, 19705,
- 19678, 19648, 19614, 19576, 19536, 19492, 19445, 19394,
- 19340, 19283, 19223, 19159, 19092, 19021, 18948, 18871,
- 18791, 18708, 18621, 18531, 18438, 18342, 18243, 18141,
- 18035, 17927, 17815, 17701, 17583, 17462, 17339, 17212,
- 17082, 16950, 16815, 16676, 16535, 16391, 16244, 16095,
- 15942, 15787, 15629, 15469, 15306, 15140, 14972, 14801,
- 14628, 14452, 14273, 14092, 13909, 13723, 13535, 13345,
- 13152, 12958, 12761, 12561, 12360, 12156, 11951, 11743,
- 11533, 11322, 11108, 10893, 10675, 10456, 10235, 10012,
- 9788, 9562, 9334, 9104, 8874, 8641, 8407, 8172,
- 7935, 7697, 7457, 7217, 6975, 6732, 6487, 6242,
- 5995, 5748, 5499, 5250, 4999, 4748, 4496, 4243,
- 3990, 3736, 3481, 3225, 2969, 2713, 2456, 2199,
- 1941, 1683, 1424, 1166, 907, 648, 389, 130
-};
-
-const Word16 edct_table_320_fx[320] = /*Q16 */
-{
- 15495, 15495, 15494, 15493, 15491, 15489, 15487, 15484,
- 15481, 15478, 15474, 15470, 15466, 15461, 15456, 15450,
- 15444, 15438, 15431, 15424, 15417, 15409, 15401, 15392,
- 15383, 15374, 15364, 15354, 15344, 15333, 15322, 15310,
- 15298, 15286, 15273, 15260, 15247, 15233, 15219, 15205,
- 15190, 15175, 15159, 15143, 15127, 15110, 15093, 15076,
- 15058, 15040, 15021, 15002, 14983, 14964, 14944, 14924,
- 14903, 14882, 14860, 14839, 14817, 14794, 14771, 14748,
- 14725, 14701, 14677, 14652, 14627, 14602, 14576, 14550,
- 14524, 14497, 14470, 14443, 14415, 14387, 14359, 14330,
- 14301, 14271, 14242, 14212, 14181, 14150, 14119, 14088,
- 14056, 14024, 13991, 13958, 13925, 13891, 13858, 13823,
- 13789, 13754, 13719, 13683, 13647, 13611, 13575, 13538,
- 13501, 13463, 13425, 13387, 13349, 13310, 13271, 13231,
- 13192, 13152, 13111, 13071, 13030, 12988, 12947, 12905,
- 12862, 12820, 12777, 12734, 12690, 12647, 12602, 12558,
- 12513, 12468, 12423, 12377, 12331, 12285, 12239, 12192,
- 12145, 12098, 12050, 12002, 11954, 11905, 11856, 11807,
- 11758, 11708, 11658, 11608, 11557, 11507, 11455, 11404,
- 11352, 11301, 11248, 11196, 11143, 11090, 11037, 10983,
- 10930, 10876, 10821, 10767, 10712, 10657, 10601, 10546,
- 10490, 10434, 10378, 10321, 10264, 10207, 10150, 10092,
- 10034, 9976, 9918, 9859, 9800, 9741, 9682, 9623,
- 9563, 9503, 9443, 9382, 9322, 9261, 9200, 9138,
- 9077, 9015, 8953, 8891, 8829, 8766, 8703, 8640,
- 8577, 8513, 8450, 8386, 8322, 8258, 8193, 8129,
- 8064, 7999, 7933, 7868, 7802, 7737, 7671, 7604,
- 7538, 7471, 7405, 7338, 7271, 7203, 7136, 7068,
- 7001, 6933, 6865, 6796, 6728, 6659, 6591, 6522,
- 6453, 6383, 6314, 6244, 6175, 6105, 6035, 5965,
- 5895, 5824, 5754, 5683, 5612, 5541, 5470, 5399,
- 5327, 5256, 5184, 5113, 5041, 4969, 4897, 4824,
- 4752, 4680, 4607, 4534, 4462, 4389, 4316, 4243,
- 4169, 4096, 4023, 3949, 3876, 3802, 3728, 3654,
- 3580, 3506, 3432, 3358, 3284, 3209, 3135, 3060,
- 2986, 2911, 2836, 2761, 2687, 2612, 2537, 2462,
- 2386, 2311, 2236, 2161, 2085, 2010, 1934, 1859,
- 1783, 1708, 1632, 1557, 1481, 1405, 1329, 1254,
- 1178, 1102, 1026, 950, 874, 798, 722, 646,
- 570, 494, 418, 342, 266, 190, 114, 38
-};
-
-const Word16 edct_table_480_fx[480] = /*Q16 */
-{
- 14001, 14001, 14001, 14000, 14000, 13999, 13998, 13997,
- 13996, 13995, 13993, 13991, 13990, 13988, 13986, 13983,
- 13981, 13978, 13976, 13973, 13970, 13967, 13963, 13960,
- 13956, 13953, 13949, 13945, 13940, 13936, 13932, 13927,
- 13922, 13917, 13912, 13907, 13902, 13896, 13890, 13885,
- 13879, 13872, 13866, 13860, 13853, 13846, 13840, 13833,
- 13825, 13818, 13811, 13803, 13795, 13787, 13779, 13771,
- 13763, 13754, 13746, 13737, 13728, 13719, 13709, 13700,
- 13691, 13681, 13671, 13661, 13651, 13641, 13630, 13620,
- 13609, 13598, 13587, 13576, 13565, 13553, 13542, 13530,
- 13518, 13506, 13494, 13482, 13469, 13457, 13444, 13431,
- 13418, 13405, 13392, 13378, 13365, 13351, 13337, 13323,
- 13309, 13295, 13280, 13266, 13251, 13236, 13221, 13206,
- 13191, 13175, 13160, 13144, 13128, 13112, 13096, 13080,
- 13063, 13047, 13030, 13013, 12996, 12979, 12962, 12944,
- 12927, 12909, 12891, 12873, 12855, 12837, 12819, 12800,
- 12782, 12763, 12744, 12725, 12706, 12686, 12667, 12647,
- 12628, 12608, 12588, 12568, 12547, 12527, 12506, 12486,
- 12465, 12444, 12423, 12402, 12380, 12359, 12337, 12316,
- 12294, 12272, 12250, 12227, 12205, 12182, 12160, 12137,
- 12114, 12091, 12068, 12045, 12021, 11998, 11974, 11950,
- 11926, 11902, 11878, 11854, 11829, 11804, 11780, 11755,
- 11730, 11705, 11680, 11654, 11629, 11603, 11578, 11552,
- 11526, 11500, 11474, 11447, 11421, 11394, 11368, 11341,
- 11314, 11287, 11260, 11232, 11205, 11177, 11150, 11122,
- 11094, 11066, 11038, 11010, 10981, 10953, 10924, 10895,
- 10867, 10838, 10809, 10779, 10750, 10721, 10691, 10662,
- 10632, 10602, 10572, 10542, 10512, 10481, 10451, 10420,
- 10390, 10359, 10328, 10297, 10266, 10235, 10203, 10172,
- 10140, 10109, 10077, 10045, 10013, 9981, 9949, 9917,
- 9884, 9852, 9819, 9786, 9754, 9721, 9688, 9654,
- 9621, 9588, 9554, 9521, 9487, 9454, 9420, 9386,
- 9352, 9318, 9283, 9249, 9214, 9180, 9145, 9111,
- 9076, 9041, 9006, 8971, 8935, 8900, 8865, 8829,
- 8794, 8758, 8722, 8686, 8650, 8614, 8578, 8542,
- 8505, 8469, 8432, 8396, 8359, 8322, 8285, 8248,
- 8211, 8174, 8137, 8099, 8062, 8025, 7987, 7949,
- 7912, 7874, 7836, 7798, 7760, 7721, 7683, 7645,
- 7606, 7568, 7529, 7491, 7452, 7413, 7374, 7335,
- 7296, 7257, 7218, 7178, 7139, 7100, 7060, 7020,
- 6981, 6941, 6901, 6861, 6821, 6781, 6741, 6701,
- 6661, 6620, 6580, 6539, 6499, 6458, 6418, 6377,
- 6336, 6295, 6254, 6213, 6172, 6131, 6090, 6048,
- 6007, 5966, 5924, 5883, 5841, 5799, 5758, 5716,
- 5674, 5632, 5590, 5548, 5506, 5464, 5422, 5379,
- 5337, 5295, 5252, 5210, 5167, 5124, 5082, 5039,
- 4996, 4953, 4911, 4868, 4825, 4782, 4738, 4695,
- 4652, 4609, 4566, 4522, 4479, 4435, 4392, 4348,
- 4305, 4261, 4218, 4174, 4130, 4086, 4042, 3999,
- 3955, 3911, 3867, 3823, 3778, 3734, 3690, 3646,
- 3602, 3557, 3513, 3469, 3424, 3380, 3335, 3291,
- 3246, 3202, 3157, 3112, 3068, 3023, 2978, 2933,
- 2889, 2844, 2799, 2754, 2709, 2664, 2619, 2574,
- 2529, 2484, 2439, 2394, 2349, 2303, 2258, 2213,
- 2168, 2122, 2077, 2032, 1986, 1941, 1896, 1850,
- 1805, 1759, 1714, 1668, 1623, 1577, 1532, 1486,
- 1441, 1395, 1350, 1304, 1258, 1213, 1167, 1121,
- 1076, 1030, 984, 939, 893, 847, 801, 756,
- 710, 664, 618, 573, 527, 481, 435, 389,
- 344, 298, 252, 206, 160, 115, 69, 23
-};
-
-const Word16 edct_table_600_fx[] =/*Q16 */
-{
- 26483, 26483, 26483, 26482, 26481, 26481, 26479, 26478,
- 26477, 26475, 26473, 26471, 26469, 26467, 26464, 26461,
- 26459, 26455, 26452, 26449, 26445, 26441, 26437, 26433,
- 26429, 26424, 26420, 26415, 26410, 26404, 26399, 26393,
- 26387, 26381, 26375, 26369, 26362, 26356, 26349, 26342,
- 26335, 26327, 26320, 26312, 26304, 26296, 26287, 26279,
- 26270, 26261, 26252, 26243, 26234, 26224, 26214, 26204,
- 26194, 26184, 26173, 26163, 26152, 26141, 26130, 26118,
- 26107, 26095, 26083, 26071, 26059, 26046, 26033, 26021,
- 26008, 25994, 25981, 25968, 25954, 25940, 25926, 25912,
- 25897, 25883, 25868, 25853, 25838, 25823, 25807, 25791,
- 25776, 25760, 25743, 25727, 25711, 25694, 25677, 25660,
- 25643, 25625, 25608, 25590, 25572, 25554, 25535, 25517,
- 25498, 25480, 25461, 25441, 25422, 25403, 25383, 25363,
- 25343, 25323, 25302, 25282, 25261, 25240, 25219, 25198,
- 25176, 25155, 25133, 25111, 25089, 25067, 25044, 25022,
- 24999, 24976, 24953, 24929, 24906, 24882, 24858, 24834,
- 24810, 24786, 24761, 24737, 24712, 24687, 24662, 24636,
- 24611, 24585, 24559, 24533, 24507, 24481, 24454, 24427,
- 24401, 24373, 24346, 24319, 24291, 24264, 24236, 24208,
- 24180, 24151, 24123, 24094, 24065, 24036, 24007, 23978,
- 23948, 23918, 23888, 23858, 23828, 23798, 23767, 23737,
- 23706, 23675, 23644, 23612, 23581, 23549, 23518, 23486,
- 23453, 23421, 23389, 23356, 23323, 23290, 23257, 23224,
- 23191, 23157, 23123, 23090, 23056, 23021, 22987, 22953,
- 22918, 22883, 22848, 22813, 22778, 22742, 22707, 22671,
- 22635, 22599, 22563, 22526, 22490, 22453, 22416, 22379,
- 22342, 22305, 22267, 22230, 22192, 22154, 22116, 22078,
- 22039, 22001, 21962, 21923, 21884, 21845, 21806, 21766,
- 21727, 21687, 21647, 21607, 21567, 21527, 21486, 21446,
- 21405, 21364, 21323, 21282, 21241, 21199, 21157, 21116,
- 21074, 21032, 20989, 20947, 20905, 20862, 20819, 20776,
- 20733, 20690, 20647, 20603, 20560, 20516, 20472, 20428,
- 20384, 20339, 20295, 20250, 20205, 20161, 20116, 20070,
- 20025, 19980, 19934, 19888, 19842, 19796, 19750, 19704,
- 19658, 19611, 19565, 19518, 19471, 19424, 19377, 19329,
- 19282, 19234, 19186, 19139, 19091, 19042, 18994, 18946,
- 18897, 18849, 18800, 18751, 18702, 18653, 18604, 18554,
- 18505, 18455, 18405, 18355, 18305, 18255, 18205, 18154,
- 18104, 18053, 18002, 17951, 17900, 17849, 17798, 17747,
- 17695, 17643, 17592, 17540, 17488, 17436, 17383, 17331,
- 17278, 17226, 17173, 17120, 17067, 17014, 16961, 16908,
- 16854, 16801, 16747, 16693, 16640, 16586, 16531, 16477,
- 16423, 16368, 16314, 16259, 16204, 16149, 16094, 16039,
- 15984, 15929, 15873, 15818, 15762, 15706, 15650, 15595,
- 15538, 15482, 15426, 15370, 15313, 15256, 15200, 15143,
- 15086, 15029, 14972, 14914, 14857, 14800, 14742, 14684,
- 14627, 14569, 14511, 14453, 14395, 14336, 14278, 14220,
- 14161, 14103, 14044, 13985, 13926, 13867, 13808, 13749,
- 13689, 13630, 13570, 13511, 13451, 13391, 13332, 13272,
- 13212, 13151, 13091, 13031, 12971, 12910, 12849, 12789,
- 12728, 12667, 12606, 12545, 12484, 12423, 12362, 12300,
- 12239, 12177, 12116, 12054, 11992, 11930, 11868, 11806,
- 11744, 11682, 11620, 11558, 11495, 11433, 11370, 11307,
- 11245, 11182, 11119, 11056, 10993, 10930, 10867, 10803,
- 10740, 10677, 10613, 10550, 10486, 10422, 10358, 10295,
- 10231, 10167, 10103, 10039, 9974, 9910, 9846, 9781,
- 9717, 9652, 9588, 9523, 9458, 9394, 9329, 9264,
- 9199, 9134, 9069, 9003, 8938, 8873, 8808, 8742,
- 8677, 8611, 8546, 8480, 8414, 8348, 8283, 8217,
- 8151, 8085, 8019, 7953, 7886, 7820, 7754, 7688,
- 7621, 7555, 7488, 7422, 7355, 7289, 7222, 7155,
- 7088, 7022, 6955, 6888, 6821, 6754, 6687, 6620,
- 6553, 6485, 6418, 6351, 6283, 6216, 6149, 6081,
- 6014, 5946, 5879, 5811, 5743, 5676, 5608, 5540,
- 5472, 5404, 5337, 5269, 5201, 5133, 5065, 4997,
- 4928, 4860, 4792, 4724, 4656, 4587, 4519, 4451,
- 4382, 4314, 4246, 4177, 4109, 4040, 3972, 3903,
- 3834, 3766, 3697, 3629, 3560, 3491, 3422, 3354,
- 3285, 3216, 3147, 3078, 3009, 2941, 2872, 2803,
- 2734, 2665, 2596, 2527, 2458, 2389, 2320, 2251,
- 2182, 2112, 2043, 1974, 1905, 1836, 1767, 1697,
- 1628, 1559, 1490, 1421, 1351, 1282, 1213, 1144,
- 1074, 1005, 936, 867, 797, 728, 659, 589,
- 520, 451, 381, 312, 243, 173, 104, 35
-};
-
-const Word16 edct_table_128_fx[128] = /*Q16 */
-{
- 19483, 19480, 19474, 19466, 19454, 19439, 19422, 19401,
- 19378, 19351, 19322, 19290, 19255, 19217, 19176, 19132,
- 19086, 19036, 18984, 18928, 18870, 18809, 18746, 18679,
- 18610, 18537, 18462, 18385, 18304, 18221, 18135, 18046,
- 17954, 17860, 17763, 17664, 17561, 17457, 17349, 17239,
- 17126, 17011, 16893, 16773, 16650, 16524, 16396, 16266,
- 16133, 15998, 15860, 15720, 15578, 15433, 15286, 15137,
- 14985, 14831, 14675, 14516, 14356, 14193, 14028, 13861,
- 13692, 13521, 13348, 13173, 12996, 12816, 12635, 12452,
- 12268, 12081, 11892, 11702, 11510, 11316, 11121, 10924,
- 10725, 10524, 10322, 10119, 9914, 9707, 9499, 9290,
- 9079, 8867, 8653, 8438, 8222, 8005, 7786, 7566,
- 7345, 7123, 6900, 6676, 6451, 6225, 5998, 5770,
- 5541, 5312, 5081, 4850, 4618, 4385, 4152, 3918,
- 3684, 3449, 3213, 2977, 2741, 2504, 2266, 2029,
- 1791, 1552, 1314, 1075, 837, 598, 359, 120
-};
-
-const Word16 edct_table_160_fx[160] = /*Q16 */
-{
- 18426, 18425, 18421, 18416, 18409, 18400, 18389, 18377,
- 18362, 18346, 18329, 18309, 18288, 18265, 18240, 18214,
- 18185, 18155, 18123, 18090, 18055, 18018, 17979, 17938,
- 17896, 17852, 17806, 17759, 17710, 17659, 17607, 17552,
- 17497, 17439, 17380, 17319, 17256, 17192, 17126, 17058,
- 16989, 16918, 16846, 16772, 16696, 16619, 16540, 16459,
- 16377, 16293, 16208, 16121, 16033, 15943, 15851, 15758,
- 15664, 15568, 15470, 15371, 15271, 15169, 15065, 14960,
- 14854, 14746, 14637, 14527, 14415, 14301, 14186, 14070,
- 13953, 13834, 13714, 13592, 13469, 13345, 13220, 13093,
- 12965, 12836, 12706, 12574, 12441, 12307, 12172, 12036,
- 11898, 11759, 11620, 11479, 11337, 11193, 11049, 10904,
- 10758, 10610, 10462, 10312, 10162, 10011, 9858, 9705,
- 9551, 9395, 9239, 9082, 8925, 8766, 8606, 8446,
- 8285, 8123, 7960, 7797, 7632, 7467, 7301, 7135,
- 6968, 6800, 6632, 6463, 6293, 6122, 5952, 5780,
- 5608, 5435, 5262, 5089, 4915, 4740, 4565, 4389,
- 4214, 4037, 3861, 3684, 3506, 3328, 3150, 2972,
- 2793, 2614, 2435, 2256, 2076, 1896, 1716, 1536,
- 1356, 1175, 994, 814, 633, 452, 271, 90
-};
-
-const Word16 edct_table_40_fx[40] = /*Q16 */
-{
- 26049, 26009, 25928, 25808, 25648, 25448, 25210, 24932,
- 24616, 24262, 23870, 23442, 22977, 22477, 21943, 21375,
- 20773, 20140, 19475, 18781, 18058, 17306, 16528, 15725,
- 14897, 14047, 13174, 12282, 11370, 10441, 9496, 8536,
- 7563, 6578, 5584, 4580, 3570, 2554, 1534, 512
-};
-
-const Word16 edct_table_20_fx[20] = /*Q16 */
-{
- 30939, 30749, 30368, 29801, 29049, 28119, 27015, 25745,
- 24316, 22737, 21018, 19169, 17202, 15129, 12963, 10717,
- 8405, 6041, 3639, 1216
-};
-
-
-const Word16 edct_table_64_fx[] =/*Q16 */
-{
- 23167, 23153, 23125, 23083, 23027, 22958, 22874, 22777,
- 22666, 22542, 22403, 22252, 22087, 21908, 21717, 21512,
- 21295, 21064, 20821, 20565, 20297, 20017, 19725, 19420,
- 19105, 18777, 18438, 18089, 17728, 17356, 16975, 16582,
- 16180, 15769, 15347, 14917, 14477, 14029, 13572, 13107,
- 12634, 12154, 11666, 11171, 10670, 10162, 9648, 9128,
- 8603, 8072, 7537, 6997, 6453, 5905, 5353, 4798,
- 4241, 3681, 3118, 2554, 1988, 1421, 853, 284
-};
-
-
-const Word16 edct_table_200_fx[] =/*Q16 */
-{
- 17427, 17426, 17423, 17420, 17416, 17411, 17404, 17397,
- 17388, 17378, 17368, 17356, 17343, 17329, 17314, 17298,
- 17281, 17262, 17243, 17223, 17201, 17179, 17155, 17131,
- 17105, 17079, 17051, 17022, 16992, 16961, 16929, 16896,
- 16862, 16827, 16791, 16754, 16716, 16676, 16636, 16595,
- 16553, 16509, 16465, 16420, 16373, 16326, 16278, 16228,
- 16178, 16126, 16074, 16021, 15966, 15911, 15855, 15797,
- 15739, 15680, 15620, 15558, 15496, 15433, 15369, 15304,
- 15238, 15171, 15103, 15035, 14965, 14894, 14823, 14751,
- 14677, 14603, 14528, 14452, 14375, 14297, 14218, 14139,
- 14058, 13977, 13895, 13812, 13728, 13643, 13558, 13471,
- 13384, 13296, 13207, 13117, 13027, 12935, 12843, 12750,
- 12657, 12562, 12467, 12371, 12274, 12177, 12078, 11979,
- 11880, 11779, 11678, 11576, 11473, 11370, 11266, 11161,
- 11055, 10949, 10843, 10735, 10627, 10518, 10409, 10299,
- 10188, 10076, 9964, 9852, 9739, 9625, 9510, 9395,
- 9280, 9164, 9047, 8930, 8812, 8694, 8575, 8455,
- 8335, 8215, 8094, 7973, 7851, 7728, 7605, 7482,
- 7358, 7234, 7109, 6984, 6858, 6732, 6606, 6479,
- 6352, 6224, 6096, 5967, 5839, 5710, 5580, 5450,
- 5320, 5190, 5059, 4928, 4796, 4664, 4532, 4400,
- 4268, 4135, 4002, 3868, 3735, 3601, 3467, 3333,
- 3198, 3064, 2929, 2794, 2659, 2523, 2388, 2252,
- 2116, 1980, 1844, 1708, 1572, 1436, 1299, 1163,
- 1026, 889, 753, 616, 479, 342, 205, 68
-};
-
-const Word16 edct_table_240_fx[] =/*Q16 */
-{
- 16650, 16650, 16648, 16646, 16643, 16640, 16635, 16630,
- 16625, 16618, 16611, 16603, 16595, 16585, 16575, 16565,
- 16553, 16541, 16528, 16515, 16501, 16486, 16470, 16454,
- 16437, 16419, 16401, 16381, 16362, 16341, 16320, 16298,
- 16275, 16252, 16228, 16203, 16178, 16151, 16125, 16097,
- 16069, 16040, 16010, 15980, 15949, 15918, 15885, 15852,
- 15819, 15784, 15749, 15713, 15677, 15640, 15602, 15564,
- 15525, 15485, 15445, 15404, 15362, 15320, 15277, 15233,
- 15189, 15144, 15098, 15052, 15005, 14957, 14909, 14860,
- 14811, 14761, 14710, 14659, 14607, 14554, 14501, 14447,
- 14392, 14337, 14282, 14225, 14168, 14111, 14053, 13994,
- 13934, 13874, 13814, 13753, 13691, 13629, 13566, 13502,
- 13438, 13374, 13309, 13243, 13176, 13109, 13042, 12974,
- 12905, 12836, 12767, 12696, 12626, 12554, 12482, 12410,
- 12337, 12264, 12190, 12115, 12040, 11965, 11889, 11812,
- 11735, 11657, 11579, 11501, 11422, 11342, 11262, 11182,
- 11101, 11019, 10937, 10855, 10772, 10689, 10605, 10521,
- 10436, 10351, 10265, 10179, 10093, 10006, 9919, 9831,
- 9743, 9654, 9565, 9476, 9386, 9296, 9205, 9114,
- 9023, 8931, 8839, 8746, 8653, 8560, 8466, 8372,
- 8278, 8183, 8088, 7993, 7897, 7801, 7704, 7608,
- 7511, 7413, 7315, 7217, 7119, 7020, 6921, 6822,
- 6723, 6623, 6523, 6422, 6321, 6221, 6119, 6018,
- 5916, 5814, 5712, 5609, 5507, 5404, 5300, 5197,
- 5093, 4990, 4885, 4781, 4677, 4572, 4467, 4362,
- 4257, 4151, 4046, 3940, 3834, 3728, 3622, 3515,
- 3408, 3302, 3195, 3088, 2981, 2873, 2766, 2658,
- 2551, 2443, 2335, 2227, 2119, 2011, 1903, 1795,
- 1686, 1578, 1469, 1361, 1252, 1143, 1035, 926,
- 817, 708, 599, 490, 381, 272, 163, 54
-};
-
-const Word16 edct_table_256_fx[] =/*Q16 */
-{
- 16384, 16383, 16382, 16380, 16378, 16375, 16371, 16367,
- 16362, 16356, 16350, 16343, 16336, 16328, 16319, 16310,
- 16300, 16290, 16278, 16267, 16254, 16242, 16228, 16214,
- 16199, 16184, 16168, 16151, 16134, 16116, 16098, 16079,
- 16059, 16039, 16018, 15997, 15975, 15952, 15929, 15905,
- 15881, 15856, 15830, 15804, 15777, 15750, 15722, 15693,
- 15664, 15634, 15604, 15573, 15541, 15509, 15476, 15443,
- 15409, 15375, 15340, 15304, 15268, 15231, 15194, 15156,
- 15117, 15078, 15039, 14999, 14958, 14917, 14875, 14832,
- 14789, 14746, 14702, 14657, 14612, 14566, 14520, 14473,
- 14426, 14378, 14329, 14280, 14231, 14181, 14130, 14079,
- 14027, 13975, 13922, 13869, 13815, 13761, 13706, 13651,
- 13595, 13538, 13481, 13424, 13366, 13308, 13249, 13190,
- 13130, 13069, 13008, 12947, 12885, 12823, 12760, 12697,
- 12633, 12569, 12504, 12439, 12373, 12307, 12240, 12173,
- 12106, 12038, 11969, 11901, 11831, 11762, 11691, 11621,
- 11550, 11478, 11406, 11334, 11261, 11188, 11114, 11040,
- 10965, 10891, 10815, 10740, 10663, 10587, 10510, 10433,
- 10355, 10277, 10198, 10119, 10040, 9961, 9881, 9800,
- 9719, 9638, 9557, 9475, 9393, 9310, 9227, 9144,
- 9061, 8977, 8892, 8808, 8723, 8638, 8552, 8466,
- 8380, 8293, 8206, 8119, 8032, 7944, 7856, 7768,
- 7679, 7590, 7501, 7411, 7321, 7231, 7141, 7050,
- 6960, 6868, 6777, 6685, 6593, 6501, 6409, 6316,
- 6223, 6130, 6037, 5943, 5850, 5756, 5661, 5567,
- 5472, 5377, 5282, 5187, 5092, 4996, 4900, 4804,
- 4708, 4611, 4515, 4418, 4321, 4224, 4127, 4030,
- 3932, 3835, 3737, 3639, 3541, 3442, 3344, 3246,
- 3147, 3048, 2949, 2851, 2751, 2652, 2553, 2454,
- 2354, 2255, 2155, 2055, 1956, 1856, 1756, 1656,
- 1556, 1456, 1356, 1255, 1155, 1055, 954, 854,
- 754, 653, 553, 452, 352, 251, 151, 50
-};
-
-const Word16 edct_table_400_fx[] =/*Q16 */
-{
- 29308, 29308, 29307, 29306, 29304, 29302, 29299, 29296,
- 29292, 29288, 29284, 29279, 29273, 29267, 29261, 29254,
- 29247, 29239, 29231, 29223, 29214, 29204, 29194, 29184,
- 29173, 29162, 29150, 29138, 29125, 29112, 29099, 29085,
- 29070, 29055, 29040, 29024, 29008, 28991, 28974, 28957,
- 28939, 28920, 28901, 28882, 28862, 28842, 28821, 28800,
- 28779, 28757, 28734, 28711, 28688, 28664, 28640, 28615,
- 28590, 28565, 28539, 28512, 28485, 28458, 28430, 28402,
- 28373, 28344, 28315, 28285, 28255, 28224, 28192, 28161,
- 28129, 28096, 28063, 28030, 27996, 27962, 27927, 27892,
- 27856, 27820, 27784, 27747, 27710, 27672, 27634, 27595,
- 27556, 27517, 27477, 27437, 27396, 27355, 27313, 27272,
- 27229, 27186, 27143, 27100, 27055, 27011, 26966, 26921,
- 26875, 26829, 26782, 26736, 26688, 26640, 26592, 26544,
- 26495, 26445, 26395, 26345, 26294, 26243, 26192, 26140,
- 26088, 26035, 25982, 25929, 25875, 25821, 25766, 25711,
- 25655, 25600, 25543, 25487, 25430, 25372, 25315, 25256,
- 25198, 25139, 25079, 25020, 24960, 24899, 24838, 24777,
- 24715, 24653, 24591, 24528, 24465, 24401, 24337, 24273,
- 24208, 24143, 24078, 24012, 23946, 23879, 23812, 23745,
- 23677, 23609, 23541, 23472, 23403, 23334, 23264, 23194,
- 23123, 23052, 22981, 22909, 22837, 22765, 22692, 22619,
- 22546, 22472, 22398, 22324, 22249, 22174, 22098, 22023,
- 21947, 21870, 21793, 21716, 21639, 21561, 21483, 21404,
- 21326, 21246, 21167, 21087, 21007, 20927, 20846, 20765,
- 20684, 20602, 20520, 20437, 20355, 20272, 20189, 20105,
- 20021, 19937, 19852, 19768, 19682, 19597, 19511, 19425,
- 19339, 19252, 19165, 19078, 18991, 18903, 18815, 18726,
- 18638, 18549, 18459, 18370, 18280, 18190, 18100, 18009,
- 17918, 17827, 17735, 17643, 17551, 17459, 17366, 17274,
- 17181, 17087, 16994, 16900, 16805, 16711, 16616, 16521,
- 16426, 16331, 16235, 16139, 16043, 15946, 15850, 15753,
- 15656, 15558, 15461, 15363, 15265, 15166, 15068, 14969,
- 14870, 14770, 14671, 14571, 14471, 14371, 14271, 14170,
- 14069, 13968, 13867, 13765, 13663, 13562, 13459, 13357,
- 13254, 13152, 13049, 12946, 12842, 12739, 12635, 12531,
- 12427, 12323, 12218, 12113, 12008, 11903, 11798, 11693,
- 11587, 11481, 11375, 11269, 11163, 11056, 10950, 10843,
- 10736, 10628, 10521, 10414, 10306, 10198, 10090, 9982,
- 9874, 9765, 9657, 9548, 9439, 9330, 9221, 9112,
- 9002, 8892, 8783, 8673, 8563, 8453, 8342, 8232,
- 8122, 8011, 7900, 7789, 7678, 7567, 7456, 7344,
- 7233, 7121, 7010, 6898, 6786, 6674, 6562, 6450,
- 6337, 6225, 6112, 6000, 5887, 5774, 5661, 5548,
- 5435, 5322, 5209, 5096, 4982, 4869, 4755, 4642,
- 4528, 4414, 4300, 4187, 4073, 3959, 3845, 3730,
- 3616, 3502, 3388, 3273, 3159, 3044, 2930, 2815,
- 2701, 2586, 2472, 2357, 2242, 2127, 2013, 1898,
- 1783, 1668, 1553, 1438, 1323, 1208, 1093, 978,
- 863, 748, 633, 518, 403, 288, 173, 58
-};
-
-const Word16 edct_table_320_16fx[320] =/*Q16 */
-{
- 7747, 7747, 7747, 7746, 7746, 7745, 7744, 7742,
- 7741, 7739, 7737, 7735, 7733, 7730, 7728, 7725,
- 7722, 7719, 7716, 7712, 7708, 7704, 7700, 7696,
- 7692, 7687, 7682, 7677, 7672, 7666, 7661, 7655,
- 7649, 7643, 7637, 7630, 7623, 7617, 7610, 7602,
- 7595, 7587, 7580, 7572, 7563, 7555, 7547, 7538,
- 7529, 7520, 7511, 7501, 7492, 7482, 7472, 7462,
- 7451, 7441, 7430, 7419, 7408, 7397, 7386, 7374,
- 7362, 7350, 7338, 7326, 7314, 7301, 7288, 7275,
- 7262, 7249, 7235, 7221, 7208, 7194, 7179, 7165,
- 7150, 7136, 7121, 7106, 7091, 7075, 7060, 7044,
- 7028, 7012, 6995, 6979, 6962, 6946, 6929, 6912,
- 6894, 6877, 6859, 6842, 6824, 6806, 6787, 6769,
- 6750, 6732, 6713, 6694, 6674, 6655, 6635, 6616,
- 6596, 6576, 6556, 6535, 6515, 6494, 6473, 6452,
- 6431, 6410, 6388, 6367, 6345, 6323, 6301, 6279,
- 6257, 6234, 6211, 6189, 6166, 6143, 6119, 6096,
- 6072, 6049, 6025, 6001, 5977, 5953, 5928, 5904,
- 5879, 5854, 5829, 5804, 5779, 5753, 5728, 5702,
- 5676, 5650, 5624, 5598, 5572, 5545, 5518, 5492,
- 5465, 5438, 5411, 5383, 5356, 5328, 5301, 5273,
- 5245, 5217, 5189, 5160, 5132, 5104, 5075, 5046,
- 5017, 4988, 4959, 4930, 4900, 4871, 4841, 4811,
- 4781, 4751, 4721, 4691, 4661, 4630, 4600, 4569,
- 4538, 4508, 4477, 4446, 4414, 4383, 4352, 4320,
- 4288, 4257, 4225, 4193, 4161, 4129, 4097, 4064,
- 4032, 3999, 3967, 3934, 3901, 3868, 3835, 3802,
- 3769, 3736, 3702, 3669, 3635, 3602, 3568, 3534,
- 3500, 3466, 3432, 3398, 3364, 3330, 3295, 3261,
- 3226, 3192, 3157, 3122, 3087, 3052, 3017, 2982,
- 2947, 2912, 2877, 2841, 2806, 2771, 2735, 2699,
- 2664, 2628, 2592, 2556, 2520, 2484, 2448, 2412,
- 2376, 2340, 2304, 2267, 2231, 2194, 2158, 2121,
- 2085, 2048, 2011, 1975, 1938, 1901, 1864, 1827,
- 1790, 1753, 1716, 1679, 1642, 1605, 1567, 1530,
- 1493, 1455, 1418, 1381, 1343, 1306, 1268, 1231,
- 1193, 1156, 1118, 1080, 1043, 1005, 967, 930,
- 892, 854, 816, 778, 740, 703, 665, 627,
- 589, 551, 513, 475, 437, 399, 361, 323,
- 285, 247, 209, 171, 133, 95, 57, 19
-};
-const Word16 edct_table_128_16fx[128] = /*Q15 */
-{
- 9742, 9740, 9737, 9733, 9727, 9720, 9711, 9701,
- 9689, 9676, 9661, 9645, 9627, 9608, 9588, 9566,
- 9543, 9518, 9492, 9464, 9435, 9405, 9373, 9339,
- 9305, 9269, 9231, 9192, 9152, 9110, 9067, 9023,
- 8977, 8930, 8882, 8832, 8781, 8728, 8675, 8619,
- 8563, 8505, 8447, 8386, 8325, 8262, 8198, 8133,
- 8067, 7999, 7930, 7860, 7789, 7717, 7643, 7568,
- 7492, 7415, 7337, 7258, 7178, 7097, 7014, 6931,
- 6846, 6761, 6674, 6586, 6498, 6408, 6318, 6226,
- 6134, 6040, 5946, 5851, 5755, 5658, 5560, 5462,
- 5362, 5262, 5161, 5059, 4957, 4854, 4750, 4645,
- 4539, 4433, 4327, 4219, 4111, 4002, 3893, 3783,
- 3673, 3562, 3450, 3338, 3226, 3113, 2999, 2885,
- 2771, 2656, 2541, 2425, 2309, 2193, 2076, 1959,
- 1842, 1724, 1607, 1489, 1370, 1252, 1133, 1014,
- 895, 776, 657, 538, 418, 299, 179, 60
-};
-const Word16 edct_table_160_16fx[160] =//Q15
-{
- 9213, 9212, 9211, 9208, 9204, 9200, 9195, 9188,
- 9181, 9173, 9164, 9155, 9144, 9132, 9120, 9107,
- 9093, 9078, 9062, 9045, 9027, 9009, 8989, 8969,
- 8948, 8926, 8903, 8880, 8855, 8830, 8803, 8776,
- 8748, 8719, 8690, 8659, 8628, 8596, 8563, 8529,
- 8495, 8459, 8423, 8386, 8348, 8309, 8270, 8230,
- 8188, 8147, 8104, 8061, 8016, 7971, 7926, 7879,
- 7832, 7784, 7735, 7686, 7635, 7584, 7533, 7480,
- 7427, 7373, 7319, 7263, 7207, 7151, 7093, 7035,
- 6976, 6917, 6857, 6796, 6735, 6673, 6610, 6547,
- 6483, 6418, 6353, 6287, 6221, 6154, 6086, 6018,
- 5949, 5880, 5810, 5739, 5668, 5597, 5525, 5452,
- 5379, 5305, 5231, 5156, 5081, 5005, 4929, 4852,
- 4775, 4698, 4620, 4541, 4462, 4383, 4303, 4223,
- 4142, 4061, 3980, 3898, 3816, 3734, 3651, 3568,
- 3484, 3400, 3316, 3231, 3146, 3061, 2976, 2890,
- 2804, 2718, 2631, 2544, 2457, 2370, 2282, 2195,
- 2107, 2019, 1930, 1842, 1753, 1664, 1575, 1486,
- 1397, 1307, 1218, 1128, 1038, 948, 858, 768,
- 678, 588, 497, 407, 317, 226, 136, 45
-};
-
-
-/*----------------------------------------------------------------------------------*
- * Mean ISF vector for active signal (only for AMR-WB IO mode)
- *----------------------------------------------------------------------------------*/
-
-const Word16 mean_isf_amr_wb_fx[M] =/*Qlog2(2.56)*/
-{
- 738, 1326, 2336, 3578, 4596, 5662, 6711, 7730,
- 8750, 9753,10705, 11728, 12833, 13971,15043, 4037
-};/*1.28f Q1*/
-
-/*----------------------------------------------------------------------------------*
- * Mean ISF vector for SID frames (only in AMR-WB IO mode)
- *----------------------------------------------------------------------------------*/
-
-const Word16 mean_isf_noise_amr_wb_fx[M] =/*Qlog2(2.56)*/
-{
- 478, 1100, 2213, 3267, 4219, 5222, 6198, 7240,
- 8229, 9153,10098, 11108, 12144, 13184,14165, 3803
-};/*14Q1*1.28*/
-
-/* ISF codebook - common 1st stage, 1st split (only in AMR-WB IO mode) */
-/*------------------------------------------------------*
- * Indirection for 1st stage 1st split of 46 bit cb. :
- The transmitted_index = indirect_dico1[found_index];
- *------------------------------------------------------*/
-const Word16 Indirect_dico1[SIZE_BK1] = // Q0
-{
- 2, 6, 18, 22, 34, 35, 38, 50,
- 66, 67, 70, 82, 98, 99, 102, 130,
- 131, 134, 146, 150, 162, 178, 194, 198,
- 210, 226, 230, 242, 0, 1, 3, 4,
- 5, 7, 8, 9, 10, 11, 12, 13,
- 14, 15, 16, 17, 19, 20, 21, 23,
- 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 36, 37, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 48, 49, 51,
- 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 65, 68, 69,
- 71, 72, 73, 74, 75, 76, 77, 78,
- 79, 80, 81, 83, 84, 85, 86, 87,
- 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 97, 100, 101, 103, 104, 105, 106,
- 107, 108, 109, 110, 111, 112, 113, 114,
- 115, 116, 117, 118, 119, 120, 121, 122,
- 123, 124, 125, 126, 127, 128, 129, 132,
- 133, 135, 136, 137, 138, 139, 140, 141,
- 142, 143, 144, 145, 147, 148, 149, 151,
- 152, 153, 154, 155, 156, 157, 158, 159,
- 160, 161, 163, 164, 165, 166, 167, 168,
- 169, 170, 171, 172, 173, 174, 175, 176,
- 177, 179, 180, 181, 182, 183, 184, 185,
- 186, 187, 188, 189, 190, 191, 192, 193,
- 195, 196, 197, 199, 200, 201, 202, 203,
- 204, 205, 206, 207, 208, 209, 211, 212,
- 213, 214, 215, 216, 217, 218, 219, 220,
- 221, 222, 223, 224, 225, 227, 228, 229,
- 231, 232, 233, 234, 235, 236, 237, 238,
- 239, 240, 241, 243, 244, 245, 246, 247,
- 248, 249, 250, 251, 252, 253, 254, 255
-};
-
-/*----------------------------------------------------------------------------------*
- * Initial LSF memory
- *----------------------------------------------------------------------------------*/
-
-const Word16 lsf_init_fx[16] = /*14Q1*1.28*/
-{
- 960, 1920, 2880, 3840, 4800, 5760, 6720, 7680, 8640, 9600, 10560, 11520, 12480, 13440, 14400, 15360
-};
-
-/*----------------------------------------------------------------------------------*
- * Gaussian codebook
- *----------------------------------------------------------------------------------*/
-
-/*table in Q12*/
-const Word16 gaus_dico_fx[190] =
-{
- -399, -125, 523, -466, 305, -658, -809, 47,
- -141, -171, -583, -259, 296, 1334, -285, -401,
- -478, -418, 140, -540, 177, -1089, 130, -292,
- 143, 492, -310, -862, -320, 388, 546, 84,
- -1202, 107, 108, 340, 239, -130, 930, 342,
- 153, -264, -763, -113, 387, -535, 83, -856,
- -361, -421, 120, 396, -367, 640, 817, 222,
- -1017, -82, -120, 890, 340, -384, 47, 339,
- -505, -430, 161, 979, 890, -267, 104, 508,
- -150, -194, 442, 193, 413, -24, 395, -43,
- -217, 69, -398, 167, 116, -936, -95, 1466,
- -435, 461, 862, -136, -94, 1311, -371, 68,
- 134, -296, -156, -564, -48, -487, 647, 315,
- 513, -101, -685, -318, -344, -644, -66, 851,
- 414, -29, 509, 414, 502, 399, 557, 649,
- -299, 750, 546, -756, -12, -365, 593, -707,
- 394, -131, -375, -62, -914, -256, -424, 64,
- 464, -1140, 280, 91, -83, -288, -550, 389,
- 52, -1228, 6, -430, 74, 205, -478, -148,
- -592, 282, -73, 1212, 42, 580, -334, 484,
- -765, 443, 649, 271, -739, 375, 613, -460,
- -208, 235, -120, -49, -311, 605, 875, 521,
- 202, -506, -548, -1088, -43, -221, 673, -245,
- -27, 469, 353, 53, 744, 275
-};
-
-const Word16 gaus_dico_swb_fx[256] =
-{
- /*Q15 */
- 709, 11759, -5333, -2701, 2397, -18, -4286, 2368,
- -4576, -1584, -900, -940, 3676, 5441, -44, 2234,
- -5698, 3082, -2671, 1666, -640, -3343, -1005, -1689,
- 2048, 281, -3935, -3723, 5628, 385, -746, -3243,
- -3332, -7228, -1748, -206, -5474, 2554, 2861, 3168,
- 5039, 588, -508, -8167, 6549, -3433, 2187, -3666,
- -5874, 2767, 8370, 1038, 6434, 6279, 625, 4030,
- -1031, 1823, 9896, -1395, 2712, -1110, -742, 6142,
- -4456, -10487, -144, -5104, 1968, -312, 6176, 2173,
- 2334, -240, 2712, 7460, 2219, -3116, -56, 2770,
- 5577, -1225, 770, 3557, 2246, 2322, 3077, 41,
- 992, -4971, 441, -5039, 4913, 3811, 1142, -1283,
- -6578, 4171, -1473, -3793, -5008, 1984, -1138, -1185,
- 5646, 1014, -5118, 7141, 2656, -7241, -3538, 2337,
- 7239, -504, -943, -10129, 702, -3811, -302, 2435,
- 5090, 3744, 2335, -3904, -1401, -1662, -7256, 6484,
- -6864, -5428, 1954, -7316, -1420, -1542, 5442, 311,
- 3698, -1343, -2974, 8756, 324, -1903, 2580, 2635,
- 4236, -1851, 3147, -772, -708, -3830, 2601, -1889,
- -3444, -762, 3939, 3206, -7406, -837, -1167, -438,
- 3707, -1015, -7472, 1849, 4277, 1459, -3047, -3760,
- 740, -7134, -3753, -3092, 209, -12121, 1398, 2266,
- 2505, -7974, -1121, -3481, -5644, 1329, 4532, 958,
- 5311, -4258, -3195, -1769, -3055, 4399, -15, 10182,
- 4503, 1912, -1574, 5054, -3163, 4881, -5364, 1925,
- -1205, -6432, 2305, -8917, -1422, 514, -3001, 3928,
- 2321, 360, -355, 1477, -3492, -4570, 1913, 2772,
- -1380, -5161, 3812, 2614, 2204, -3135, 1244, -3066,
- -4446, -6389, 4899, -5250, 1372, 1999, 1122, 5312,
- 1310, -1189, -3310, 6403, 3818, 7734, 1620, -8533,
- 706, 7498, -4472, 1272, -949, 3203, -4427, -2855,
- 4419, 2283, 6410, 2584, -3397, -3382, -2976, -48,
-};
-
-
-/*----------------------------------------------------------------------------------*
- * CLDFB tables
- *----------------------------------------------------------------------------------*/
-
-const Word16 freqTable[2] = {20, 40}; // Q0
-
-/* SNR: 109.44, PHASE: 3.500000000000000 */
-
-/* SNR: 109.44, PHASE: 3.500000000000000 */
-
-const Word32 CLDFB80_10_fx[100] = // q = 30
-{
- 3584, -2501, -707, 157, -1170, -1038,
--11, -1944, -1380, 1837, 14727, -9096,
--1691, -267, 3897, -4705, 419, 4651,
-5275, -6639, -243747, -72521, -17071, 14831,
--23632, -38285, 18452, -20885, -6245, -281515,
--1070487, -153329, -20195, -4338, -209848, 194011,
-24972, -5106, -34468, 1151402, -2164680, -832327,
-376720, 1686598, 1844777, 1697325, 2356308, 3037447,
-3248821, 1779296, -1533240, -1713947, 833816, 2751563,
-2421812, 284255, -3540922, -6991555, -10248264, -14642952,
-20031906, 26043234, 34417552, 45928496, 60756732, 78698864,
-98151832, 116245496, 129823136, 136344976, 134601568, 122059576,
-95304000, 53433792, -3371365, -74987256, -160511088, -258343120,
--366360320, -481533344, 599091264, 714631872, 823505600, 920768896,
-1001735168, 1062249792, 1100603392, 1116473216, 1114030976, 1091249536,
-1031959808, 939413760, 835792512, 727712064, 614651648, 499141824,
-382288320, 266885408, 148867680, 44714176
-};
-
-
-/* SNR: 292.49, PHASE: 2.000000000000000 */
-const Word32 CLDFB80_16_fx[160] = // q = 30
-{ 592, -824, -251, 104, 64, -2,
--19, 2357, 3222, -18, -2, 75,
-37, -82, -596, 808, 2242, -3035,
--755, 254, 126, -435, 107, -19350,
-26445, -100, 482, -149, -91, 247,
-2196, -3062, -344117, -158537, -67240, -47926,
--21715, 16231, 6227, 48320, 46494, 5449,
-17932, -33783, -26258, -13467, -97911, -469416,
--1317171, -563405, -199456, -118497, -43264, 11679,
--61886, 64706, -248886, 55869, 3768, 67211,
-64791, 39611, 345778, 1796799, -2314105, -1658358,
--815220, -115680, 761413, 1616443, 1931089, 1230669,
-1712206, 1949652, 2418775, 2970521, 3179526, 3272216,
-2739046, 1383591, -1186345, -2091284, -1594461, -20541,
-1561481, 2685864, 2822045, 2243697, 1007270, -1321111,
--3774214, -5979353, -7970747, -10025660, -12576468, -15588057,
-19092548, 22464968, 26489252, 31480652, 37681832, 45115060,
-53868456, 63884792, 75139712, 87185504, 99355152, 110921760,
-121117896, 129158840, 134480400, 136595408, 135565040, 130704096,
-120827352, 105296200, 83827480, 56486836, 23319760, -15680647,
--60454808, -110775264, -166285472, -226570624, -291114656, -359358976,
--430528992, -503583200, 577127680, 650096768, 721690560, 790528896,
-855345280, 915113088, 968648896, 1014713216, 1052549440, 1081848192,
-1102232576, 1113723648, 1117499392, 1114694144, 1104247168, 1084392960,
-1047294336, 993703296, 933123072, 868665920, 802559168, 734628416,
-664562240, 593135168, 520952544, 448011680, 375024864, 302909728,
-230463232, 156264608, 85568040, 29877076
-};
-
-
-/* SNR: 89.77, PHASE: 1.500000000000000 */
-const Word32 CLDFB80_20_fx[200] = // q = 30
-{ 1767, -5032, -88, -196, 26, 203,
--254, -755, -8, 5224, 7569, 3,
-161, -101, 462, -85, -115, 1651,
--2694, 4755, 4946, -22236, -524, -658,
-65, 469, -402, -1021, 719, -9362,
-12273, -828, -312, 170, -1089, 201,
-407, -7058, 12038, -3893, -327043, -222151,
--35479, -70712, -44739, -22286, -4950, 10391,
--6975, 55398, 27635, -7373, 3144, -22481,
--20586, -25326, -30793, 63871, -118589, -531211,
--1262671, -706692, -140675, -191397, -107627, -49946,
--20212, 30609, -145958, 302172, -516943, 139838,
--27637, 62099, 52144, 58317, 81974, -160536,
-375017, 1963206, -2140127, -2009648, -925313, -652848,
--36271, 664400, 1339893, 1799274, 1945125, 831665,
-1777056, 1828829, 2078398, 2585601, 2993432, 3154609,
-3289693, 3034094, 2356141, 1146722, -993260, -1911082,
--2021484, -1182252, 157141, 1427332, 2466905, 2979250,
-2692828, 2193128, 1283653, -616499, -2589952, -4472529,
--6187298, -7776617, -9380603, -11192438, -13438549, -15899665,
-18725886, 21392202, 24336266, 27874318, 32044188, 37006492,
-42749912, 49318540, 56747120, 64938688, 73960840, 83528888,
-93302528, 102923904, 112017456, 120184144, 127010856, 132191136,
-135478896, 136610544, 135791440, 132663544, 126439184, 116783968,
-103416816, 86239880, 65299188, 40633116, 12229525, -19893306,
--55715672, -95119752, -137902624, -183892768, -232841840, -284483936,
--338536576, -394642624, -452297696, -510956224, 569805312, 628294144,
-686151296, 742695360, 797209408, 849073920, 897777728, 942743488,
-983299712, 1018874944, 1049145600, 1073975296, 1093176448, 1106582656,
-1114420736, 1117424512, 1116238848, 1110577792, 1099271424, 1081958528,
-1052270720, 1010577920, 964128448, 914037760, 862118336, 809238464,
-755241024, 699830528, 643231744, 585949312, 528205504, 469954944,
-411440896, 353300032, 295721536, 237791168, 178588864, 119772248,
-66882256, 25081918
-};
-
-
-/* SNR: 89.29, PHASE: 0.833333333333333 */
-const Word32 CLDFB80_30_fx[300] = // q = 30
-{ -298, 3584, 1941, -855, -2501, -18,
-108, -707, 31, 15, 157, 303,
-46, -1170, 5206, 7621, -1038, 39,
-476, -11, -29, -11, -1944, 58,
--3, -1380, -660, 1053, 1837, -2898,
--12992, 14727, 8112, -3476, -9096, -22,
-265, -1691, 46, -32, -267, 593,
-210, 3897, 9064, -12976, -4705, -177,
--1102, 419, 158, 60, 4651, -142,
--11, 5275, 2753, -4425, -6639, 19639,
--341195, -243747, -157895, -76329, -72521, -65719,
--49275, -17071, -21325, -4817, 14831, 27866,
--1522, -23632, 5019, -51348, -38285, -878,
-59536, 18452, -11251, -36822, -20885, -26546,
--28596, -6245, -16613, -92408, -281515, -679650,
--1089989, -1070487, -687312, -252030, -153329, -178007,
--122647, -20195, -41359, -29533, -4338, 53191,
--112253, -209848, 617831, -803951, 194011, 106901,
--106999, 24972, 64775, 70954, -5106, 66493,
-77725, -34468, 24005, 399486, 1151402, 2091330,
--1945866, -2164680, -1871142, -1133490, -832327, -560635,
--144700, 376720, 793103, 1258629, 1686598, 1843272,
-1942367, 1844777, 286874, 1790714, 1697325, 1882734,
-2048236, 2356308, 2670961, 2960784, 3037447, 3187788,
-3282834, 3248821, 2972461, 2561469, 1779296, 779690,
--670109, -1533240, -2023874, -2068454, -1713947, -979306,
--79112, 833816, 1606493, 2311180, 2751563, 2948543,
-2758276, 2421812, 2144318, 1669907, 284255, -925661,
--2240403, -3540922, -4767759, -5909822, -6991555, -8035796,
--9103931, -10248264, -11549851, -13052389, -14642952, -16334399,
-18220558, 20031906, 21872604, 23814234, 26043234, 28516756,
-31295850, 34417552, 37909524, 41736344, 45928496, 50500180,
-55453996, 60756732, 66352956, 72392624, 78698864, 85151696,
-91671536, 98151832, 104484224, 110553528, 116245496, 121424144,
-125981624, 129823136, 132872256, 135069696, 136344976, 136548112,
-135995744, 134601568, 131846392, 127706624, 122059576, 114818808,
-105909512, 95304000, 83010216, 69049472, 53433792, 36159948,
-17222988, -3371365, -25594396, -49478012, -74987256, -102019216,
--130543792, -160511088, -191851984, -224489536, -258343120, -293333280,
--329374368, -366360320, -404158112, -442603456, -481533344, -520813312,
-560055680, 599091264, 637996480, 676579264, 714631872, 751940864,
-788293056, 823505600, 857424640, 889902848, 920768896, 949826944,
-976873792, 1001735168, 1024295104, 1044475456, 1062249792, 1077572608,
-1090377088, 1100603392, 1108260608, 1113474048, 1116473216, 1117510400,
-1116725248, 1114030976, 1109119488, 1101598848, 1091249536, 1078932736,
-1059134272, 1031959808, 1003169408, 972174976, 939413760, 905472960,
-870845632, 835792512, 800328576, 764335744, 727712064, 690466496,
-652724672, 614651648, 576357376, 537862912, 499141824, 460206112,
-421184800, 382288320, 343676096, 305305440, 266885408, 228014720,
-188521408, 148867680, 110353960, 74971128, 44714176, 18455688
-};
-
-
-const Word32 CLDFB80_32_fx[320] = // q = 30
-{
- -1093, 2020, -1500, 75, -3259, -200,
-2, 86, -307, -6, -372, -406,
-686, 39, -1685, 4713, 6814, -1488,
-47, 778, -40, -130, 24, -872,
-225, -5, -116, -556, -123, -751,
-1334, -5815, -17696, 8208, -6989, 239,
--11912, -669, 1, 206, -738, 0,
--579, -811, 1617, 569, 3828, 10109,
--14335, -4601, -628, -1935, 180, 186,
--69, 2086, -538, 14, 408, 1524,
-585, 3601, -4502, 26170, -348871, -274413,
--191283, -101650, -55023, -71745, -57839, -39470,
--16489, -17154, -4618, 1542, 27531, -4838,
--24078, -6041, -61576, -45939, -4350, 52992,
--21467, -30551, -47624, -16879, -16327, -28526,
--30774, 45781, -47861, -103961, -321282, -704888,
--1065517, -1123685, -707166, -371532, -86309, -196314,
--147630, -95796, -26567, -30201, -12085, -23646,
-30175, -133297, -186726, 644643, -823106, 165914,
-127129, -77847, 76139, 59764, 84597, 13696,
-44921, 72597, 82827, -180230, 163871, 385660,
-1272552, 2097220, -1940583, -2216918, -1963534, -1312195,
--811283, -684818, -332127, 81208, 566324, 995811,
-1374732, 1743252, 1885233, 1944746, 1791356, 230889,
-1776037, 1693755, 1848743, 2021967, 2237951, 2554532,
-2866858, 3010232, 3111818, 3235821, 3289505, 3179984,
-2912034, 2438977, 1724392, 733947, -625866, -1486531,
--1958890, -2094028, -1863598, -1255187, -454123, 425746,
-1212702, 1901282, 2517750, 2869908, 2908450, 2719155,
-2384774, 2140992, 1717492, 398307, -731735, -1939480,
--3196994, -4359654, -5453402, -6492968, -7485701, -8462297,
--9485345, -10586349, -11872517, -13293064, -14799378, -16391634,
-18159074, 19878216, 21572990, 23372214, 25384474, 27638258,
-30127980, 32911950, 36012916, 39421380, 43135868, 47172528,
-51552328, 56259572, 61272356, 66530936, 72196904, 78102488,
-84136944, 90243120, 96340328, 102334376, 108124720, 113633800,
-118743656, 123354504, 127384760, 130768192, 133428752, 135331936,
-136411184, 136532064, 136012736, 134791376, 132367184, 128735088,
-123803096, 117494272, 109734136, 100486232, 89749032, 77539936,
-63866580, 48743548, 32160198, 14114131, -5387419, -26313940,
--48704924, -72531920, -97696000, -124178280, -151940320, -180929216,
--211078752, -242327632, -274608448, -307853568, -341987136, -376916512,
--412518528, -448658976, -485200704, -522047808, 558838528, 595432000,
-631934592, 668176768, 703995904, 739213504, 773652800, 807151808,
-839574912, 870801792, 900704320, 929133248, 955922048, 980906240,
-1003949120, 1024962240, 1043881152, 1060686784, 1075342592, 1087794688,
-1097989248, 1105913344, 1111637504, 1115325568, 1117191552, 1117410816,
-1116024960, 1112890624, 1107711872, 1100166016, 1090143104, 1078585600,
-1060024128, 1034545088, 1007817280, 979127552, 948772416, 917237312,
-884973248, 852271488, 819225472, 785777536, 751820160, 717295872,
-682246976, 646793792, 611070144, 575157504, 539069056, 502781984,
-466300064, 429718016, 393203360, 356913536, 320878656, 284927936,
-248740064, 212036736, 174863904, 137843808, 102263632, 69872776,
-42173520, 17586372
-};
-
-
-/* SNR: 81.55, PHASE: 0.500000000000000 */
-const Word32 CLDFB80_40_fx[400] = // q = 30
-{
--4459, -419, -3627, 1424, -337, -2077,
-303, 18, 81, 159, -711, 9,
-12, -289, -782, 599, -26, 261,
--439, 2799, 3758, -185, 230, -43,
-682, -21, -75, -29, -55, -1950,
-416, 56, 16, 233, 887, -479,
-680, -2718, -569, -16448, -33103, -1653,
--16424, 6275, -1401, -7536, 1256, 82,
-202, 378, -1703, -5, -27, -665,
--1194, 1295, -18, 118, -11445, 11396,
--15922, 16043, 175, 78, -1655, 102,
-374, 132, 161, 4663, -995, -137,
--67, -970, -4393, 2058, -3082, 11739,
--993, 52507, -372470, -339964, -238020, -154668,
--91227, -39704, -68193, -63466, -52270, -36721,
--12972, -20431, -6925, 7426, -2361, 29241,
-920, -11369, 13936, -42084, -90219, 4460,
--7456, 295, 60570, -36066, -9836, -23630,
--40550, -22839, -11573, -27317, -28142, -21799,
-74247, -37443, -94761, -175261, -418504, -781461,
--995765, -1274142, -822204, -644197, -320592, -79371,
--211045, -170432, -131251, -90676, -8615, -38865,
--25806, 10490, -21115, 43834, -93771, -212052,
--80067, 687824, -841077, -28319, 196054, 89800,
--98757, 81413, 22561, 71310, 76947, -1234,
-38817, 69237, 75947, 74313, -220677, 108139,
-388007, 614410, 1602908, 2104013, -1945962, -2345233,
--2073811, -1788974, -1237042, -801097, -773094, -511061,
--205272, 126459, 548962, 854332, 1215260, 1516757,
-1754373, 1867886, 1938796, 1938332, 1525725, 104199,
-1696967, 1687208, 1745905, 1910502, 2033618, 2194668,
-2472078, 2712787, 2937869, 3012596, 3095693, 3204093,
-3274808, 3283756, 3148592, 2939051, 2641685, 2031332,
-1549503, 597843, -490013, -1328870, -1713436, -2059616,
--2084878, -1903964, -1464478, -873102, -195311, 513856,
-1135793, 1697317, 2228107, 2629045, 2909611, 2926214,
-2785543, 2569874, 2293850, 2134485, 1852516, 752397,
--164140, -1082527, -2067571, -3082101, -4010647, -4913513,
--5770452, -6592737, -7388101, -8166445, -8966356, -9806266,
--10700961, -11733450, -12861255, -14030459, -15273330, -16566203,
-17977196, 19420796, 20683474, 22109952, 23560036, 25167814,
-26942868, 28845886, 30930688, 33206692, 35686848, 38368864,
-41237952, 44313740, 47594052, 51099240, 54815852, 58726668,
-62834600, 67067844, 71610536, 76321632, 81103048, 85964624,
-90855304, 95735248, 100552568, 105257896, 109812680, 114164760,
-118253480, 122029112, 125449296, 128468360, 131068744, 133194984,
-134844544, 135983552, 136548480, 136476080, 136056288, 135290432,
-133727152, 131405624, 128303264, 124356992, 119537688, 113797504,
-107116320, 99479544, 90889712, 81356080, 70886368, 59482072,
-47150368, 33884192, 19681098, 4546190, -11521655, -28482206,
--46395036, -65246120, -84945856, -105504280, -126897840, -149107856,
--172107808, -195862240, -220341504, -245510512, -271335616, -297782912,
--324814976, -352387008, -380449280, -408931776, -437767552, -466890752,
--496221408, -525752320, 555187200, 584450368, 613710272, 642840512,
-671780800, 700438528, 728721728, 756541312, 783807872, 810444608,
-836384512, 861566464, 885927424, 909395008, 931888896, 953321728,
-973609216, 992677120, 1010468928, 1026949632, 1042084096, 1055868544,
-1068286464, 1079312512, 1088916480, 1097072128, 1103772032, 1109042176,
-1112948608, 1115590912, 1117080960, 1117511680, 1116923264, 1115280512,
-1112471040, 1108330880, 1102691712, 1095455872, 1086748672, 1077537920,
-1062688064, 1042243712, 1021432192, 999408768, 976158720, 951869952,
-926793472, 901173760, 875200384, 848982208, 822546624, 795860992,
-768868224, 741522368, 713812928, 685772416, 657463808, 628958848,
-600314432, 571556608, 542686272, 513690592, 484561600, 455329056,
-426060320, 396846880, 367771776, 338869952, 310096864, 281325184,
-252379520, 223109248, 193485184, 163693120, 134192648, 105710896,
-79151352, 55383672, 34725716, 14899882
-};
-
-
-/* SNR: 85.15, PHASE: 0.166666666666667 */
-const Word32 CLDFB80_60_fx[600] = // q = 30
-{ -11638, 1767, -122, 1628, -5032, -196,
-161, -88, -3545, 137, -196, 21,
-36, 26, 132, -1128, 203, 12,
--29, -254, -97, -286, -755, 689,
--55, -8, 215, -1583, 5224, -169,
--595, 7569, -1361, 190, 3, -67,
-788, 161, -43, -20, -101, -32,
--10, 462, -3064, 321, -85, 24,
-12, -115, 151, -968, 1651, -22,
--258, -2694, -28, 68, 4755, -32803,
--51846, 4946, -596, 6086, -22236, -388,
-578, -524, -12974, 673, -658, 65,
-91, 65, 314, -2699, 469, 12,
--69, -402, -518, -689, -1021, 1669,
--23, 719, 449, -2322, -9362, 9537,
--13566, 12273, 3730, -157, -828, 61,
--1978, -312, 206, 462, 170, 84,
-41, -1089, 7330, -768, 201, -60,
--41, 407, -660, 3231, -7058, 161,
-771, 12038, 198, -1291, -3893, 106546,
--387363, -327043, -319712, -213953, -222151, -158504,
--105319, -35479, -59682, -66733, -70712, -61610,
--55171, -44739, -31711, -9900, -22286, -19252,
--9917, -4950, 14172, 3111, 10391, 26566,
-4086, -6975, -13332, -9892, 55398, -89244,
--120822, 27635, -30751, -9363, -7373, 2810,
-49557, 3144, -15960, 10651, -22481, -39335,
--43081, -20586, -29742, -8098, -25326, -28071,
--28128, -30793, -15878, 36414, 63871, -51035,
--98423, -118589, -196780, -380753, -531211, -867079,
--924260, -1262671, -1211187, -909700, -706692, -590140,
--387713, -140675, -90592, -207147, -191397, -163116,
--139419, -107627, -77449, 8620, -49946, -36329,
--21446, -20212, 13295, -23389, 30609, 24765,
--73159, -145958, -228347, -136170, 302172, 622362,
--742756, -516943, 79533, 208728, 139838, 68780,
--69177, -27637, 72365, 6204, 62099, 78720,
-81230, 52144, -15436, 27781, 58317, 71170,
-74613, 81974, 55368, -164496, -160536, 180918,
-362005, 375017, 795458, 1461875, 1963206, 2095155,
--1983049, -2140127, -2301661, -2078197, -2009648, -1702455,
--1336746, -925313, -815553, -803613, -652848, -461551,
--265137, -36271, 196856, 518314, 664400, 915382,
-1166217, 1339893, 1585569, 1738976, 1799274, 1890535,
-1933937, 1945125, 1923994, 1665861, 831665, 77564,
-1488037, 1777056, 1688417, 1721975, 1828829, 1937199,
-2017937, 2078398, 2252451, 2437196, 2585601, 2754365,
-2909842, 2993432, 3016599, 3074266, 3154609, 3219375,
-3265044, 3289693, 3277126, 3189837, 3034094, 2902602,
-2709099, 2356141, 1938986, 1632226, 1146722, 418214,
--305018, -993260, -1403823, -1653092, -1911082, -2083225,
--2096449, -2021484, -1849083, -1552144, -1182252, -764155,
--310625, 157141, 627282, 1032601, 1427332, 1788414,
-2142931, 2466905, 2666629, 2856089, 2979250, 2902477,
-2810289, 2692828, 2523008, 2330296, 2193128, 2132550,
-2001086, 1283653, 592123, -15236, -616499, -1241115,
--1897102, -2589952, -3235046, -3852858, -4472529, -5058432,
--5630304, -6187298, -6725206, -7257095, -7776617, -8297675,
--8829816, -9380603, -9952123, -10548511, -11192438, -11919065,
--12671172, -13438549, -14232061, -15062200, -15899665, -16802572,
-17739412, 18725886, 19625418, 20458448, 21392202, 22346532,
-23310144, 24336266, 25457146, 26639572, 27874318, 29180440,
-30570936, 32044188, 33604364, 35257056, 37006492, 38833420,
-40745368, 42749912, 44846596, 47032812, 49318540, 51704112,
-54183000, 56747120, 59397304, 62137772, 64938688, 67793344,
-70831448, 73960840, 77111768, 80298224, 83528888, 86778376,
-90039080, 93302528, 96541856, 99755032, 102923904, 106027616,
-109066040, 112017456, 114866184, 117592440, 120184144, 122624224,
-124905544, 127010856, 128931552, 130666344, 132191136, 133505016,
-134605360, 135478896, 136120576, 136498544, 136610544, 136390896,
-136106368, 135791440, 135081680, 134039064, 132663544, 130943336,
-128876128, 126439184, 123615464, 120403880, 116783968, 112750168,
-108296544, 103416816, 98114136, 92387688, 86239880, 79676032,
-72697184, 65299188, 57491652, 49271324, 40633116, 31582262,
-22113356, 12229525, 1933215, -8779568, -19893306, -31396530,
--43338216, -55715672, -68469528, -81601800, -95119752, -109012544,
--123274624, -137902624, -152887216, -168220960, -183892768, -199892672,
--216212560, -232841840, -249770272, -266987040, -284483936, -302248800,
--320270592, -338536576, -357031680, -375740448, -394642624, -413715328,
--432939744, -452297696, -471766976, -491319872, -510956224, -530689568,
-550314688, 569805312, 589331520, 608841280, 628294144, 647679424,
-666974528, 686151296, 705180416, 724037376, 742695360, 761126400,
-779305216, 797209408, 814818048, 832112192, 849073920, 865685504,
-881927232, 897777728, 913213888, 928211072, 942743488, 956784768,
-970310720, 983299712, 995732352, 1007593856, 1018874944, 1029566592,
-1039655360, 1049145600, 1058033856, 1066312576, 1073975296, 1081012992,
-1087415680, 1093176448, 1098289920, 1102755712, 1106582656, 1109785856,
-1112388096, 1114420736, 1115916544, 1116907776, 1117424512, 1117484800,
-1117091968, 1116238848, 1114897920, 1113026048, 1110577792, 1107500160,
-1103739520, 1099271424, 1094099328, 1088271360, 1081958528, 1076012800,
-1066112832, 1052270720, 1038832960, 1024980800, 1010577920, 995613248,
-980113280, 964128448, 947737280, 931017344, 914037760, 896864896,
-879548544, 862118336, 844591360, 826968768, 809238464, 791384896,
-773390848, 755241024, 736928896, 718455680, 699830528, 681070912,
-662197568, 643231744, 624193216, 605096768, 585949312, 566752640,
-547506176, 528205504, 508844544, 489425088, 469954944, 450450944,
-430937408, 411440896, 391989376, 372605984, 353300032, 334067616,
-314888448, 295721536, 276517248, 257224080, 237791168, 218193616,
-198443888, 178588864, 158737840, 139063920, 119772248, 101121944,
-83411368, 66882256, 51724928, 38009000, 25081918, 11097560
-};
-
-
-/* 5ms delay prototype */
-const Word32 LDQMF_10_fx[] = // q = 30
-{
- 136778, 68195, -70890, -226890, -352352, -420072,
--436802, -444543, -506661, -672815, -980068, -1367880,
--1747442, -2041059, -2171766, -2084001, -1756846, -1205000,
--470033, 391658, -1352314, -2311012, -3225024, -4068760,
--4825637, -5483931, -6033975, -6472204, -6808585, -7075060,
--7325812, -7636335, -8074047, -8676456, -9424478, -10219283,
--10865228, -11073811, -10475044, -8652076, 5180201, -339904,
--8224782, -18673422, -31726070, -47229416, -64809980, -83846512,
--103451368, -122477480, -139540384, -153063904, -161342016, -162639632,
--155309920, -137908720, -109304704, -68777832, -16099735, 48410956,
--123867744, -208812656, -301278944, -398795360, -498505440, -597277184,
--691834048, -778907776, -855407232, -918606592, -966152640, -996390080,
--1008509056, -1002265344, -978191040, -937540800, -882190336, -814525888,
--737309056, -653527872, 566225280, 478344672, 392910464, 312395584,
-238918544, 174094816, 118926376, 73749168, 38239292, 11438051,
--6809585, -17473586, -23179288, -24893300, -23497172, -19904868,
--15070633, -9938406, -5364481, -2000462
-};
-
-
-const Word32 LDQMF_16_fx[] = // q = 30
-{
-135840, 119105, 61025, -23300, -120396, -217572,
--303688, -369787, -411986, -431913, -436960, -439365,
--455121, -500073, -585815, -716339, -910646, -1146410,
--1392576, -1634245, -1852285, -2026746, -2138911, -2173116,
--2118583, -1970211, -1728614, -1399460, -992562, -520340,
-3268, 562389, -1169900, -1774888, -2369781, -2945925,
--3497147, -4018445, -4506032, -4956920, -5368526, -5738270,
--6064626, -6347064, -6587229, -6790047, -6964112, -7121373,
--7276728, -7449880, -7659373, -7920485, -8244154, -8633965,
--9083566, -9574508, -10074442, -10534940, -10894573, -11076715,
--10992408, -10543848, -9627864, -8139161, 5976364, 3037887,
--760649, -5491840, -11209240, -17943616, -25700144, -34454400,
--44150032, -54695840, -65964980, -77789648, -89960896, -102229872,
--114308392, -125871952, -136561440, -145990880, -153753088, -159424128,
--162577504, -162794960, -159676832, -152853360, -141995744, -126825840,
--107126032, -82747424, -53617472, -19744928, 18775524, 61761592,
--108947912, -159965984, -214394832, -271716064, -331337920, -392605120,
--454808224, -517194272, -578978880, -639359104, -697528768, -752693376,
--804086912, -850989824, -892747136, -928791232, -958536704, -981563328,
--997684800, -1006698432, -1008520640, -1003187328, -990852800, -971782976,
--946346880, -915003328, -878295040, -836832960, -791284544, -742359104,
--690793664, -637338560, 582754624, 527645440, 472906400, 419190784,
-367113152, 317241312, 270082016, 226065808, 185534960, 148735312,
-115810224, 86800312, 61646000, 40190228, 22181636, 7245162,
--4169367, -12156084, -17964338, -21866804, -24101958, -24886370,
--24433336, -22962478, -20701850, -17885954, -14749119, -11519968,
--8412224, -5619924, -3298610, -1524161
-};
-
-
-const Word32 LDQMF_20_fx[] = // q = 30
-{
-132095, 130054, 94118, 37811, -32619, -110471,
--188997, -262715, -325880, -375095, -408842, -427924,
--435582, -437285, -440062, -452482, -482692, -537287,
--620381, -731564, -887814, -1074239, -1268925, -1466394,
--1657422, -1832122, -1980124, -2091724, -2157946, -2171782,
--2128230, -2024638, -1860817, -1638685, -1362085, -1036418,
--668022, -263994, 167952, 619489, -1109006, -1594302,
--2074063, -2544892, -3002259, -3443307, -3865450, -4266665,
--4645248, -4999899, -5329217, -5631869, -5906959, -6153951,
--6372928, -6565001, -6732690, -6880012, -7012401, -7136777,
--7260809, -7394870, -7549043, -7731644, -7949919, -8208793,
--8510223, -8852171, -9227619, -9624792, -10025312, -10404401,
--10731825, -10971712, -11081824, -11015548, -10722771, -10150872,
--9246198, -7954792, 6226194, 4006049, 1251053, -2079213,
--6018496, -10592059, -15815707, -21694928, -28223572, -35382820,
--43140436, -51449560, -60249600, -69462792, -78994976, -88734976,
--98555328, -108312432, -117847120, -126986608, -135542896, -143318016,
--150106768, -155693424, -159859744, -162387488, -163062224, -161676800,
--158034768, -151954128, -143271408, -131843832, -117553208, -100308496,
--80048728, -56744644, -30400730, -1056328, 31212950, 66296312,
--104051416, -144280880, -186784688, -231313168, -277585056, -325290400,
--374093504, -423635840, -473540064, -523412928, -572850304, -621440576,
--668770368, -714429248, -758014656, -799138176, -837430848, -872549376,
--904183040, -932063424, -955866112, -975368256, -990502784, -1001141248,
--1007204608, -1008661952, -1005531712, -997881088, -985824192, -969518976,
--949164608, -924995776, -897283008, -866326016, -832450624, -796003264,
--757347840, -716859456, -674920448, -631918336, 588261568, 544170240,
-500187776, 456655456, 413899520, 372230592, 331939808, 293293792,
-256529792, 221851008, 189423392, 159373024, 131783696, 106697088,
-84113256, 63991576, 46252108, 30775584, 17400960, 5897692,
--3242832, -10003035, -15315395, -19324048, -22161874, -23947232,
--24790774, -24801182, -24088950, -22768174, -20956786, -18774960,
--16343248, -13780261, -11200397, -8711802, -6413878, -4393110,
--2713518, -1364255
-};
-
-
-const Word32 LDQMF_30_fx[] = // q = 30
-{
- 121571, 136778, 125655, 101704, 68195, 26875,
--20212, -70890, -123705, -176138, -226890, -274106,
--316253, -352352, -381787, -404297, -420072, -429892,
--434876, -436802, -437431, -439163, -444543, -456066,
--476087, -506661, -549091, -604538, -672815, -752814,
--858037, -980068, -1106184, -1235998, -1367880, -1498945,
--1626464, -1747442, -1858910, -1957741, -2041059, -2106142,
--2150372, -2171766, -2168618, -2139643, -2084001, -2001495,
--1892255, -1756846, -1596236, -1411745, -1205000, -977797,
--732072, -470033, -193708, 94399, 391658, 694989,
--1028102, -1352314, -1674661, -1994503, -2311012, -2622127,
--2927093, -3225024, -3515027, -3796480, -4068760, -4331384,
--4583784, -4825637, -5056603, -5276176, -5483931, -5679645,
--5863044, -6033975, -6192384, -6338348, -6472204, -6594554,
--6706284, -6808585, -6902959, -6991107, -7075060, -7157331,
--7239857, -7325812, -7418951, -7521577, -7636335, -7765375,
--7910813, -8074047, -8256089, -8457071, -8676456, -8912695,
--9163169, -9424478, -9691922, -9959316, -10219283, -10463412,
--10682245, -10865228, -11000298, -11074417, -11073811, -10983892,
--10789539, -10475044, -10024687, -9422374, -8652076, -7698111,
-6547450, 5180201, 3585185, 1749124, -339904, -2692689,
--5318487, -8224782, -11417230, -14899579, -18673422, -22738288,
--27091010, -31726070, -36635292, -41807760, -47229416, -52884028,
--58751904, -64809980, -71032152, -77388632, -83846512, -90369776,
--96918936, -103451368, -109921528, -116280640, -122477480, -128458624,
--134165992, -139540384, -144523760, -149052944, -153063904, -156492352,
--159273296, -161342016, -162634320, -163087360, -162639632, -161231616,
--158806368, -155309920, -150691824, -144905568, -137908720, -129663752,
--120138088, -109304704, -97142448, -83636416, -68777832, -52564528,
--35001268, -16099735, 4121304, 25635912, 48410956, 72407360,
--97584200, -123867744, -151213264, -179552912, -208812656, -238912112,
--269764832, -301278944, -333357440, -365898336, -398795360, -431938528,
--465214080, -498505440, -531693760, -564658432, -597277184, -629427584,
--660987072, -691834048, -721848128, -750911168, -778907776, -805726528,
--831260224, -855407232, -878071616, -899164800, -918606592, -936328128,
--952202112, -966152640, -978197888, -988289792, -996390080, -1002471040,
--1006513664, -1008509056, -1008457600, -1006369728, -1002265344, -996173888,
--988133504, -978191040, -966401920, -952828672, -937540800, -920615360,
--902135488, -882190336, -860873664, -838284672, -814525888, -789704064,
--763927872, -737309056, -709960000, -681994880, -653527872, -624673024,
-595607552, 566225280, 536822976, 507495872, 478344672, 449466912,
-420958208, 392910464, 365412224, 338547584, 312395584, 287029856,
-262517344, 238918544, 216286160, 194665808, 174094816, 154602160,
-136208672, 118926376, 102759984, 87704592, 73749168, 60872400,
-49048000, 38239292, 28404982, 19492542, 11438051, 4150853,
--1959299, -6809585, -10983833, -14524688, -17473586, -19875174,
--21764768, -23179288, -24150308, -24711158, -24893300, -24729546,
--24252922, -23497172, -22497182, -21287720, -19904868, -18383770,
--16760795, -15070633, -13348427, -11626766, -9938406, -8313092,
--6779951, -5364481, -4088471, -2966834, -2000462, -1134160
-};
-
-
-const Word32 LDQMF_32_fx[] = // q = 30
-{
-119697, 137151, 128520, 107723, 78400, 41836,
--442, -46740, -95597, -145201, -193804, -240598,
--283800, -322316, -355411, -382593, -403699, -418862,
--428699, -434120, -436480, -437237, -438149, -441391,
--449045, -463039, -485346, -517326, -560092, -614348,
--679872, -755580, -854379, -968457, -1086190, -1207329,
--1330799, -1454135, -1575271, -1691704, -1801098, -1900763,
--1988263, -2061316, -2117677, -2155275, -2172543, -2168111,
--2140952, -2090356, -2016155, -1918414, -1797519, -1654212,
--1489464, -1304576, -1100939, -880095, -643755, -393648,
--131597, 140303, 419876, 704520, -1017921, -1322020,
--1624457, -1924758, -2222508, -2515835, -2804014, -3086295,
--3361992, -3630425, -3891163, -4143616, -4387487, -4622276,
--4847761, -5063642, -5269495, -5464963, -5649876, -5823971,
--5987172, -6139337, -6280537, -6410931, -6530943, -6641149,
--6742439, -6835855, -6922708, -7004445, -7082802, -7159902,
--7237256, -7317480, -7403834, -7498178, -7602711, -7719257,
--7849652, -7995245, -8157013, -8335469, -8530447, -8741283,
--8966383, -9203373, -9449370, -9700315, -9951033, -10195449,
--10426707, -10637019, -10818085, -10960053, -11052529, -11084311,
--11043675, -10918394, -10695736, -10362793, -9906464, -9313511,
--8570674, -7665161, 6586647, 5317833, 3849979, 2171972,
-273875, -1853535, -4218327, -6827112, -9685347, -12796811,
--16163952, -19787344, -23665996, -27796800, -32174812, -36793016,
--41642268, -46710992, -51985904, -57451192, -63088408, -68876552,
--74792144, -80808992, -86898528, -93029584, -99168576, -105279432,
--111323816, -117260928, -123048216, -128641440, -133992400, -139052160,
--143773440, -148104208, -151991888, -155383600, -158225792, -160465072,
--162048320, -162923104, -163038096, -162343200, -160789920, -158332016,
--154925376, -150528912, -145104496, -138617152, -131035664, -122332640,
--112485024, -101474136, -89286032, -75911456, -61346324, -45591780,
--28653996, -10544916, 8718141, 29112362, 50609392, 73176464,
--96780680, -121357544, -146873168, -173272304, -200494976, -228475968,
--257145792, -286430368, -316251616, -346527296, -377172096, -408096800,
--439210240, -470417824, -501623072, -532727936, -563632832, -594237184,
--624439872, -654140096, -683237312, -711632192, -739226496, -765924288,
--791632320, -816260416, -839722176, -861935360, -882823040, -902313408,
--920341952, -936853184, -951735680, -964924736, -976443584, -986251200,
--994314944, -1000609792, -1005117952, -1007828864, -1008739392, -1007854080,
--1005185024, -1000751488, -994580096, -986704064, -977163328, -966004416,
--953279168, -939044864, -923364608, -906306368, -887942656, -868349888,
--847608448, -825801792, -803016512, -779341120, -754867072, -729686080,
--703891520, -677576896, -650837184, -623766656, 596524928, 568982144,
-541414592, 513899552, 486520032, 459356832, 432489472, 405994688,
-379947008, 354417408, 329473600, 305178976, 281592608, 258768368,
-236754960, 215594992, 195325728, 175977920, 157575920, 140137536,
-123674336, 108191456, 93687496, 80154992, 67580128, 55943780,
-45219876, 35377480, 26377892, 18179138, 10724362, 3937154,
--1793747, -6383129, -10375463, -13802420, -16701194, -19108980,
--21056298, -22573612, -23687536, -24425978, -24814642, -24880884,
--24650790, -24152456, -23413234, -22462376, -21328340, -20040900,
--18629038, -17122794, -15550818, -13942058, -12323783, -10723672,
--9166937, -7678115, -6278687, -4990172, -3829056, -2807491,
--1918388, -1103400
-};
-
-
-const Word32 LDQMF_40_fx[] = // q = 30
-{
-113206, 137254, 134425, 123146, 105211, 81666,
-53560, 21302, -14069, -51499, -90644, -130324,
--169687, -208133, -245093, -279677, -311296, -339564,
--364227, -384972, -401866, -414904, -424383, -430758,
--434462, -436342, -437086, -437526, -438798, -441921,
--448029, -458055, -473038, -493889, -521096, -555299,
--596905, -645667, -701531, -764070, -843495, -933719,
--1026835, -1122239, -1219597, -1318430, -1417239, -1515133,
--1610824, -1702996, -1790556, -1872015, -1946188, -2011806,
--2067738, -2112859, -2146050, -2166539, -2173557, -2166437,
--2144725, -2108000, -2056211, -1989295, -1907357, -1810628,
--1699503, -1574446, -1436054, -1285028, -1122103, -948052,
--763730, -570121, -367947, -158284, 57837, 279329,
-505114, 733496, -987128, -1230885, -1473412, -1714779,
--1954662, -2192913, -2428356, -2660607, -2889345, -3114179,
--3334742, -3550687, -3761781, -3967793, -4168400, -4363503,
--4552806, -4736194, -4913551, -5084693, -5249383, -5407420,
--5558753, -5703241, -5840790, -5971350, -6094838, -6211308,
--6320774, -6423390, -6519396, -6609079, -6692852, -6771222,
--6844809, -6914280, -6980363, -7043921, -7105964, -7167616,
--7229469, -7292854, -7359781, -7431209, -7508135, -7591745,
--7682927, -7782628, -7891680, -8010673, -8140087, -8280182,
--8430924, -8592083, -8763179, -8943293, -9131195, -9325472,
--9524332, -9725493, -9926142, -10123188, -10313198, -10492333,
--10656603, -10801577, -10922158, -11013175, -11068951, -11083709,
--11051345, -10965628, -10820070, -10607987, -10322919, -9958035,
--9506509, -8961670, -8316717, -7565184, 6702942, 5718827,
-4609517, 3369113, 1992225, 473872, -1190731, -3005819,
--4975066, -7101637, -9388180, -11836610, -14448347, -17224060,
--20163764, -23266722, -26531342, -29955288, -33535422, -37267720,
--41147260, -45168140, -49323552, -53606284, -58007508, -62517548,
--67125584, -71820016, -76587808, -81415152, -86287160, -91187832,
--96100320, -101006496, -105887512, -110723520, -115493552, -120176040,
--124748632, -129188288, -133469680, -137567456, -141458352, -145116032,
--148513808, -151624560, -154421360, -156876704, -158963328, -160653808,
--161921024, -162738128, -163078752, -162916896, -162227280, -160985216,
--159167008, -156749920, -153712208, -150033328, -145694224, -140676912,
--134964928, -128543672, -121399776, -113521832, -104900488, -95527920,
--85398544, -74508560, -62856444, -50442808, -37270156, -23343566,
--8670189, 6740502, 22876916, 39724980, 57268860, 75490816,
--94376496, -113883272, -134001320, -154702832, -175958544, -197737504,
--220006032, -242729312, -265870144, -289389664, -313247648, -337401888,
--361809024, -386424256, -411201216, -436093120, -461051360, -486026816,
--510969600, -535829088, -560554240, -585093440, -609395008, -633407296,
--657078592, -680357568, -703193408, -725535424, -747334272, -768541184,
--789108672, -808990656, -828142272, -846520832, -864084928, -880795968,
--896616960, -911514304, -925457216, -938417536, -950324992, -961141376,
--970896128, -979566976, -987136576, -993587776, -998908288, -1003088128,
--1006120192, -1008000960, -1008729280, -1008307648, -1006741504, -1004039168,
--1000212096, -995274560, -989243584, -982139008, -973983296, -964801472,
--954620608, -943470016, -931381312, -918388608, -904527488, -889835648,
--874352128, -858117568, -841174400, -823565824, -805336512, -786531904,
--767198144, -747382720, -727132672, -706495808, -685520512, -664254656,
--642746560, -621047616, 599273536, 577248256, 555196416, 533150944,
-511154144, 489249568, 467478368, 445881248, 424498464, 403368608,
-382529632, 362017792, 341868224, 322114240, 302787552, 283917824,
-265532592, 247657504, 230315568, 213527440, 197311648, 181683920,
-166657488, 152242496, 138447232, 125276624, 112733328, 100817520,
-89526080, 78854768, 68795096, 59337532, 50469688, 42175888,
-34440516, 27241264, 20558124, 14361678, 8619497, 3303077,
--1288525, -5070930, -8454926, -11459781, -14115485, -16433949,
--18436136, -20138626, -21555150, -22702724, -23593500, -24242222,
--24662498, -24867088, -24870766, -24686354, -24328404, -23811232,
--23148884, -22356736, -21449164, -20441404, -19348716, -18185774,
--16968062, -15710186, -14426756, -13132428, -11840736, -10565599,
--9320040, -8115962, -6965903, -5879984, -4867950, -3939393,
--3097321, -2346408, -1680052, -1007771
-};
-
-
-const Word32 LDQMF_60_fx[] = // q = 30
-{
- 102336, 132095, 137435, 135349, 130054, 120487,
-108540, 94118, 77297, 58570, 37811, 15643,
--7974, -32619, -57897, -84046, -110471, -136942,
--163210, -188997, -214438, -239091, -262715, -285164,
--306247, -325880, -343923, -360378, -375095, -388054,
--399325, -408842, -416725, -423037, -427924, -431547,
--434000, -435582, -436522, -437005, -437285, -437644,
--438481, -440062, -442703, -446767, -452482, -460182,
--470154, -482692, -497967, -516093, -537287, -561715,
--589463, -620381, -654511, -691825, -731564, -775911,
--829205, -887814, -949148, -1011179, -1074239, -1138341,
--1203246, -1268925, -1334921, -1400802, -1466394, -1531260,
--1595082, -1657422, -1717943, -1776350, -1832122, -1884921,
--1934396, -1980124, -2021834, -2059138, -2091724, -2119241,
--2141378, -2157946, -2168655, -2173353, -2171782, -2163852,
--2149388, -2128230, -2100421, -2065896, -2024638, -1976676,
--1922048, -1860817, -1793099, -1719008, -1638685, -1552286,
--1460012, -1362085, -1258676, -1150050, -1036418, -918024,
--795131, -668022, -536993, -402188, -263994, -122679,
-21420, 167952, 316690, 467104, 619489, 773430,
--945239, -1109006, -1271451, -1433050, -1594302, -1754861,
--1914784, -2074063, -2232363, -2389328, -2544892, -2698989,
--2851488, -3002259, -3151251, -3298296, -3443307, -3586211,
--3726943, -3865450, -4001599, -4135335, -4266665, -4395461,
--4521664, -4645248, -4766175, -4884420, -4999899, -5112604,
--5222404, -5329217, -5433113, -5533999, -5631869, -5726641,
--5818340, -5906959, -5992421, -6074745, -6153951, -6230036,
--6303010, -6372928, -6439843, -6503845, -6565001, -6623435,
--6679269, -6732690, -6783804, -6832855, -6880012, -6925506,
--6969547, -7012401, -7054336, -7095680, -7136777, -7177903,
--7219120, -7260809, -7303731, -7348340, -7394870, -7443617,
--7494881, -7549043, -7606393, -7667166, -7731644, -7800142,
--7872827, -7949919, -8031501, -8117779, -8208793, -8304570,
--8405066, -8510223, -8619935, -8734017, -8852171, -8974106,
--9099397, -9227619, -9358364, -9490965, -9624792, -9759051,
--9892867, -10025312, -10155439, -10282162, -10404401, -10520844,
--10630426, -10731825, -10823502, -10903968, -10971712, -11025073,
--11062346, -11081824, -11081759, -11060277, -11015548, -10945697,
--10848751, -10722771, -10565739, -10375810, -10150872, -9888970,
--9588053, -9246198, -8861297, -8431401, -7954792, -7429283,
-6854949, 6226194, 5542800, 4803353, 4006049, 3149248,
-2231398, 1251053, 206700, -902968, -2079213, -3323232,
--4636016, -6018496, -7471561, -8995894, -10592059, -12260527,
--14001671, -15815707, -17702624, -19662438, -21694928, -23799650,
--25976100, -28223572, -30541232, -32928052, -35382820, -37904240,
--40490688, -43140436, -45851544, -48621904, -51449560, -54331840,
--57266136, -60249600, -63279032, -66351236, -69462792, -72609920,
--75788648, -78994976, -82224448, -85472704, -88734976, -92006232,
--95281520, -98555328, -101822272, -105076584, -108312432, -111523680,
--114704032, -117847120, -120946376, -123995120, -126986608, -129913560,
--132768248, -135542896, -138230992, -140825344, -143318016, -145701104,
--147966688, -150106768, -152113232, -153978192, -155693424, -157250816,
--158642336, -159859744, -160895152, -161740352, -162387488, -162828688,
--163056176, -163062224, -162839296, -162379936, -161676800, -160722816,
--159511024, -158034768, -156287280, -154262480, -151954128, -149356496,
--146464032, -143271408, -139773568, -135965808, -131843832, -127403488,
--122641048, -117553208, -112136840, -106389392, -100308496, -93892368,
--87139520, -80048728, -72619504, -64851416, -56744644, -48299972,
--39518100, -30400730, -20949652, -11167261, -1056328, 9379870,
-20137698, 31212950, 42601076, 54297248, 66296312, 78593112,
--91185600, -104051416, -117194704, -130607064, -144280880, -158207776,
--172378736, -186784688, -201415824, -216262032, -231313168, -246558128,
--261985952, -277585056, -293343616, -309249600, -325290400, -341453376,
--357725472, -374093504, -390543744, -407062432, -423635840, -440249504,
--456889088, -473540064, -490187584, -506816896, -523412928, -539960640,
--556444864, -572850304, -589161600, -605363456, -621440576, -637377600,
--653159232, -668770368, -684195712, -699420352, -714429248, -729207616,
--743740992, -758014656, -772014784, -785727168, -799138176, -812234496,
--825002880, -837430848, -849505856, -861215872, -872549376, -883495616,
--894043456, -904183040, -913905152, -923200640, -932063424, -940477696,
--948417216, -955866112, -962841216, -969345024, -975368256, -980905536,
--985952256, -990502784, -994553344, -998100544, -1001141248, -1003673344,
--1005694720, -1007204608, -1008202304, -1008687808, -1008661952, -1008125952,
--1007081664, -1005531712, -1003479040, -1000927424, -997881088, -994344832,
--990323904, -985824192, -980852096, -975414528, -969518976, -963173312,
--956385600, -949164608, -941519424, -933459776, -924995776, -916137728,
--906896448, -897283008, -887308928, -876985984, -866326016, -855341824,
--844045696, -832450624, -820569472, -808415936, -796003264, -783345088,
--770455104, -757347840, -744036608, -730535808, -716859456, -703022272,
--689038016, -674920448, -660685696, -646345600, -631918336, -617424704,
-602927232, 588261568, 573575488, 558872576, 544170240, 529480224,
-514815008, 500187776, 485610624, 471095904, 456655456, 442301536,
-428045760, 413899520, 399874240, 385981024, 372230592, 358633472,
-345199872, 331939808, 318862624, 305977728, 293293792, 280819232,
-268562016, 256529792, 244729552, 233167968, 221851008, 210784624,
-199973840, 189423392, 179137440, 169119664, 159373024, 149900064,
-140703152, 131783696, 123142424, 114780232, 106697088, 98892400,
-91364808, 84113256, 77135992, 70429688, 63991576, 57819020,
-51907328, 46252108, 40848248, 35691672, 30775584, 26091894,
-21637068, 17400960, 13374445, 9548629, 5897692, 2475272,
--592184, -3242832, -5659970, -7917455, -10003035, -11926348,
--13696880, -15315395, -16789184, -18123694, -19324048, -20394110,
--21338122, -22161874, -22868630, -23462238, -23947232, -24327810,
--24607834, -24790774, -24881324, -24883598, -24801182, -24638338,
--24399474, -24088950, -23710470, -23268668, -22768174, -22213084,
--21607820, -20956786, -20264828, -19536176, -18774960, -17986262,
--17174228, -16343248, -15497611, -14641749, -13780261, -12916498,
--12055168, -11200397, -10355588, -9525147, -8711802, -7920384,
--7153632, -6413878, -5706099, -5031208, -4393110, -3792571,
--3230785, -2713518, -2227977, -1784736, -1364255, -871387
-};
-
-const Word32 rot_vec_delay_re_LDQMF_fx[60] = // q = 31
-{
- -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224,
- 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224,
- -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224,
- 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224,
- -1518500224, 1518500224, 1518500224, -1518500224
-};
-
-const Word32 rot_vec_delay_im_LDQMF_fx[60] = // q = 31
-{
- -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224,
- 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224,
- -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224,
- 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224,
- -1518500224, -1518500224, 1518500224, 1518500224
-};
-
-const Word32 rot_vec_ana_re_L10_fx[5] = // q = 29
-{
- 1517329536, 1424643840, 1192503936, 843633536, 412182400
-};
-
-const Word32 rot_vec_ana_im_L10_fx[5] = // q = 29
-{
- -59616040, -525578848, -940094336, -1262586752, -1461488512
-};
-
-const Word32 rot_vec_ana_re_L16_fx[8] = // q = 29
-{
- 1200118272, 1171310720, 1097490432, 981494080, 827779520, 642253888, 432046752, 205236304
-};
-
-const Word32 rot_vec_ana_im_L16_fx[8] = // q = 29
-{
- -29461250, -263026624, -486484032, -691246144, -869444032, -1014229696, -1120039040, -1182806016
-};
-
-const Word32 rot_vec_ana_re_L20_fx[10] = // q = 29
-{
- 1073534848, 1057019968, 1014477760, 946955776, 856116544, 744196864, 613952640, 468590848, 311690784, 147115888
-};
-
-const Word32 rot_vec_ana_im_L20_fx[10] = // q = 29
-{
- -21081516, -188759824, -351790240, -506158400, -648063232, -774010624, -880899328, -966097344, -1027506880, -1063615744
-};
-
-const Word32 rot_vec_ana_re_L30_fx[15] = // q = 29
-{
- 876631424, 870629568, 855088960, 830179840, 796175040, 753447232, 702464448, 643785344, 578052800, 505986944, 428377440, 346074528, 259979936, 171036960, 80220064
-};
-
-const Word32 rot_vec_ana_im_L30_fx[15] = // q = 29
-{
- -11475734, -103045800, -193486880, -281808064, -367041728, -448253984, -524555072, -595109056, -659142848, -715955008, -764922944, -805510272, -837272192, -859860864, -873028672
-};
-
-const Word32 rot_vec_ana_re_L32_fx[16] = // q = 29
-{
- 848803520, 843695296, 830461760, 809230464, 780205824, 743667392, 699967040, 649525568, 592828864, 530422880, 462908640, 390936320, 315199072, 236426304, 155376608, 72830544
-};
-
-const Word32 rot_vec_ana_im_L32_fx[16] = // q = 29
-{
- -10416909, -93564040, -175810112, -256363024, -334447008, -409310112, -480231328, -546527616, -607560576, -662742400, -711541696, -753488384, -788178560, -815278208, -834526272, -845737344
-};
-
-const Word32 rot_vec_ana_re_L40_fx[20] = // q = 29
-{
- 759213504, 756288320, 748700352, 736496320, 719751616, 698569408, 673080256, 643441344, 609835392, 572469632, 531574400, 487401824, 440224256, 390332576, 338034336,
- 283652032, 227520896, 169987024, 111405128, 52136384
-};
-
-const Word32 rot_vec_ana_im_L40_fx[20] = // q = 29
-{
- -7453801, -66998032, -126129192, -184482736, -241698864, -297424864, -351317120, -403043392, -452284768, -498737664, -542115648, -582151360, -618597888, -651230528,
- -679848192, -704274304, -724358336, -739976448, -751032384, -757457984
-};
-
-const Word32 rot_vec_ana_re_L60_fx[30] = // q = 29
-{
- 619911872, 618849920, 616091776, 611644992, 605521728, 597738752, 588317440, 577283520, 564667392, 550503488, 534830720, 517692032, 499134368, 479208608, 457969376, 435474880, 411786784,
- 386970016, 361092576, 334225408, 306442144, 277818944, 248434272, 218368656, 187704512, 156525872, 124918216, 92968160, 60763288, 28391868
-};
-
-const Word32 rot_vec_ana_im_L60_fx[30] = // q = 29
-{
- -4057371, -36495492, -68833576, -100983000, -132855632, -164364112, -195422080, -225944416, -255847456, -285049248, -313469728, -341030976, -367657536, -393276352, -417817216, -441212864,
- -463399200, -484315392, -503904096, -522111616, -538888128, -554187520, -567967936, -580191616, -590825024, -599838976, -607208896, -612914432, -616940032, -619274624
-};
-
-
-/*!
- * \brief CLDFB prototype filter
- *
- * cldfb bands: 10
- * delay[ms]: 1.00
- * abs. max Val: 1.04
- * scale: 0.50
- */
-const Word16 CLDFB80_10[] =//Q.5
-{
- W16(0x0000), W16(0xfffc), W16(0xffdf), W16(0x0132), W16(0x23b5),
- W16(0x0000), W16(0xffff), W16(0xfff3), W16(0x018d), W16(0x2a98),
- W16(0x0000), W16(0x0000), W16(0x0006), W16(0x020d), W16(0x3116),
- W16(0x0000), W16(0x0000), W16(0x001a), W16(0x02bd), W16(0x36e2),
- W16(0x0000), W16(0x0000), W16(0x001c), W16(0x039f), W16(0x3bb5),
- W16(0x0000), W16(0xffff), W16(0x001a), W16(0x04b1), W16(0x3f51),
- W16(0x0000), W16(0x0000), W16(0x0024), W16(0x05da), W16(0x419a),
- W16(0x0000), W16(0x0000), W16(0x002e), W16(0x06ee), W16(0x428c),
- W16(0x0000), W16(0x0000), W16(0x0032), W16(0x07bd), W16(0x4267),
- W16(0x0000), W16(0xfffc), W16(0x001b), W16(0x0820), W16(0x410b),
- W16(0x0000), W16(0xfff0), W16(0xffe9), W16(0x0806), W16(0x3d82),
- W16(0x0000), W16(0xfffe), W16(0xffe6), W16(0x0746), W16(0x37fe),
- W16(0x0000), W16(0x0000), W16(0x000d), W16(0x05ae), W16(0x31d1),
- W16(0x0000), W16(0x0000), W16(0x002a), W16(0x032f), W16(0x2b60),
- W16(0x0000), W16(0xfffd), W16(0x0025), W16(0xffcd), W16(0x24a3),
- W16(0x0000), W16(0x0003), W16(0x0004), W16(0xfb88), W16(0x1dc0),
- W16(0x0000), W16(0x0000), W16(0xffca), W16(0xf66f), W16(0x16c9),
- W16(0x0000), W16(0x0000), W16(0xff95), W16(0xf09a), W16(0x0fe8),
- W16(0x0000), W16(0xffff), W16(0xff64), W16(0xea2a), W16(0x08e0),
- W16(0x0000), W16(0x0012), W16(0xff21), W16(0xe34c), W16(0x02aa)
-};
-
-/*!
- * \brief CLDFB prototype filter
- *
- * cldfb bands: 16
- * delay[ms]: 1.00
- * abs. max Val: 1.04
- * scale: 0.50
- */
-const Word16 CLDFB80_16[] =//Q.5
-{
- W16(0x0000), W16(0xfffb), W16(0xffdd), W16(0x0123), W16(0x2266),
- W16(0x0000), W16(0xfffe), W16(0xffe7), W16(0x0157), W16(0x26c0),
- W16(0x0000), W16(0xffff), W16(0xfff4), W16(0x0194), W16(0x2b04),
- W16(0x0000), W16(0xffff), W16(0xfffe), W16(0x01e0), W16(0x2f1f),
- W16(0x0000), W16(0x0000), W16(0x000c), W16(0x023f), W16(0x32fc),
- W16(0x0000), W16(0x0000), W16(0x0019), W16(0x02b0), W16(0x368c),
- W16(0x0000), W16(0x0000), W16(0x001d), W16(0x0336), W16(0x39bc),
- W16(0x0000), W16(0x0001), W16(0x0013), W16(0x03cf), W16(0x3c7b),
- W16(0x0000), W16(0x0001), W16(0x001a), W16(0x047b), W16(0x3ebd),
- W16(0x0000), W16(0x0000), W16(0x001e), W16(0x0532), W16(0x407c),
- W16(0x0000), W16(0x0000), W16(0x0025), W16(0x05ec), W16(0x41b3),
- W16(0x0000), W16(0xffff), W16(0x002d), W16(0x069d), W16(0x4262),
- W16(0x0000), W16(0x0000), W16(0x0031), W16(0x0738), W16(0x429c),
- W16(0x0000), W16(0x0000), W16(0x0032), W16(0x07b3), W16(0x4271),
- W16(0x0000), W16(0xffff), W16(0x002a), W16(0x0804), W16(0x41d1),
- W16(0x0000), W16(0xfff9), W16(0x0015), W16(0x0824), W16(0x40a3),
- W16(0x0000), W16(0xffec), W16(0xffee), W16(0x0815), W16(0x3e6c),
- W16(0x0000), W16(0xfff7), W16(0xffe0), W16(0x07ca), W16(0x3b3b),
- W16(0x0000), W16(0xfffd), W16(0xffe8), W16(0x0734), W16(0x379e),
- W16(0x0000), W16(0xfffe), W16(0x0000), W16(0x0647), W16(0x33c7),
- W16(0x0000), W16(0xffff), W16(0x0018), W16(0x04ff), W16(0x2fd6),
- W16(0x0000), W16(0x0000), W16(0x0029), W16(0x035e), W16(0x2bca),
- W16(0x0000), W16(0xffff), W16(0x002b), W16(0x0164), W16(0x279c),
- W16(0x0000), W16(0x0001), W16(0x0022), W16(0xff11), W16(0x235b),
- W16(0x0000), W16(0xfffc), W16(0x000f), W16(0xfc66), W16(0x1f0d),
- W16(0x0000), W16(0x0001), W16(0xffec), W16(0xf966), W16(0x1ab4),
- W16(0x0000), W16(0x0000), W16(0xffc6), W16(0xf617), W16(0x165a),
- W16(0x0000), W16(0x0001), W16(0xffa5), W16(0xf27f), W16(0x120e),
- W16(0x0000), W16(0x0001), W16(0xff86), W16(0xeea6), W16(0x0dbd),
- W16(0x0000), W16(0x0001), W16(0xff67), W16(0xea95), W16(0x0950),
- W16(0x0000), W16(0x0005), W16(0xff40), W16(0xe657), W16(0x051a),
- W16(0x0000), W16(0x001b), W16(0xff12), W16(0xe1fc), W16(0x01c8)
-};
-
-/*!
- * \brief CLDFB prototype filter
- *
- * cldfb bands: 20
- * delay[ms]: 1.00
- * abs. max Val: 1.04
- * scale: 0.50
- */
-const Word16 CLDFB80_20[] =//Q.5
-{
- W16(0x0000), W16(0xfffb), W16(0xffdf), W16(0x011e), W16(0x21f7),
- W16(0x0000), W16(0xfffd), W16(0xffe1), W16(0x0146), W16(0x2573),
- W16(0x0000), W16(0xffff), W16(0xfff2), W16(0x0173), W16(0x28e6),
- W16(0x0000), W16(0xffff), W16(0xfff6), W16(0x01a9), W16(0x2c45),
- W16(0x0000), W16(0xffff), W16(0xffff), W16(0x01e9), W16(0x2f84),
- W16(0x0000), W16(0x0000), W16(0x000a), W16(0x0235), W16(0x329c),
- W16(0x0000), W16(0x0000), W16(0x0014), W16(0x028c), W16(0x3583),
- W16(0x0000), W16(0x0000), W16(0x001b), W16(0x02f1), W16(0x3831),
- W16(0x0000), W16(0x0000), W16(0x001e), W16(0x0362), W16(0x3a9c),
- W16(0x0000), W16(0x0001), W16(0x000d), W16(0x03df), W16(0x3cbb),
- W16(0x0000), W16(0x0000), W16(0x001b), W16(0x0469), W16(0x3e89),
- W16(0x0000), W16(0x0000), W16(0x001c), W16(0x04fb), W16(0x4004),
- W16(0x0000), W16(0x0000), W16(0x0020), W16(0x0590), W16(0x4129),
- W16(0x0000), W16(0x0000), W16(0x0027), W16(0x0622), W16(0x41f5),
- W16(0x0000), W16(0x0000), W16(0x002e), W16(0x06ad), W16(0x426d),
- W16(0x0000), W16(0x0000), W16(0x0030), W16(0x072a), W16(0x429b),
- W16(0x0000), W16(0x0000), W16(0x0032), W16(0x0792), W16(0x4288),
- W16(0x0000), W16(0x0001), W16(0x002e), W16(0x07e1), W16(0x4232),
- W16(0x0000), W16(0xfffe), W16(0x0024), W16(0x0813), W16(0x4186),
- W16(0x0000), W16(0xfff8), W16(0x0011), W16(0x0825), W16(0x407d),
- W16(0x0000), W16(0xffed), W16(0xfff1), W16(0x0818), W16(0x3eb8),
- W16(0x0000), W16(0xfff5), W16(0xffe3), W16(0x07e8), W16(0x3c3c),
- W16(0x0000), W16(0xfffe), W16(0xffe1), W16(0x0789), W16(0x3977),
- W16(0x0000), W16(0xfffd), W16(0xffee), W16(0x06f6), W16(0x367b),
- W16(0x0000), W16(0xfffe), W16(0x0002), W16(0x062a), W16(0x3363),
- W16(0x0000), W16(0xffff), W16(0x0016), W16(0x0524), W16(0x303c),
- W16(0x0000), W16(0x0000), W16(0x0026), W16(0x03e4), W16(0x2d04),
- W16(0x0000), W16(0x0000), W16(0x002d), W16(0x026c), W16(0x29b7),
- W16(0x0000), W16(0xfffe), W16(0x0029), W16(0x00bb), W16(0x2657),
- W16(0x0000), W16(0x0005), W16(0x0021), W16(0xfed0), W16(0x22ed),
- W16(0x0000), W16(0xfff8), W16(0x0014), W16(0xfcae), W16(0x1f7c),
- W16(0x0000), W16(0x0002), W16(0xfff7), W16(0xfa55), W16(0x1c03),
- W16(0x0000), W16(0x0000), W16(0xffd8), W16(0xf7c8), W16(0x1886),
- W16(0x0000), W16(0x0001), W16(0xffbc), W16(0xf50a), W16(0x150f),
- W16(0x0000), W16(0x0001), W16(0xffa2), W16(0xf21f), W16(0x11a0),
- W16(0x0000), W16(0x0001), W16(0xff89), W16(0xef0b), W16(0x0e2c),
- W16(0x0000), W16(0x0001), W16(0xff71), W16(0xebd2), W16(0x0aa5),
- W16(0x0000), W16(0xfffe), W16(0xff55), W16(0xe87a), W16(0x0724),
- W16(0x0000), W16(0x0006), W16(0xff33), W16(0xe50a), W16(0x03fd),
- W16(0x0000), W16(0x001e), W16(0xff0d), W16(0xe18b), W16(0x017f)
-};
-
-/*!
- * \brief CLDFB prototype filter
- *
- * cldfb bands: 32
- * delay[ms]: 1.00
- * abs. max Val: 1.04
- * scale: 0.50
- */
-const Word16 CLDFB80_32[] =//Q.5
-{
- W16(0x0000), W16(0xfffb), W16(0xffe2), W16(0x0115), W16(0x214f),
- W16(0x0000), W16(0xfffc), W16(0xffde), W16(0x012f), W16(0x237e),
- W16(0x0000), W16(0xfffd), W16(0xffe2), W16(0x0149), W16(0x25ab),
- W16(0x0000), W16(0xfffe), W16(0xffec), W16(0x0165), W16(0x27d4),
- W16(0x0000), W16(0xffff), W16(0xfff4), W16(0x0183), W16(0x29f6),
- W16(0x0000), W16(0xffff), W16(0xfff6), W16(0x01a6), W16(0x2c10),
- W16(0x0000), W16(0xffff), W16(0xfffb), W16(0x01cc), W16(0x2e1d),
- W16(0x0000), W16(0xffff), W16(0x0001), W16(0x01f6), W16(0x301c),
- W16(0x0000), W16(0x0000), W16(0x0009), W16(0x0226), W16(0x320b),
- W16(0x0000), W16(0x0000), W16(0x000f), W16(0x025a), W16(0x33e7),
- W16(0x0000), W16(0x0000), W16(0x0015), W16(0x0292), W16(0x35b0),
- W16(0x0000), W16(0x0000), W16(0x001b), W16(0x02d0), W16(0x3761),
- W16(0x0000), W16(0x0000), W16(0x001d), W16(0x0313), W16(0x38fa),
- W16(0x0000), W16(0x0000), W16(0x001e), W16(0x035a), W16(0x3a77),
- W16(0x0000), W16(0x0000), W16(0x001b), W16(0x03a7), W16(0x3bd7),
- W16(0x0000), W16(0x0000), W16(0x0004), W16(0x03f7), W16(0x3d18),
- W16(0x0000), W16(0xffff), W16(0x001b), W16(0x044e), W16(0x3e38),
- W16(0x0000), W16(0xffff), W16(0x001a), W16(0x04a8), W16(0x3f39),
- W16(0x0000), W16(0x0000), W16(0x001c), W16(0x0504), W16(0x4018),
- W16(0x0000), W16(0x0001), W16(0x001f), W16(0x0561), W16(0x40d6),
- W16(0x0000), W16(0x0000), W16(0x0022), W16(0x05be), W16(0x4172),
- W16(0x0000), W16(0x0000), W16(0x0027), W16(0x0619), W16(0x41eb),
- W16(0x0000), W16(0xffff), W16(0x002c), W16(0x0672), W16(0x4242),
- W16(0x0000), W16(0x0000), W16(0x002e), W16(0x06c6), W16(0x427b),
- W16(0x0000), W16(0x0000), W16(0x002f), W16(0x0714), W16(0x4297),
- W16(0x0000), W16(0x0000), W16(0x0031), W16(0x075a), W16(0x429a),
- W16(0x0000), W16(0x0000), W16(0x0032), W16(0x0798), W16(0x4285),
- W16(0x0000), W16(0x0001), W16(0x0031), W16(0x07cb), W16(0x4255),
- W16(0x0000), W16(0xffff), W16(0x002c), W16(0x07f4), W16(0x4206),
- W16(0x0000), W16(0xfffe), W16(0x0025), W16(0x0811), W16(0x4193),
- W16(0x0000), W16(0xfffb), W16(0x001a), W16(0x0821), W16(0x40fa),
- W16(0x0000), W16(0xfff5), W16(0x000b), W16(0x0823), W16(0x404a),
- W16(0x0000), W16(0xfff0), W16(0xfff6), W16(0x081b), W16(0x3f2f),
- W16(0x0000), W16(0xffef), W16(0xffe9), W16(0x0809), W16(0x3daa),
- W16(0x0000), W16(0xfff5), W16(0xffe2), W16(0x07e4), W16(0x3c12),
- W16(0x0000), W16(0xfffa), W16(0xffe0), W16(0x07ac), W16(0x3a5c),
- W16(0x0000), W16(0xffff), W16(0xffe4), W16(0x0761), W16(0x388d),
- W16(0x0000), W16(0xfffd), W16(0xffed), W16(0x0701), W16(0x36ac),
- W16(0x0000), W16(0xfffe), W16(0xfff9), W16(0x068a), W16(0x34c0),
- W16(0x0000), W16(0xffff), W16(0x0006), W16(0x05fd), W16(0x32cd),
- W16(0x0000), W16(0x0000), W16(0x0013), W16(0x0559), W16(0x30d4),
- W16(0x0000), W16(0x0000), W16(0x001d), W16(0x049f), W16(0x2ed6),
- W16(0x0000), W16(0x0000), W16(0x0026), W16(0x03cf), W16(0x2cd0),
- W16(0x0000), W16(0x0000), W16(0x002c), W16(0x02e8), W16(0x2ac1),
- W16(0x0000), W16(0x0000), W16(0x002c), W16(0x01eb), W16(0x28aa),
- W16(0x0000), W16(0xfffe), W16(0x0029), W16(0x00d7), W16(0x268d),
- W16(0x0000), W16(0xfffd), W16(0x0024), W16(0xffae), W16(0x246c),
- W16(0x0000), W16(0x000a), W16(0x0021), W16(0xfe6e), W16(0x2248),
- W16(0x0000), W16(0xfff3), W16(0x001a), W16(0xfd19), W16(0x2022),
- W16(0x0000), W16(0x0003), W16(0x0006), W16(0xfbad), W16(0x1df8),
- W16(0x0000), W16(0x0002), W16(0xfff5), W16(0xfa2d), W16(0x1bcb),
- W16(0x0000), W16(0xffff), W16(0xffe2), W16(0xf899), W16(0x199d),
- W16(0x0000), W16(0x0001), W16(0xffcf), W16(0xf6f2), W16(0x1770),
- W16(0x0000), W16(0x0001), W16(0xffbd), W16(0xf537), W16(0x1546),
- W16(0x0000), W16(0x0001), W16(0xffad), W16(0xf36b), W16(0x1320),
- W16(0x0000), W16(0x0000), W16(0xff9d), W16(0xf18e), W16(0x10fc),
- W16(0x0000), W16(0x0001), W16(0xff8e), W16(0xefa2), W16(0x0ed3),
- W16(0x0000), W16(0x0001), W16(0xff7f), W16(0xeda7), W16(0x0ca3),
- W16(0x0000), W16(0x0001), W16(0xff6f), W16(0xeb9e), W16(0x0a6c),
- W16(0x0000), W16(0xfffd), W16(0xff5e), W16(0xe989), W16(0x0837),
- W16(0x0000), W16(0x0003), W16(0xff4b), W16(0xe769), W16(0x0618),
- W16(0x0000), W16(0x0006), W16(0xff35), W16(0xe542), W16(0x042a),
- W16(0x0000), W16(0x0013), W16(0xff1e), W16(0xe314), W16(0x0284),
- W16(0x0000), W16(0x0020), W16(0xff06), W16(0xe0e2), W16(0x010c)
-};
-
-/*!
- * \brief CLDFB prototype filter
- *
- * cldfb bands: 40
- * delay[ms]: 1.00
- * abs. max Val: 1.04
- * scale: 0.50
- */
-const Word16 CLDFB80_40[] =//Q.5
-{
- W16(0x0000), W16(0xfffa), W16(0xffe2), W16(0x0112), W16(0x2117),
- W16(0x0000), W16(0xfffb), W16(0xffdc), W16(0x0128), W16(0x22d6),
- W16(0x0000), W16(0xfffc), W16(0xffe0), W16(0x013c), W16(0x2494),
- W16(0x0000), W16(0xfffe), W16(0xffe5), W16(0x0151), W16(0x2651),
- W16(0x0000), W16(0xffff), W16(0xffed), W16(0x0167), W16(0x280b),
- W16(0x0000), W16(0xffff), W16(0xfff4), W16(0x0180), W16(0x29c0),
- W16(0x0000), W16(0xffff), W16(0xfff4), W16(0x019b), W16(0x2b6f),
- W16(0x0000), W16(0xffff), W16(0xfff8), W16(0x01b8), W16(0x2d18),
- W16(0x0000), W16(0xffff), W16(0xfffd), W16(0x01d8), W16(0x2eb8),
- W16(0x0000), W16(0xffff), W16(0x0002), W16(0x01fb), W16(0x304e),
- W16(0x0000), W16(0x0000), W16(0x0008), W16(0x0221), W16(0x31da),
- W16(0x0000), W16(0x0000), W16(0x000d), W16(0x0249), W16(0x335a),
- W16(0x0000), W16(0x0000), W16(0x0013), W16(0x0275), W16(0x34ce),
- W16(0x0000), W16(0x0000), W16(0x0017), W16(0x02a4), W16(0x3634),
- W16(0x0000), W16(0x0000), W16(0x001b), W16(0x02d6), W16(0x378b),
- W16(0x0000), W16(0x0000), W16(0x001d), W16(0x030c), W16(0x38d3),
- W16(0x0000), W16(0x0000), W16(0x001e), W16(0x0344), W16(0x3a08),
- W16(0x0000), W16(0x0000), W16(0x001e), W16(0x0380), W16(0x3b2b),
- W16(0x0000), W16(0x0000), W16(0x0017), W16(0x03bf), W16(0x3c3b),
- W16(0x0000), W16(0xffff), W16(0x0002), W16(0x03ff), W16(0x3d36),
- W16(0x0000), W16(0xffff), W16(0x001a), W16(0x0445), W16(0x3e1d),
- W16(0x0000), W16(0x0000), W16(0x001a), W16(0x048d), W16(0x3eef),
- W16(0x0000), W16(0x0000), W16(0x001b), W16(0x04d6), W16(0x3fad),
- W16(0x0000), W16(0x0000), W16(0x001d), W16(0x0520), W16(0x4055),
- W16(0x0000), W16(0x0001), W16(0x001f), W16(0x056a), W16(0x40e8),
- W16(0x0000), W16(0xffff), W16(0x0021), W16(0x05b5), W16(0x4164),
- W16(0x0000), W16(0x0000), W16(0x0026), W16(0x05fe), W16(0x41ca),
- W16(0x0000), W16(0x0000), W16(0x0029), W16(0x0646), W16(0x421b),
- W16(0x0000), W16(0xffff), W16(0x002d), W16(0x068c), W16(0x4256),
- W16(0x0000), W16(0x0000), W16(0x002e), W16(0x06ce), W16(0x427f),
- W16(0x0000), W16(0x0000), W16(0x002f), W16(0x070c), W16(0x4295),
- W16(0x0000), W16(0x0000), W16(0x0031), W16(0x0746), W16(0x429c),
- W16(0x0000), W16(0x0000), W16(0x0032), W16(0x077a), W16(0x4293),
- W16(0x0000), W16(0x0000), W16(0x0032), W16(0x07a8), W16(0x427a),
- W16(0x0000), W16(0x0001), W16(0x0030), W16(0x07d0), W16(0x424f),
- W16(0x0000), W16(0xffff), W16(0x002d), W16(0x07f0), W16(0x4210),
- W16(0x0000), W16(0xffff), W16(0x0028), W16(0x080a), W16(0x41ba),
- W16(0x0000), W16(0xfffd), W16(0x001f), W16(0x081b), W16(0x414b),
- W16(0x0000), W16(0xfffa), W16(0x0018), W16(0x0824), W16(0x40c6),
- W16(0x0000), W16(0xfff4), W16(0x0009), W16(0x0822), W16(0x403a),
- W16(0xffff), W16(0xfff1), W16(0xfff9), W16(0x081c), W16(0x3f57),
- W16(0x0000), W16(0xffed), W16(0xffec), W16(0x0810), W16(0x3e1f),
- W16(0x0000), W16(0xfff3), W16(0xffe6), W16(0x07f9), W16(0x3ce2),
- W16(0x0000), W16(0xfff6), W16(0xffe1), W16(0x07d5), W16(0x3b92),
- W16(0x0000), W16(0xfffb), W16(0xffe0), W16(0x07a6), W16(0x3a2f),
- W16(0x0000), W16(0xffff), W16(0xffe3), W16(0x076a), W16(0x38bc),
- W16(0x0000), W16(0xfffd), W16(0xffea), W16(0x0720), W16(0x373e),
- W16(0x0000), W16(0xfffd), W16(0xfff3), W16(0x06c8), W16(0x35b7),
- W16(0x0000), W16(0xfffe), W16(0xfffd), W16(0x0662), W16(0x342a),
- W16(0x0000), W16(0xffff), W16(0x0008), W16(0x05ee), W16(0x329a),
- W16(0x0000), W16(0x0000), W16(0x0011), W16(0x056b), W16(0x3107),
- W16(0x0000), W16(0xffff), W16(0x001a), W16(0x04d9), W16(0x2f70),
- W16(0x0000), W16(0x0000), W16(0x0022), W16(0x043a), W16(0x2dd4),
- W16(0x0000), W16(0x0000), W16(0x0028), W16(0x038c), W16(0x2c33),
- W16(0x0000), W16(0x0000), W16(0x002c), W16(0x02cf), W16(0x2a8c),
- W16(0x0000), W16(0x0001), W16(0x002d), W16(0x0205), W16(0x28e0),
- W16(0x0000), W16(0xffff), W16(0x002b), W16(0x012c), W16(0x2730),
- W16(0x0000), W16(0xfffd), W16(0x0027), W16(0x0045), W16(0x257d),
- W16(0x0000), W16(0xffff), W16(0x0023), W16(0xff50), W16(0x23c8),
- W16(0x0000), W16(0x000a), W16(0x0021), W16(0xfe4d), W16(0x2211),
- W16(0x0000), W16(0xfff3), W16(0x001c), W16(0xfd3c), W16(0x2059),
- W16(0x0000), W16(0x0000), W16(0x000b), W16(0xfc1c), W16(0x1e9e),
- W16(0x0000), W16(0x0003), W16(0xfffd), W16(0xfaf0), W16(0x1ce2),
- W16(0x0000), W16(0x0001), W16(0xffef), W16(0xf9b6), W16(0x1b24),
- W16(0x0000), W16(0xfffe), W16(0xffe0), W16(0xf870), W16(0x1965),
- W16(0x0000), W16(0x0001), W16(0xffd1), W16(0xf71d), W16(0x17a7),
- W16(0x0000), W16(0x0000), W16(0xffc3), W16(0xf5be), W16(0x15ec),
- W16(0x0000), W16(0x0001), W16(0xffb5), W16(0xf453), W16(0x1433),
- W16(0x0000), W16(0x0001), W16(0xffa8), W16(0xf2de), W16(0x127c),
- W16(0x0000), W16(0x0000), W16(0xff9b), W16(0xf15e), W16(0x10c5),
- W16(0x0000), W16(0x0001), W16(0xff8f), W16(0xefd4), W16(0x0f0b),
- W16(0x0000), W16(0x0001), W16(0xff83), W16(0xee40), W16(0x0d4c),
- W16(0x0000), W16(0x0001), W16(0xff77), W16(0xeca4), W16(0x0b88),
- W16(0x0000), W16(0x0001), W16(0xff6a), W16(0xeaff), W16(0x09c2),
- W16(0x0000), W16(0xfffd), W16(0xff5d), W16(0xe953), W16(0x0800),
- W16(0x0000), W16(0x0002), W16(0xff4d), W16(0xe7a0), W16(0x064d),
- W16(0x0000), W16(0x0006), W16(0xff3c), W16(0xe5e8), W16(0x04b8),
- W16(0x0000), W16(0x0009), W16(0xff2a), W16(0xe42c), W16(0x034d),
- W16(0x0000), W16(0x0018), W16(0xff17), W16(0xe26c), W16(0x0212),
- W16(0x0001), W16(0x0020), W16(0xff03), W16(0xe0aa), W16(0x00e3)
-};
-
-/*!
- * \brief CLDFB prototype filter
- *
- * cldfb bands: 60
- * delay[ms]: 1.00
- * abs. max Val: 1.04
- * scale: 0.50
- */
-const Word16 CLDFB80_60[] =//Q.5
-{
- W16(0x0000), W16(0xfffa), W16(0xffe2), W16(0x010f), W16(0x20cd),
- W16(0x0000), W16(0xfffb), W16(0xffdf), W16(0x011e), W16(0x21f7),
- W16(0x0000), W16(0xfffb), W16(0xffdd), W16(0x012b), W16(0x2320),
- W16(0x0000), W16(0xfffd), W16(0xffe0), W16(0x0138), W16(0x244a),
- W16(0x0000), W16(0xfffd), W16(0xffe1), W16(0x0146), W16(0x2573),
- W16(0x0000), W16(0xfffe), W16(0xffe6), W16(0x0155), W16(0x269b),
- W16(0x0000), W16(0xfffe), W16(0xffec), W16(0x0164), W16(0x27c1),
- W16(0x0000), W16(0xffff), W16(0xfff2), W16(0x0173), W16(0x28e6),
- W16(0x0000), W16(0xffff), W16(0xfff4), W16(0x0184), W16(0x2a08),
- W16(0x0000), W16(0xffff), W16(0xfff4), W16(0x0196), W16(0x2b28),
- W16(0x0000), W16(0xffff), W16(0xfff6), W16(0x01a9), W16(0x2c45),
- W16(0x0000), W16(0xffff), W16(0xfff9), W16(0x01bd), W16(0x2d5e),
- W16(0x0000), W16(0xffff), W16(0xfffc), W16(0x01d2), W16(0x2e73),
- W16(0x0000), W16(0xffff), W16(0xffff), W16(0x01e9), W16(0x2f84),
- W16(0x0000), W16(0x0000), W16(0x0003), W16(0x0201), W16(0x3091),
- W16(0x0000), W16(0x0000), W16(0x0008), W16(0x021a), W16(0x3199),
- W16(0x0000), W16(0x0000), W16(0x000a), W16(0x0235), W16(0x329c),
- W16(0x0000), W16(0x0000), W16(0x000e), W16(0x0251), W16(0x3399),
- W16(0x0000), W16(0x0000), W16(0x0012), W16(0x026e), W16(0x3491),
- W16(0x0000), W16(0x0000), W16(0x0014), W16(0x028c), W16(0x3583),
- W16(0x0000), W16(0x0000), W16(0x0018), W16(0x02ac), W16(0x366f),
- W16(0x0000), W16(0x0000), W16(0x001b), W16(0x02ce), W16(0x3753),
- W16(0x0000), W16(0x0000), W16(0x001b), W16(0x02f1), W16(0x3831),
- W16(0x0000), W16(0x0000), W16(0x001d), W16(0x0315), W16(0x3907),
- W16(0x0000), W16(0x0000), W16(0x001e), W16(0x033b), W16(0x39d6),
- W16(0x0000), W16(0x0000), W16(0x001e), W16(0x0362), W16(0x3a9c),
- W16(0x0000), W16(0x0000), W16(0x001d), W16(0x038a), W16(0x3b5a),
- W16(0x0000), W16(0x0000), W16(0x0019), W16(0x03b4), W16(0x3c0f),
- W16(0x0000), W16(0x0001), W16(0x000d), W16(0x03df), W16(0x3cbb),
- W16(0x0000), W16(0xffff), W16(0x0001), W16(0x040a), W16(0x3d5e),
- W16(0x0000), W16(0xfffe), W16(0x0017), W16(0x0439), W16(0x3df8),
- W16(0x0000), W16(0x0000), W16(0x001b), W16(0x0469), W16(0x3e89),
- W16(0x0000), W16(0x0000), W16(0x001a), W16(0x0499), W16(0x3f10),
- W16(0x0000), W16(0x0000), W16(0x001a), W16(0x04c9), W16(0x3f8f),
- W16(0x0000), W16(0x0000), W16(0x001c), W16(0x04fb), W16(0x4004),
- W16(0x0000), W16(0x0000), W16(0x001e), W16(0x052c), W16(0x406f),
- W16(0x0000), W16(0x0001), W16(0x001f), W16(0x055e), W16(0x40d1),
- W16(0x0000), W16(0x0000), W16(0x0020), W16(0x0590), W16(0x4129),
- W16(0x0000), W16(0x0000), W16(0x0022), W16(0x05c1), W16(0x4177),
- W16(0x0000), W16(0x0000), W16(0x0025), W16(0x05f2), W16(0x41bb),
- W16(0x0000), W16(0x0000), W16(0x0027), W16(0x0622), W16(0x41f5),
- W16(0x0000), W16(0xffff), W16(0x002a), W16(0x0652), W16(0x4226),
- W16(0x0000), W16(0xffff), W16(0x002c), W16(0x0680), W16(0x424e),
- W16(0x0000), W16(0x0000), W16(0x002e), W16(0x06ad), W16(0x426d),
- W16(0x0000), W16(0x0000), W16(0x002e), W16(0x06d9), W16(0x4284),
- W16(0x0000), W16(0x0000), W16(0x002f), W16(0x0702), W16(0x4293),
- W16(0x0000), W16(0x0000), W16(0x0030), W16(0x072a), W16(0x429b),
- W16(0x0000), W16(0x0000), W16(0x0031), W16(0x074f), W16(0x429b),
- W16(0x0000), W16(0x0000), W16(0x0032), W16(0x0772), W16(0x4295),
- W16(0x0000), W16(0x0000), W16(0x0032), W16(0x0792), W16(0x4288),
- W16(0x0000), W16(0x0000), W16(0x0032), W16(0x07af), W16(0x4274),
- W16(0x0000), W16(0x0001), W16(0x0031), W16(0x07ca), W16(0x4257),
- W16(0x0000), W16(0x0001), W16(0x002e), W16(0x07e1), W16(0x4232),
- W16(0x0000), W16(0xffff), W16(0x002c), W16(0x07f5), W16(0x4203),
- W16(0x0000), W16(0xfffe), W16(0x0029), W16(0x0806), W16(0x41ca),
- W16(0x0000), W16(0xfffe), W16(0x0024), W16(0x0813), W16(0x4186),
- W16(0x0000), W16(0xfffd), W16(0x001e), W16(0x081d), W16(0x4137),
- W16(0x0000), W16(0xfffa), W16(0x0019), W16(0x0823), W16(0x40de),
- W16(0x0000), W16(0xfff8), W16(0x0011), W16(0x0825), W16(0x407d),
- W16(0xffff), W16(0xfff3), W16(0x0006), W16(0x0821), W16(0x4023),
- W16(0xffff), W16(0xfff2), W16(0xfffb), W16(0x081d), W16(0x3f8c),
- W16(0x0000), W16(0xffed), W16(0xfff1), W16(0x0818), W16(0x3eb8),
- W16(0x0000), W16(0xffee), W16(0xffeb), W16(0x080d), W16(0x3deb),
- W16(0x0000), W16(0xfff2), W16(0xffe7), W16(0x07fd), W16(0x3d18),
- W16(0x0000), W16(0xfff5), W16(0xffe3), W16(0x07e8), W16(0x3c3c),
- W16(0x0000), W16(0xfff7), W16(0xffe0), W16(0x07ce), W16(0x3b58),
- W16(0x0000), W16(0xfffa), W16(0xffe0), W16(0x07ae), W16(0x3a6b),
- W16(0x0000), W16(0xfffe), W16(0xffe1), W16(0x0789), W16(0x3977),
- W16(0x0000), W16(0xffff), W16(0xffe4), W16(0x075e), W16(0x387d),
- W16(0x0000), W16(0xfffd), W16(0xffe8), W16(0x072d), W16(0x377e),
- W16(0x0000), W16(0xfffd), W16(0xffee), W16(0x06f6), W16(0x367b),
- W16(0x0000), W16(0xfffe), W16(0xfff4), W16(0x06b8), W16(0x3575),
- W16(0x0000), W16(0xfffe), W16(0xfffb), W16(0x0674), W16(0x346d),
- W16(0x0000), W16(0xfffe), W16(0x0002), W16(0x062a), W16(0x3363),
- W16(0x0000), W16(0xffff), W16(0x000a), W16(0x05d9), W16(0x3257),
- W16(0x0000), W16(0x0000), W16(0x0010), W16(0x0582), W16(0x314b),
- W16(0x0000), W16(0xffff), W16(0x0016), W16(0x0524), W16(0x303c),
- W16(0x0000), W16(0xffff), W16(0x001b), W16(0x04c0), W16(0x2f2c),
- W16(0x0000), W16(0x0000), W16(0x0021), W16(0x0455), W16(0x2e19),
- W16(0x0000), W16(0x0000), W16(0x0026), W16(0x03e4), W16(0x2d04),
- W16(0x0000), W16(0x0000), W16(0x0029), W16(0x036d), W16(0x2bed),
- W16(0x0000), W16(0x0000), W16(0x002c), W16(0x02f0), W16(0x2ad3),
- W16(0x0000), W16(0x0000), W16(0x002d), W16(0x026c), W16(0x29b7),
- W16(0x0000), W16(0x0000), W16(0x002c), W16(0x01e2), W16(0x2898),
- W16(0x0000), W16(0xffff), W16(0x002b), W16(0x0151), W16(0x2778),
- W16(0x0000), W16(0xfffe), W16(0x0029), W16(0x00bb), W16(0x2657),
- W16(0x0000), W16(0xfffd), W16(0x0026), W16(0x001d), W16(0x2534),
- W16(0x0000), W16(0xfffe), W16(0x0024), W16(0xff7a), W16(0x2411),
- W16(0x0000), W16(0x0005), W16(0x0021), W16(0xfed0), W16(0x22ed),
- W16(0x0000), W16(0x0009), W16(0x0021), W16(0xfe21), W16(0x21c8),
- W16(0x0000), W16(0xfff5), W16(0x001f), W16(0xfd6b), W16(0x20a2),
- W16(0x0000), W16(0xfff8), W16(0x0014), W16(0xfcae), W16(0x1f7c),
- W16(0x0000), W16(0x0001), W16(0x0009), W16(0xfbeb), W16(0x1e54),
- W16(0x0000), W16(0x0003), W16(0x0000), W16(0xfb23), W16(0x1d2c),
- W16(0x0000), W16(0x0002), W16(0xfff7), W16(0xfa55), W16(0x1c03),
- W16(0x0000), W16(0x0001), W16(0xffed), W16(0xf981), W16(0x1ad9),
- W16(0x0000), W16(0xffff), W16(0xffe3), W16(0xf8a7), W16(0x19b0),
- W16(0x0000), W16(0x0000), W16(0xffd8), W16(0xf7c8), W16(0x1886),
- W16(0x0000), W16(0x0001), W16(0xffcf), W16(0xf6e3), W16(0x175d),
- W16(0x0000), W16(0x0000), W16(0xffc5), W16(0xf5f9), W16(0x1636),
- W16(0x0000), W16(0x0001), W16(0xffbc), W16(0xf50a), W16(0x150f),
- W16(0x0000), W16(0x0001), W16(0xffb3), W16(0xf416), W16(0x13e9),
- W16(0x0000), W16(0x0001), W16(0xffaa), W16(0xf31d), W16(0x12c5),
- W16(0x0000), W16(0x0001), W16(0xffa2), W16(0xf21f), W16(0x11a0),
- W16(0x0000), W16(0x0000), W16(0xff99), W16(0xf11d), W16(0x107b),
- W16(0x0000), W16(0x0000), W16(0xff91), W16(0xf016), W16(0x0f55),
- W16(0x0000), W16(0x0001), W16(0xff89), W16(0xef0b), W16(0x0e2c),
- W16(0x0000), W16(0x0001), W16(0xff81), W16(0xedfc), W16(0x0d01),
- W16(0x0000), W16(0x0001), W16(0xff79), W16(0xece9), W16(0x0bd4),
- W16(0x0000), W16(0x0001), W16(0xff71), W16(0xebd2), W16(0x0aa5),
- W16(0x0000), W16(0x0001), W16(0xff68), W16(0xeab8), W16(0x0976),
- W16(0x0000), W16(0xfffd), W16(0xff5f), W16(0xe99b), W16(0x084a),
- W16(0x0000), W16(0xfffe), W16(0xff55), W16(0xe87a), W16(0x0724),
- W16(0x0000), W16(0x0003), W16(0xff4a), W16(0xe757), W16(0x0607),
- W16(0x0000), W16(0x0006), W16(0xff3f), W16(0xe632), W16(0x04f9),
- W16(0x0000), W16(0x0006), W16(0xff33), W16(0xe50a), W16(0x03fd),
- W16(0x0000), W16(0x000c), W16(0xff27), W16(0xe3e1), W16(0x0315),
- W16(0x0000), W16(0x0016), W16(0xff1a), W16(0xe2b7), W16(0x0244),
- W16(0x0000), W16(0x001e), W16(0xff0d), W16(0xe18b), W16(0x017f),
- W16(0x0002), W16(0x0020), W16(0xff00), W16(0xe05e), W16(0x00a9)
-};
-
-const Word16 CLDFB80_30[] =//Q.5
-{
- 0, -5, -30, 278, 8546,
- 0, -4, -33, 306, 9141,
- 0, -2, -29, 334, 9735,
- 0, -1, -17, 363, 10324,
- 0, -1, -13, 397, 10904,
- 0, -1, -9, 435, 11474,
- 0, -1, -2, 478, 12028,
- 0, 0, 6, 525, 12566,
- 0, 0, 12, 578, 13083,
- 0, 0, 19, 637, 13579,
- 0, 0, 26, 701, 14050,
- 0, 0, 28, 771, 14493,
- 0, 0, 30, 846, 14906,
- 0, 0, 28, 927, 15285,
- 0, 0, 4, 1012, 15630,
- 0, -1, 27, 1105, 15937,
- 0, -1, 26, 1201, 16209,
- 0, 0, 29, 1299, 16442,
- 0, 1, 31, 1399, 16638,
- 0, 0, 36, 1498, 16794,
- 0, 0, 41, 1594, 16911,
- 0, -1, 45, 1687, 16990,
- 0, 0, 46, 1774, 17036,
- 0, 0, 49, 1853, 17052,
- 0, 0, 50, 1922, 17040,
- 0, 0, 50, 1981, 16999,
- 0, 0, 45, 2027, 16924,
- 0, -1, 39, 2061, 16809,
- 0, -4, 27, 2080, 16651,
- 0, -10, 12, 2084, 16463,
- 0, -17, -10, 2075, 16161,
- 0, -16, -23, 2054, 15746,
- 0, -10, -31, 2012, 15307,
- 0, -4, -32, 1949, 14834,
- 0, -2, -26, 1862, 14334,
- 0, -3, -15, 1752, 13816,
- 0, -2, -1, 1616, 13288,
- 0, 0, 13, 1454, 12753,
- 0, -1, 25, 1267, 12212,
- 0, 0, 35, 1054, 11663,
- 0, 0, 42, 815, 11104,
- 0, 1, 45, 552, 10536,
- 0, -2, 42, 263, 9960,
- 0, -3, 37, -51, 9379,
- 0, 9, 33, -391, 8795,
- 0, -12, 25, -755, 8207,
- 0, 3, 4, -1144, 7616,
- 0, 2, -14, -1557, 7022,
- 0, -2, -34, -1992, 6427,
- 0, 0, -54, -2449, 5833,
- 0, 1, -73, -2927, 5244,
- 0, 1, -90, -3425, 4659,
- 0, 0, -107, -3942, 4072,
- 0, 1, -123, -4476, 3479,
- 0, 1, -139, -5026, 2877,
- 0, -1, -156, -5590, 2272,
- 0, 0, -176, -6167, 1684,
- 0, 6, -199, -6754, 1144,
- 0, 18, -223, -7348, 682,
- 0, 32, -249, -7947, 282
-};
-
-/*!
- * \brief CLDFB rRotVectr
- *
- * cldfb bands: 10
- * global gain: 8.00
- * scale: sqrt(1.0/16.00)
- */
-const Word16 rRotVectr_10[] =//Q(sqrt(1.0/16.00))
-{
- W16(0x5a71), W16(0x54ea), W16(0x4714), W16(0x3249), W16(0x1891)
-};
-
-/*!
- * \brief CLDFB iRotVectr
- *
- * cldfb bands: 10
- * global gain: 8.00
- * scale: sqrt(1.0/16.00)
- */
-const Word16 iRotVectr_10[] =//Q(sqrt(1.0/16.00))
-{
- W16(0xfc72), W16(0xe0ac), W16(0xc7f7), W16(0xb4be), W16(0xa8e3)
-};
-
-/*!
- * \brief CLDFB rRotVectr
- *
- * cldfb bands: 16
- * global gain: 5.00
- * scale: sqrt(1.0/8.00)
- */
-const Word16 rRotVectr_16[] =//Q(sqrt(1.0/8.00))
-{
- W16(0x652a), W16(0x62bc), W16(0x5c83), W16(0x52bc), W16(0x45c7),
- W16(0x3623), W16(0x246b), W16(0x114d)
-};
-
-/*!
- * \brief CLDFB iRotVectr
- *
- * cldfb bands: 16
- * global gain: 5.00
- * scale: sqrt(1.0/8.00)
- */
-const Word16 iRotVectr_16[] =//Q(sqrt(1.0/8.00))
-{
- W16(0xfd84), W16(0xe9d4), W16(0xd6fe), W16(0xc5bb), W16(0xb6b6),
- W16(0xaa82), W16(0xa196), W16(0x9c4c)
-};
-
-/*!
- * \brief CLDFB rRotVectr
- *
- * cldfb bands: 20
- * global gain: 4.00
- * scale: sqrt(1.0/8.00)
- */
-const Word16 rRotVectr_20[] =//Q(sqrt(1.0/8.00))
-{
- W16(0x5a7e), W16(0x591a), W16(0x5584), W16(0x4fd3), W16(0x482a),
- W16(0x3ebb), W16(0x33c1), W16(0x2780), W16(0x1a46), W16(0x0c67)
-};
-
-/*!
- * \brief CLDFB iRotVectr
- *
- * cldfb bands: 20
- * global gain: 4.00
- * scale: sqrt(1.0/8.00)
- */
-const Word16 iRotVectr_20[] =//Q(sqrt(1.0/8.00)
-{
- W16(0xfe39), W16(0xf017), W16(0xe259), W16(0xd556), W16(0xc95f),
- W16(0xbec1), W16(0xb5bf), W16(0xae90), W16(0xa963), W16(0xa658)
-};
-
-/*!
- * \brief CLDFB rRotVectr
- *
- * cldfb bands: 30
- * global gain: 2.50
- * scale: sqrt(1.0/4.00)
- */
-const Word16 rRotVectr_30[] =//Q(sqrt(1.0/4.00))
-{
- 25902, 25725, 25265, 24529, 23525, 22262, 20756, 19022, 17080, 14950, 12657, 10226, 7682, 5054, 2370
-};
-
-/*!
- * \brief CLDFB iRotVectr
- *
- * cldfb bands: 30
- * global gain: 2.50
- * scale: sqrt(1.0/4.00)
- */
-const Word16 iRotVectr_30[] =//Q(sqrt(1.0/4.00))
-{
- -339, -3045, -5717, -8327, -10845, -13245, -15499, -17584, -19476, -21154, -22601, -23801, -24739, -25406, -25796
-};
-/*!
- * \brief CLDFB rRotVectr
- *
- * cldfb bands: 32
- * global gain: 2.50
- * scale: sqrt(1.0/4.00)
- */
-const Word16 rRotVectr_32[] =//Q(sqrt(1.0/4.00))
-{
- W16(0x652f), W16(0x6494), W16(0x6300), W16(0x6078), W16(0x5d02),
- W16(0x58a7), W16(0x5371), W16(0x4d6e), W16(0x46ac), W16(0x3f3b),
- W16(0x372f), W16(0x2e9a), W16(0x2593), W16(0x1c2f), W16(0x1286),
- W16(0x08af)
-};
-
-/*!
- * \brief CLDFB iRotVectr
- *
- * cldfb bands: 32
- * global gain: 2.50
- * scale: sqrt(1.0/4.00)
- */
-const Word16 iRotVectr_32[] =//Q(sqrt(1.0/4.00))
-{
- W16(0xfec2), W16(0xf4d9), W16(0xeb0b), W16(0xe170), W16(0xd821),
- W16(0xcf35), W16(0xc6c1), W16(0xbed9), W16(0xb793), W16(0xb0ff),
- W16(0xab2d), W16(0xa62d), W16(0xa20b), W16(0x9ed0), W16(0x9c84),
- W16(0x9b2e)
-};
-
-/*!
- * \brief CLDFB rRotVectr
- *
- * cldfb bands: 40
- * global gain: 2.00
- * scale: sqrt(1.0/4.00)
- */
-const Word16 rRotVectr_40[] =//Q(sqrt(1.0/4.00))
-{
- W16(0x5a81), W16(0x5a28), W16(0x5941), W16(0x57cc), W16(0x55cd),
- W16(0x5347), W16(0x503d), W16(0x4cb4), W16(0x48b3), W16(0x443e),
- W16(0x3f5e), W16(0x3a1a), W16(0x347b), W16(0x2e88), W16(0x284c),
- W16(0x21d0), W16(0x1b1f), W16(0x1444), W16(0x0d48), W16(0x0637)
-};
-
-/*!
- * \brief CLDFB iRotVectr
- *
- * cldfb bands: 40
- * global gain: 2.00
- * scale: sqrt(1.0/4.00)
- */
-const Word16 iRotVectr_40[] =//Q(sqrt(1.0/4.00))
-{
- W16(0xff1d), W16(0xf803), W16(0xf0f7), W16(0xea02), W16(0xe330),
- W16(0xdc8b), W16(0xd61f), W16(0xcff4), W16(0xca15), W16(0xc48c),
- W16(0xbf60), W16(0xba9a), W16(0xb642), W16(0xb25e), W16(0xaef5),
- W16(0xac0b), W16(0xa9a6), W16(0xa7ca), W16(0xa678), W16(0xa5b4)
-};
-
-/*!
- * \brief CLDFB rRotVectr
- *
- * cldfb bands: 60
- * global gain: 1.33
- * scale: sqrt(1.0/2.00)
- */
-const Word16 rRotVectr_60[] =//Q(sqrt(1.0/2.00))
-{
- W16(0x6882), W16(0x6855), W16(0x67de), W16(0x671e), W16(0x6615),
- W16(0x64c5), W16(0x632f), W16(0x6153), W16(0x5f32), W16(0x5ccf),
- W16(0x5a2a), W16(0x5747), W16(0x5426), W16(0x50ca), W16(0x4d35),
- W16(0x496a), W16(0x456c), W16(0x413d), W16(0x3ce0), W16(0x3859),
- W16(0x33aa), W16(0x2ed6), W16(0x29e2), W16(0x24d0), W16(0x1fa5),
- W16(0x1a63), W16(0x150f), W16(0x0fac), W16(0x0a3e), W16(0x04c9)
-};
-
-/*!
- * \brief CLDFB iRotVectr
- *
- * cldfb bands: 60
- * global gain: 1.33
- * scale: sqrt(1.0/2.00)
- */
-const Word16 iRotVectr_60[] =//Q(sqrt(1.0/2.00))
-{
- W16(0xff51), W16(0xf9d9), W16(0xf465), W16(0xeefa), W16(0xe99a),
- W16(0xe44a), W16(0xdf0e), W16(0xd9e9), W16(0xd4de), W16(0xcff2),
- W16(0xcb27), W16(0xc682), W16(0xc204), W16(0xbdb3), W16(0xb990),
- W16(0xb59e), W16(0xb1e0), W16(0xae5a), W16(0xab0c), W16(0xa7fb),
- W16(0xa526), W16(0xa292), W16(0xa03f), W16(0x9e30), W16(0x9c65),
- W16(0x9ae0), W16(0x99a2), W16(0x98ac), W16(0x97fe), W16(0x9799)
-};
-
-const Word16 cldfb_anaScale[] = // Q0
-{
- SCALE_CLDFB_ANA_10, SCALE_CLDFB_ANA_16, SCALE_CLDFB_ANA_20, SCALE_CLDFB_ANA_32, SCALE_CLDFB_ANA_40, SCALE_CLDFB_ANA_60, SCALE_CLDFB_ANA_30
-};
-const Word16 cldfb_synScale[] = // Q0
-{
- SCALE_CLDFB_SYN_10, SCALE_CLDFB_SYN_16, SCALE_CLDFB_SYN_20, SCALE_CLDFB_SYN_32, SCALE_CLDFB_SYN_40, SCALE_CLDFB_SYN_60, SCALE_CLDFB_SYN_30
-};
-const Word16 cldfb_synGain[] =//Q0
-{
- 0x6666, /* 10 bands */
- 0x51EC, /* 16 bands */
- 0x6666, /* 20 bands */
- 0x51EC, /* 32 bands */
- 0x6666, /* 40 bands */
- 0x4CCD /* 60 bands */
-};
-
-const Word16 *cldfb_protoFilter_2_5ms[] =
-{
- CLDFB80_10, CLDFB80_16, CLDFB80_20, CLDFB80_32, CLDFB80_40, CLDFB80_60, CLDFB80_30
-};
-
-const Word16 cldfb_scale_2_5ms[7] =
-{
- 22603/*88.293854 Q8*/, /* 10 bands */
- 22605/*88.299622 Q8*/, /* 16 bands */
- 22605/*88.300926 Q8*/, /* 20 bands */
- 22606/*88.303848 Q8*/, /* 32 bands */
- 22606/*88.304718 Q8*/, /* 40 bands */
- 22535/*88.028412 Q8*/, /* 60 bands */
- 22588/*88.234489 Q8*/ /* 30 bands */
-};
-
-const Word16 cldfb_scale_5_0ms[7] =
-{
- 21649/*88.293854 Q8*/, /* 10 bands */
- 21649/*88.299622 Q8*/, /* 16 bands */
- 21649/*88.300926 Q8*/, /* 20 bands */
- 21649/*88.303848 Q8*/, /* 32 bands */
- 21649/*88.304718 Q8*/, /* 40 bands */
- 22535/*88.028412 Q8*/, /* 60 bands */
- 21581/*88.028412 Q8*/ /* 30 bands */
-};
-
-
-/*Q31*/
-const Word32 rot_vec_syn_re_L10_fx[5] =
-{
- 239910864 ,225255952 ,188551424 ,133390176 ,65171760 ,
-};
-
-
-/*Q31*/
-const Word32 rot_vec_syn_im_L10_fx[5] =
-{
- -9426123 ,-83101312 ,-148641968 ,-199632496 ,-231081632 ,
-};
-
-
-/*Q31*/
-const Word32 rot_vec_syn_re_L16_fx[8] =
-{
- 240023664 ,234262144 ,219498080 ,196298816 ,165555904 ,128450776 ,86409352 ,41047260 ,
-};
-
-
-/*Q31*/
-const Word32 rot_vec_syn_im_L16_fx[8] =
-{
- -5892250 ,-52605324 ,-97296808 ,-138249232 ,-173888800 ,-202845936 ,-224007808 ,-236561200 ,
-};
-
-
-/*Q31*/
-const Word32 rot_vec_syn_re_L20_fx[10] =
-{
- 240049696 ,236356848 ,226844128 ,211745744 ,191433472 ,166407488 ,137283984 ,104780104 ,69696184 ,32896112 ,
-};
-
-
-/*Q31*/
-const Word32 rot_vec_syn_im_L20_fx[10] =
-{
- -4713971 ,-42207980 ,-78662688 ,-113180456 ,-144911344 ,-173074048 ,-196975088 ,-216025936 ,-229757520 ,-237831712 ,
-};
-
-
-/*Q31*/
-const Word32 rot_vec_syn_re_L30_fx[15] =
-{
- 240075408 ,238431728 ,234175760 ,227354112 ,218041520 ,206340016 ,192377808 ,176307872 ,
- 158306272 ,138570240 ,117315992 ,94776408 ,71198440 ,46840400 ,21969170 ,
-};
-
-
-/*Q31*/
-const Word32 rot_vec_syn_im_L30_fx[15] =
-{
- -3142759 ,-28220256 ,-52988564 ,-77176320 ,-100518520 ,-122759408 ,-143655328 ,-162977328 ,
- -180513712 ,-196072352 ,-209482768 ,-220598064 ,-229296448 ,-235482592 ,-239088752 ,
-};
-
-
-/*Q31*/
-const Word32 rot_vec_syn_re_L32_fx[16] =
-{
- 240077888 ,238633056 ,234890064 ,228884944 ,220675536 ,210340896 ,197980576 ,183713584 ,
- 167677328 ,150026240 ,130930336 ,110573488 ,89151760 ,66871456 ,43947140 ,20599588 ,
-};
-
-
-/*Q31*/
-const Word32 rot_vec_syn_im_L32_fx[16] =
-{
- -2946347 ,-26463908 ,-49726608 ,-72510408 ,-94595904 ,-115770384 ,-135829936 ,-154581360 ,
- -171844080 ,-187451856 ,-201254368 ,-213118704 ,-222930576 ,-230595504 ,-236039664 ,-239210640 ,
-};
-
-
-/*Q31*/
-const Word32 rot_vec_syn_re_L40_fx[20] =
-{
- 240084400 ,239159360 ,236759824 ,232900592 ,227605456 ,220907040 ,212846672 ,203474016 ,
- 192846896 ,181030800 ,168098592 ,154130000 ,139211136 ,123434000 ,106895848 ,89698648 ,
- 71948424 ,53754620 ,35229396 ,16486972 ,
-};
-
-
-/*Q31*/
-const Word32 rot_vec_syn_im_L40_fx[20] =
-{
- -2357099 ,-21186638 ,-39885552 ,-58338564 ,-76431896 ,-94054000 ,-111096224 ,-127453512 ,
- -143025008 ,-157714704 ,-171432032 ,-184092416 ,-195617824 ,-205937184 ,-214986864 ,-222711088 ,
- -229062224 ,-234001104 ,-237497296 ,-239529232 ,
-};
-
-
-/*Q31*/
-const Word32 rot_vec_syn_re_L60_fx[30] =
-{
- 240090832 ,239679552 ,238611328 ,236889088 ,234517552 ,231503216 ,227854352 ,223580960 ,218694736 ,
- 213209088 ,207139056 ,200501264 ,193313904 ,185596688 ,177370784 ,168658704 ,159484336 ,149872832 ,
- 139850544 ,129444936 ,118684528 ,107598816 ,96218184 ,84573816 ,72697640 ,60622212 ,48380616 ,
- 36006412 ,23533520 ,10996123 ,
-};
-
-
-/*Q31*/
-const Word32 rot_vec_syn_im_L60_fx[30] =
-{
- -1571413 ,-14134643 ,-26659130 ,-39110548 ,-51454764 ,-63657948 ,-75686648 ,-87507896 ,-99089296 ,
- -110399096 ,-121406296 ,-132080736 ,-142393152 ,-152315264 ,-161819904 ,-170881008 ,-179473744 ,
- -187574544 ,-195161216 ,-202212960 ,-208710464 ,-214635904 ,-219973040 ,-224707248 ,-228825536 ,
- -232316640 ,-235170976 ,-237380736 ,-238939840 ,-239844032 ,
-};
-
-
-const Word16 bpf_weights_16_Fx[16] =
-{
- 16385/*0.500020f Q15*/, 23022/*0.702561f Q15*/, 6843/*0.208838f Q15*/, 51/*0.001553f Q15*/,
- 58/*0.001777f Q15*/, 45/*0.001370f Q15*/, 30/*0.000926f Q15*/, 18/*0.000554f Q15*/,
- 9/*0.000270f Q15*/, 3/*0.000080f Q15*/, 1/*0.000030f Q15*/, 3/*0.000082f Q15*/,
- 3/*0.000081f Q15*/, 2/*0.000052f Q15*/, 1/*0.000017f Q15*/, 1/*0.000016f Q15*/
-};
-
-const Word16 bpf_weights_16_ivas_fx[16] =
-{
- 32767/*0.999969f Q15*/, 23022/*0.702561f Q15*/, 6843/*0.208838f Q15*/, 51/*0.001553f Q15*/,
- 58/*0.001777f Q15*/, 45/*0.001370f Q15*/, 30/*0.000926f Q15*/, 18/*0.000554f Q15*/,
- 9/*0.000270f Q15*/, 3/*0.000080f Q15*/, 1/*0.000030f Q15*/, 3/*0.000082f Q15*/,
- 3/*0.000081f Q15*/, 2/*0.000052f Q15*/, 1/*0.000017f Q15*/, 1/*0.000016f Q15*/
-};
-const Word32 bpf_weights_16_ivas_fx_32[16] =
-{
- 1073784774/*1.000040f Q30*/, 754369130/*0.702561f Q30*/, 224238095/*0.208838f Q30*/, 1667521/*0.001553f Q30*/,
- 1908039/*0.001777f Q30*/, 1435593/*0.001370f Q30*/, 994285/*0.000926f Q30*/, 594853/*0.000554f Q30*/,
- 289910/*0.000270f Q30*/, 85899/*0.000080f Q30*/, 32212/*0.000030f Q30*/, 88047/*0.000082f Q30*/,
- 86973/*0.000081f Q30*/, 55835/*0.000052f Q30*/, 18254/*0.000017f Q30*/, 17179/*0.000016f Q30*/
-};
-
-
-/*-------------------------------------------------------------------*
- * LP CNG excitation details code book
- *-------------------------------------------------------------------*/
-
-const Word16 CNG_details_codebook_fx[64][NUM_ENV_CNG] = /* Q6 */
-{
- {443,547,613,547,510,471,540,479,586,535,565,611,532,500,462,551,498,463,446,484},
- {600,499,472,537,633,654,641,646,674,677,687,693,693,690,688,700,693,696,640,571},
- {529,537,501,582,537,474,505,491,521,545,561,591,566,609,570,608,636,655,649,524},
- {648,690,689,684,693,599,668,714,663,675,524,519,726,658,673,696,654,715,708,668},
- {623,630,660,656,686,688,637,666,630,555,470,468,464,445,502,583,615,545,605,592},
- {659,668,669,625,662,700,700,693,702,702,688,677,654,584,525,492,446,477,634,615},
- {634,648,656,552,520,557,662,659,572,617,691,683,684,666,673,695,682,698,680,623},
- {756,743,734,709,730,757,746,722,484,552,779,688,686,610,616,749,758,694,745,729},
- {549,568,556,625,683,619,609,667,663,684,709,649,691,668,594,511,525,617,542,684},
- {550,467,533,760,739,692,773,756,743,770,765,791,779,784,775,792,759,577,642,553},
- {658,674,656,651,670,582,593,520,467,470,522,589,600,596,587,631,652,679,645,669},
- {788,765,787,797,785,799,787,786,780,692,641,550,501,513,726,747,670,687,734,773},
- {641,654,668,673,665,682,689,684,697,665,664,593,544,494,458,537,622,650,635,635},
- {706,753,762,716,748,762,788,792,785,788,799,777,782,766,760,710,704,503,519,735},
- {748,775,784,635,717,504,539,640,764,778,681,721,791,786,787,780,780,770,774,781},
- {752,516,624,780,713,753,569,548,770,784,749,740,690,755,776,748,744,730,767,698},
- {453,471,516,517,561,653,659,616,629,608,682,698,679,681,645,587,594,522,499,469},
- {617,534,506,615,782,792,754,771,740,787,791,776,782,787,793,788,775,778,651,736},
- {661,593,490,495,491,495,554,656,658,611,628,660,680,677,698,678,673,699,687,679},
- {798,793,786,795,799,772,771,696,624,557,507,545,724,757,747,770,780,785,793,784},
- {703,695,703,714,697,701,697,631,598,498,475,451,503,611,648,664,664,683,679,688},
- {744,672,659,762,785,745,757,761,761,767,722,757,761,737,699,471,582,770,724,756},
- {775,746,535,680,541,513,697,723,743,744,769,741,741,738,769,772,779,743,714,724},
- {767,771,697,756,766,752,710,477,602,783,746,766,692,708,783,782,761,778,787,785},
- {483,588,700,665,665,640,650,717,699,707,692,698,700,692,668,650,609,610,540,484},
- {507,618,788,766,754,692,709,785,788,770,793,785,799,784,767,776,789,759,761,495},
- {709,712,706,678,661,604,503,480,653,664,664,639,621,675,695,689,704,681,711,709},
- {788,740,770,768,771,776,732,749,739,764,714,492,544,783,714,708,717,559,739,768},
- {758,771,789,779,777,799,791,785,779,779,752,675,718,510,501,600,727,750,752,758},
- {759,765,676,658,774,767,737,749,769,784,778,738,755,769,788,756,473,530,777,725},
- {669,665,721,653,499,774,780,781,767,561,690,747,722,779,757,727,764,745,770,736},
- {731,768,745,775,783,782,715,741,786,673,766,777,764,730,773,769,774,781,778,764},
- {557,505,545,604,660,672,604,596,580,612,587,556,546,597,530,494,437,480,546,555},
- {560,588,510,495,606,720,718,742,756,755,767,774,776,778,772,772,776,776,754,592},
- {680,644,620,612,516,477,471,499,502,598,664,588,656,682,689,671,668,672,682,692},
- {757,778,781,799,775,750,799,758,789,774,489,579,799,739,774,723,686,788,787,778},
- {705,685,654,680,672,680,657,579,574,619,639,518,482,545,665,587,540,599,606,651},
- {729,767,767,773,783,778,793,773,784,779,757,768,686,654,679,564,483,549,490,522},
- {725,693,715,588,522,629,721,647,697,684,614,725,708,674,715,729,717,725,689,738},
- {797,783,795,797,782,757,636,624,508,517,703,750,746,757,772,771,774,790,779,799},
- {556,591,652,692,728,712,698,688,704,718,728,717,713,693,716,558,490,540,620,678},
- {532,617,777,775,763,789,768,785,778,791,792,792,793,777,781,724,551,665,540,509},
- {710,697,706,717,673,679,620,581,546,474,562,684,680,675,660,656,702,680,701,708},
- {771,793,788,787,794,791,792,783,791,792,733,770,532,525,692,761,777,753,734,728},
- {724,695,678,652,695,735,697,712,714,721,696,710,569,581,570,522,642,704,748,726},
- {796,754,785,782,732,814,803,794,799,790,810,806,794,797,756,745,749,506,741,779},
- {793,767,785,780,724,648,488,747,784,771,793,740,759,805,794,796,795,795,801,806},
- {787,508,640,775,722,792,774,705,781,801,774,800,786,806,808,783,795,797,784,782},
- {654,649,601,597,594,667,646,662,615,623,651,671,669,674,682,653,624,484,473,665},
- {790,765,479,527,746,728,770,753,721,774,794,802,789,782,803,795,764,804,779,776},
- {738,699,642,509,515,501,466,614,702,612,683,720,687,717,704,739,714,733,721,718},
- {778,795,791,786,758,783,783,743,744,527,554,789,762,767,722,722,777,788,776,782},
- {694,696,700,696,709,710,696,689,674,662,581,538,496,637,644,681,679,671,689,704},
- {776,788,742,796,779,756,788,789,782,798,795,804,771,753,571,611,504,545,593,779},
- {799,717,747,682,487,573,766,774,775,762,711,802,799,796,790,787,802,789,773,786},
- {795,797,790,804,788,791,774,706,532,770,786,743,789,708,755,785,804,803,807,770},
- {568,722,738,680,713,703,693,749,703,705,740,720,712,631,621,727,730,722,574,612},
- {626,762,734,770,759,750,792,775,790,792,788,786,791,767,782,778,794,745,504,544},
- {774,784,779,753,654,560,530,532,555,699,742,695,716,767,770,772,778,780,779,782},
- {781,781,790,783,792,798,787,792,765,740,701,537,564,773,767,756,786,797,789,801},
- {738,717,799,794,772,784,774,790,788,748,789,769,768,763,504,587,783,751,784,732},
- {776,789,763,772,800,786,802,787,805,799,776,773,792,761,750,702,532,745,807,735},
- {765,778,764,484,607,791,757,760,700,687,789,777,779,783,768,791,778,757,784,770},
- {800,825,775,782,821,679,805,824,752,824,796,785,829,817,824,803,814,807,762,779}
-};
-/*-------------------------------------------------------------------*
- * FD CNG
- *-------------------------------------------------------------------*/
-
-const Word16 d_array[SIZE_SCALE_TABLE_CN] = { 1, 2, 5, 8, 10, 15, 20, 30, 40, 60, 80, 120, 140, 160, 180, 220, 260, 300 };
-const Word16 m_array[SIZE_SCALE_TABLE_CN] = { 0/*0.000f Q15*/, 8520/*0.260f Q15*/, 15729/*0.480f Q15*/, 19005/*0.580f Q15*/, 19988/*0.610f Q15*/, 21889/*0.668f Q15*/, 23101/*0.705f Q15*/, 24969/*0.762f Q15*/, 26214/*0.800f Q15*/, 27558/*0.841f Q15*/, 28344/*0.865f Q15*/, 29164/*0.890f Q15*/, 29491/*0.900f Q15*/, 29819/*0.910f Q15*/, 30147/*0.920f Q15*/, 30474/*0.930f Q15*/, 30638/*0.935f Q15*/, 30802/*0.940f Q15*/ };
-const Word16 msQeqInvAv_thresh[3] = { 328/*0.01f Q15*/, 983/*0.03f Q15*/, 1638/*0.05f Q15*/ };
-const Word16 msNoiseSlopeMax[4] = { 32767/*2.f Q14*/, 26214/*1.6f Q14*/, 21299/*1.3f Q14*/, 18022/*1.1f Q14*/ };
-
-
-const SCALE_SETUP scaleTableStereo[SIZE_SCALE_TABLE_STEREO] =
-{
- { 1, 0, 8000, /* -5.5f,*/ -704/*-5.5f Q7*/, -704 },
- { 1, 8000, 9600, /* -5.0f,*/ -640/*-5.0f Q7*/, -640 },
- { 1, 9600, 13200, /* -4.0f,*/ -512/*-4.0f Q7*/, -512 },
- { 1, 13200, 16400, /* -3.0f,*/ -384/*-3.0f Q7*/, -384 },
- { 1, 16400, 24400, /* -1.6f,*/ -204/*-1.6f Q7*/, -204 },
- { 1, 24400, 32000, /* -0.2f,*/ -26/*-1.6f Q7*/, -26 },
- { 1, 32000,512001, /* 0.0f,*/ 0 /*0.0f Q7*/, 0 },
-
- { 2, 0, 8000, /*-0.9f ,*/ -115/*-0.9f Q7*/, -115 },
- { 2, 8000, 9600, /*-0.65f,*/ -83/*-0.65f Q7*/, -83 },
- { 2, 9600, 13200, /*-2.0f ,*/ -256/*-2.0f Q7*/, -256 },
- { 2, 13200, 16400, /*-3.0f ,*/ -384/*-3.0f Q7*/, -384 },
- { 2, 16400, 24400, /*-0.8f ,*/ -102/*-0.8f Q7*/, -102 },
- { 2, 24400, 32000, /*-0.25f,*/ -32/*-0.25f Q7*/, -32 },
- { 2, 32000,512001, /* 0.0f ,*/ 0/* 0.0f Q7*/, 0 }
-};
-const SCALE_SETUP scaleTableMono[SIZE_SCALE_TABLE_MONO] =
-{
- { 0, 0, 8000, /* -5.5f,*/ -704/*-5.5f Q7*/, -704 },
- { 0, 8000, 9600, /* -5.0f,*/ -640/*-5.0f Q7*/, -640 },
- { 0, 9600, 13200, /* -4.0f,*/ -512/*-4.0f Q7*/, -512 },
- { 0, 13200, 16400, /* -3.0f,*/ -384/*-3.0f Q7*/, -384 },
- { 0, 16400, 24400, /* -1.5f,*/ -192/*-1.5f Q7*/, -192 },
- { 0, 24400,128001, /* -0.5f,*/ -64/*-0.5f Q7*/, -64 },
-
- { 1, 0, 8000, /*-5.5f ,*/ -704/*-5.5f Q7*/, -704 },
- { 1, 8000, 9600, /*-5.0f ,*/ -640/*-5.0f Q7*/, -640 },
- { 1, 9600, 13200, /*-1.55f,*/ -198/*-1.55f Q7*/, -198 },
- { 1, 13200, 16400, /*-3.0f ,*/ -384/*-3.0f Q7*/,-384 },
- { 1, 16400, 24400, /*-0.6f ,*/ -77/*-0.6f Q7*/, -77 },
- { 1, 24400, 32000, /*-0.2f ,*/ -26/*-0.2f Q7*/, -26 },
- { 1, 32000,128001, /* 0.0f ,*/ 0/* 0.0f Q7*/, 0 },
-
- { 2, 0, 8000, /*-0.9f ,*/ -115/*-0.9f Q7*/, -115 },
- { 2, 8000, 9600, /*-0.65f,*/ -83/*-0.65f Q7*/, -83 },
- { 2, 9600, 13200, /*-2.0f ,*/ -256/*-2.0f Q7*/, -256 },
- { 2, 13200, 16400, /*-3.0f ,*/ -384/*-3.0f Q7*/, -384 },
- { 2, 16400, 24400, /*-0.8f ,*/ -102/*-0.8f Q7*/, -102 },
- { 2, 24400, 32000, /*-0.25f,*/ -32/*-0.25f Q7*/, -32 },
- { 2, 32000,128001, /* 0.0f ,*/ 0/* 0.0f Q7*/,0 }
-};
-
-const SCALE_SETUP scaleTable_cn_only[SIZE_SCALE_TABLE_CN] =
-{
- { 0, 0, 8000, /*-3.5f,*/ 20295/*1.2387211385 Q14*/ /*-3.5f*/, 20295 },
- { 0, 8000, 9600, /*-3.0f,*/ 16306/*0.9952622652 Q14*/ /*-3.0f*/, 16306 },
- { 0, 9600, 13200, /*-2.5f,*/ 12751/*0.7782794237 Q14*/ /*-2.5f*/, 12751 },
- { 0, 13200, 16400, /*-2.0f,*/ 9583/*0.5848932266 Q14*/ /*-2.0f*/, 9583 },
- { 0, 16400,128001, /* 0.0f,*/ 0/*0.0000000000 Q14*/ /* 0.0f*/, 0 },
-
- { 1, 0, 8000, /*-3.0f,*/ 16306/*0.9952622652 Q14*/ /*-3.0f*/, 16306 },
- { 1, 8000, 9600, /*-2.5f,*/ 12751/*0.7782794237 Q14*/ /*-2.5f*/, 12751 },
- { 1, 9600, 13200, /*-1.5f,*/ 6759/*0.4125375748 Q14*/ /*-1.5f*/, 6759 },
- { 1, 13200, 16400, /*-2.5f,*/ 12751/*0.7782794237 Q14*/ /*-2.5f*/, 12751 },
- { 1, 16400, 24400, /*-0.5f,*/ 1999/*0.1220184565 Q14*/ /*-0.5f*/, 1999 },
- { 1, 24400,128001, /* 0.0f,*/ 0/*0.0000000000 Q14*/ /* 0.0f*/, 0 },
-
- { 2, 0, 8000, /*-2.5f,*/ 12751/*0.7782794237 Q14*/ /*-2.5f*/, 12751 },
- { 2, 8000, 9600, /*-2.5f,*/ 12751/*0.7782794237 Q14*/ /*-2.5f*/, 12751 },
- { 2, 9600, 13200, /*-2.0f,*/ 9583/*0.5848932266 Q14*/ /*-2.0f*/, 9583 },
- { 2, 13200, 16400, /*-1.0f,*/ 4242/*0.2589254379 Q14*/ /*-1.0f*/, 4242 },
-
- { 2, 16400, 24400, /*-0.5f,*/ 1999/*0.1220184565 Q14*/ /*-0.5f*/, 1999 },
- { 2, 24400, 32000, /* 0.0f,*/ 0/*0.0000000000 Q14*/ /* 0.0f*/, 0 },
- { 2, 32000,128001, /* 0.0f,*/ 0/*0.0000000000 Q14*/ /* 0.0f*/, 0 }
-};
-
-const SCALE_SETUP scaleTable_cn_dirac[15] =
-{
- { 0, 0, 13200, /*-3.0f,*/ 16306/*0.9952622652 Q14*/ /*-3.0f*/, 16306 },
- { 0, 13200, 16400, /*-2.5f,*/ 12751/*0.7782794237 Q14*/ /*-2.5f*/, 12751 },
- { 0, 16400, 24400, /*-2.0f,*/ 9583/*0.5848932266 Q14*/ /*-2.0f*/, 9583 },
- { 0, 24400, 32000, /*-1.5f,*/ 6759/*0.4125375748 Q14*/ /*-1.5f*/, 6759 },
- { 0, 32000,512001, /* 0.0f,*/ 0/*0.0000000000 Q14*/ /* 0.0f*/, 0 },
-
- { 1, 0, 13200, /*-3.0f,*/ 16306/*0.9952622652 Q14*/ /*-3.0f*/, 16306 },
- { 1, 13200, 16400, /*-2.5f,*/ 12751/*0.7782794237 Q14*/ /*-2.5f*/, 12751 },
- { 1, 16400, 24400, /*-2.0f,*/ 9583/*0.5848932266 Q14*/ /*-2.0f*/, 9583 },
- { 1, 24400, 32000, /*-1.5f,*/ 6759/*0.4125375748 Q14*/ /*-1.5f*/, 6759 },
- { 1, 32000,512001, /* 0.0f,*/ 0/*0.0000000000 Q14*/ /* 0.0f*/, 0 },
-
- { 2, 0, 13200, /*-3.0f,*/ 16306/*0.9952622652 Q14*/ /*-3.0f*/, 16306 },
- { 2, 13200, 16400, /*-2.5f,*/ 12751/*0.7782794237 Q14*/ /*-2.5f*/, 12751 },
- { 2, 16400, 24400, /*-2.0f,*/ 9583/*0.5848932266 Q14*/ /*-2.0f*/, 9583 },
- { 2, 24400, 32000, /*-1.5f,*/ 6759/*0.4125375748 Q14*/ /*-1.5f*/, 6759 },
- { 2, 32000,512001, /* 0.0f,*/ 0/*0.0000000000 Q14*/ /* 0.0f*/, 0 }
-};
-const Word16 scaleTable_cn_only_amrwbio[3][2] =
-{
- { ACELP_6k60, 24771/*1.5118864315 Q14*/ },
- { ACELP_8k85, 16306/*0.9952622652 Q14*/ },
- { ACELP_12k65, 9583/*0.5848932266 Q14*/ },
-};
-const Word32 scaleTable_cn_only_amrwbio_fx_by_10f[SIZE_SCALE_TABLE_CN_AMRWB][2] =//Q29
-{
- { ACELP_6k60, 858993459 },
- { ACELP_8k85, 644245094 },
- { ACELP_12k65, 429496729 }
-};
-
-const Word16 sidparts_encoder_noise_est[SIZE_SIDPARTS_ENC_NOISE_EST] = { 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 58, 68, 80, 92, 108, 126, 148, 176, 212, 255, 259, 264, 269, 279 }; // Q0
-
-const Word16 sidPartitions_nb[] = { 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 58, 68, 80, 92, 108, 126, 159 }; // Q0
-const Word16 sidPartitions_wb1[] = { 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 58, 68, 80, 92, 108, 126, 148, 176, 212, 255 }; // Q0
-const Word16 sidPartitions_wb2[] = { 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 58, 68, 80, 92, 108, 126, 148, 176, 212, 255, 259 }; // Q0
-const Word16 sidPartitions_wb3[] = { 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 58, 68, 80, 92, 108, 126, 148, 176, 212, 255, 319 }; // Q0
-const Word16 sidPartitions_swb1[] = { 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 58, 68, 80, 92, 108, 126, 148, 176, 212, 255, 259, 264, 269, 274 }; // Q0
-const Word16 sidPartitions_swb2[] = { 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 58, 68, 80, 92, 108, 126, 148, 176, 212, 255, 319, 324, 329, 339 }; // Q0
-
-const Word16 shapingPartitions_nb[] = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 25, 28, 31, 34, 37, 40, 43, 47, 51, 55, 59, 64, 69, 74, 80, 86, 93, 100, 108, 117, 126, 136, 159 }; // Q0
-const Word16 shapingPartitions_wb1[] = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 25, 28, 31, 34, 37, 40, 43, 47, 51, 55, 59, 64, 69, 74, 80, 86, 93, 100, 108, 117, 126, 135, 148, 162, 176, 192, 212, 232, 255 }; // Q0
-const Word16 shapingPartitions_wb2[] = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 25, 28, 31, 34, 37, 40, 43, 47, 51, 55, 59, 64, 69, 74, 80, 86, 93, 100, 108, 117, 126, 135, 148, 162, 176, 192, 212, 232, 255 }; // Q0
-const Word16 shapingPartitions_wb3[] = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 25, 28, 31, 34, 37, 40, 43, 47, 51, 55, 59, 64, 69, 74, 80, 86, 93, 100, 108, 117, 126, 136, 148, 176, 212, 256, 308, 319 }; // Q0
-const Word16 shapingPartitions_swb1[] = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 25, 28, 31, 34, 37, 40, 43, 47, 51, 55, 59, 64, 69, 74, 80, 86, 93, 100, 108, 117, 126, 135, 148, 162, 176, 192, 212, 232, 255 }; // Q0
-const Word16 shapingPartitions_swb2[] = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 25, 28, 31, 34, 37, 40, 43, 47, 51, 55, 59, 64, 69, 74, 80, 86, 93, 100, 108, 117, 126, 136, 148, 176, 212, 256, 308, 319 }; // Q0
-
-const FD_CNG_SETUP FdCngSetup_nb = { 512, 160, sizeof(sidPartitions_nb)/sizeof(Word16), sidPartitions_nb, sizeof(shapingPartitions_nb)/sizeof(Word16), shapingPartitions_nb };
-const FD_CNG_SETUP FdCngSetup_wb1 = { 512, 256, sizeof(sidPartitions_wb1)/sizeof(Word16), sidPartitions_wb1, sizeof(shapingPartitions_wb1)/sizeof(Word16), shapingPartitions_wb1 };
-const FD_CNG_SETUP FdCngSetup_wb2 = { 512, 256, sizeof(sidPartitions_wb2)/sizeof(Word16), sidPartitions_wb2, sizeof(shapingPartitions_wb2)/sizeof(Word16), shapingPartitions_wb2 };
-const FD_CNG_SETUP FdCngSetup_wb3 = { 640, 320, sizeof(sidPartitions_wb3)/sizeof(Word16), sidPartitions_wb3, sizeof(shapingPartitions_wb3)/sizeof(Word16), shapingPartitions_wb3 };
-const FD_CNG_SETUP FdCngSetup_swb1 = { 512, 256, sizeof(sidPartitions_swb1)/sizeof(Word16), sidPartitions_swb1, sizeof(shapingPartitions_swb1)/sizeof(Word16), shapingPartitions_swb1 };
-const FD_CNG_SETUP FdCngSetup_swb2 = { 640, 320, sizeof(sidPartitions_swb2)/sizeof(Word16), sidPartitions_swb2, sizeof(shapingPartitions_swb2)/sizeof(Word16), shapingPartitions_swb2 };
-
-
-const Word16 levels_37bits[FD_CNG_stages_37bits] = { 128, 64, 64, 64, 64, 64 }; // Q0
-const Word16 bits_37bits[FD_CNG_stages_37bits] = { 7, 6, 6, 6, 6, 6 }; // Q0
-
-/* IDCT_MATRIX_ROM: 18*24 Word16 = 432 Word16 */
-/* or compressed IDCT_MATRIX_ROM: 18*24 Word8 + 25 = 230 Word16 + WMOPS (INDIRECT(432) and STORE(432) ) */
-
-/* Stage1 Word8 tables 16x8+ 17*10+ 17*16 + 78*18 = = 1974 Word8 -> 987 Word16 */
-
-/* ROM storeSizeW8 = W8reduction (3072- (987+230) )/3072 = 1207/3072 --> 39.3 % */
-/* ROM with DCTII-24 in PROM = W8reduction (3072- (987) )/3072 = /3072 --> 31.8 % */
-
-/* additional minor Table ROM ( dct_mid points 18 Word16, dct_col_upshifts 52, scaleFactors 2*2 = ~= 74 Word16s */
-
-
-const Word16 cdk1_ivas_entries_per_segment[FDCNG_VQ_DCT_NSEGM] = { 16, 17, 17, 78 }; // Q0
-const Word16 cdk1_ivas_cum_entries_per_segment[FDCNG_VQ_DCT_NSEGM + 1] = { 0, 16 ,33, 50, 128 }; // Q0
-const Word16 /* DCT trunc_len */ cdk1_ivas_cols_per_segment[FDCNG_VQ_DCT_NSEGM] = { FDCNG_VQ_DCT_MINTRUNC, 10, 16, FDCNG_VQ_DCT_MAXTRUNC }; /* 8, 10, 16, 18 */
-const Word16 /* segment inner DCT trunc_len */ cdk1_ivas_trunc_dct_cols_per_segment[FDCNG_VQ_DCT_NSEGM] = { FDCNG_VQ_DCT_MAXTRUNC - FDCNG_VQ_DCT_MINTRUNC, FDCNG_VQ_DCT_MAXTRUNC - 10 , FDCNG_VQ_DCT_MAXTRUNC - 16 , 0 };
-
-/* to get back to FDCNG VQ domain for segment S use : idct as follows */
-/* cdk1r_vec[col, row] = cdk1r_tr_midQ_truncQ(col 1:24 ) + invScaleFQ * idctMat( cdk1_ivas_dct_sS_W8[1:col]<fftlen/2+1; j++) hs->fftSineTab[j] = (float)sin(2.0*EVS_PI*j/hs->fftlen); */
-
-
-const Word32 olapWinAna512_fx[512] = { /* Q30 */
- 4658693, 13975905, 23292590, 32608396, 41922980, 51235980, 60547056, 69855848,
- 79162008, 88465192, 97765048, 107061216, 116353360, 125641120, 134924144, 144202096,
- 153474624, 162741360, 172001968, 181256112, 190503440, 199743568, 208976192, 218200960,
- 227417488, 236625472, 245824528, 255014368, 264194560, 273364832, 282524800, 291674144,
- 300812512, 309939520, 319054880, 328158240, 337249248, 346327520, 355392768, 364444672,
- 373482816, 382506912, 391516576, 400511584, 409491456, 418455904, 427404576, 436337216,
- 445253408, 454152800, 463035104, 471900032, 480747136, 489576160, 498386752, 507178592,
- 515951328, 524704608, 533438144, 542151616, 550844672, 559516992, 568168256, 576798144,
- 585406272, 593992320, 602556096, 611097152, 619615168, 628109888, 636580992, 645028096,
- 653450880, 661849088, 670222400, 678570432, 686892992, 695189632, 703460096, 711704128,
- 719921344, 728111424, 736274112, 744409088, 752515968, 760594560, 768644608, 776665664,
- 784657408, 792619584, 800552064, 808454272, 816326144, 824167232, 831977280, 839756032,
- 847503104, 855218368, 862901376, 870551936, 878169728, 885754432, 893305728, 900823488,
- 908307264, 915756864, 923171904, 930552256, 937897664, 945207680, 952482048, 959720640,
- 966923136, 974089152, 981218496, 988310912, 995366080, 1002383808, 1009363840, 1016305856,
- 1023209536, 1030074688, 1036901120, 1043688512, 1050436672, 1057145152, 1063813888, 1070442688,
- 1077031040, 1083578880, 1090085888, 1096551936, 1102976640, 1109359872, 1115701248, 1122000640,
- 1128257792, 1134472576, 1140644480, 1146773504, 1152859392, 1158901888, 1164900608, 1170855680,
- 1176766592, 1182633088, 1188455168, 1194232448, 1199964800, 1205651968, 1211293824, 1216889984,
- 1222440320, 1227944704, 1233402752, 1238814464, 1244179456, 1249497600, 1254768768, 1259992704,
- 1265169152, 1270297984, 1275378944, 1280411904, 1285396736, 1290333056, 1295220992, 1300060032,
- 1304850048, 1309591040, 1314282624, 1318924928, 1323517440, 1328060032, 1332552832, 1336995328,
- 1341387520, 1345729152, 1350020224, 1354260352, 1358449536, 1362587648, 1366674432, 1370709632,
- 1374693376, 1378625408, 1382505344, 1386333312, 1390109184, 1393832576, 1397503616, 1401121920,
- 1404687488, 1408200320, 1411659904, 1415066496, 1418419840, 1421719680, 1424966016, 1428158720,
- 1431297664, 1434382720, 1437413760, 1440390656, 1443313408, 1446181632, 1448995584, 1451755008,
- 1454459648, 1457109632, 1459704704, 1462244864, 1464729856, 1467159808, 1469534464, 1471853824,
- 1474117760, 1476326272, 1478479104, 1480576256, 1482617728, 1484603264, 1486533120, 1488406912,
- 1490224640, 1491986176, 1493691648, 1495340800, 1496933760, 1498470400, 1499950464, 1501374080,
- 1502741248, 1504051840, 1505305856, 1506503168, 1507643648, 1508727424, 1509754368, 1510724480,
- 1511637888, 1512494208, 1513293568, 1514035968, 1514721408, 1515349760, 1515921152, 1516435456,
- 1516892672, 1517292672, 1517635584, 1517921408, 1518150144, 1518321664, 1518435968, 1518493184,
- 1518493184, 1518435968, 1518321664, 1518150144, 1517921408, 1517635584, 1517292672, 1516892672,
- 1516435456, 1515921152, 1515349760, 1514721408, 1514035968, 1513293568, 1512494208, 1511637888,
- 1510724480, 1509754368, 1508727424, 1507643648, 1506503040, 1505305728, 1504051840, 1502741248,
- 1501374080, 1499950464, 1498470272, 1496933760, 1495340800, 1493691648, 1491986176, 1490224640,
- 1488406784, 1486533120, 1484603264, 1482617728, 1480576256, 1478479104, 1476326272, 1474117760,
- 1471853824, 1469534464, 1467159808, 1464729856, 1462244864, 1459704704, 1457109504, 1454459648,
- 1451754880, 1448995584, 1446181632, 1443313408, 1440390656, 1437413760, 1434382720, 1431297664,
- 1428158720, 1424966016, 1421719680, 1418419712, 1415066496, 1411659904, 1408200192, 1404687488,
- 1401121920, 1397503488, 1393832576, 1390109056, 1386333312, 1382505344, 1378625280, 1374693376,
- 1370709632, 1366674432, 1362587648, 1358449536, 1354260352, 1350020096, 1345729024, 1341387392,
- 1336995200, 1332552704, 1328060032, 1323517440, 1318924800, 1314282624, 1309590912, 1304850048,
- 1300059904, 1295220864, 1290333056, 1285396736, 1280411904, 1275378944, 1270297856, 1265169024,
- 1259992576, 1254768640, 1249497600, 1244179456, 1238814336, 1233402752, 1227944576, 1222440192,
- 1216889984, 1211293696, 1205651840, 1199964672, 1194232320, 1188455040, 1182632960, 1176766464,
- 1170855552, 1164900608, 1158901760, 1152859264, 1146773504, 1140644352, 1134472448, 1128257664,
- 1122000640, 1115701120, 1109359744, 1102976512, 1096551808, 1090085760, 1083578752, 1077030912,
- 1070442560, 1063813824, 1057145088, 1050436608, 1043688448, 1036901056, 1030074624, 1023209472,
- 1016305728, 1009363776, 1002383744, 995365952, 988310848, 981218432, 974089024, 966922944,
- 959720576, 952481920, 945207488, 937897472, 930552192, 923171840, 915756736, 908307072,
- 900823296, 893305664, 885754240, 878169600, 870551808, 862901248, 855218240, 847503040,
- 839755968, 831977216, 824167104, 816326016, 808454208, 800551936, 792619520, 784657280,
- 776665472, 768644480, 760594496, 752515904, 744408960, 736273984, 728111296, 719921216,
- 711704000, 703460032, 695189504, 686892864, 678570368, 670222272, 661848960, 653450752,
- 645027968, 636580864, 628109760, 619615104, 611097024, 602555968, 593992256, 585406144,
- 576798016, 568168128, 559516864, 550844544, 542151488, 533438016, 524704480, 515951200,
- 507178432, 498386592, 489576032, 480747008, 471899904, 463035040, 454152672, 445253280,
- 436337056, 427404480, 418455744, 409491328, 400511456, 391516512, 382506816, 373482688,
- 364444544, 355392672, 346327392, 337249088, 328158112, 319054752, 309939392, 300812384,
- 291674016, 282524672, 273364704, 264194448, 255014224, 245824400, 236625328, 227417360,
- 218200832, 208976064, 199743440, 190503312, 181255984, 172001856, 162741232, 153474480,
- 144201968, 134924016, 125640984, 116353224, 107061080, 97764912, 88465064, 79161880,
- 69855712, 60546920, 51235848, 41922844, 32608264, 23292456, 13975772, 4658560
-};
-
-const Word32 olapWinAna640_fx[640] = { /* Q30 */
- 3726956, 11180779, 18634332, 26087438, 33539914, 40991584, 48442264, 55891776,
- 63339940, 70786584, 78231520, 85674560, 93115552, 100554288, 107990608, 115424328,
- 122855256, 130283240, 137708080, 145129584, 152547616, 159961952, 167372448, 174778896,
- 182181152, 189579008, 196972288, 204360832, 211744464, 219122960, 226496192, 233863984,
- 241226128, 248582448, 255932784, 263276976, 270614784, 277946112, 285270720, 292588448,
- 299899136, 307202592, 314498688, 321787136, 329067872, 336340672, 343605344, 350861792,
- 358109728, 365349088, 372579616, 379801184, 387013568, 394216640, 401410208, 408594112,
- 415768160, 422932192, 430086016, 437229536, 444362464, 451484736, 458596064, 465696416,
- 472785504, 479863168, 486929344, 493983712, 501026240, 508056672, 515074880, 522080640,
- 529073824, 536054304, 543021824, 549976256, 556917440, 563845248, 570759424, 577659840,
- 584546368, 591418816, 598276992, 605120768, 611949952, 618764352, 625563904, 632348352,
- 639117568, 645871424, 652609664, 659332224, 666038848, 672729472, 679403776, 686061824,
- 692703360, 699328128, 705936064, 712526976, 719100736, 725657216, 732196160, 738717440,
- 745220992, 751706496, 758173952, 764623104, 771053888, 777466048, 783859456, 790234048,
- 796589568, 802925888, 809242816, 815540288, 821818048, 828076096, 834314176, 840532096,
- 846729856, 852907136, 859063872, 865199872, 871315072, 877409344, 883482368, 889534144,
- 895564480, 901573248, 907560320, 913525504, 919468672, 925389632, 931288320, 937164672,
- 943018240, 948849280, 954657344, 960442432, 966204416, 971943104, 977658304, 983350016,
- 989017984, 994662144, 1000282368, 1005878464, 1011450368, 1016997760, 1022520768, 1028019136,
- 1033492736, 1038941376, 1044364992, 1049763520, 1055136768, 1060484416, 1065806656, 1071103168,
- 1076373888, 1081618688, 1086837376, 1092029952, 1097196160, 1102335872, 1107449088, 1112535680,
- 1117595392, 1122628224, 1127633920, 1132612480, 1137563776, 1142487680, 1147383936, 1152252672,
- 1157093632, 1161906688, 1166691712, 1171448576, 1176177280, 1180877696, 1185549568, 1190193024,
- 1194807680, 1199393536, 1203950464, 1208478464, 1212977408, 1217447040, 1221887232, 1226298112,
- 1230679424, 1235031040, 1239352960, 1243644928, 1247907072, 1252139008, 1256340864, 1260512384,
- 1264653440, 1268764288, 1272844288, 1276893824, 1280912512, 1284900352, 1288857216, 1292782976,
- 1296677760, 1300541056, 1304373120, 1308173824, 1311942912, 1315680512, 1319386240, 1323060224,
- 1326702336, 1330312576, 1333890688, 1337436672, 1340950400, 1344431872, 1347880960, 1351297536,
- 1354681472, 1358032896, 1361351424, 1364637312, 1367890304, 1371110272, 1374297216, 1377451008,
- 1380571776, 1383659136, 1386713216, 1389733760, 1392720896, 1395674496, 1398594432, 1401480704,
- 1404333312, 1407151872, 1409936640, 1412687360, 1415404160, 1418086784, 1420735232, 1423349376,
- 1425929344, 1428475008, 1430986112, 1433462784, 1435904896, 1438312448, 1440685312, 1443023360,
- 1445326848, 1447595392, 1449828992, 1452027776, 1454191616, 1456320256, 1458413824, 1460472448,
- 1462495616, 1464483712, 1466436480, 1468353920, 1470235904, 1472082688, 1473893760, 1475669376,
- 1477409536, 1479113984, 1480782720, 1482416000, 1484013440, 1485575040, 1487100928, 1488591104,
- 1490045184, 1491463424, 1492845824, 1494192256, 1495502592, 1496776960, 1498015232, 1499217280,
- 1500383360, 1501513344, 1502606976, 1503664512, 1504685824, 1505670912, 1506619520, 1507532032,
- 1508408192, 1509247872, 1510051200, 1510818304, 1511548928, 1512243072, 1512900864, 1513522176,
- 1514107008, 1514655360, 1515167104, 1515642496, 1516081408, 1516483584, 1516849280, 1517178496,
- 1517471232, 1517727232, 1517946752, 1518129664, 1518276096, 1518385792, 1518459008, 1518495488,
- 1518495488, 1518459008, 1518385792, 1518276096, 1518129664, 1517946752, 1517727232, 1517471104,
- 1517178496, 1516849280, 1516483584, 1516081280, 1515642496, 1515167104, 1514655360, 1514107008,
- 1513522176, 1512900864, 1512243072, 1511548928, 1510818304, 1510051200, 1509247872, 1508408192,
- 1507532032, 1506619520, 1505670912, 1504685696, 1503664512, 1502606976, 1501513344, 1500383360,
- 1499217280, 1498015232, 1496776960, 1495502592, 1494192128, 1492845824, 1491463424, 1490045184,
- 1488590976, 1487100928, 1485575040, 1484013312, 1482416000, 1480782720, 1479113984, 1477409536,
- 1475669376, 1473893760, 1472082560, 1470235904, 1468353920, 1466436480, 1464483712, 1462495616,
- 1460472320, 1458413824, 1456320256, 1454191488, 1452027776, 1449828992, 1447595392, 1445326848,
- 1443023360, 1440685312, 1438312448, 1435904768, 1433462656, 1430986112, 1428474880, 1425929344,
- 1423349376, 1420735104, 1418086784, 1415404160, 1412687360, 1409936640, 1407151872, 1404333184,
- 1401480704, 1398594432, 1395674496, 1392720896, 1389733760, 1386713088, 1383659008, 1380571648,
- 1377451008, 1374297216, 1371110272, 1367890304, 1364637312, 1361351424, 1358032768, 1354681472,
- 1351297408, 1347880832, 1344431744, 1340950272, 1337436672, 1333890688, 1330312576, 1326702336,
- 1323060224, 1319386240, 1315680384, 1311942912, 1308173696, 1304373120, 1300541056, 1296677632,
- 1292782848, 1288857088, 1284900224, 1280912512, 1276893696, 1272844288, 1268764160, 1264653440,
- 1260512256, 1256340736, 1252138880, 1247906944, 1243644800, 1239352832, 1235030912, 1230679296,
- 1226297984, 1221887104, 1217446912, 1212977280, 1208478336, 1203950464, 1199393408, 1194807552,
- 1190192896, 1185549440, 1180877696, 1176177280, 1171448576, 1166691584, 1161906560, 1157093504,
- 1152252544, 1147383808, 1142487552, 1137563648, 1132612352, 1127633792, 1122628096, 1117595264,
- 1112535552, 1107448960, 1102335872, 1097196032, 1092029824, 1086837248, 1081618560, 1076373888,
- 1071103104, 1065806592, 1060484352, 1055136576, 1049763456, 1044364928, 1038941312, 1033492608,
- 1028019072, 1022520704, 1016997696, 1011450240, 1005878400, 1000282304, 994662080, 989017920,
- 983349888, 977658240, 971942976, 966204288, 960442368, 954657280, 948849152, 943018176,
- 937164480, 931288192, 925389504, 919468544, 913525312, 907560192, 901573184, 895564416,
- 889534016, 883482304, 877409152, 871314944, 865199808, 859063744, 852907008, 846729728,
- 840532032, 834314112, 828075968, 821817984, 815540096, 809242752, 802925696, 796589376,
- 790233856, 783859392, 777465984, 771053824, 764622976, 758173824, 751706432, 745220864,
- 738717312, 732196032, 725657088, 719100608, 712526848, 705935936, 699328000, 692703232,
- 686061760, 679403712, 672729280, 666038720, 659332096, 652609536, 645871296, 639117440,
- 632348224, 625563776, 618764224, 611949824, 605120640, 598276864, 591418688, 584546240,
- 577659712, 570759296, 563845120, 556917312, 549976128, 543021696, 536054144, 529073696,
- 522080512, 515074752, 508056512, 501026112, 493983648, 486929216, 479863072, 472785376,
- 465696288, 458596000, 451484608, 444362336, 437229408, 430085952, 422932064, 415768032,
- 408593952, 401410080, 394216512, 387013440, 379801024, 372579456, 365348960, 358109632,
- 350861664, 343605248, 336340544, 329067744, 321787008, 314498528, 307202464, 299899008,
- 292588320, 285270592, 277945984, 270614656, 263276832, 255932656, 248582320, 241225984,
- 233863840, 226496064, 219122832, 211744320, 204360704, 196972144, 189578864, 182181008,
- 174778768, 167372304, 159961824, 152547472, 145129456, 137707936, 130283104, 122855136,
- 115424192, 107990472, 100554160, 93115416, 85674432, 78231384, 70786448, 63339808,
- 55891640, 48442128, 40991448, 33539780, 26087306, 18634200, 11180647, 3726823
-};
-
-/* Synthesis windows for overlap-add */
-/* for (j=0; jfftlen; j++) hs->olapWinSyn[j] = (float)sin(EVS_PI*((float)j+0.5f)/(float)(hs->fftlen); */
-
-const Word16 olapWinSyn256_fx[256] =
-{//Q15
- 201, 603, 1005, 1407, 1808, 2210, 2611, 3011, 3411, 3811, 4210, 4609, 5006, 5403, 5800, 6195,
- 6589, 6983, 7375, 7766, 8156, 8545, 8933, 9319, 9704, 10087, 10469, 10849, 11228, 11605, 11980, 12353,
- 12725, 13094, 13462, 13828, 14191, 14552, 14912, 15269, 15623, 15976, 16325, 16673, 17018, 17360, 17700, 18037,
- 18371, 18703, 19032, 19358, 19681, 20001, 20318, 20631, 20942, 21250, 21555, 21856, 22154, 22448, 22740, 23027,
- 23312, 23593, 23870, 24144, 24414, 24680, 24943, 25201, 25457, 25708, 25955, 26199, 26438, 26674, 26905, 27133,
- 27356, 27576, 27791, 28002, 28208, 28411, 28609, 28803, 28993, 29178, 29359, 29535, 29707, 29874, 30037, 30196,
- 30350, 30499, 30644, 30784, 30919, 31050, 31176, 31298, 31414, 31526, 31634, 31736, 31834, 31927, 32015, 32098,
- 32176, 32250, 32319, 32383, 32442, 32496, 32545, 32589, 32629, 32663, 32693, 32718, 32737, 32752, 32762, 32767,
- 32767, 32762, 32752, 32737, 32718, 32693, 32663, 32629, 32589, 32545, 32496, 32442, 32383, 32319, 32250, 32176,
- 32098, 32015, 31927, 31834, 31736, 31634, 31526, 31414, 31298, 31176, 31050, 30919, 30784, 30644, 30499, 30350,
- 30196, 30037, 29874, 29707, 29535, 29359, 29178, 28993, 28803, 28609, 28411, 28208, 28002, 27791, 27576, 27356,
- 27133, 26905, 26674, 26438, 26199, 25955, 25708, 25457, 25201, 24943, 24680, 24414, 24144, 23870, 23593, 23312,
- 23027, 22740, 22448, 22154, 21856, 21555, 21250, 20942, 20631, 20318, 20001, 19681, 19358, 19032, 18703, 18371,
- 18037, 17700, 17360, 17018, 16673, 16325, 15976, 15623, 15269, 14912, 14552, 14191, 13828, 13462, 13094, 12725,
- 12353, 11980, 11605, 11228, 10849, 10469, 10087, 9704, 9319, 8933, 8545, 8156, 7766, 7375, 6983, 6589,
- 6195, 5800, 5403, 5006, 4609, 4210, 3811, 3411, 3011, 2611, 2210, 1808, 1407, 1005, 603, 201
-};
-
-
-const Word16 olapWinSyn320_fx[320] =
-{//Q15
- 160, 482, 804, 1125, 1447, 1768, 2089, 2410, 2731, 3051,
- 3371, 3691, 4011, 4330, 4648, 4967, 5284, 5602, 5918, 6234,
- 6550, 6865, 7179, 7493, 7805, 8117, 8429, 8739, 9049, 9358,
- 9665, 9972, 10278, 10583, 10887, 11190, 11492, 11793, 12092, 12391,
- 12688, 12984, 13278, 13572, 13864, 14155, 14444, 14732, 15019, 15304,
- 15588, 15870, 16151, 16430, 16707, 16983, 17258, 17530, 17801, 18070,
- 18338, 18604, 18868, 19130, 19390, 19648, 19905, 20159, 20412, 20663,
- 20911, 21158, 21403, 21645, 21886, 22124, 22360, 22594, 22826, 23056,
- 23283, 23509, 23732, 23952, 24171, 24387, 24600, 24812, 25021, 25227,
- 25431, 25633, 25832, 26029, 26223, 26415, 26604, 26790, 26974, 27155,
- 27334, 27510, 27684, 27854, 28023, 28188, 28351, 28511, 28668, 28822,
- 28974, 29123, 29269, 29412, 29552, 29690, 29825, 29956, 30085, 30211,
- 30334, 30455, 30572, 30686, 30797, 30906, 31011, 31114, 31213, 31309,
- 31403, 31493, 31581, 31665, 31746, 31824, 31899, 31971, 32040, 32106,
- 32169, 32229, 32285, 32339, 32389, 32436, 32480, 32521, 32559, 32594,
- 32625, 32653, 32679, 32701, 32720, 32736, 32748, 32758, 32764, 32767,
- 32767, 32764, 32758, 32748, 32736, 32720, 32701, 32679, 32653, 32625,
- 32594, 32559, 32521, 32480, 32436, 32389, 32339, 32285, 32229, 32169,
- 32106, 32040, 31971, 31899, 31824, 31746, 31665, 31581, 31493, 31403,
- 31309, 31213, 31114, 31011, 30906, 30797, 30686, 30572, 30455, 30334,
- 30211, 30085, 29956, 29825, 29690, 29552, 29412, 29269, 29123, 28974,
- 28822, 28668, 28511, 28351, 28188, 28023, 27854, 27684, 27510, 27334,
- 27155, 26974, 26790, 26604, 26415, 26223, 26029, 25832, 25633, 25431,
- 25227, 25021, 24812, 24600, 24387, 24171, 23952, 23732, 23509, 23283,
- 23056, 22826, 22594, 22360, 22124, 21886, 21645, 21403, 21158, 20911,
- 20663, 20412, 20159, 19905, 19648, 19390, 19130, 18868, 18604, 18338,
- 18070, 17801, 17530, 17258, 16983, 16707, 16430, 16151, 15870, 15588,
- 15304, 15019, 14732, 14444, 14155, 13864, 13572, 13278, 12984, 12688,
- 12391, 12092, 11793, 11492, 11190, 10887, 10583, 10278, 9972, 9665,
- 9358, 9049, 8739, 8429, 8117, 7805, 7493, 7179, 6865, 6550,
- 6234, 5918, 5602, 5284, 4967, 4648, 4330, 4011, 3691, 3371,
- 3051, 2731, 2410, 2089, 1768, 1447, 1125, 804, 482, 160
-};
-
-/*-------------------------------------------------------------------*
- * AMR-WB ISF codebook - common 1st stage for 46bit and 36bit codebooks,
- * 2 splits
- *
- * codebook vector dimension number of vectors
- * ~~~~~~~~ ~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
- * 1_1 9 256
- * 1_2 7 256
- *-------------------------------------------------------------------*/
-
-/*-------------------------------------------------------------------*
- * 1nd stage, 1st split: ISF0 to ISF8
- *-------------------------------------------------------------------*/
-
-const Word16 dico1_isf_fx[] =
-{/*Qlog2(2.56)*/
- 740, 1263, 1292, 1006, 997, 1019, 1017, 976, 923,
- 557, 946, 1049, 867, 846, 990, 1112, 1262, 1241,
- 633, 898, 996, 756, 662, 683, 783, 909, 996,
- 830, 736, 278, 820, 1254, 686, 712, 1039, 473,
- 503, 885, 1508, 1307, 1282, 1172, 1119, 1209, 1061,
- 416, 719, 989, 1227, 1001, 1052, 954, 741, 1044,
- 585, 1132, 1233, 1091, 1247, 1433, 1512, 1448, 1314,
- -31, 469, 803, 659, 619, 658, 843, 987, 1113,
- 842, 1678, 1841, 1549, 1474, 1256, 1082, 905, 742,
- 370, 1216, 1768, 1633, 1212, 636, 22, -330, 71,
- 73, 738, 893, 968, 993, 1768, 2273, 1840, 1391,
- 1513, 1714, 1238, 534, 276, 315, 461, 459, 508,
- 421, 1293, 1640, 1623, 1742, 1617, 1499, 1284, 1006,
- -95, 752, 1680, 1569, 1618, 1436, 1200, 980, 712,
- -78, 831, 1194, 1110, 1378, 1481, 1492, 1365, 1217,
- 670, 1208, 1168, 860, 742, 601, 528, 403, 309,
- 397, 621, 966, 752, 579, 398, 400, 329, 252,
- 510, 864, 1108, 807, 939, 902, 925, 717, 481,
- 539, 835, 913, 719, 617, 544, 591, 565, 642,
- 162, 889, 654, 108, -34, 244, 488, 561, 532,
- -62, 1033, 1308, 1035, 1127, 1098, 1029, 961, 823,
- -14, 945, 990, 801, 755, 815, 847, 913, 892,
- 394, 1765, 1666, 1339, 1117, 806, 642, 479, 380,
- 529, 1851, 2003, 1228, 622, -41, -416, 344, 819,
- 635, 1058, 883, 492, 372, 312, 317, 274, 241,
- 279, 966, 1642, 1478, 1463, 1123, 795, 525, 339,
- 457, 955, 1177, 1214, 1427, 1457, 1345, 917, 539,
- 148, 751, 1515, 1105, 867, 606, 474, 448, 399,
- 579, 1081, 1035, 390, 3, -263, -198, -82, 38,
- 18, -68, -12, 313, 761, 405, 249, 111, -76,
- -91, 827, 948, 648, 613, 535, 522, 490, 421,
- 41, -44, -281, -472, 652, 534, 193, 135, -90,
- 41, -121, -356, -60, 663, 307, 61, -48, -344,
- -118, -204, 328, 512, 870, 793, 610, 402, 186,
- 156, 293, 74, -338, -475, -897, -594, -161, -497,
- 226, 131, -138, 307, 169, -271, -164, -387, -624,
- 62, -32, -61, -252, -541, -828, -1027, -523, -662,
- 102, -61, 141, 112, -270, -251, -541, 25, -150,
- 6, -132, -356, -686, -96, -322, -522, -31, -326,
- -36, -209, -521, -229, 307, -132, -5, -99, -384,
- 60, -51, -237, -668, -973, -407, -708, -75, -172,
- 26, -138, -266, 111, -302, 43, -278, -356, -359,
- 570, 822, 496, -154, -312, -92, 137, 279, 371,
- -146, 368, 409, 68, 6, 77, 167, 202, 162,
- -103, 294, 607, 415, 483, 462, 480, 431, 408,
- -120, -338, -612, -524, 584, 331, 92, 433, 276,
- -178, -293, -154, -41, 269, 100, -9, 213, 160,
- -218, -304, 463, 454, 397, 273, 202, 286, 273,
- -232, 7, 6, -388, -472, -427, -378, -167, -100,
- -294, -183, 134, -47, 101, -88, -84, -117, -3,
- 57, 17, -202, -634, -989, -1119, -533, 176, -36,
- 120, -28, 23, 111, -319, 318, -22, -77, 266,
- -271, -464, -434, -658, -640, -385, -385, -99, -69,
- -198, -259, -266, -44, -39, -139, -137, 171, 66,
- 9, -145, -377, -846, -1000, -111, -325, 342, 135,
- -81, -286, -380, 192, -57, 307, 76, -24, -140,
- 677, 702, 247, 56, 249, 141, -105, -236, -99,
- 36, -39, -69, 348, 198, -93, 322, 91, -72,
- -127, -376, -657, 139, 623, 223, 501, 306, 220,
- -113, -384, -796, 504, 438, 85, 213, -83, -194,
- -174, -422, 7, 1155, 1089, 1182, 1003, 945, 806,
- 8, -126, -317, -103, -351, -695, -98, -268, -537,
- 33, -103, -290, 167, -39, -407, 44, -208, -375,
- 104, -23, -64, -291, -637, -851, -1084, -61, -112,
- -75, -306, -434, 218, -148, -354, -680, -133, -216,
- -121, -377, -718, -97, -130, -361, -156, -379, -599,
- -56, -254, -586, 235, 157, -214, 11, -260, -149,
- -124, -267, -397, -580, -593, -527, -805, -385, 346,
- -193, -440, -708, -351, -141, -255, -499, -147, -185,
- 448, 660, 494, 208, 509, 461, 338, 291, 149,
- -223, 88, 335, 159, 212, 191, 286, 308, 205,
- -171, -242, 514, 362, 295, 524, 552, 694, 585,
- -64, -308, -448, -21, 284, 786, 446, 289, 92,
- -218, -390, -7, 169, 206, 330, 352, 408, 358,
- -36, 702, 959, 859, 861, 1115, 1269, 1357, 1305,
- -133, -341, -65, 678, 417, 440, 486, 518, 780,
- 33, -44, -191, -344, -461, -755, -201, 217, -31,
- -353, -547, -44, 123, -61, -68, -79, 29, 60,
- 73, -57, -406, -766, -1243, -1203, 240, 400, 165,
- -73, -282, -601, -213, -171, -375, 332, 35, -103,
- -29, -207, -553, -476, -638, -908, 172, -22, -135,
- -192, -239, -164, -103, -111, -47, 153, 125, 110,
- -1, -203, -570, -1030, -1424, -535, 155, 1, 147,
- -333, -653, -865, -197, -158, -21, -44, 95, 108,
- 389, 588, 490, 33, -237, -524, -628, -136, -260,
- 40, -177, -462, 453, 862, 380, 131, -130, -405,
- -76, -281, -741, -742, 898, 619, 277, 71, -222,
- -32, -265, -556, -25, 994, 682, 305, 126, -165,
- -69, -349, -585, 234, 1158, 903, 626, 510, 251,
- -1, -99, -272, -210, -603, -351, -540, -811, -383,
- -16, -230, -504, 410, 149, -205, -343, -651, -639,
- 103, -9, -227, -205, -562, -781, -1079, -1208, -156,
- 143, 63, -135, -67, -317, -602, -784, -1154, -640,
- -144, -391, -674, -622, -200, -254, -660, -947, -395,
- -40, -250, -625, 27, 543, 94, -131, -386, -673,
- -123, -371, -757, -451, -564, -614, -415, -711, -35,
- -116, -309, -593, -268, 239, -33, -338, -650, -135,
- 94, 251, 554, 57, -312, -423, -154, -57, 235,
- -268, -71, 381, 114, -44, -87, 125, 173, 133,
- -131, -19, 1149, 670, 486, 356, 309, 369, 296,
- -223, -501, -899, -722, -70, 6, 131, 310, 394,
- -99, -303, -517, 249, 64, -53, 135, -11, 453,
- -147, -399, -730, -401, 817, 738, 802, 749, 575,
- -154, -435, -739, 800, 593, 366, 529, 318, 326,
- -224, 45, -39, -387, -515, -518, -608, -384, -321,
- -315, -377, 143, -101, -113, -377, -177, -144, -12,
- 117, 40, -239, -651, -1051, -581, -737, -990, -328,
- 26, -50, -157, -23, -453, -283, -531, -546, 192,
- -252, -501, -743, -589, -627, -499, -328, -118, -72,
- -324, -494, -244, -306, -144, -177, -262, -135, -78,
- -36, -234, -519, -961, -1290, -314, -479, -371, -45,
- -95, -292, -535, -8, -300, 112, -164, -277, 198,
- -99, -128, 880, 836, 579, 351, 23, -95, -217,
- -27, -258, 124, 1011, 597, 425, 144, 7, -73,
- -69, -300, -683, -435, 1132, 899, 504, 332, 109,
- -74, -323, -637, 563, 1074, 608, 371, 105, -49,
- -259, -121, 1440, 1334, 1628, 1490, 1438, 1223, 933,
- -82, -306, -613, -222, -378, -675, -545, -671, -845,
- 53, -124, -347, 422, 52, -125, -270, -529, 9,
- 79, -89, -320, -662, -999, -1199, -1243, -676, -297,
- -68, -273, -611, 137, -146, -397, -627, -845, -220,
- -112, -346, -797, -826, 234, -132, -188, -278, -522,
- -159, -405, -734, -419, 293, 74, -167, -167, 184,
- -153, -437, -833, -1080, -336, -472, -561, -340, -253,
- -169, -423, -820, -904, -131, -19, -346, -604, 31,
- 33, -31, 312, 62, -148, 49, -59, 564, 486,
- -306, -333, 194, -44, 67, 72, 147, 205, 243,
- -207, -49, 1360, 983, 969, 991, 1014, 1110, 973,
- -211, -172, 883, 627, 711, 674, 705, 798, 746,
- -88, -325, -763, -974, 687, 908, 514, 382, 172,
- -292, -612, -805, 63, 131, 270, 259, 352, 348,
- -235, -84, 955, 818, 1120, 1289, 1559, 1480, 1285,
- -180, -461, -614, 657, 691, 745, 854, 783, 713,
- -97, -309, -477, -614, -777, -734, -768, -526, -472,
- -344, -476, -35, -169, 49, -77, -150, -240, -141,
- -52, -268, -639, -919, -1278, -1113, -342, -333, -151,
- -68, -242, -585, -73, -209, -478, -159, -429, 133,
- -197, -499, -1005, -1268, -272, -224, -105, -67, 17,
- -363, -618, -414, -116, -62, 20, 10, 116, 108,
- -195, -475, -906, -1260, -891, -441, -277, -142, -28,
- -226, -519, -950, -700, -275, -266, -116, -105, 82,
- 404, 511, 520, 327, 17, -194, -333, -536, -586,
- -114, -130, 276, 237, 204, 342, 135, -16, -111,
- 191, 180, -137, -467, 272, 106, -95, 17, -192,
- -80, -290, -626, 194, 598, 196, 21, -281, 77,
- 137, 367, 534, 764, 670, 382, 296, 153, 84,
- 303, 497, 144, -85, -125, -539, -482, -464, -764,
- 233, 347, 68, -147, 169, -210, -242, -226, -482,
- 307, 422, 154, -175, -386, -722, -724, -904, -1015,
- 309, 308, 160, -60, -470, -420, -598, -791, -219,
- 68, 121, -137, -560, -146, -446, -515, -494, -729,
- 130, 53, -227, 46, 474, 32, -161, -192, -490,
- 213, 164, -71, -465, -876, -161, -456, -587, -48,
- 218, 117, 39, 177, -194, -88, -226, -418, 50,
- 210, 547, 569, 279, 121, -44, -50, 10, -84,
- 58, 140, 182, -5, 267, 117, 106, 211, 198,
- 153, 559, 872, 460, 222, 108, 188, 180, 183,
- 158, 119, 284, -153, -271, 229, 87, 110, -57,
- -183, 82, 118, 21, 13, 40, 118, 191, 185,
- 163, 56, 609, 341, 50, 329, 68, 266, 218,
- 100, 206, 18, -304, -107, -436, -487, -65, -306,
- -86, 154, 134, -30, -45, -73, -104, -80, -96,
- 245, 330, 10, -440, -849, -1082, 79, 40, -265,
- 196, 372, 272, -181, -493, -389, 275, 80, -59,
- 2, -12, -246, -505, -100, -436, 21, -187, -431,
- -221, -48, 36, -271, -186, -147, -109, 26, 71,
- 213, 140, 72, -351, -620, -84, -363, 69, 46,
- 91, 167, -3, -95, -99, -105, -48, 114, 147,
- 259, 249, 172, 607, 406, 52, 59, -189, -320,
- 115, -85, -54, 574, 128, 226, -59, -253, 130,
- 39, 364, 757, 940, 728, 660, 659, 583, 770,
- -115, -338, -760, -471, 394, 37, 441, 178, 6,
- -57, -305, -525, 796, 453, 188, -4, -114, 248,
- 71, 444, 797, 731, 1096, 1157, 1222, 1029, 811,
- 135, 359, 551, 425, 749, 815, 874, 704, 502,
- 132, 247, 0, -206, -449, -750, -258, -514, -633,
- 248, 249, 91, 121, -195, -499, -90, -282, -435,
- 78, 20, -277, -623, -983, -1224, -415, -458, -639,
- 347, 509, 208, -179, -464, -728, -76, -237, -486,
- -103, -343, -756, -713, -265, -609, -191, -398, -636,
- -121, -383, -749, 567, 252, -36, -354, -417, -50,
- 204, 100, -149, -650, -1081, -47, -7, -263, 111,
- -46, -180, -267, -324, -562, -394, -692, 398, 292,
- 482, 670, 683, 624, 442, 165, 116, 36, -149,
- 108, 247, 291, 247, 355, 122, 109, 224, 296,
- 292, 349, 725, 482, 388, 329, 429, 620, 667,
- -34, 197, 213, -127, 84, 494, 620, 575, 375,
- 126, 207, 172, 167, 362, 202, 296, 395, 455,
- -6, 250, 539, 467, 636, 801, 1149, 1287, 1118,
- 27, 240, 369, 280, 440, 411, 634, 892, 953,
- 159, 170, -58, -395, -797, -690, 77, -211, -334,
- -5, -28, -13, -74, -335, -603, 300, 88, -205,
- 82, -33, -364, -698, -1203, -1153, 110, -146, -289,
- 113, 1, -243, -588, -994, -496, 414, 160, 42,
- -56, -247, -440, -693, -996, -479, 11, -178, -357,
- -151, -353, -327, -211, -340, 141, 65, 425, 453,
- 34, -169, -455, -932, -1215, 138, 499, 256, 324,
- 68, 139, -15, -547, -478, 17, 306, 502, 481,
- -32, -134, 445, 129, -143, -244, -503, -507, -599,
- 61, -140, -345, 496, 458, -2, 20, -227, -514,
- 215, 519, 920, 1053, 1090, 791, 528, 290, 155,
- -54, -233, -647, -602, 639, 294, -2, -167, -442,
- -78, -315, -791, -113, 820, 403, 158, -116, -356,
- -105, -379, -236, 1224, 893, 749, 568, 356, 214,
- -17, -199, -144, 50, -283, -247, -578, -846, -1087,
- 69, -11, -381, -206, 209, -284, -387, -416, -716,
- 39, -5, -145, -374, -682, -909, -1074, -1169, -1066,
- 287, 226, 67, -221, -662, -171, -421, -642, -707,
- -132, -348, -538, -448, -20, -4, -354, -748, -933,
- 4, -75, -289, -598, 317, 52, -208, -297, -559,
- -88, -264, -358, -589, -631, -248, -523, -822, -1071,
- 70, -8, 54, -314, -515, 92, -146, -274, -493,
- 199, 62, 391, 158, -141, 71, -219, -203, -207,
- 152, 40, 329, 162, -29, 48, -149, 108, 127,
- 267, 722, 1256, 882, 625, 248, 8, -81, -60,
- -58, -138, -291, -600, -12, -2, -39, 147, 117,
- -107, -345, -513, 459, 76, 92, -272, 388, 262,
- 362, 516, 203, -409, -716, -831, -331, 185, 209,
- -117, -391, -298, 671, 292, 538, 257, 166, -38,
- -102, -319, -194, -283, -573, -262, -579, -219, -444,
- -235, 78, 11, -168, -101, -229, -263, -321, -123,
- 70, 50, -170, -599, -996, -588, -263, -516, -455,
- 394, 363, 229, -136, -538, 21, -183, -348, -201,
- -124, -368, -640, -879, -847, -209, -409, -494, -515,
- -127, -341, -541, -425, -510, -10, -252, -473, -291,
- 84, -69, -201, -676, -868, 103, -311, -132, -320,
- 5, -173, -188, -297, -628, 197, -57, 7, -11,
- 49, -160, 56, 558, 111, 33, -311, -440, -463,
- -1, -246, -307, 862, 453, 139, -170, -355, -232,
- -197, -38, 1702, 1331, 1252, 950, 692, 504, 426,
- -108, -344, -861, -1172, 444, 354, 88, -46, -220,
- -53, -321, -494, 1113, 744, 364, 198, -34, -75,
- -69, 199, 897, 1140, 1343, 1183, 977, 742, 522,
- 122, 44, -269, 27, -155, -562, -307, -590, -773,
- 154, 42, -160, 252, -129, -305, -471, -733, -371,
- 135, 185, -82, -416, -722, -913, -504, -743, -880,
- 149, 214, -84, -329, -680, -835, -426, -661, -81,
- -128, -380, -735, -998, -337, 17, -182, -467, -697,
- -84, -290, -510, -592, 13, 440, 154, -38, -279,
- 70, -61, -246, -727, -1047, -80, -381, -535, -704,
- 178, -2, -146, -670, -938, 482, 138, 63, 65,
- -11, 15, 772, 443, 142, -20, -209, -126, -161,
- -32, -249, 95, 552, 124, 30, -343, 82, -86,
- -163, -257, 899, 1097, 906, 751, 502, 390, 294,
- -51, -258, -447, -806, -368, 763, 464, 364, 183,
- -166, -374, -367, 87, 35, 399, 418, 856, 833,
- -205, -310, 588, 778, 785, 1065, 1118, 1245, 1157,
- -173, -312, 107, 345, 400, 790, 870, 1113, 1001,
- -7, -120, -387, -410, -614, -943, -226, -384, -491,
- -203, -288, -51, -331, -90, -178, -408, -573, -338,
- 56, -29, -273, -627, -1041, -798, -247, -467, 148,
- 66, -2, -205, -205, -575, -349, -57, -352, -58,
- -45, -225, -471, -924, -497, 77, -32, 44, -135,
- -277, -491, -497, -502, -424, -202, -137, 77, 96,
- 26, -179, -469, -1008, -1260, 262, -35, -132, -259,
- -66, -232, -447, -533, -789, -191, -100, -267, 364,
- 111, 43, -287, -423, -608, -987, -922, -799, -827,
- 77, 76, -101, -260, -549, -850, -88, -231, -329,
- 75, 24, -66, -269, -427, -528, -773, 201, -5,
- 67, 7, -61, -320, -487, 12, -200, -242, -94,
- 27, -54, -149, -354, -661, -594, -450, -481, 560,
- 31, -69, -246, -549, -1141, -178, -232, -275, -288,
- 16, -84, -176, 7, -83, -210, -246, -424, -589,
- 63, -60, -201, -90, -269, -400, -685, -1218, -258,
- 169, 217, 142, -71, -243, -433, -504, -511, -537,
- 6, -105, -234, -321, -188, -131, -307, -521, -1319,
- -34, -151, -369, 11, 44, -95, -280, -500, 160,
- 31, -37, -163, -334, 288, 89, -150, -86, -299,
- -35, -161, -362, -74, -74, -263, 240, 9, -153,
- -45, -208, -529, -896, 89, 24, -130, -313, -373,
- 234, 276, 197, -10, -236, -162, -134, -85, -112,
- 42, -73, 133, 392, 98, 72, -153, -162, -99,
- -3, -145, -338, 408, 401, 133, -52, -296, -501,
- 3, -109, -152, -85, -56, 42, -145, 703, 205,
- -49, -149, -281, -134, -121, -41, -21, 16, 958,
- 30, -107, -196, -463, -523, 490, 236, 70, -128,
- -33, -161, -364, -148, 757, 516, 250, 43, -65,
- -34, -193, -244, 750, 527, 349, 234, 172, 134,
- -64, -223, -379, 55, 28, 248, 793, 442, 320,
- 29, -85, -298, -622, -888, 127, 206, 387, 460,
- -48, -170, -477, -876, 573, 635, 440, 375, 311,
- 42, 3, -212, -441, -718, -821, 388, 373, 211,
- -106, -155, 1092, 459, 570, 561, 506, 604, 514,
- -144, -264, 0, 460, 619, 877, 916, 1273, 921
-};
-
-/*-------------------------------------------------------------------*
- * 1nd stage, 2nd split: ISF9 to ISF15
- *-------------------------------------------------------------------*/
-
-/* ISF codebook - common 1st stage, 2nd split (only in AMR-WB IO mode) */
-const Word16 dico2_isf_fx[] =
-{/*Qlog2(2.56)*/
- 1357, 1313, 1136, 784, 438, 181, 145,
- 636, 648, 667, 568, 442, 217, 362,
- 427, 440, 674, 524, 332, 117, -417,
- 121, 295, 468, 465, 230, 44, -221,
- -147, -240, 149, 80, 390, 278, 106,
- -418, -556, 552, 511, 235, 144, -95,
- 43, 193, 274, 150, 67, 34, -273,
- -43, -126, 171, 416, 282, 63, -354,
- -372, -86, -344, -108, -94, -182, -89,
- -600, -840, -200, 465, 258, -11, -253,
- -48, 329, 97, -290, -543, -795, -354,
- -570, -117, 187, 10, -133, -416, -76,
- -618, -129, -247, -371, 45, -76, 277,
- -1022, -1079, 126, 474, 254, 127, 52,
- -281, 76, -167, -361, -283, -551, -283,
- -119, -52, -1, 134, -32, -204, -415,
- 1064, 827, 637, 684, 464, 209, 12,
- 482, 416, 449, 371, 335, 294, 194,
- 719, 576, 365, 135, 113, 91, -199,
- 298, 176, 493, 366, 194, 163, 36,
- -35, -236, -259, -36, -4, 99, 152,
- -98, -306, -27, 228, 90, 111, -86,
- 91, 13, -211, -258, -106, 86, -64,
- 73, -35, -57, -31, 162, 35, -192,
- -109, -335, -629, -66, -61, -128, 322,
- -495, -669, -728, 193, 31, -220, 122,
- 324, 95, -89, -91, -409, -710, -154,
- 0, -234, 92, 33, -343, -609, -220,
- -343, -408, -476, -655, -153, 82, 222,
- -490, -745, -255, 49, -48, 135, -127,
- 119, -67, -328, -390, -272, -545, -56,
- -57, -130, -10, -7, -164, -47, -22,
- 984, 1064, 961, 568, 210, -27, 16,
- 811, 691, 754, 514, 224, -35, 166,
- 662, 704, 618, 386, 57, -211, -257,
- 510, 359, 418, 393, 91, -144, -18,
- -193, -31, -27, 223, 89, -143, 24,
- -112, -98, 471, 319, 185, 3, 175,
- 252, 146, -47, 272, 48, -211, -234,
- 146, 69, 203, 364, 68, -52, 51,
- -259, -478, -697, -349, -758, -501, 63,
- -501, -769, -289, 79, -311, -497, -106,
- 251, 53, -235, -469, -895, -884, 145,
- -416, -551, 140, -133, -523, -775, 44,
- -326, -423, -713, -497, -86, -431, 99,
- -757, -772, -160, -76, -46, -32, 379,
- 85, -35, -200, -401, -663, -1040, -247,
- -180, -330, -92, -376, 27, -183, -110,
- 1279, 1086, 781, 502, 324, 164, 157,
- 682, 466, 449, 277, 146, 28, 409,
- 635, 472, 390, 107, -232, -538, -139,
- 196, 396, 332, 213, 209, -29, -81,
- 150, -95, -312, 76, -77, -320, -50,
- 46, 9, 47, 175, 139, 30, 384,
- 218, 206, -24, -250, -96, -276, -183,
- 26, 119, 38, 14, -4, -133, -52,
- -477, -614, -987, -715, -631, -813, 200,
- -744, -1009, -1065, -745, -631, -171, 18,
- -137, -251, -483, -613, -980, -1203, 12,
- -605, -767, -562, -686, -1088, -515, 58,
- -202, -428, -782, -1072, -96, -234, -179,
- -480, -709, -1070, -897, -131, -92, 321,
- -145, -193, -512, -729, -572, -765, -210,
- -331, -585, -525, -631, -281, -208, -303,
- 1165, 1104, 939, 828, 716, 426, 155,
- 6, -109, 820, 778, 415, 113, -27,
- 381, 339, 314, 265, 121, -9, -474,
- -373, 47, 584, 442, 99, -231, -113,
- -496, -38, -285, 262, 305, 170, 4,
- -587, -556, 69, 66, 471, 354, 13,
- -138, 70, -18, 106, 67, 167, -302,
- -445, -141, 185, 191, 151, 83, -133,
- -257, -521, -720, -198, 134, -46, -182,
- -819, -1168, -777, 512, 359, 95, -113,
- 137, -2, -74, -138, -401, -114, -371,
- -242, -466, 204, 223, -31, -212, -192,
- -532, -637, -466, -686, 256, 277, -139,
- -1141, -1244, -381, -75, -54, 14, 88,
- -311, 115, -143, -499, -343, 124, -416,
- -616, -147, -135, 43, -4, 121, -369,
- 835, 783, 641, 390, 355, 350, 64,
- 72, 194, 443, 467, 436, 219, 372,
- 464, 369, 192, 4, -156, -72, -226,
- 57, 206, 303, 205, 188, 101, 265,
- -40, -205, -488, -184, 276, 64, -26,
- -217, -433, -297, 137, 328, 308, -289,
- 378, 81, -308, -465, 57, -37, 227,
- -100, 24, -36, -151, 199, 8, 143,
- -426, -697, -1059, -133, 388, 161, 321,
- -644, -1023, -1271, 39, 66, -123, 70,
- 372, 177, -173, -556, -553, -304, -189,
- -117, -369, -425, -122, -462, -152, -73,
- -649, -850, -1189, -767, 497, 360, 222,
- -798, -1139, -1455, -190, 430, 234, 179,
- 42, -94, -405, -692, 38, -202, -246,
- -169, -366, -290, -88, -64, 32, -292,
- 1010, 923, 938, 710, 465, 230, 342,
- 217, 300, 1054, 675, 68, -458, -179,
- 78, 453, 316, 18, -237, -496, -243,
- 167, 21, 424, 215, -91, -303, -170,
- -290, -81, -70, -67, 40, 54, -59,
- -353, -427, -90, 53, 94, 9, 54,
- -28, 318, 283, 15, -240, -58, 79,
- -75, -121, 229, 35, 58, 6, -133,
- -351, -514, -744, -834, -705, -137, 164,
- -1124, -1388, -1055, -230, -73, 40, 36,
- -163, -233, -532, -785, -1170, -697, 96,
- -788, -959, -246, -430, -624, -165, -8,
- -856, -540, -630, -907, -337, -70, 76,
- -937, -1042, -659, -733, -208, 199, -26,
- -523, 78, -98, -501, -869, -890, -81,
- -624, -703, -45, -348, -25, 87, -186,
- 1005, 823, 546, 249, 90, -22, 207,
- 298, 397, 381, 319, 200, 62, 303,
- 473, 379, 133, -247, -632, -441, 75,
- 284, 208, 391, 115, -25, 44, 95,
- -72, 79, -95, -63, -129, -293, 203,
- -164, -349, 115, 122, 69, -1, 378,
- 348, 170, 99, 58, -179, -302, 188,
- -190, -2, 150, 23, -51, -11, 216,
- -615, -863, -1090, -1427, -802, -48, -6,
- -961, -1276, -1548, -727, -58, 56, 223,
- -124, -255, -561, -988, -1277, -148, -82,
- -480, -660, -891, -1191, -1339, -325, 20,
- -621, -917, -1296, -1350, 264, 289, 50,
- -844, -1022, -1345, -1329, -293, 46, 278,
- -260, -468, -829, -1176, -533, -560, -78,
- -215, -484, -822, -1233, -791, 15, -138,
- 1301, 1317, 1262, 1048, 716, 357, -64,
- 578, 824, 925, 802, 630, 362, 102,
- 470, 925, 767, 514, 327, 190, -112,
- 225, 492, 495, 437, 598, 384, -45,
- 43, 82, -42, 175, 519, 342, -64,
- -304, -154, 159, 576, 403, 221, 327,
- 214, 244, 122, -62, 312, 92, -160,
- 218, 208, 310, 268, 306, 323, -199,
- -285, -269, -79, -124, -143, -153, 236,
- -205, -384, -426, 344, 59, -185, -184,
- -272, 247, 126, -210, -518, -468, 78,
- -99, -120, 502, 160, -280, -557, 304,
- -423, -17, -283, -443, 215, 212, -140,
- -564, -684, -228, 510, 361, 130, 323,
- -428, 335, 98, -65, 36, -215, -246,
- -362, 51, 364, -16, -234, 150, -165,
- 914, 883, 751, 653, 676, 464, -153,
- 631, 545, 535, 720, 596, 360, -81,
- 783, 712, 512, 439, 341, 251, -391,
- 497, 417, 249, 372, 295, 173, -193,
- 128, -110, -385, 93, 39, 173, -231,
- 216, -59, -253, 462, 389, 154, 69,
- 455, 270, -4, -337, -49, 233, -322,
- 307, 143, 53, 218, 128, 236, -156,
- -37, -186, -240, -411, -110, 9, 399,
- -140, -365, -628, 258, 380, 214, 277,
- 131, 454, 177, -285, -520, 108, -214,
- 77, -141, 201, -123, -490, -131, 60,
- -14, -194, -521, -741, 273, 362, -33,
- -362, -566, -287, -228, 161, 237, 317,
- -269, 195, -75, -375, -204, 11, 77,
- -128, -264, -156, -223, -475, 265, 27,
- 1238, 1147, 916, 689, 432, 210, -280,
- 800, 664, 879, 726, 411, 160, -164,
- 454, 686, 536, 275, 147, 46, 111,
- 303, 486, 512, 355, 241, 181, -69,
- 79, 92, 29, 147, 233, 52, 17,
- -171, 289, 131, 439, 271, 3, -10,
- 413, 241, 144, 174, 155, -2, 14,
- 58, 217, 247, 219, 149, 175, -18,
- 228, -8, -240, -206, -513, -191, 202,
- -96, -272, -454, 33, -300, -575, 46,
- -10, -108, -246, -347, -770, -535, 9,
- -326, -430, -61, -321, -704, -299, 201,
- -1, -280, -603, -419, -185, 18, -36,
- -516, -522, -379, -291, -181, -97, 27,
- -159, -313, -525, -224, -510, -831, -197,
- -292, -459, -59, -310, -562, -143, -351,
- 1066, 912, 631, 389, 207, 86, -224,
- 596, 512, 596, 505, 314, 122, -48,
- 787, 861, 441, -93, -303, 33, -190,
- 257, 469, 337, 51, 15, 298, -93,
- 295, 73, -119, 25, 36, 23, 108,
- -28, -3, -32, 114, 21, 185, 107,
- 482, 305, 15, -279, -319, 52, 96,
- 226, 46, 115, 72, -136, 133, -125,
- 18, -207, -559, -590, -503, -482, 321,
- -571, -789, -951, -172, -441, -538, 113,
- 181, 14, -310, -641, -1001, -202, 159,
- -136, -393, -433, -513, -911, -144, -22,
- 72, -265, -706, -954, -159, 53, 332,
- -338, -591, -852, -383, -395, 56, 44,
- 43, -158, -464, -897, -631, -157, -294,
- -161, -128, -328, -573, -483, -125, 11,
- 1017, 906, 1051, 1005, 679, 341, -102,
- 359, 334, 1567, 1314, 723, 105, 10,
- -65, 726, 529, 301, 220, 43, -273,
- -510, 436, 719, 566, 358, 179, 114,
- -560, 298, 133, -120, 342, 225, 14,
- -899, -101, 217, 617, 400, 146, -58,
- -41, 352, 82, -196, 39, 121, -167,
- -212, 59, 447, 284, 423, 250, -169,
- -371, -484, -596, 30, -41, 249, 22,
- -372, -650, -794, 477, 445, 216, -79,
- -352, 275, 17, -443, -929, 92, 19,
- -699, -696, 431, 264, -49, -310, 182,
- -978, -217, -430, -400, 101, 261, 72,
- -929, -889, -357, -13, 463, 378, 236,
- -826, 56, 30, -299, -360, -128, -51,
- -878, -299, -111, 75, 65, 36, 3,
- 817, 368, -25, 354, 697, 591, -173,
- 309, 212, 222, 751, 484, 140, -56,
- 593, 379, 70, -8, 258, 180, 110,
- 165, -46, 255, 297, 219, 273, 105,
- 160, -70, -358, -181, 379, 330, 319,
- -238, -369, -198, 740, 580, 319, -143,
- 201, 109, -202, -456, 328, 276, -141,
- 203, 170, 111, 42, 207, 360, 188,
- -345, -399, -513, -233, 650, 422, 81,
- -635, -961, -1220, 463, 539, 204, 209,
- 202, -25, -194, -498, -787, 193, -143,
- -449, -538, 195, -106, -331, 68, 62,
- -228, -477, -840, -576, 317, 128, 283,
- -671, -937, -807, -114, 391, 335, -62,
- 246, 2, -314, -679, -303, 180, -88,
- -107, -272, 90, -198, -28, 290, -112,
- 885, 1149, 1021, 712, 496, 281, -83,
- 269, 492, 787, 643, 347, 70, 124,
- 336, 636, 499, 92, -229, -179, 191,
- 26, 402, 564, 340, 149, -11, 135,
- -440, 561, 470, 204, -72, -186, 140,
- -720, 14, 355, 229, 68, -133, 465,
- 110, 310, 103, 12, 106, 29, 158,
- -178, 113, 161, 142, 121, 115, 27,
- -651, -414, -645, -152, -164, -13, -429,
- -639, -944, -681, -104, -81, 52, -189,
- -663, -164, -316, -683, -954, -205, -83,
- -609, -669, -172, -517, -694, 283, -80,
- -646, -152, -383, -678, -246, -40, -143,
- -747, -796, -745, -390, -98, 43, 275,
- -599, -199, -398, -433, -436, -538, 31,
- -1107, -568, -376, -265, -126, -21, 1,
- 847, 573, 308, 392, 305, 101, 55,
- 273, 293, 201, 267, 346, 201, 123,
- 727, 480, 226, 2, -65, -138, 164,
- 273, 208, 173, 292, 12, 253, 174,
- 340, 207, 180, 88, 116, 46, 475,
- -460, -166, -30, 13, 110, 173, 396,
- 137, 88, 43, -137, -94, 34, 284,
- 96, -14, 226, 40, 63, 70, 130,
- -467, -735, -1012, -1174, -307, 305, -67,
- -612, -920, -1146, -567, -8, 92, -25,
- -182, -271, -492, -754, -857, 287, -75,
- -494, -787, -689, -683, -709, 137, -326,
- -288, -550, -903, -1105, 334, 321, -62,
- -354, -653, -834, -445, 1, 377, -152,
- -162, -306, -608, -937, -297, 247, -192,
- -234, -477, -244, -488, -266, 342, -332
-};
-
-/*-------------------------------------------------------------------*
- * AMR-WB ISF codebook - 46bits, 2 stages, 1st stage common with the
- * 36bit codebook,5 splits in the 2nd stage
- *
- * codebook vector dimension number of vectors
- * ~~~~~~~~ ~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
- * 2_1 3 64
- * 2_2 3 128
- * 2_3 3 128
- * 2_4 3 32
- * 2_5 4 32
- *-------------------------------------------------------------------*/
-
-/*-------------------------------------------------------------------*
- * 2nd stage, 1st split: ISF0 to ISF2
- *-------------------------------------------------------------------*/
-
-/* ISF codebook - 46b, 2nd stage, 1st split (only in AMR-WB IO mode) */
-const Word16 dico21_isf_46b_fx[] =
-{/*Qlog2(2.56)*/
- 329, 409, 249,
- -33, 505, 160,
- -29, -14, 582,
- -262, 127, 354,
- 145, 237, 175,
- -152, 245, 122,
- 27, 42, 340,
- -84, -93, 311,
- 285, 222, -156,
- 47, -43, -504,
- 234, 121, 385,
- 104, -317, 45,
- 176, 195, 8,
- 104, -59, -94,
- 177, 53, 192,
- -34, -127, 152,
- 570, 277, -34,
- -67, -329, -639,
- -157, -272, 462,
- -177, -462, 198,
- 322, 179, 115,
- -386, 171, 19,
- 19, -12, 195,
- -120, -252, 201,
- 304, 36, -336,
- -128, -221, -380,
- 171, -185, 296,
- -242, -312, 23,
- 198, 39, 16,
- -3, -177, -111,
- 111, -93, 76,
- -92, -223, 4,
- 177, 406, -44,
- -168, 380, -149,
- -4, 273, 331,
- -420, 513, 277,
- 21, 247, 47,
- -58, 131, -2,
- -3, 134, 180,
- -145, 40, 175,
- 189, 74, -145,
- -27, -45, -325,
- 370, -114, -21,
- -83, -415, -173,
- 77, 95, -51,
- -40, -30, -67,
- 71, 88, 86,
- -35, -98, 14,
- 69, 197, -334,
- -196, 79, -231,
- -348, -137, 218,
- -352, -89, -85,
- 47, 201, -130,
- -165, 37, -15,
- -43, 3, 86,
- -161, -108, 79,
- 83, 21, -237,
- -81, -149, -238,
- 150, -186, -251,
- -186, -249, -162,
- -19, 66, -139,
- -26, -50, -181,
- 24, 11, 0,
- -130, -105, -98
-};
-
-/*-------------------------------------------------------------------*
- * 2nd stage, 2nd split: ISF3 to ISF5
- *-------------------------------------------------------------------*/
-
-/* ISF codebook - 46b, 2nd stage, 2st split (only in AMR-WB IO mode) */
-const Word16 dico22_isf_46b_fx[] =
-{/*Qlog2(2.56)*/
- -127, 310, 42,
- -242, 197, 5,
- -151, 84, -17,
- -214, 127, -149,
- -247, -131, 159,
- -268, -267, -95,
- -217, 1, -79,
- -271, -80, -185,
- -45, 436, 159,
- 165, 199, 391,
- -33, 81, 187,
- -66, -42, 355,
- -298, -57, 343,
- -108, -537, 226,
- -144, -23, 193,
- 176, -402, 87,
- 53, 296, 25,
- -84, 253, -104,
- -58, 105, -126,
- -169, 174, -314,
- -48, 44, -294,
- -164, -417, -242,
- -139, 3, -194,
- -155, -207, -211,
- 119, 322, 213,
- 333, 50, 380,
- 237, 247, -2,
- 466, -16, 201,
- 238, -255, -107,
- 67, -440, -149,
- 122, -88, -139,
- 88, -247, -73,
- -41, 231, 167,
- -62, 155, 16,
- -65, 16, 77,
- -68, -2, -63,
- -151, -300, 160,
- -18, -333, 54,
- -56, -94, 5,
- 2, -190, 14,
- 92, 148, 209,
- 108, 9, 272,
- 108, 35, 110,
- 142, -85, 145,
- 47, -157, 279,
- 3, -320, 246,
- 43, -72, 68,
- 86, -217, 135,
- 36, 140, 79,
- 56, 175, -49,
- 26, 45, 3,
- 73, 55, -101,
- 109, -183, -242,
- -4, -283, -242,
- 48, -68, -48,
- -6, -153, -122,
- 161, 196, 96,
- 232, 80, 190,
- 165, 97, 11,
- 258, -31, 71,
- 267, -77, -91,
- 311, -209, 87,
- 152, -14, -22,
- 150, -149, 9,
- -324, 557, 187,
- -384, 307, 46,
- -251, 27, 77,
- -365, 77, -52,
- -482, -84, 160,
- -424, -515, -64,
- -294, -120, -4,
- -476, -116, -109,
- -97, 318, 365,
- 106, 627, 445,
- -190, 120, 287,
- -146, 65, 619,
- -427, 242, 363,
- -361, -371, 432,
- -347, 102, 168,
- -629, 195, -14,
- -65, 476, -47,
- -297, 320, -168,
- -55, 356, -264,
- -391, 82, -286,
- -51, -31, -556,
- -178, -399, -586,
- -205, -49, -360,
- -343, -238, -337,
- 220, 457, 58,
- 561, 467, 259,
- 340, 270, -168,
- 450, 77, -280,
- 60, 167, -413,
- 133, -252, -492,
- 216, 157, -290,
- 282, 0, -495,
- -226, 293, 183,
- -157, 135, 122,
- -158, -59, 39,
- -133, -118, -97,
- -332, -309, 113,
- -160, -425, -6,
- -149, -211, 24,
- -80, -277, -90,
- -11, 125, 338,
- 130, -71, 465,
- 5, -45, 184,
- 237, -95, 253,
- -139, -197, 297,
- -19, -300, 511,
- -63, -152, 139,
- 250, -289, 336,
- 124, 339, -150,
- 34, 176, -208,
- 171, 166, -116,
- 94, 38, -229,
- 75, -65, -339,
- -78, -205, -385,
- 0, -30, -163,
- -56, -110, -242,
- 321, 244, 194,
- 505, 238, -1,
- 317, 116, 65,
- 309, 88, -74,
- 452, -51, -50,
- 334, -217, -290,
- 211, 41, -152,
- 238, -55, -260
-};
-
-/*-------------------------------------------------------------------*
- * 2nd stage, 3rd split: ISF6 to ISF8
- *-------------------------------------------------------------------*/
-
-/* ISF codebook - 46b, 2nd stage, 3rd split (only in AMR-WB IO mode) */
-const Word16 dico23_isf_46b_fx[] =
-{/*Qlog2(2.56)*/
- -10, 151, 359,
- 136, 298, 223,
- 255, -104, 290,
- 423, 6, 183,
- -270, -269, -98,
- -52, -82, 13,
- -82, -274, -97,
- 90, -246, -72,
- -299, -70, 421,
- -88, 365, 430,
- 187, -318, 381,
- 380, 37, 488,
- -373, -316, 79,
- -308, -101, 5,
- -135, -451, 8,
- 72, -421, -154,
- 180, 170, -121,
- 62, 177, -40,
- 326, 80, -105,
- 248, 263, -5,
- -168, -181, -221,
- -2, -23, -158,
- -14, -149, -121,
- 119, -91, -147,
- 119, 332, -153,
- 49, 303, 34,
- 442, -55, -69,
- 217, 454, 58,
- -359, -187, -375,
- -42, 50, -274,
- -8, -267, -249,
- 85, -86, -346,
- -77, -40, 345,
- 89, 134, 219,
- 156, -80, 160,
- 108, 40, 116,
- -158, -206, 29,
- 5, -32, 175,
- -65, -158, 146,
- 55, -78, 73,
- -114, -222, 353,
- -47, 81, 211,
- 49, -151, 268,
- 105, 4, 302,
- -263, -132, 183,
- -151, -28, 201,
- -177, -307, 166,
- 101, -221, 130,
- 74, 58, -98,
- 32, 44, 13,
- 194, 30, -142,
- 170, 96, 8,
- -136, -119, -91,
- -65, 8, -55,
- 3, -188, 12,
- 45, -63, -49,
- 149, -21, -19,
- 24, 144, 95,
- 254, -22, 60,
- 161, 196, 96,
- -158, -61, 48,
- -70, 33, 82,
- -23, -321, 58,
- 155, -147, 5,
- -364, 328, 77,
- -21, 453, 173,
- -108, 82, 630,
- 367, 263, 208,
- -300, -62, -176,
- -205, 143, -158,
- -169, -410, -264,
- 257, -269, -100,
- -636, 289, -2,
- -292, 627, 173,
- -382, -363, 387,
- 248, 524, 447,
- -521, -111, -107,
- -395, 118, -274,
- -343, -680, -125,
- -172, -447, -663,
- 75, 148, -367,
- -79, 263, -94,
- 249, 148, -286,
- 380, 271, -162,
- -142, -4, -186,
- -57, 111, -125,
- -35, -108, -254,
- 100, 29, -242,
- -80, 303, -264,
- -78, 464, -57,
- 248, -22, -494,
- 661, 662, 44,
- -193, -40, -330,
- -178, 145, -337,
- -90, -199, -400,
- -40, -23, -498,
- -192, 114, 315,
- -41, 244, 190,
- 88, -97, 485,
- 241, 80, 212,
- -246, 40, 87,
- -156, 147, 134,
- -2, -334, 239,
- 308, -203, 110,
- -459, 251, 422,
- -218, 310, 228,
- -86, -346, 654,
- 184, 175, 425,
- -481, -63, 169,
- -349, 117, 188,
- -125, -560, 310,
- 158, -416, 94,
- 46, 171, -192,
- -63, 157, 14,
- 256, -35, -271,
- 322, 123, 53,
- -214, 4, -76,
- -156, 86, -18,
- 128, -197, -232,
- 265, -90, -98,
- -308, 332, -145,
- -131, 308, 58,
- 509, 59, -339,
- 562, 196, -14,
- -378, 100, -47,
- -234, 202, 1,
- 104, -270, -493,
- 319, -210, -325
-};
-
-/*-------------------------------------------------------------------*
- * 2nd stage, 4th split: ISF9 to ISF11
- *-------------------------------------------------------------------*/
-
-/* ISF codebook - 46b, 2nd stage, 4th split (only in AMR-WB IO mode) */
-const Word16 dico24_isf_46b_fx[] =
-{/*Qlog2(2.56)*/
- -79, -89, -4,
- -171, 77, -211,
- 160, -193, 98,
- 120, -103, 323,
- 32, -22, -129,
- 72, 78, -268,
- 182, -76, -66,
- 309, 99, -145,
- -229, -157, -84,
- -383, 98, -71,
- -90, -352, 12,
- -284, -178, 178,
- -65, -125, -166,
- -87, -175, -351,
- 42, -198, -48,
- 154, -140, -243,
- -77, 18, 108,
- -39, 355, 91,
- 87, 8, 155,
- -4, 158, 239,
- 128, 95, -54,
- 7, 246, -124,
- 258, 15, 89,
- 206, 216, 98,
- -201, 9, 18,
- -312, 233, 204,
- -39, -174, 155,
- -144, -9, 284,
- -57, 70, -69,
- -157, 187, 18,
- 54, -30, 23,
- 24, 135, 55
-};
-
-/*-------------------------------------------------------------------*
- * 2nd stage, 1st split: ISF12 to ISF15
- *-------------------------------------------------------------------*/
-
-/* ISF codebook - 46b, 2nd stage, 5th split (only in AMR-WB IO mode) */
-const Word16 dico25_isf_46b_fx[] =
-{/*Qlog2(2.56)*/
- 169, 142, -119, 115,
- 206, -20, 94, 226,
- -106, 313, -21, 16,
- -62, 161, 71, 255,
- -89, 101, -185, 125,
- 72, -30, -201, 344,
- -258, 33, -8, 81,
- -104, -154, 72, 296,
- 144, -68, -268, -25,
- 81, -78, -87, 106,
- 22, 155, -186, -119,
- -46, -28, 27, 91,
- -114, -37, -175, -33,
- -94, -222, -189, 122,
- -132, -119, -191, -270,
- -172, -173, 18, -43,
- 279, 135, -42, -128,
- 187, -86, 229, -138,
- 159, 240, 140, 46,
- 69, 25, 227, 77,
- 21, 115, 13, 8,
- 68, -248, 126, 81,
- -150, 137, 207, -9,
- -154, -133, 289, 67,
- 143, -37, -86, -326,
- 180, -32, 19, -23,
- 26, 168, 116, -233,
- -32, -26, 118, -78,
- 3, -8, -45, -115,
- 57, -215, -54, -83,
- -209, 112, -22, -167,
- -91, -151, 168, -262
-};
-
-
-/*-------------------------------------------------------------------*
- * AMR-WB ISF codebook - 36bits, 2 stages, 1st stage common with the
- * 46bit codebook,3 splits in the 2nd stage
- *
- * codebook vector dimension number of vectors
- * ~~~~~~~~ ~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
- * 2_1 5 128
- * 2_2 4 128
- * 2_3 7 64
- *-------------------------------------------------------------------*/
-
-/*-------------------------------------------------------------------*
- * 2nd stage, 1st split: ISF0 to ISF4
- *-------------------------------------------------------------------*/
-
-/* ISF codebook - 36b, 2nd stage, 1st split (only in AMR-WB IO mode) */
-const Word16 dico21_isf_36b_fx[] =
-{/*Qlog2(2.56)*/
- -52, -96, 212, 315, -73,
- 82, -204, 363, 136, -197,
- -126, -331, 183, 218, 143,
- -49, -41, 557, 230, 72,
- 2, -73, 163, 377, 221,
- 133, 111, 278, 215, -110,
- -102, -20, 284, 113, 273,
- 84, 319, 290, 18, 85,
- -25, -5, 125, 132, -204,
- -38, -5, 286, -9, -356,
- -140, -256, 92, 117, -189,
- -144, 191, 313, 51, -98,
- 167, -10, 44, 247, 36,
- 381, 197, 238, 74, 6,
- 38, -408, 29, -3, -85,
- 92, 266, 157, -25, -200,
- 161, -121, 70, 84, -140,
- -16, -86, 112, -94, -189,
- -269, -270, 351, 107, -24,
- -68, -67, 492, -103, -155,
- -53, -131, 62, 122, 10,
- 135, 84, 283, -55, -120,
- -12, -219, 331, -81, 167,
- 220, -136, 147, -172, -42,
- 140, -95, -109, -88, -194,
- 0, -2, -4, -33, -381,
- -66, -217, 152, -186, -402,
- 244, 108, 156, -140, -395,
- 113, -136, -196, 110, -24,
- 214, 118, 11, -64, -131,
- -110, -286, -6, -332, 16,
- 94, 97, 79, -291, -205,
- -5, -39, -20, 252, -96,
- 76, 174, 101, 163, 61,
- -69, -239, -55, 399, 6,
- -115, 319, 164, 275, 196,
- -15, 36, -47, 331, 121,
- 226, 209, 271, 325, 184,
- 13, -80, -218, 471, 353,
- 288, 378, 16, -51, 251,
- 174, 116, 52, 149, -279,
- 235, 276, 39, 120, -48,
- 0, -108, -108, 241, -339,
- -93, 534, 45, 33, -87,
- 194, 149, -71, 405, -44,
- 409, 370, 81, -186, -154,
- 25, -102, -448, 124, -173,
- 22, 408, -110, -310, -214,
- -26, 23, -83, 114, 14,
- -110, 164, 52, 223, -82,
- 37, -25, -263, 306, -15,
- -466, 415, 292, 165, -18,
- 29, -19, -171, 155, 182,
- 179, 144, -27, 231, 258,
- -103, -247, -396, 238, 113,
- 375, -154, -109, -4, 156,
- 98, 85, -292, -5, -124,
- 116, 139, -116, -98, -294,
- -14, -83, -278, -117, -378,
- 106, 33, -106, -344, -484,
- 119, 17, -412, 138, 166,
- 384, 101, -204, 88, -156,
- -121, -284, -300, -1, -166,
- 280, 33, -152, -313, -81,
- -37, 22, 229, 153, 37,
- -60, -83, 236, -8, -41,
- -169, -228, 126, -20, 363,
- -235, 17, 364, -156, 156,
- -25, -30, 72, 144, 156,
- 153, -26, 256, 97, 144,
- -21, -37, 48, -65, 250,
- 63, 77, 273, -128, 124,
- -129, -26, 40, 9, -115,
- -6, 82, 38, -90, -182,
- -336, -13, 28, 158, 91,
- -30, 241, 137, -170, -17,
- 146, 14, -11, 33, 61,
- 192, 197, 54, -84, 85,
- 23, -200, -78, -29, 140,
- 122, 237, 106, -341, 136,
- -57, -142, -85, -16, -74,
- -59, -90, -8, -187, -20,
- -211, -267, 216, -179, -110,
- -50, -7, 220, -267, -70,
- -57, -42, -17, -15, 71,
- 32, 21, 63, -137, 33,
- -137, -175, 104, -68, 97,
- -67, -43, 133, -301, 221,
- -116, -200, -81, -92, -272,
- -64, -41, -54, -244, -220,
- -287, -242, -50, -87, -89,
- -245, 236, 102, -166, -295,
- 66, 24, -162, -71, 95,
- 66, 136, -90, -220, -36,
- -98, -161, -222, -188, 29,
- -18, 18, -19, -415, 9,
- 49, 61, 100, 39, -56,
- -111, 82, 135, -31, 52,
- -90, -153, -93, 189, 182,
- -214, 295, 119, -74, 284,
- 2, 137, 37, 47, 182,
- 92, 117, 184, -53, 373,
- -21, -14, -35, 136, 391,
- 146, 129, -164, -28, 333,
- 92, 80, -84, 100, -134,
- -8, 217, -32, 3, -47,
- -151, 251, -215, 142, 92,
- -224, 310, -172, -275, 98,
- 159, 155, -177, 112, 53,
- 205, 27, 8, -240, 192,
- 169, 120, -319, -201, 106,
- 11, 36, -86, -237, 455,
- -109, -154, -163, 174, -55,
- -38, 32, -101, -78, -59,
- -205, -321, -97, 69, 79,
- -310, 44, 18, -185, 34,
- -115, -20, -148, -39, 203,
- -29, 154, -30, -158, 166,
- -45, -131, -317, -24, 363,
- -165, -205, -112, -222, 265,
- -32, -44, -150, 54, -193,
- -6, -38, -255, -169, -115,
- -266, 87, -189, -36, -169,
- -60, -87, -266, -436, -170,
- -68, -81, -278, 24, 38,
- -23, -19, -155, -256, 141,
- -61, -226, -565, -175, 71,
- 9, -29, -237, -515, 263
-};
-
-/*-------------------------------------------------------------------*
- * 2nd stage, 2nd split: ISF5 to ISF8
- *-------------------------------------------------------------------*/
-
-/* ISF codebook - 36b, 2nd stage, 2nd split (only in AMR-WB IO mode) */
-
-const Word16 dico22_isf_36b_fx[] =
-{/*Qlog2(2.56)*/
- -298, -6, 95, 31,
- -213, -87, -122, 261,
- 4, -49, 208, 14,
- -129, -110, 30, 118,
- -214, 258, 110, -235,
- -41, -18, -126, 120,
- 103, 65, 127, -37,
- 126, -36, -24, 25,
- -138, -67, -278, -186,
- -164, -194, -201, 78,
- -211, -87, -51, -221,
- -174, -79, -94, -39,
- 23, -6, -157, -240,
- 22, -110, -153, -68,
- 148, -5, -2, -149,
- -1, -135, -39, -179,
- 68, 360, -117, -15,
- 137, 47, -278, 146,
- 136, 260, 135, 65,
- 61, 116, -45, 97,
- 231, 379, 87, -120,
- 338, 177, -272, 3,
- 266, 156, 28, -69,
- 260, 84, -85, 86,
- -266, 154, -256, -182,
- -17, -65, -304, -6,
- -40, 175, -151, -180,
- -27, 27, -87, -63,
- 121, 114, -166, -469,
- 159, -66, -323, -231,
- 214, 152, -141, -212,
- 137, 36, -184, -51,
- -282, -237, 40, 10,
- -48, -235, -37, 251,
- -54, -323, 136, 29,
- -88, -174, 213, 198,
- -390, 99, -63, -375,
- 107, -169, -164, 424,
- 69, -111, 141, -167,
- 74, -129, 65, 144,
- -353, -207, -205, -109,
- -160, -386, -355, 98,
- -176, -493, -20, -143,
- -252, -432, -2, 216,
- -90, -174, -168, -411,
- 13, -284, -229, -160,
- -87, -279, 34, -251,
- -75, -263, -58, -42,
- 420, 53, -211, -358,
- 384, -35, -374, 396,
- 68, -228, 323, -2,
- 167, -307, 192, 194,
- 459, 329, -5, -332,
- 375, 79, -7, 313,
- 282, -124, 200, -92,
- 271, -162, -70, 180,
- -157, -298, -514, -309,
- 58, -163, -546, 18,
- 124, -364, 167, -238,
- 83, -411, -117, 96,
- 140, -112, -388, -624,
- 259, -133, -317, 41,
- 163, -130, -64, -334,
- 226, -165, -124, -110,
- -466, -61, 6, 229,
- -153, 205, -145, 242,
- -159, 48, 195, 148,
- -58, 28, 31, 279,
- -303, 185, 279, -4,
- -61, 197, 59, 86,
- -114, 123, 168, -52,
- 35, 36, 100, 126,
- -407, 102, -77, -40,
- -338, -1, -342, 156,
- -179, 105, -34, -97,
- -185, 84, -35, 108,
- -133, 107, -91, -357,
- -180, 54, -229, 24,
- -44, 47, 47, -182,
- -66, 13, 45, 4,
- -339, 251, 64, 226,
- -42, 101, -350, 275,
- -99, 398, 142, 121,
- 111, 12, -102, 260,
- 0, 505, 260, -94,
- 161, 285, -96, 224,
- -4, 206, 314, 33,
- 167, 139, 88, 204,
- -235, 316, -60, -25,
- -8, -150, -312, 201,
- -36, 292, 61, -104,
- -40, 174, -162, 42,
- -21, 402, -29, -351,
- 21, 152, -360, -93,
- 57, 191, 212, -196,
- 76, 158, -21, -69,
- -328, -185, 331, 119,
- -53, 285, 56, 337,
- -107, -24, 405, 29,
- -18, 137, 272, 277,
- -255, 22, 173, -191,
- 295, 322, 325, 302,
- 21, -27, 332, -178,
- 119, 13, 271, 129,
- -455, -180, 116, -191,
- -227, 62, -148, 524,
- -176, -287, 282, -157,
- -243, 13, 199, 430,
- -59, -49, 115, -365,
- 72, -172, -137, 93,
- -138, -126, 141, -84,
- 5, -124, 38, -20,
- -258, 311, 601, 213,
- 94, 130, -61, 502,
- -1, -157, 485, 313,
- 146, -74, 158, 345,
- 276, 135, 280, -57,
- 490, 252, 99, 43,
- 267, -74, 429, 105,
- 278, -23, 119, 94,
- -542, 488, 257, -115,
- -84, -244, -438, 478,
- -113, -545, 387, 101,
- -95, -306, 111, 498,
- 95, 166, 22, -301,
- 420, -15, -58, -78,
- 270, 29, 122, -282,
- 160, -240, 50, -38
-};
-
-/*-------------------------------------------------------------------*
- * 2nd stage, 3rd split: ISF9 to ISF15
- *-------------------------------------------------------------------*/
-
-/* ISF codebook - 36b, 2nd stage, 3rd split (only in AMR-WB IO mode) */
-const Word16 dico23_isf_36b_fx[] =
-{/*Qlog2(2.56)*/
- 81, -18, 68, -27, -122, -280, -4,
- 45, -177, 209, -30, -136, -74, 131,
- -44, 101, -75, -88, -48, -137, -54,
- -245, -28, 63, -18, -112, -103, 58,
- -79, -6, 220, -65, 114, -35, -50,
- 109, -65, 143, -114, 129, 76, 125,
- 166, 90, -61, -242, 186, -74, -43,
- -46, -92, 49, -227, 24, -155, 39,
- 67, 85, 99, -42, 53, -184, -281,
- 142, -122, 0, 21, -142, -15, -17,
- 223, 92, -21, -48, -82, -14, -167,
- 51, -37, -243, -30, -90, 18, -56,
- 54, 105, 74, 86, 69, 13, -101,
- 196, 72, -89, 43, 65, 19, 39,
- 121, 34, 131, -82, 25, 213, -156,
- 101, -102, -136, -21, 57, 214, 22,
- 36, -124, 205, 204, 58, -156, -83,
- 83, -117, 137, 137, 85, 116, 44,
- -92, -148, -68, 11, -102, -197, -220,
- -76, -185, -58, 132, -26, -183, 85,
- -7, -31, -2, 23, 205, -151, 10,
- -27, -37, -5, -18, 292, 131, 1,
- 117, -168, 9, -93, 80, -59, -125,
- -182, -244, 98, -24, 135, -22, 94,
- 221, 97, 106, 42, 43, -160, 83,
- 25, -64, -21, 6, 14, -15, 154,
- 126, 15, -140, 150, -10, -207, -114,
- 79, -63, -211, -70, -28, -217, 165,
- 46, 38, -22, 281, 132, -62, 109,
- 112, 54, -112, -93, 208, 27, 296,
- 115, 10, -147, 41, 216, 42, -276,
- 50, -115, -254, 167, 117, -2, 61,
- 17, 144, 34, -72, -186, -150, 272,
- -29, -66, -89, -95, -149, 129, 251,
- 122, 0, -50, -234, -91, 36, 26,
- -105, -102, -88, -121, -236, -7, -11,
- -204, 109, 5, -191, 105, -15, 163,
- -80, 32, -24, -209, 41, 294, 70,
- -106, -94, -204, -118, 120, -50, -37,
- -82, -241, 46, -131, -29, 150, -55,
- 33, 155, 120, -89, -8, 7, 62,
- 213, 82, 61, 18, -161, 144, 152,
- 30, 131, 65, -87, -255, -17, -107,
- -8, 85, -64, 51, -162, 223, -53,
- -134, 261, 69, -56, 218, 72, -111,
- 2, 155, -113, -87, 49, 85, -28,
- -163, 42, -1, -196, 7, 39, -245,
- 14, -137, -79, 11, -160, 202, -293,
- -94, 33, 208, 100, 56, -44, 326,
- -78, -41, 232, 13, -142, 227, 80,
- -16, -87, 201, 33, -133, 15, -183,
- -58, -192, -47, 184, -128, 133, 99,
- -205, 11, -155, 78, 52, 72, 141,
- -246, 26, 99, 151, 59, 115, -64,
- -79, -47, -16, -14, 6, 47, -43,
- -72, -178, -27, 162, 112, 43, -174,
- -175, 238, 186, 71, -54, -188, -76,
- -225, 233, 39, -39, -158, 122, 44,
- -26, 43, 84, 130, -93, -51, 22,
- 3, 92, -150, 136, -182, -57, 97,
- -131, 179, -78, 80, 91, -165, 90,
- -2, 148, 15, 130, 65, 175, 117,
- -138, 114, -137, 132, 3, -10, -186,
- 140, -4, -37, 254, -62, 92, -109
-};
-
-/*-------------------------------------------------------------------*
- * AMR-WB ISF codebook for SID - 28bits, 1 stage, 5 splits
- *
- * codebook vector dimension number of vectors
- * ~~~~~~~~ ~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
- * 1 2 64
- * 2 3 64
- * 3 3 64
- * 4 4 32
- * 5 4 32
- *-------------------------------------------------------------------*/
-
-/*-------------------------------------------------------------------*
- * 1st stage, 1st split: ISF0 to ISF1
- *-------------------------------------------------------------------*/
-
-/* ISF codebook for SID frames - 28b, 1st split */
-const Word16 dico1_ns_28b_fx[] =
-{/*Qlog2(2.56)*/
- -269, -673,
- -222, -537,
- -233, -430,
- -138, -451,
- -212, -331,
- -192, -241,
- -87, -231,
- -191, -128,
- -70, -106,
- -164, -6,
- 74, -179,
- 27, -33,
- -102, 74,
- -162, 115,
- -94, 172,
- -6, 130,
- -143, 234,
- 14, 218,
- -65, 270,
- 88, 182,
- -124, 341,
- -44, 381,
- 38, 335,
- 117, 274,
- -112, 454,
- 74, 431,
- -5, 488,
- 175, 384,
- -83, 561,
- 122, 529,
- 21, 601,
- 229, 481,
- 231, 303,
- 226, 608,
- 300, 372,
- 210, 187,
- 306, 265,
- 328, 473,
- 382, 331,
- 371, 132,
- 139, 58,
- 365, 21,
- 250, -82,
- 443, 218,
- 483, 110,
- 426, 415,
- 579, 222,
- 518, 333,
- 573, 448,
- 455, 529,
- 685, 329,
- 332, 580,
- 595, 593,
- 468, 645,
- 762, 517,
- 326, 709,
- 485, 793,
- 130, 684,
- 671, 737,
- 354, 876,
- 88, 806,
- -65, 706,
- -35, 1016,
- 266, 1123
-};
-
-/*-------------------------------------------------------------------*
- * 1st stage, 2ndt split: ISF2 to ISF4
- *-------------------------------------------------------------------*/
-
-/* ISF codebook for SID frames - 28b, 2nd spilt */
-const Word16 dico2_ns_28b_fx[] =
-{/*Qlog2(2.56)*/
- -824, -884, -949,
- -805, -456, -418,
- -442, -438, -541,
- -217, -578, -793,
- -168, -444, -582,
- -287, -492, -274,
- -552, -297, -300,
- -163, -333, -358,
- -370, -232, -232,
- -175, -358, -159,
- -381, -21, -357,
- -184, -159, -162,
- -53, -191, -280,
- 18, -267, -215,
- -138, 61, -283,
- 71, -95, -294,
- 13, -156, -546,
- 0, -83, -79,
- 44, 97, -316,
- 178, -52, -213,
- 222, -261, -422,
- 237, -118, -44,
- 141, 145, -132,
- 363, 81, -287,
- 213, 65, 34,
- -107, 94, -5,
- 91, -29, 126,
- -355, 51, -41,
- -219, -76, 145,
- -63, 100, 244,
- -719, 44, 27,
- -572, -124, 155,
- -423, 133, 315,
- -917, 71, 224,
- -268, 318, 131,
- -93, -190, 420,
- -97, 122, 491,
- -79, 317, 355,
- 130, 100, 325,
- 86, -293, 210,
- 133, 258, 161,
- 176, -73, 465,
- 195, 300, 384,
- 348, 22, 221,
- 376, 183, 409,
- 377, 286, 202,
- 242, 213, 659,
- 257, 565, 248,
- 344, 408, -76,
- 405, 440, 509,
- 612, 385, 379,
- 536, 607, 216,
- -56, 582, 192,
- 100, 517, 567,
- -365, 448, 445,
- 728, 347, 10,
- 505, 357, 759,
- 636, 582, 658,
- 335, 517, 852,
- 378, 809, 572,
- -195, 878, 829,
- 529, 707, 987,
- 918, 726, 392,
- 1250, 997, 1063
-};
-
-/*-------------------------------------------------------------------*
- * 1st stage, 3rd split: ISF5 to ISF7
- *-------------------------------------------------------------------*/
-
-/* ISF codebook for SID frames - 28b, 3rd spilt */
-const Word16 dico3_ns_28b_fx[] =
-{/*Qlog2(2.56)*/
- -805, -838, -774,
- -522, -627, -828,
- -477, -486, -603,
- -295, -481, -634,
- -366, -384, -393,
- -186, -414, -396,
- -237, -394, -106,
- -252, -202, -275,
- -61, -177, -442,
- -84, -198, -199,
- -179, -125, -31,
- -72, -47, -163,
- -298, -220, 215,
- -64, -168, 251,
- -133, 156, -59,
- -30, -2, 127,
- 54, 66, -61,
- -233, 21, 251,
- 209, -50, 32,
- 33, 194, 136,
- -117, -18, 475,
- 202, 46, 309,
- 256, 185, 53,
- 35, 200, 390,
- 200, 263, 242,
- -216, 302, 294,
- 128, 358, 0,
- 19, 431, 287,
- 224, 447, 280,
- 367, 165, 213,
- 397, 314, 319,
- 383, 379, 75,
- 277, 325, 462,
- 394, 505, 334,
- 251, 98, -213,
- 450, 153, 448,
- 565, 226, 76,
- 470, 383, 502,
- 635, 390, 278,
- 237, 135, 620,
- 342, 401, 649,
- 331, 551, 518,
- 130, 418, 592,
- 531, 306, 737,
- 729, 389, 580,
- 497, 557, 699,
- 296, 383, 874,
- 283, 624, 759,
- 126, 622, 476,
- 559, 595, 472,
- 382, 770, 616,
- 719, 613, 745,
- 540, 639, 928,
- 517, 826, 801,
- 684, 811, 604,
- 752, 786, 857,
- 933, 661, 350,
- 694, 450, 1061,
- 562, 911, 1051,
- 824, 813, 1104,
- 758, 1047, 882,
- 1140, 917, 889,
- 1039, 1246, 1426,
- 1483, 1666, 1876
-};
-
-/*-------------------------------------------------------------------*
- * 1st stage, 4th split: ISF8 to ISF11
- *-------------------------------------------------------------------*/
-
-/* ISF codebook for SID frames - 28b, 4th spilt */
-const Word16 dico4_ns_28b_fx[] =
-{/*Qlog2(2.56)*/
- -776, -854, -891, -920,
- -552, -610, -663, -741,
- -321, -370, -476, -565,
- 274, -160, -456, 201,
- 265, 67, -160, -306,
- -8, -210, 79, 272,
- 163, 236, 307, 308,
- 578, 317, 64, 298,
- -9, 197, 342, 620,
- 343, 232, 314, 622,
- 173, 149, 548, 527,
- 356, 370, 481, 376,
- 135, 444, 488, 556,
- 391, 471, 487, 653,
- 228, 424, 576, 835,
- 422, 372, 722, 682,
- 295, 673, 693, 635,
- 539, 596, 590, 449,
- 475, 618, 659, 818,
- 735, 517, 491, 673,
- 602, 346, 257, 877,
- 625, 635, 849, 720,
- 727, 818, 698, 595,
- 653, 481, 690, 1139,
- 814, 762, 704, 908,
- 507, 747, 898, 936,
- 848, 855, 924, 785,
- 646, 1037, 882, 795,
- 772, 845, 1024, 1151,
- 1133, 983, 818, 921,
- 940, 1068, 1252, 1302,
- 1588, 1767, 1718, 1513
-};
-
-/*-------------------------------------------------------------------*
- * 1st stage, 5th split: ISF12 to ISF15
- *-------------------------------------------------------------------*/
-
-/* ISF codebook for SID frames - 28b, 5th spilt */
-const Word16 dico5_ns_28b_fx[] =
-{/*Qlog2(2.56)*/
- -810, -879, -945, -254,
- 248, 184, 671, 128,
- 288, 703, 918, 99,
- 658, 558, 662, 219,
- 552, 585, 910, 208,
- 559, 804, 759, 119,
- 606, 774, 921, -139,
- 782, 761, 748, 208,
- 756, 708, 983, 56,
- 544, 864, 1010, 152,
- 737, 698, 987, 299,
- 771, 924, 879, 103,
- 536, 785, 961, 405,
- 667, 916, 801, 328,
- 738, 705, 773, 439,
- 823, 871, 992, 355,
- 640, 1004, 1052, 369,
- 724, 822, 949, 597,
- 415, 655, 729, 482,
- 1009, 896, 793, 363,
- 908, 803, 687, -25,
- 1016, 838, 1011, 189,
- 947, 1112, 942, 222,
- 914, 1049, 981, 527,
- 956, 987, 1011, -120,
- 781, 1049, 1121, 92,
- 1178, 1053, 884, 47,
- 1123, 1059, 1182, 118,
- 933, 972, 1277, 357,
- 1109, 918, 1101, 503,
- 1039, 1286, 1220, 317,
- 1351, 1207, 1010, 326
-}; /*1.28f Q1*/
-
-const Word16 means_nb_31bits_ma_lsf[16] = { 861 /*336.3281f*1.28f Q1*/, 1360 /*531.2500f*1.28f Q1*/, 2270 /*886.7188f*1.28f Q1*/, 3243 /*1266.7969f*1.28f Q1*/, 4171 /*1629.2969f*1.28f Q1*/, 5052 /*1973.4375f*1.28f Q1*/, 6012 /*2348.4375f*1.28f Q1*/, 6776 /*2646.8750f*1.28f Q1*/, 7676 /*2998.4375f*1.28f Q1*/, 8428 /*3292.1875f*1.28f Q1*/, 9194 /*3591.4062f*1.28f Q1*/, 9744 /*3806.2500f*1.28f Q1*/, 10580 /*4132.8125f*1.28f Q1*/, 11911 /*4652.7344f*1.28f Q1*/, 13440 /*5250.0000f*1.28f Q1*/, 15061 /*5883.2031f*1.28f Q1*/ };
-const Word16 means_wb_31bits_ma_lsf[16] = { 818 /*319.5312f*1.28f Q1*/, 1403 /*548.0469f*1.28f Q1*/, 2392 /*934.3750f*1.28f Q1*/, 3465 /*1353.5156f*1.28f Q1*/, 4429 /*1730.0781f*1.28f Q1*/, 5428 /*2120.3125f*1.28f Q1*/, 6414 /*2505.4688f*1.28f Q1*/, 7323 /*2860.5469f*1.28f Q1*/, 8304 /*3243.7500f*1.28f Q1*/, 9221 /*3601.9531f*1.28f Q1*/, 10162 /*3969.5312f*1.28f Q1*/, 11091 /*4332.4219f*1.28f Q1*/, 12125 /*4736.3281f*1.28f Q1*/, 13153 /*5137.8906f*1.28f Q1*/, 14241 /*5562.8906f*1.28f Q1*/, 15266 /*5963.2812f*1.28f Q1*/ };
-
-
-const Word16 *lsf_means[2] = { means_wb_31bits_ma_lsf, means_nb_31bits_ma_lsf };
-
-const lsp_unw_triplet p16_gamma0_92to1[16] = /* Q14 */
-{
- { 0, 19622, -9695 },
- { -14938, 29357, -13258 },
- { -8483, 23708, -13414 },
- { -7350, 22410, -12305 },
- { -7397, 21417, -12160 },
- { -7071, 19878, -11229 },
- { -7144, 19877, -11326 },
- { -6423, 17194, -9613 },
- { -7407, 18024, -9695 },
- { -6972, 16339, -8191 },
- { -8220, 17625, -8422 },
- { -8159, 17459, -8289 },
- { -8700, 19066, -9508 },
- { -7986, 17629, -8607 },
- { -8503, 17203, -8109 },
- { -7820, 14903, 0 }
-};
-
-const lsp_unw_triplet p16_gamma0_94to1[16] = /* Q14 */
-{
- { 0, 12931, -6314 },
- { -9364, 19577, -8870 },
- { -5512, 16236, -9305 },
- { -4892, 15366, -8398 },
- { -4869, 14631, -8275 },
- { -4631, 13358, -7540 },
- { -4575, 13271, -7599 },
- { -4151, 11403, -6385 },
- { -4859, 11947, -6371 },
- { -4504, 10805, -5407 },
- { -5346, 11618, -5515 },
- { -5418, 11578, -5424 },
- { -5806, 12711, -6226 },
- { -5205, 11592, -5606 },
- { -5745, 11498, -5188 },
- { -5473, 10245, 0 }
-};
-
-
-const Word16 dico_lsf_abs_8b[256 * M] = /*14Q1*1.28*/
-{
- 966, 1761, 2937, 3740, 4574, 5488, 6457, 7398, 8355, 9289, 10254, 11211, 12247, 13202, 14221, 15172,
- 1540, 2731, 3544, 4232, 5065, 5917, 6846, 7707, 8602, 9538, 10479, 11445, 12439, 13339, 14332, 15243,
- 1414, 2201, 3469, 4160, 4832, 5563, 6504, 7493, 8507, 9423, 10261, 11087, 12014, 12887, 13935, 15041,
- 1176, 2031, 3312, 4141, 4915, 5612, 6368, 7097, 7965, 8861, 9900, 10956, 12137, 13161, 14215, 15190,
- 840, 1102, 1853, 3913, 4514, 5155, 5976, 6577, 7726, 8469, 9195, 9896, 12016, 13534, 14458, 15327,
- 1165, 1552, 2467, 3520, 3933, 4902, 6085, 6607, 7652, 8343, 8922, 9577, 11002, 13331, 14521, 15310,
- 1113, 1431, 2280, 3471, 3975, 4853, 5690, 6407, 7275, 8032, 8621, 9884, 12276, 13033, 13880, 15039,
- 719, 1036, 1867, 2553, 4352, 5021, 5775, 6505, 7179, 7826, 9601, 11113, 12075, 12807, 14022, 15272,
- 953, 1294, 1952, 2553, 3007, 5085, 6062, 6718, 8178, 8712, 9927, 11330, 12351, 13205, 14164, 15087,
- 940, 1283, 2111, 2792, 3256, 3911, 6096, 6898, 7589, 9317, 10103, 10891, 11893, 12886, 13757, 15049,
- 587, 903, 1795, 3140, 4297, 4853, 5479, 6468, 7886, 8442, 9844, 11336, 12043, 12793, 13911, 15151,
- 861, 1323, 2258, 3258, 3853, 4815, 5824, 6684, 8004, 9358, 10709, 11951, 12810, 13582, 14465, 15216,
- 758, 1202, 2449, 3134, 3694, 4423, 5673, 6885, 7835, 9014, 10027, 11120, 12196, 13199, 14218, 15199,
- 1042, 1478, 2150, 3726, 4263, 4954, 6139, 6790, 7965, 8974, 9643, 10764, 12030, 12725, 13557, 14581,
- 719, 926, 2434, 3748, 4185, 5032, 5661, 6815, 7286, 9180, 10365, 11159, 11991, 12918, 13824, 15248,
- 715, 1008, 2245, 3846, 4283, 5859, 6516, 7754, 9005, 9791, 10611, 11473, 12342, 13216, 14190, 15177,
- 972, 1282, 1856, 2557, 3020, 4536, 7105, 8030, 8649, 9405, 10103, 10712, 11575, 12633, 13608, 14745,
- 813, 1132, 1994, 2990, 3472, 4041, 4711, 7349, 8285, 8967, 9924, 10497, 11905, 13402, 14503, 15358,
- 897, 1260, 1953, 3238, 3878, 4495, 6373, 7420, 8046, 9326, 10330, 10893, 11883, 13155, 14226, 15156,
- 772, 1190, 1952, 2591, 4617, 5613, 6788, 7715, 8323, 9061, 10103, 11442, 12520, 13313, 14105, 15130,
- 648, 914, 1614, 2978, 3913, 5180, 6371, 7029, 7510, 8288, 10181, 11303, 12262, 13298, 14629, 15443,
- 679, 934, 1510, 2061, 4006, 5506, 6056, 6653, 7326, 8996, 10254, 11800, 12686, 13410, 14130, 15080,
- 536, 802, 1288, 2431, 4428, 4896, 5421, 6396, 8409, 9756, 10509, 11135, 12212, 13338, 14298, 15284,
- 774, 1064, 1751, 2361, 3813, 5723, 6272, 7170, 7837, 9027, 9999, 10677, 11383, 12564, 14005, 15142,
- 678, 938, 1492, 2025, 4146, 5207, 5984, 6738, 7509, 8781, 9766, 10948, 12156, 13220, 14217, 15296,
- 639, 927, 1490, 2153, 4243, 5592, 6466, 7219, 7989, 9277, 10369, 11353, 12295, 13240, 14272, 15267,
- 743, 1035, 1700, 2248, 3167, 5728, 6394, 7572, 8421, 9284, 10729, 11762, 12753, 13526, 14380, 15202,
- 468, 692, 1255, 2740, 4287, 5357, 6462, 7499, 8537, 9503, 10499, 11458, 12457, 13393, 14352, 15260,
- 734, 989, 1478, 1957, 2947, 5157, 6144, 7370, 8090, 8834, 9907, 11183, 12331, 13280, 14246, 15263,
- 461, 681, 1659, 3534, 4547, 5654, 6632, 7664, 8623, 9608, 10561, 11542, 12490, 13438, 14368, 15271,
- 792, 1113, 1855, 2398, 3238, 5817, 6524, 7434, 8483, 9164, 10021, 11002, 12178, 13218, 14316, 15216,
- 658, 1008, 1970, 3074, 4543, 5908, 7154, 8105, 8980, 9832, 10606, 11401, 12264, 13165, 14158, 15163,
- 1009, 1541, 2392, 3464, 4644, 5562, 6666, 7588, 8538, 9554, 10547, 11489, 12487, 13412, 14326, 15206,
- 955, 1704, 3142, 3903, 4985, 6046, 7112, 8024, 8864, 9606, 10417, 11275, 12242, 13171, 14188, 15188,
- 1152, 2084, 3441, 4308, 5341, 6367, 7465, 8361, 9258, 10034, 10799, 11569, 12435, 13295, 14269, 15192,
- 1361, 2472, 3734, 4540, 5724, 6786, 7934, 8876, 9753, 10482, 11209, 11930, 12704, 13494, 14411, 15293,
- 1448, 2793, 3997, 5078, 6382, 7418, 8278, 9062, 9827, 10479, 11193, 11976, 12798, 13632, 14523, 15357,
- 1488, 2499, 3704, 4557, 5499, 6512, 7628, 8636, 9720, 10662, 11547, 12425, 13250, 13991, 14754, 15490,
- 1099, 2055, 3146, 3872, 4700, 5675, 6721, 7670, 8652, 9638, 10640, 11603, 12561, 13473, 14404, 15285,
- 575, 841, 1577, 3091, 3894, 4777, 5587, 6225, 8293, 8937, 9666, 10986, 12135, 13292, 14164, 15178,
- 799, 1086, 1834, 2360, 3186, 5166, 5756, 7271, 8036, 8703, 9532, 10239, 11731, 13180, 14418, 15362,
- 956, 1297, 2021, 2413, 4341, 5175, 5948, 6783, 7304, 8114, 9024, 9853, 10910, 12746, 14094, 15167,
- 1288, 1856, 2407, 3125, 3686, 4421, 5672, 6339, 7288, 8274, 9315, 10205, 11191, 12856, 14483, 15463,
- 1020, 1359, 2139, 2709, 3398, 4646, 5412, 6441, 7053, 7923, 9213, 10192, 11791, 13084, 14208, 15242,
- 839, 1165, 2114, 2625, 3382, 3972, 5064, 7268, 7966, 8749, 9833, 12022, 13123, 13848, 14622, 15279,
- 837, 1104, 1848, 2230, 3860, 4731, 5491, 6377, 6917, 8917, 10029, 10891, 12043, 12753, 13952, 15201,
- 1136, 1564, 2097, 2558, 3026, 4824, 5743, 6459, 7664, 8183, 9819, 10837, 11538, 12762, 14193, 15309,
- 1013, 1492, 2105, 2593, 3135, 5090, 6278, 6877, 7559, 8026, 9120, 10257, 11268, 12899, 14253, 15324,
- 677, 952, 1578, 2156, 3456, 4665, 5545, 6815, 7822, 8967, 10044, 11143, 12218, 13205, 14269, 15290,
- 560, 833, 1626, 2825, 4189, 5300, 5822, 6280, 7858, 9256, 10189, 11481, 12413, 13040, 14138, 15123,
- 666, 1181, 2686, 3416, 4169, 5158, 6179, 7282, 8275, 9372, 10419, 11434, 12436, 13400, 14358, 15244,
- 773, 1040, 1809, 3551, 4049, 5132, 5867, 6525, 7877, 8558, 9275, 10956, 12231, 13016, 14012, 15032,
- 881, 1209, 1988, 3725, 4126, 5152, 6189, 6712, 8497, 9495, 10097, 11006, 12228, 13271, 14197, 15140,
- 850, 1109, 2540, 3212, 3836, 4671, 5423, 6258, 6873, 7502, 9107, 10990, 12254, 13154, 14378, 15352,
- 721, 954, 2751, 3694, 4320, 5071, 5825, 6738, 7291, 7984, 9289, 11579, 12483, 13254, 14338, 15260,
- 1055, 1371, 1968, 3743, 4580, 4986, 5695, 6267, 7257, 8890, 9548, 10261, 11586, 12347, 13324, 15091,
- 676, 972, 2112, 2850, 3753, 4728, 5494, 6367, 7285, 8675, 9943, 11368, 12460, 13350, 14172, 15122,
- 1049, 1494, 2200, 3000, 3527, 5081, 6046, 6884, 8291, 9069, 10097, 11369, 12496, 13375, 14347, 15128,
- 814, 1123, 2183, 2717, 3304, 3975, 5256, 6076, 7491, 8840, 10493, 11738, 12716, 13494, 14450, 15263,
- 948, 1271, 2388, 3106, 3719, 4616, 5356, 6675, 7383, 7967, 9440, 11584, 12408, 13133, 13866, 14860,
- 635, 881, 1924, 3907, 4384, 5217, 5950, 6984, 7695, 8650, 9877, 11108, 12074, 13120, 14245, 15282,
- 762, 1028, 2283, 3533, 3943, 4563, 5144, 6692, 7423, 8653, 9739, 10969, 12023, 13103, 14147, 15192,
- 579, 854, 1748, 3347, 3979, 4734, 5418, 7056, 8203, 9063, 10246, 11271, 12279, 13293, 14338, 15258,
- 503, 768, 1465, 3077, 4620, 5151, 5798, 7143, 8378, 9391, 10401, 11373, 12315, 13200, 14113, 15106,
- 717, 1002, 1807, 3675, 4066, 5418, 6034, 6837, 8445, 8980, 10353, 11755, 12753, 13520, 14476, 15232,
- 672, 949, 1676, 3274, 4729, 5344, 6538, 7393, 8330, 9755, 10902, 11594, 12475, 13327, 14247, 15152,
- 496, 912, 2757, 3804, 4833, 5819, 6853, 7814, 8753, 9709, 10654, 11604, 12540, 13471, 14395, 15300,
- 775, 1049, 2302, 3012, 3920, 4950, 5709, 7219, 7761, 9746, 10544, 11297, 12044, 12831, 13700, 15084,
- 1078, 1504, 2140, 3195, 3778, 4555, 5966, 6673, 7747, 8995, 9612, 10447, 11613, 12329, 13101, 14856,
- 968, 1849, 3399, 4265, 5004, 5732, 6679, 7575, 8554, 9526, 10485, 11412, 12400, 13344, 14309, 15220,
- 1199, 2464, 3945, 4913, 6009, 6786, 7495, 8106, 8835, 9620, 10520, 11438, 12438, 13342, 14319, 15235,
- 1081, 2165, 3828, 4637, 5448, 6070, 6800, 7534, 8434, 9349, 10320, 11262, 12293, 13218, 14232, 15192,
- 1083, 1694, 2537, 3083, 3771, 5128, 6256, 7141, 8587, 9530, 10324, 11062, 11832, 12707, 13900, 15104,
- 925, 1244, 2121, 3433, 3834, 5306, 6241, 6848, 8344, 9060, 9700, 10464, 11277, 12214, 14081, 15400,
- 773, 1006, 1754, 4566, 5209, 5778, 6451, 7124, 8069, 8706, 9253, 10001, 10837, 12064, 14326, 15356,
- 620, 950, 1866, 3048, 4740, 5460, 5977, 6457, 7915, 9271, 9868, 10687, 11496, 12237, 13203, 15016,
- 1104, 1439, 2275, 2648, 3695, 5401, 5983, 7243, 7860, 8327, 8987, 11178, 12399, 13141, 14208, 14977,
- 1076, 1712, 2332, 3118, 4625, 5250, 6130, 7069, 7734, 8740, 10166, 11116, 12011, 12960, 13959, 14830,
- 659, 949, 1548, 2807, 4382, 4952, 5938, 7089, 7729, 8587, 10547, 11148, 11668, 12528, 13953, 15131,
- 618, 891, 1593, 3197, 3993, 4733, 5928, 6583, 7372, 9278, 10158, 10852, 12066, 13201, 14256, 15298,
- 1226, 1611, 2351, 3438, 3930, 4616, 6358, 6975, 7675, 9306, 10025, 10545, 11077, 12750, 14164, 15269,
- 680, 957, 1852, 3036, 3864, 5284, 5883, 6570, 7132, 8763, 9943, 10590, 11425, 12827, 14180, 15184,
- 567, 890, 1811, 3039, 4034, 4670, 5067, 5886, 7597, 8889, 10127, 10989, 12275, 13126, 14471, 15240,
- 1017, 1306, 1912, 4065, 5098, 5506, 6244, 6943, 7610, 8963, 10029, 10608, 11375, 12363, 14054, 15433,
- 718, 949, 1640, 4407, 4989, 5504, 6145, 6846, 8055, 8755, 9764, 11309, 12335, 13157, 13991, 15052,
- 833, 1104, 2582, 3256, 3910, 5291, 5740, 7382, 8142, 8582, 9618, 11230, 12436, 13284, 14118, 14993,
- 1157, 1491, 2370, 3490, 3848, 5022, 5800, 6591, 7995, 8564, 9304, 10921, 12495, 13372, 14254, 15054,
- 1052, 1417, 2072, 2620, 3044, 4572, 5432, 6284, 7546, 8244, 9800, 10798, 12368, 13625, 14662, 15445,
- 795, 1132, 1902, 2810, 3433, 4747, 5790, 6745, 8443, 9315, 10050, 10836, 11673, 12528, 13832, 15149,
- 967, 1250, 2420, 3159, 3625, 4266, 4948, 7030, 7674, 8235, 9112, 9840, 11161, 12837, 14235, 15341,
- 730, 997, 2113, 3171, 3737, 4764, 5577, 6449, 7240, 8394, 9116, 10604, 12009, 13102, 14231, 15244,
- 1192, 1617, 2341, 3430, 4000, 4721, 5596, 6358, 7429, 8167, 8895, 9916, 10855, 12188, 13896, 15254,
- 872, 1150, 2032, 3553, 3983, 4963, 5636, 6604, 7462, 8064, 9470, 10203, 11089, 12799, 14118, 15282,
- 1013, 1444, 1984, 3267, 4408, 4772, 5805, 7143, 7690, 8647, 10029, 10669, 11431, 12636, 13988, 15117,
- 830, 1134, 1866, 3581, 4056, 4925, 6011, 6558, 8076, 8830, 9656, 10706, 12639, 13726, 14663, 15367,
- 684, 957, 1801, 3005, 3559, 4879, 5574, 6920, 7739, 8471, 9724, 10719, 12040, 13148, 14262, 15275,
- 699, 1022, 2042, 3021, 3652, 5369, 6030, 7152, 8031, 8854, 9968, 10869, 11910, 13073, 14255, 15228,
- 831, 1105, 1945, 3827, 4272, 5403, 6214, 6843, 8117, 8827, 9516, 10328, 11201, 12905, 14507, 15398,
- 785, 1036, 2037, 4291, 4698, 5531, 6223, 7000, 8372, 9181, 9784, 10501, 11195, 12592, 13855, 15023,
- 1079, 1556, 2081, 3294, 4678, 5189, 5975, 6991, 7650, 8458, 9624, 10387, 11370, 12518, 13343, 14521,
- 1085, 1535, 2122, 2772, 3190, 4157, 6280, 7310, 8119, 8898, 9511, 10169, 11313, 12529, 13732, 15153,
- 1130, 1625, 2359, 3044, 3504, 5151, 6102, 6755, 7616, 8099, 8791, 9828, 10718, 12434, 14231, 15302,
- 894, 1194, 1854, 2315, 3048, 5073, 5700, 6637, 7336, 8181, 9563, 10924, 12316, 13331, 14349, 15237,
- 1274, 1843, 2368, 2935, 3396, 4031, 5905, 6950, 7597, 8704, 9554, 10193, 11657, 13031, 13891, 14934,
- 1208, 1660, 2310, 3189, 3644, 4355, 5442, 6162, 7602, 8433, 9505, 10600, 12310, 13625, 14495, 15234,
- 884, 1244, 2154, 2652, 3187, 3810, 5991, 6674, 7284, 8251, 9106, 10547, 11947, 13173, 14248, 15300,
- 851, 1095, 2125, 2913, 3429, 4068, 4931, 6228, 6911, 8477, 9513, 10932, 12187, 13333, 14385, 15286,
- 637, 976, 2370, 3892, 4718, 6063, 7126, 8378, 9405, 10359, 11188, 12001, 12807, 13610, 14465, 15303,
- 674, 1156, 3206, 3848, 4574, 5332, 6275, 7180, 7979, 8944, 9945, 11135, 12211, 13166, 14189, 15185,
- 648, 874, 1620, 4523, 5335, 5818, 6480, 7079, 8024, 8654, 9320, 10068, 11602, 13428, 14329, 15293,
- 602, 831, 3174, 4258, 4758, 5558, 6154, 6862, 7261, 8173, 9894, 11228, 12406, 13185, 14416, 15390,
- 728, 1050, 2523, 3324, 4581, 5112, 6274, 7249, 7665, 8228, 9024, 9779, 11962, 13886, 14569, 15310,
- 625, 1064, 2658, 3373, 4317, 5328, 6341, 7576, 8230, 9137, 10072, 11030, 12105, 13071, 14050, 15127,
- 860, 1199, 2569, 3264, 3928, 5082, 6012, 7023, 7568, 8726, 9899, 10975, 11665, 12602, 13465, 14849,
- 994, 1326, 2131, 3392, 3914, 4629, 5507, 6365, 7208, 8086, 9307, 10139, 11960, 13752, 14791, 15505,
- 1297, 1723, 2304, 2955, 3528, 4575, 5330, 6141, 7321, 7873, 9079, 11066, 12114, 12781, 13485, 14866,
- 1247, 1673, 2480, 3557, 4100, 4892, 5843, 6678, 7764, 8607, 9292, 10007, 11055, 11895, 12912, 14829,
- 1108, 1515, 2302, 3815, 4582, 5275, 6233, 7271, 7993, 8890, 9807, 10489, 11145, 11905, 12753, 14036,
- 969, 1302, 2055, 2425, 3922, 5219, 6014, 6785, 7331, 9195, 10032, 10897, 11788, 12542, 13408, 14826,
- 1042, 1398, 2217, 2813, 3449, 4242, 5032, 6957, 7766, 8985, 9916, 10576, 11237, 12222, 13952, 15302,
- 1099, 1456, 2313, 2814, 3532, 5651, 6349, 7119, 8208, 8769, 9427, 10112, 11070, 12005, 12975, 14815,
- 952, 1343, 2279, 4277, 5014, 5588, 6550, 7259, 8172, 9304, 10112, 10905, 11848, 12798, 13734, 14852,
- 827, 1155, 2015, 2590, 3389, 5575, 6147, 7237, 8788, 9352, 9943, 10452, 11166, 11866, 13017, 14908,
- 965, 1342, 1904, 3530, 4756, 5265, 6282, 7430, 8006, 8866, 10189, 10858, 11593, 12497, 13413, 14286,
- 791, 1033, 1807, 4669, 5445, 6065, 6777, 7311, 8217, 8955, 9594, 10171, 10891, 11711, 13024, 15079,
- 703, 982, 1468, 2926, 5508, 6551, 7045, 7648, 8280, 9027, 10043, 10724, 11477, 12486, 13816, 15160,
- 636, 1084, 3228, 4342, 5051, 5884, 6638, 7545, 8362, 9253, 10190, 11160, 12212, 13207, 14220, 15198,
- 821, 1100, 1682, 3559, 5618, 6419, 6944, 7630, 8233, 9075, 10130, 10822, 11427, 12149, 13027, 14146,
- 629, 1332, 3013, 3722, 4532, 5532, 6531, 7553, 8517, 9499, 10507, 11474, 12457, 13390, 14358, 15272,
- 1317, 2450, 3297, 3892, 4613, 5418, 6425, 7337, 8291, 9245, 10282, 11346, 12442, 13393, 14373, 15268,
- 1375, 2387, 3533, 4376, 5325, 6263, 7320, 8268, 9276, 10272, 11197, 12094, 13000, 13818, 14648, 15432,
- 1158, 2044, 2814, 3372, 4231, 5273, 6326, 7190, 8055, 8945, 9909, 11036, 12230, 13264, 14271, 15192,
- 871, 1102, 2233, 4189, 4539, 5309, 5875, 6894, 8135, 8683, 9397, 10814, 12535, 13312, 14286, 15134,
- 814, 1062, 2256, 4246, 4741, 5468, 6095, 6832, 7800, 8445, 9019, 9623, 10539, 12957, 14398, 15333,
- 958, 1249, 1879, 3625, 4221, 4743, 5374, 6010, 7564, 8370, 9054, 10537, 11472, 12580, 13996, 15129,
- 871, 1148, 2666, 3651, 4193, 5040, 5660, 6778, 7459, 8017, 8780, 9530, 10508, 12721, 14270, 15304,
- 651, 1057, 2426, 3096, 4328, 5224, 6148, 6984, 7722, 9038, 10150, 11248, 12299, 13281, 14301, 15245,
- 617, 889, 2138, 4101, 4573, 5464, 6134, 7293, 8294, 9277, 10316, 11265, 12281, 13301, 14327, 15273,
- 792, 1161, 2081, 2883, 3644, 5502, 6438, 7760, 8867, 9704, 10404, 11003, 11913, 13286, 14647, 15445,
- 1202, 1869, 2491, 2996, 4025, 5336, 6574, 7586, 8415, 9166, 9940, 11099, 12441, 13461, 14408, 15252,
- 1164, 2036, 2762, 3315, 4510, 5722, 6901, 7925, 8892, 9813, 10715, 11594, 12526, 13416, 14359, 15235,
- 1442, 2242, 2916, 3528, 4751, 5836, 6787, 7599, 8395, 9235, 10177, 11157, 12208, 13147, 14145, 15115,
- 1182, 2189, 3501, 4359, 5481, 6402, 7306, 7997, 8719, 9457, 10314, 11195, 12207, 13152, 14186, 15159,
- 1123, 1928, 3249, 4174, 5190, 6018, 6841, 7570, 8320, 9079, 9969, 10880, 11946, 12957, 14056, 15116,
- 1391, 2121, 3172, 3766, 4449, 5215, 6232, 7171, 8096, 8981, 9854, 10664, 11746, 12851, 14017, 15116,
- 1330, 2144, 2998, 3489, 4141, 5059, 6328, 7427, 8552, 9564, 10505, 11379, 12290, 13173, 14193, 15189,
- 1109, 1492, 2303, 2946, 3382, 4987, 6548, 6997, 8296, 9305, 9871, 10389, 11172, 13047, 14487, 15395,
- 1088, 1547, 2223, 3092, 3620, 4386, 6452, 7580, 8220, 9176, 10021, 10624, 11535, 12511, 13349, 14330,
- 888, 1265, 1930, 3715, 4354, 4929, 6671, 7348, 8125, 9622, 10527, 11265, 12457, 13225, 13909, 14800,
- 815, 1189, 2006, 3817, 4374, 5838, 6485, 7386, 8816, 9395, 10242, 10930, 11702, 12358, 13510, 14977,
- 990, 1329, 1856, 2513, 2960, 3841, 6200, 7584, 8128, 9084, 9884, 10615, 11927, 13026, 14162, 15236,
- 809, 1891, 3000, 3978, 4992, 5938, 6931, 7857, 8818, 9757, 10695, 11637, 12557, 13495, 14394, 15295,
- 554, 1531, 2712, 3754, 4813, 5795, 6805, 7758, 8739, 9677, 10642, 11569, 12527, 13426, 14344, 15173,
- 961, 1247, 2162, 4030, 4594, 5392, 6191, 6804, 7979, 8852, 9449, 10061, 10905, 11757, 12852, 14951,
- 1214, 1854, 2494, 3286, 3894, 4471, 5973, 7358, 7967, 8807, 9608, 10178, 10994, 12344, 13316, 14487,
- 1024, 1446, 2069, 2773, 3329, 5327, 6627, 7318, 8209, 8780, 9592, 11114, 12066, 12765, 13662, 14618,
- 907, 1229, 2135, 2657, 3456, 4585, 5614, 6412, 7107, 8072, 10517, 11769, 12447, 13038, 14011, 15186,
- 608, 888, 1729, 3791, 4395, 4825, 5374, 6977, 7738, 8387, 9316, 10715, 12651, 13548, 14546, 15311,
- 941, 1202, 2101, 3123, 3503, 4159, 4619, 6676, 7402, 8223, 9627, 10280, 11822, 13131, 14470, 15468,
- 800, 1065, 1726, 2186, 4630, 5715, 6394, 7256, 7782, 8452, 9368, 11407, 12394, 13086, 14086, 15167,
- 875, 1208, 1941, 2508, 3296, 4447, 5532, 6821, 7582, 8862, 9556, 10519, 11696, 12896, 14109, 15273,
- 900, 1183, 1959, 2423, 3386, 5868, 6409, 7218, 7883, 8442, 9143, 9913, 11104, 13003, 14241, 15213,
- 1115, 1573, 2286, 3113, 3574, 4645, 5519, 6311, 8196, 8937, 9864, 11290, 12252, 13043, 13810, 14631,
- 754, 1068, 2679, 3694, 4190, 5008, 5606, 7347, 8013, 8864, 9972, 10786, 11627, 12824, 14010, 15316,
- 825, 1144, 1765, 3426, 4206, 4874, 6385, 7180, 7946, 9319, 10153, 10682, 11276, 11957, 13415, 15087,
- 537, 862, 1866, 3116, 4349, 4842, 5496, 7245, 7958, 8822, 9611, 10099, 11455, 13291, 14370, 15284,
- 887, 1205, 1698, 3243, 5173, 5813, 6470, 7237, 7881, 8707, 9739, 10497, 11284, 12115, 13185, 14869,
- 726, 1002, 2984, 3728, 4334, 5142, 5946, 7127, 7676, 8367, 9085, 10668, 11889, 13054, 14011, 15180,
- 771, 981, 1772, 4221, 4795, 5401, 6003, 6690, 7480, 8115, 8717, 9938, 12232, 13037, 13941, 15157,
- 1303, 1922, 2468, 3316, 4185, 4656, 5507, 6631, 7341, 8291, 9593, 10378, 11412, 12616, 13556, 14820,
- 1080, 1403, 2477, 2954, 3741, 4642, 5517, 6582, 7111, 7805, 8786, 9547, 11253, 12874, 14045, 15236,
- 872, 1141, 2386, 3209, 3896, 5042, 5805, 7002, 7549, 8285, 9036, 9939, 12031, 13030, 13767, 15055,
- 728, 1046, 2013, 4276, 5230, 5799, 6889, 7772, 8535, 9890, 10949, 11702, 12791, 13661, 14459, 15218,
- 768, 1578, 3171, 4134, 5114, 6061, 7128, 8112, 9139, 10152, 11101, 12005, 12913, 13736, 14586, 15387,
- 622, 1221, 3202, 4279, 5529, 6753, 7808, 8631, 9408, 10115, 10830, 11631, 12512, 13365, 14324, 15263,
- 621, 848, 1626, 4612, 5335, 5797, 6416, 7167, 8286, 8933, 9880, 11327, 12709, 13565, 14439, 15329,
- 650, 861, 3115, 4397, 4828, 5572, 6159, 7071, 7513, 8108, 8667, 9739, 12413, 13532, 14414, 15581,
- 756, 1091, 1615, 2958, 4679, 5429, 6304, 7065, 7657, 8329, 10012, 10763, 11425, 12569, 14285, 15324,
- 765, 1051, 2074, 3446, 3838, 5659, 6318, 7149, 8407, 8942, 9688, 11058, 12443, 13347, 14361, 15231,
- 1121, 1473, 2217, 2827, 3347, 5017, 5872, 6668, 7595, 8264, 9085, 10487, 12210, 13022, 13866, 14985,
- 1056, 1457, 2212, 2861, 3453, 5060, 5976, 6759, 7697, 8519, 9461, 10348, 11169, 12000, 13798, 15274,
- 1042, 1388, 2220, 3677, 4297, 5120, 6037, 6788, 7788, 8549, 9262, 10069, 10878, 11755, 14085, 15413,
- 961, 1331, 1957, 3111, 3796, 4344, 5010, 5553, 7612, 9441, 10155, 10903, 11982, 12664, 13391, 14959,
- 1135, 1470, 2082, 3284, 3937, 4423, 5140, 5618, 7055, 8860, 9355, 10318, 11706, 12556, 13826, 15192,
- 1084, 1383, 2209, 3550, 4038, 4636, 5240, 5911, 8011, 9044, 9570, 10294, 11155, 11865, 13587, 15219,
- 737, 1028, 1858, 2434, 3038, 3815, 5414, 6560, 7753, 9010, 10088, 11109, 12200, 13241, 14292, 15286,
- 979, 1377, 2142, 3511, 4042, 4787, 5869, 6505, 7764, 8710, 9567, 10378, 11383, 13445, 14620, 15417,
- 802, 1063, 1768, 3997, 4648, 5273, 6005, 6694, 7698, 8427, 9191, 10230, 11176, 12425, 13991, 15244,
- 926, 1148, 2359, 3438, 3811, 4446, 4994, 6492, 7088, 7840, 8921, 9955, 11823, 13037, 14140, 15275,
- 639, 939, 1753, 3080, 4204, 5022, 5702, 6198, 6811, 8268, 9786, 10836, 12243, 13126, 14260, 15306,
- 736, 1079, 1802, 3276, 4001, 5415, 6381, 7119, 8492, 9232, 10308, 11105, 12031, 12793, 13904, 15114,
- 1249, 1897, 2616, 3398, 4149, 4840, 5809, 6616, 7453, 8768, 9869, 10767, 12051, 13177, 14339, 15241,
- 1026, 1314, 2014, 3249, 3690, 4344, 4892, 5691, 7289, 7970, 9397, 10615, 11663, 13015, 14272, 15328,
- 970, 1249, 2342, 2895, 3661, 4685, 5348, 6691, 7176, 8850, 10323, 11025, 11936, 12697, 13429, 14816,
- 872, 1155, 1680, 2334, 2880, 4439, 6448, 7088, 8221, 9517, 10060, 10691, 11577, 12830, 14274, 15377,
- 874, 1131, 2067, 2714, 3203, 3786, 4480, 6643, 7487, 8708, 9861, 10989, 12079, 13208, 14240, 15290,
- 804, 1079, 1708, 2236, 2842, 5275, 6096, 7030, 7886, 8704, 9978, 11354, 12923, 13800, 14706, 15380,
- 646, 907, 1724, 3428, 3981, 5158, 5889, 7244, 8226, 8728, 9227, 10055, 11833, 13065, 14232, 15287,
- 986, 1315, 1948, 2518, 3010, 5465, 6638, 7224, 8275, 8820, 9602, 10482, 11268, 12169, 14206, 15449,
- 565, 805, 1593, 3458, 4571, 5319, 6411, 7828, 8796, 9460, 10121, 10926, 11931, 12989, 14085, 15181,
- 532, 795, 1654, 3253, 3949, 5323, 6246, 7279, 8378, 9364, 10397, 11379, 12395, 13375, 14390, 15290,
- 835, 1169, 1895, 2461, 3233, 5608, 6358, 7353, 8521, 9756, 10632, 11371, 12291, 12967, 13777, 14575,
- 528, 840, 1585, 2511, 4342, 5075, 5825, 7183, 8370, 8938, 9529, 10614, 12398, 13483, 14482, 15340,
- 789, 1044, 2065, 2677, 3589, 5397, 5969, 7559, 8126, 8638, 9332, 10989, 12645, 13441, 14355, 15188,
- 685, 970, 1644, 2232, 4331, 5344, 6203, 6877, 7736, 9534, 10331, 11186, 11981, 12778, 13629, 14878,
- 800, 1120, 1829, 2303, 4180, 4963, 5877, 6722, 7425, 8436, 9106, 10138, 12113, 13163, 14087, 15242,
- 851, 1150, 2243, 3088, 3642, 5370, 6027, 6953, 7919, 8562, 9276, 9957, 10896, 12786, 14320, 15324,
- 735, 1113, 2000, 3196, 4699, 5471, 6589, 7347, 8003, 8855, 9650, 10594, 12001, 13017, 13918, 15089,
- 837, 1098, 1699, 2175, 3008, 6101, 6902, 7529, 8229, 8790, 9674, 10585, 11532, 12971, 14334, 15323,
- 626, 1278, 3315, 4325, 5436, 6586, 7790, 8824, 9821, 10690, 11482, 12268, 13043, 13789, 14591, 15381,
- 1439, 2612, 3825, 4715, 5881, 7098, 8204, 9129, 10075, 10889, 11673, 12416, 13159, 13897, 14672, 15420,
- 1489, 2697, 3785, 4568, 5440, 6284, 7191, 8043, 8936, 9852, 10756, 11696, 12662, 13539, 14458, 15314,
- 663, 932, 1850, 4514, 5042, 5800, 6482, 7381, 8674, 9537, 10447, 11239, 12074, 12975, 13958, 14969,
- 695, 1028, 1781, 2195, 4548, 5142, 6539, 7282, 7728, 8259, 8915, 9755, 11646, 13482, 14373, 15221,
- 846, 1138, 1713, 2239, 2823, 5254, 6237, 6940, 7777, 8443, 9981, 10858, 11793, 13022, 14259, 15331,
- 595, 882, 1481, 3108, 4815, 5391, 5979, 6529, 8058, 8939, 9706, 10649, 11884, 13065, 14350, 15334,
- 887, 1139, 1829, 2276, 3102, 5552, 6221, 7067, 7712, 8368, 9127, 10682, 12241, 13127, 14112, 15133,
- 1019, 1418, 2165, 2865, 3353, 4937, 6019, 6784, 7810, 8440, 9197, 10025, 12092, 13614, 14602, 15352,
- 951, 1206, 2295, 3066, 3586, 4125, 4780, 7215, 7687, 8320, 9079, 10918, 12519, 13503, 14488, 15224,
- 847, 1149, 2069, 2504, 4231, 5041, 6034, 6862, 7321, 7882, 8765, 10837, 12433, 13022, 13809, 15203,
- 829, 1111, 2677, 3505, 3999, 5080, 5694, 7033, 7667, 8302, 8963, 10297, 12410, 13340, 14485, 15373,
- 908, 1284, 2182, 2613, 3944, 5116, 5768, 7284, 7825, 8461, 10123, 11755, 12583, 13368, 14195, 15053,
- 930, 1215, 2323, 2834, 3500, 4216, 5200, 5956, 6576, 7757, 9998, 10921, 12073, 12844, 14003, 15254,
- 973, 1343, 2164, 3265, 3733, 4538, 5294, 6469, 7850, 8468, 9747, 10750, 11398, 12428, 13990, 15226,
- 952, 1239, 1992, 3093, 3498, 4156, 4605, 5695, 7946, 8668, 9684, 11027, 12029, 13102, 14093, 15158,
- 558, 828, 1638, 2628, 3361, 4827, 6046, 7182, 8226, 9297, 10326, 11331, 12343, 13333, 14312, 15248,
- 543, 797, 1292, 2197, 4031, 4954, 6096, 7133, 8292, 9244, 10253, 11267, 12293, 13293, 14303, 15272,
- 562, 818, 1546, 2854, 3792, 5212, 5897, 6697, 8329, 9105, 10103, 11572, 13033, 13866, 14716, 15223,
- 897, 1320, 1937, 2717, 3205, 4412, 6880, 7773, 8381, 9585, 10492, 11242, 12589, 13425, 14212, 15053,
- 798, 1174, 2038, 2482, 3869, 4999, 5820, 7157, 7807, 9160, 10013, 11078, 12122, 13113, 14028, 14997,
- 686, 1000, 2269, 3020, 3755, 5347, 5960, 7664, 8406, 9199, 10485, 11521, 12512, 13361, 14217, 15144,
- 715, 1058, 1660, 3282, 4591, 4997, 6361, 7315, 7878, 9084, 10356, 11033, 12186, 13333, 14390, 15279,
- 784, 1087, 1584, 3299, 5404, 6007, 6611, 7254, 7870, 8870, 10201, 10911, 11780, 12799, 14077, 15156,
- 664, 905, 1952, 4880, 5346, 5934, 6519, 7374, 8530, 9311, 10103, 10819, 11525, 12818, 14071, 15168,
- 626, 914, 2854, 4227, 4737, 5634, 6361, 7354, 7918, 8636, 9491, 10701, 11785, 13139, 14220, 15292,
- 1793, 3491, 4468, 5330, 6092, 6716, 7382, 8023, 8852, 9777, 10729, 11640, 12576, 13418, 14323, 15182,
- 688, 949, 1560, 3990, 5022, 5519, 6194, 6798, 8071, 8773, 9515, 10514, 12712, 13784, 14609, 15400,
- 783, 1014, 2824, 3542, 4129, 4903, 5606, 6542, 6965, 7778, 10053, 10913, 11995, 12759, 13498, 15320,
- 753, 1093, 2085, 2706, 4391, 5134, 5930, 6777, 7408, 8184, 9523, 10719, 12392, 13543, 14552, 15277,
- 920, 1325, 2067, 2928, 3400, 4646, 5913, 6704, 8091, 8819, 9941, 10843, 12080, 13740, 14761, 15449,
- 618, 961, 2096, 3325, 4242, 5555, 6567, 7721, 8801, 9891, 10891, 11871, 12871, 13717, 14555, 15310,
- 826, 1165, 2466, 3876, 4364, 5723, 6461, 7667, 8417, 9095, 9913, 10755, 11704, 12971, 14239, 15196,
- 1056, 1577, 2885, 3726, 4232, 5031, 5736, 6842, 8006, 8903, 10198, 11414, 12536, 13409, 14359, 15205,
- 876, 1205, 2453, 3059, 3652, 4312, 5617, 6518, 7542, 8743, 9363, 11286, 13049, 13835, 14643, 15303,
- 763, 990, 2805, 3723, 4228, 4936, 5628, 6613, 7058, 7705, 8476, 10130, 11974, 13113, 14180, 15342,
- 857, 1152, 1913, 3994, 4629, 5137, 6183, 6861, 7722, 9347, 10177, 10777, 11599, 13112, 14298, 15264,
- 656, 1269, 3434, 4621, 5637, 6438, 7220, 7942, 8741, 9612, 10517, 11433, 12435, 13354, 14316, 15237,
- 1359, 2605, 3748, 4758, 6042, 7092, 7952, 8651, 9338, 9974, 10723, 11579, 12528, 13418, 14397, 15297,
- 1529, 3067, 4410, 5449, 6449, 7233, 7901, 8525, 9237, 10002, 10859, 11784, 12730, 13589, 14467, 15300,
- 1790, 3311, 4192, 4897, 5538, 6210, 6922, 7697, 8597, 9590, 10560, 11494, 12426, 13283, 14229, 15138,
- 1252, 2359, 3404, 4211, 5155, 6055, 7030, 7899, 8850, 9793, 10761, 11714, 12674, 13565, 14489, 15352,
- 590, 998, 2402, 3314, 4528, 5604, 6649, 7644, 8508, 9487, 10408, 11383, 12335, 13276, 14293, 15243,
- 727, 1025, 1614, 3818, 5876, 6391, 6980, 7606, 8211, 9304, 10696, 11324, 12381, 13241, 13988, 14791,
- 621, 899, 2068, 4152, 5232, 6483, 7323, 8193, 8960, 9627, 10417, 11291, 12234, 13192, 14216, 15187,
- 582, 828, 1926, 4025, 4942, 6029, 6957, 7599, 8278, 9093, 10032, 11126, 12233, 13209, 14256, 15311,
- 788, 1126, 1690, 3183, 3923, 4599, 6240, 6890, 7758, 9022, 9656, 10453, 11779, 12706, 13913, 15214
-};
-
-
-const Word16 lsf_cdk_nb_gc_stg1[] = /* 14Q1*1.28 */
-{
- -2046, -827, -3490, -8984, -9331, -8562, -2854, 112, 2194, 13294, 11592, 7952,
- -294, 2271, 1647, -1260, -2029, -3649, -4081, -3432, -3649, 333, 5042, 4720,
- -1209, 984, -241, -3413, -4476, -4817, -2910, -2016, -2016, 2900, 6868, 5408,
- -1900, 896, 688, -197, -33, -993, -1470, -1283, -2145, -665, 2161, 4064,
- -1998, -351, -1985, -4742, -4879, -5329, -3500, -2023, -1264, 8507, 9766, 6640,
- 245, 3962, 3664, 1935, 1601, 144, -1054, -1236, -2225, -2647, -3746, 1695,
- -3051, -1382, -1825, 828, 2537, 1872, 957, 689, -592, 1675, 5507, 5216,
- -2178, -281, 2097, 5417, 4372, 1648, -802, -1304, -2817, -754, 3345, 4224,
- -3400, -2402, -4098, -3148, -2066, -1985, -558, 466, 705, 11042, 11096, 7424,
- 776, 4355, 3200, -1139, -2922, -3985, -2990, -2405, -2881, -661, 2897, 4176,
- -1818, 394, -385, -1504, -1545, -2913, -3062, -2451, -2609, 2093, 6387, 5248,
- -1081, 2069, 1952, 1345, 1649, 64, -1394, -1526, -2577, -2051, -1025, 2863,
- 276, 2780, 1567, -3228, -4881, -5970, -4363, -3523, -3089, 3447, 7300, 5456,
- 1917, 6445, 5552, 2069, 684, -1233, -2371, -2377, -3409, -1635, 1616, 3648,
- -2734, -1049, -2001, -1927, -1908, -2273, -1294, -652, -944, 4451, 7893, 5888,
- -1193, 2108, 5153, 7875, 8214, 6145, 2891, 2001, 208, -1312, -2273, 1599,
- -3697, -3538, -6739, -7238, -4524, -2464, 2424, 4591, 6098, 15691, 13066, 8912,
- -352, 2108, 847, -247, 1179, -769, -2757, -2873, -3713, 203, 4994, 4688,
- -1185, 1565, 703, -1788, -2372, -2721, -1951, -1554, -2129, -374, 2529, 4192,
- -2094, 401, 352, 1118, 2376, 1632, 582, 351, -1009, -1389, -784, 3056,
- -367, 1637, -145, -5132, -6888, -8178, -5371, -3397, -1776, 9469, 9894, 6752,
- 953, 5894, 6785, 5196, 4663, 2400, 31, -598, -2065, -2581, -2786, 1743,
- -2637, -1222, -560, 5363, 6867, 5329, 2192, 1264, -544, -508, 1345, 3664,
- -1112, 1918, 2976, 3989, 4508, 3104, 1245, 606, -897, -2381, -4258, 1119,
- -1983, -328, -2930, -6112, -1802, 144, 486, 194, -960, 4066, 7797, 5872,
- 648, 3526, 3104, 562, -200, -2177, -3380, -3162, -3857, -1516, 2433, 3920,
- -2908, -722, -417, -181, 290, -352, -352, -175, -1088, 1689, 5603, 5184,
- -536, 2771, 2064, 10, -643, -1793, -1733, -1523, -2193, -1813, -1585, 2831,
- 2239, 5541, 4400, -637, -2370, -4802, -5148, -3901, -2912, 7328, 9222, 6320,
- 8159, 12344, 9921, 5311, 4611, 2480, -1461, -1819, -2032, 5438, 7396, 5968,
- -3908, -2998, -3105, 1031, 2171, 1952, 2012, 1982, 1280, 8825, 10343, 7056,
- -80, 5935, 10546, 12414, 12351, 9601, 4823, 3380, 1152, -840, -2161, 1967
-};
-const Word16 lsf_cdk_nb_gc_stg2[] = /* 14Q1*1.28 */
-{
- -476, -1387, -3185, 464, 1104, 0,
- -1029, -675, 63, -1664, -1168, 0,
- -691, -1002, -1697, -1968, -704, 0,
- -957, -724, -945, 816, 928, 0,
- -1131, -2087, -1296, 2704, 1376, 0,
- -1167, -1003, 512, 592, 192, 0,
- 492, 517, -721, -3600, -1888, 0,
- 489, -147, -1153, -688, -864, 0,
- 865, 179, -608, 2000, 1008, 0,
- -1286, -1953, -1633, -304, -368, 0,
- 2033, 1593, -369, -576, 272, 0,
- -718, 685, 751, -192, 192, 0,
- 1394, 1172, 1520, -480, -576, 0,
- -1455, -466, 2896, 2176, 896, 0,
- -1171, 324, 2512, -272, -496, 0,
- 4950, 5112, 3536, 1040, 80, 0
-};
-const Word16 lsf_cdk_nb_gc_stg3[] = /* 14Q1*1.28 */
-{
- 1, 6, -801, -3701, -3408, -1712, 2661, 2257, 768,
- 4, 11, -481, -1886, -2409, -2353, -652, 1216, 256,
- 14, 6, -1713, -1706, -1012, -817, -1158, -369, -97,
- 8, 15, 127, -780, -1241, -1617, -2819, -1474, -577,
- 13, 6, 2320, 103, -1175, -1681, 297, 1536, 384,
- 4, 14, -529, -319, -161, -129, -2113, -4131, -1281,
- 0, 5, -2001, -1650, -185, 1040, 2146, 1713, 736,
- 12, 4, 320, 1615, 1634, 1376, -1700, -4675, -1697,
- 15, 13, -401, -348, -511, -320, 2570, 2865, 944,
- 7, 14, 335, -1107, -768, -112, -338, -65, 15,
- 13, 15, -1025, 563, -38, -865, -1105, 383, 31,
- 4, 6, 1056, 1034, 443, -289, -2357, -1986, -689,
- 7, 6, 1008, 1608, 1329, 816, 730, 1312, 432,
- 4, 12, -1281, 789, 1794, 1328, -517, -561, -113,
- 12, 4, 704, 1656, 2289, 3153, 5215, 3682, 1680,
- 11, 15, 2528, 4255, 3539, 2320, -669, -1585, -641
-};
-const Word16 lsf_cdk_nb_vc_stg1[] = /* 14Q1*1.28 */
-{
- -1950, -1358, -4562, -8912, -8626, -8050, -2211, 1051, 4226, 15749, 13194, 8800,
- 224, 2532, 175, -5316, -6930, -5601, 381, 515, -416, 3224, 6964, 5584,
- -2481, -1570, -3746, -3444, -3066, -3665, -2328, -929, -256, 10781, 10903, 7280,
- -164, 2676, 1952, 1170, 1362, 32, -809, -978, -1793, -2288, -3137, 2287,
- -1649, -589, -3746, -9056, -6586, -2160, 1693, 1869, 1072, 8982, 10375, 7056,
- -1442, 731, -465, -352, 881, 0, -1397, -1476, -2273, -792, 2209, 4048,
- -570, 1125, -577, -4067, -5011, -6130, -4457, -3228, -2464, 7796, 9414, 6432,
- 314, 2780, 1599, -2442, -4050, -5762, -4680, -3747, -3169, 3706, 7556, 5568,
- -3306, -3212, -6178, -5257, -2978, -2209, 33, 2038, 3490, 15396, 13130, 8704,
- -303, 2334, 927, -1025, -1877, -2753, -1964, -1602, -2145, -943, 1457, 3872,
- -1437, 228, -1633, -3020, -3188, -2833, -1579, -942, -1184, 2482, 6532, 5408,
- 2622, 6487, 4448, 511, -1383, -2769, -2495, -2230, -2977, -107, 4082, 4480,
- -1897, -706, -2994, -2432, 566, 704, 220, 99, -608, 3533, 7300, 5744,
- -2605, -1419, -1376, 1700, 1217, 112, -957, -849, -1633, 1902, 6131, 5296,
- 2177, 3621, 751, -6700, -10534, -11698, -2205, 713, 3954, 15329, 12986, 8656,
- 7156, 9030, 4704, 653, -2345, -6178, -4996, -1616, 1762, 14213, 12329, 8272,
- -997, 238, -2066, -5868, -6868, -7474, -4302, -2171, -623, 12371, 11336, 7600,
- 2585, 4011, 959, -298, 477, -353, -2457, -2786, -3233, 5865, 8693, 6064,
- -2145, -680, -1553, -1961, -2011, -3249, -3184, -2317, -1968, 5674, 8613, 6080,
- 675, 4202, 4128, 2060, 1483, -865, -2647, -2552, -3377, -2094, 64, 3184,
- -3084, -2915, -5698, -905, 1626, 2176, 1517, 1566, 1024, 9339, 10663, 7232,
- -741, 1377, 1168, 206, 185, -1601, -3079, -2936, -3553, -265, 4402, 4528,
- 872, 3048, 799, -4039, -5660, -7890, -7222, -4564, -1792, 10306, 10311, 6992,
- 2766, 6132, 4848, -1357, -2881, -4914, -4864, -3528, -2608, 9503, 10134, 6832,
- -1649, -1598, -6691, -10943, -5664, -3632, 2663, 6788, 11044, 19895, 15933, 10416,
- 530, 3138, 2560, -401, -1453, -3425, -4047, -3463, -3713, 252, 4914, 4672,
- -879, 1210, 47, -2253, -2732, -3777, -3689, -2947, -2833, 2110, 6499, 5232,
- 5749, 8736, 6865, 3519, 2447, 383, -1446, -1459, -2385, 970, 4146, 4560,
- -2556, -1914, -3969, 3390, 7938, 6305, 1777, 560, -928, 1091, 4563, 4928,
- -1808, -411, 1313, 6469, 6395, 3680, 398, -149, -1713, -1588, 832, 3360,
- 3630, 5517, 2479, -2938, -6552, -10675, -4951, -545, 1441, 13744, 12041, 8080,
- 10956, 13776, 9201, 4285, 3873, -801, -5835, -2466, 1233, 13746, 12105, 8192
-};
-const Word16 lsf_cdk_nb_vc_stg2[] = /* 14Q1*1.28 */
-{
- -377, -729, -1793, 400, 1312, 0,
- -1197, -1432, -2033, -1936, -1520, 0,
- -403, -100, 127, -3232, -3456, 0,
- 555, 364, -865, -592, -1264, 0,
- -1136, -1968, -2640, 4448, 3824, 0,
- -1539, 94, 591, 1600, 1376, 0,
- -1564, -393, 2528, -304, -688, 0,
- 1075, 823, 1648, -96, -704, 0,
- -770, -404, 527, -1648, 64, 0,
- -1320, -1678, -1072, 48, -688, 0,
- 145, 83, -1089, -3632, -448, 0,
- 1994, 1756, 159, 1120, 1504, 0,
- 282, -236, -800, 2080, 624, 0,
- -1357, -1537, 1008, 2624, 1360, 0,
- 2002, 2046, 1215, -2336, -1808, 0,
- 3757, 3480, 2592, 1472, 512, 0
-};
-const Word16 lsf_cdk_nb_vc_stg3[] = /* 14Q1*1.28 */
-{
- 3, 5, -657, -4633, -3805, -736, 1304, 1024, 368,
- 6, 12, -305, -1836, -2507, -2625, -1818, -241, -305,
- 6, 4, -2577, -1854, -1236, -1073, -594, 207, -1,
- 2, 2, -80, 643, 38, -993, -3719, -1602, -769,
- 13, 10, -625, -1825, -2422, -2449, 2887, 2625, 784,
- 6, 0, -336, 315, 466, 560, -2183, -4867, -1345,
- 10, 7, -2625, 1255, 2305, 1296, 181, 544, 208,
- 0, 7, 912, 1998, 1662, 623, -416, 256, 32,
- 10, 6, -1713, -1720, -311, 1408, 2066, 1585, 672,
- 7, 11, 15, -1217, -99, -33, -851, -33, -81,
- 12, 0, -1680, 556, -499, -897, 454, 896, 256,
- 2, 8, 2608, 425, -938, -1937, -1205, 15, -177,
- 6, 2, 1504, -796, -939, 80, 2179, 1777, 672,
- 3, 13, 1984, 3517, 3171, 2320, -2605, -5651, -1857,
- 14, 2, -160, 1660, 2380, 2832, 2924, 2097, 992,
- 10, 0, 3857, 3623, 2853, 1728, 1554, 1441, 656
-};
-const Word16 lsf_cdk_wb_gc_stg1[] = /* 14Q1*1.28 */
-{
- -854, -266, -3202, -8408, -10604, -11763, -10826, -9448, -7970, -4784, -3493, -2593,
- -2727, -1241, -1489, -1469, -1977, -2529, -2344, -2279, -2273, -1750, -1365, -1505,
- -728, 1001, -113, -1594, -2256, -3553, -4619, -4591, -4497, -3300, -2327, -2129,
- -590, 1699, 1264, 1187, 300, -865, -1554, -1669, -1649, -1202, -837, -1169,
- -1612, -578, -2546, -5013, -6155, -6834, -6779, -6002, -5506, -3988, -2968, -2625,
- -1725, 1072, 1280, 74, 277, 672, 1385, 2172, 2688, 2643, 2065, 848,
- -86, 3639, 3824, 1931, 2115, 1120, 338, 500, 496, 751, 718, -65,
- -1024, 1647, 5377, 9202, 8763, 7665, 5376, 4447, 3824, 2803, 2000, 608,
- -2585, -2600, -6211, -11489, -11790, -10322, -5788, -3684, -2289, -465, -33, -289,
- -3165, -2478, -3521, -1181, 298, 1632, 2160, 2107, 2272, 2075, 1407, 319,
- 1275, 3587, 2848, 570, -26, -1489, -4034, -4818, -5202, -3732, -2550, -2049,
- -2614, -1530, -848, 4992, 6996, 8002, 9185, 9172, 9106, 7739, 5862, 3408,
- 440, 2263, 751, -3627, -4674, -4978, -4938, -5078, -5554, -5428, -4266, -3361,
- -2308, -80, 176, 2603, 3871, 3792, 3219, 2667, 2480, 2189, 1405, 95,
- 2569, 6546, 6257, 3885, 2438, 1504, 1431, 1319, 1392, 1337, 942, -65,
- -712, 3328, 6290, 10673, 12635, 13827, 14544, 13939, 13619, 10691, 8026, 4768,
- 842, 2338, 159, -5945, -8498, -9619, -8197, -7076, -6066, -4502, -3722, -3409,
- -1628, 617, -129, -1907, -2194, -1505, -95, 486, 928, 1268, 1071, 175,
- 538, 3277, 2111, -1606, -3194, -3553, -2105, -1604, -1393, -974, -740, -1009,
- -1279, 456, 2593, 6823, 5435, 3536, 1502, 544, -96, -521, -548, -1105,
- -983, 675, -865, -4388, -5936, -5697, -3245, -2211, -1633, -519, -276, -849,
- -102, 3506, 2480, 332, -670, -448, 859, 1384, 1776, 1846, 1568, 448,
- 270, 5022, 5136, 4435, 4546, 4305, 4185, 4385, 4337, 3659, 2785, 1152,
- 216, 5449, 10098, 11459, 11060, 9922, 8139, 7175, 6289, 4794, 3394, 1600,
- -3137, -3309, -5826, -6310, -5500, -4385, -2187, -1054, -288, 502, 527, -129,
- -2997, -2031, -1344, 2452, 2535, 1856, 912, 451, 272, -124, -515, -993,
- 3808, 7001, 5536, 908, -807, -1665, -2041, -2232, -2449, -2206, -1782, -1905,
- -1117, 2493, 3616, 4843, 5755, 6273, 6815, 6906, 6769, 5801, 4580, 2528,
- 2509, 4911, 3439, -2294, -4945, -7203, -9006, -7957, -6818, -4297, -3321, -3009,
- -1110, 1877, 1776, 2112, 2398, 2704, 3465, 3938, 4257, 4039, 3202, 1568,
- 7131, 11568, 10626, 7755, 6467, 5073, 4839, 4543, 4128, 3206, 2160, 912,
- 2457, 10049, 15204, 18687, 18433, 17364, 14947, 13353, 11682, 8277, 6182, 3232
-};
-const Word16 lsf_cdk_wb_gc_stg2[] = /* 14Q1*1.28 */
-{
- -1224, -2316, -3425, -928, 128, 0,
- -1874, -2354, -1025, -624, -448, 0,
- -1026, -888, -481, -2352, -1024, 0,
- 838, 174, -2306, -4048, -960, 0,
- -1336, -2679, -1776, 2464, 1200, 0,
- 497, 2649, 3536, 1344, 320, 0,
- -1099, 4, 2448, -544, -752, 0,
- 993, 486, 592, 64, -480, 0,
- 288, -551, -2385, 1824, 2016, 0,
- -1090, -815, 128, 1008, 704, 0,
- 279, -579, -1729, -560, -832, 0,
- 60, 1211, 543, -288, 272, 0,
- 480, 1062, 560, 3152, 1680, 0,
- -1276, -672, 2961, 2704, 1200, 0,
- 1357, 1787, 767, -3424, -2768, 0,
- 4229, 3682, 1696, 192, -256, 0
-};
-const Word16 lsf_cdk_wb_gc_stg3[] = /* 14Q1*1.28 */
-{
- 15, 1, -1665, -4778, -4630, -3105, -554, -304, -112,
- 13, 10, -753, -1579, -1817, -1953, -2415, -2148, -1697,
- 8, 15, 1135, -1716, -3415, -5154, -4958, -3443, -1905,
- 4, 1, -32, 570, 443, -65, -2187, -2759, -2561,
- 4, 14, 399, -979, -269, 816, 385, -194, -673,
- 2, 5, -2161, -1600, -401, -97, -412, -433, -321,
- 0, 15, 2128, 3449, 1993, 175, -2815, -2580, -1729,
- 3, 2, 400, 714, 1209, 1904, 2711, 2436, 1840,
- 9, 13, 143, -1925, -2694, -2545, 358, 930, 960,
- 10, 0, -960, 868, 173, -513, -97, 577, 896,
- 0, 5, 1824, 11, -1080, -1761, -1565, -1058, -705,
- 7, 1, -880, 2304, 2790, 2384, 573, -18, -273,
- 5, 8, 1840, 1467, 978, 768, 598, 351, -17,
- 6, 7, -1473, -2052, -711, 992, 3166, 2788, 2080,
- 7, 12, 1856, 3557, 3483, 3184, 2417, 1923, 1408,
- 3, 13, -1649, 1850, 4068, 5073, 4907, 4086, 2976
-};
-const Word16 lsf_cdk_wb_vc_stg1[] = /* 14Q1*1.28 */
-{
- -1159, -1161, -5395, -12785, -14024, -12291, -8572, -6523, -4593, -1979, -1169, -897,
- -1903, -921, -2065, -1931, -2752, -3825, -4238, -4174, -4145, -3108, -2167, -2081,
- 522, 1696, -513, -6103, -8611, -9571, -9024, -8617, -7826, -5631, -4489, -3761,
- -1839, -544, -1280, 1080, 564, 752, 844, 1110, 1344, 1185, 1039, 63,
- -2685, -2538, -5074, -6161, -6745, -6738, -5709, -4457, -3377, -1830, -1188, -1185,
- -3059, -3565, -6706, -3405, -1183, -272, -112, 33, 160, -5, 13, -721,
- 4464, 5425, 1535, -8151, -13242, -15171, -5882, -2159, -288, 176, 739, 1440,
- 1431, 2210, -769, -2539, -889, -721, -4378, -6019, -8099, -8147, -6215, -3873,
- -1779, -2663, -8548, -12911, -8955, -5265, -1796, -700, 240, 746, 528, -160,
- -847, 1228, 735, -1117, -1191, -1857, -2236, -2407, -2321, -1779, -1542, -1665,
- -11, 1561, 591, -2764, -3940, -4994, -5679, -5652, -5586, -4852, -3930, -3297,
- -783, 2500, 2912, 1480, 864, -64, -492, -833, -769, -353, -452, -1009,
- -1207, 305, -1169, -3978, -4167, -3249, -1227, -606, -48, 233, -51, -545,
- -2442, -2531, -3873, 5622, 7990, 7025, 4210, 3337, 2576, 1042, 237, -673,
- 7644, 9215, 4703, -2206, -6625, -10676, -11281, -8039, -4321, -386, 15, -113,
- 5397, 7494, 5296, -39, -1846, -2017, -1875, -1846, -1697, -2156, -2072, -1969,
- -279, 230, -3010, -8280, -10317, -11859, -10729, -9576, -7922, -4867, -3862, -2865,
- -899, -234, -2897, 3569, 4566, 799, -5740, -7153, -6546, -3276, -2048, -960,
- 954, 3319, 1295, -3334, -5133, -5137, -2866, -2245, -1793, -1073, -934, -1281,
- -1098, 1538, 1024, 1919, 2978, 3729, 4709, 5431, 5521, 4962, 3843, 1920,
- -772, 429, -1810, -5319, -6411, -7074, -6828, -6001, -5266, -3901, -3160, -2833,
- -140, 1442, -1153, -2496, -631, 1264, 2033, 3167, 3840, 3225, 2577, 1232,
- 2263, 4102, 1167, -4671, -6812, -9651, -10507, -2400, 272, 1823, 1124, -2641,
- 3904, 5709, 4800, 1435, -1797, -3682, -7176, -9009, -11812, -10666, -5157, -2353,
- 122, 738, -2898, -9698, -11180, -8161, -1527, -926, -352, 476, -116, -705,
- 1615, 3938, 3296, -117, -1405, -2593, -4075, -4383, -4273, -3528, -3017, -2881,
- 3319, 4999, 2191, -4352, -6684, -7394, -7503, -7494, -6914, -5038, -4138, -3841,
- 1933, 5658, 4544, 2619, 2149, 1456, 812, 401, 240, 207, 12, -673,
- 1747, 3791, 1295, -236, -1712, -1232, 632, 903, 1488, 1527, 1184, 368,
- -1030, 922, 4017, 7665, 6754, 5073, 3236, 1989, 1056, 426, 45, -609,
- 12487, 14522, 8896, 2687, 1057, -3810, -10425, -9171, -6482, -2948, -2321, -1169,
- 7344, 9906, 7921, 4454, 3289, 2320, 1483, 513, 192, 491, 493, 79
-};
-const Word16 lsf_cdk_wb_vc_stg2[] = /* 14Q1*1.28 */
-{
- -182, -1035, -2593, -176, 528, 0,
- -2110, -2904, -2881, -1696, -864, 0,
- -160, -876, -1777, -4160, -2112, 0,
- 1601, 651, -1393, 208, -896, 0,
- -1109, -1806, -2112, 2592, 1360, 0,
- -1723, -1575, 1104, 912, 288, 0,
- -700, 1343, 687, 1408, 144, 0,
- 863, 454, 864, 464, -160, 0,
- -1234, -1141, -289, -832, 832, 0,
- -230, -608, -480, -1520, -2352, 0,
- 1268, 2126, 1919, -3440, -3072, 0,
- 1298, 1365, -65, -2832, 672, 0,
- 1095, 493, -849, 3184, 3056, 0,
- -469, -479, 1617, 3728, 2112, 0,
- -675, 1400, 3984, 240, -592, 0,
- 2580, 2697, 2432, 1920, 1040, 0
-};
-const Word16 lsf_cdk_wb_vc_stg3[] = /* 14Q1*1.28 */
-{
- 7, 3, -1329, -4391, -3913, -3041, -859, -255, 176,
- 13, 7, -2257, -960, -1287, -1649, -1313, -770, -433,
- 3, 13, -33, -1650, -2302, -2721, -4039, -3798, -2609,
- 10, 4, 0, 1123, 279, -1057, -2271, -1039, 160,
- 7, 12, 15, -748, 384, 848, -1029, -1992, -2385,
- 4, 1, -2417, -2753, -316, 912, 1240, 993, 704,
- 0, 0, 2497, 3043, 1347, -849, -5667, -5913, -4193,
- 5, 2, 848, 519, 1737, 2560, 1763, 1506, 912,
- 12, 12, 271, -2734, -3306, -736, 1294, 383, -209,
- 10, 14, -577, -71, -129, -449, 1561, 2068, 1920,
- 14, 1, 1408, -1285, -2943, -4177, -1355, 306, 752,
- 15, 8, -2529, 2194, 2953, 2368, 1761, 1377, 816,
- 14, 10, 3024, 1322, 224, -304, 514, 511, -81,
- 1, 12, -849, -709, 112, 2417, 5221, 4664, 3648,
- 1, 9, 160, 3607, 3314, 2016, -333, -884, -1233,
- 13, 12, 1888, 3621, 3935, 4000, 3607, 2932, 2128
-};
-
-const Word16 *const lsf_codebook[2][2][TCXLPC_NUMSTAGES] = /* 14Q1*1.28 */
-{
- {
- { lsf_cdk_wb_gc_stg1, lsf_cdk_wb_gc_stg2, lsf_cdk_wb_gc_stg3 },
- { lsf_cdk_wb_vc_stg1, lsf_cdk_wb_vc_stg2, lsf_cdk_wb_vc_stg3 }
- },
- {
- { lsf_cdk_nb_gc_stg1, lsf_cdk_nb_gc_stg2, lsf_cdk_nb_gc_stg3 },
- { lsf_cdk_nb_vc_stg1, lsf_cdk_nb_vc_stg2, lsf_cdk_nb_vc_stg3 }
- }
-};
-
-const Word16 lsf_numbits[TCXLPC_NUMSTAGES] = { 5, 4, 4 }; // Q0
-
-const Word16 lsf_dims_ivas[TCXLPC_NUMSTAGES] = { 16, 6, 10 }; // Q0
-const Word16 lsf_offs_ivas[TCXLPC_NUMSTAGES] = { 0, 0, 6 }; // Q0
-const Word16 lsf_dims[TCXLPC_NUMSTAGES] = { 16, 8, 12 }; // Q0
-const Word16 lsf_offs[TCXLPC_NUMSTAGES] = { 0, 0, 4 }; // Q0
-
-
-const Word16 lsf_ind_cdk_nb_gc_stg4[] = /* 14Q1*1.28 */
-{
- -1360, -704, 0,
- 80, 256, 0,
- -896, 1008, 0,
- 960, 2016, 0
-};
-const Word16 lsf_ind_cdk_nb_vc_stg4[] = /* 14Q1*1.28 */
-{
- -1360, -944, 0,
- 624, 1408, 0,
- -368, 240, 0,
- 2480, 3216, 0
-};
-const Word16 lsf_ind_cdk_wb_gc_stg4[] = /* 14Q1*1.28 */
-{
- -1280, -816, 0,
- 368, 272, 0,
- -704, 1136, 0,
- 1296, 2448, 0
-};
-const Word16 lsf_ind_cdk_wb_vc_stg4[] = /* 14Q1*1.28 */
-{
- -1040, -848, 0,
- 688, 400, 0,
- -560, 1520, 0,
- 2256, 2704, 0
-};
-
-const Word16 *const lsf_ind_codebook[2][2][TCXLPC_IND_NUMSTAGES] = /* 14Q1*1.28 */
-{
- { { lsf_ind_cdk_wb_gc_stg4 }, { lsf_ind_cdk_wb_vc_stg4 } },
- { { lsf_ind_cdk_nb_gc_stg4 }, { lsf_ind_cdk_nb_vc_stg4 } }
-};
-
-const Word16 lsf_ind_numbits[TCXLPC_IND_NUMSTAGES] = { 2 }; // Q0
-
-const Word16 lsf_ind_dims_ivas[TCXLPC_IND_NUMSTAGES] = { 2 }; // Q0
-const Word16 lsf_ind_dims[TCXLPC_IND_NUMSTAGES] = { 4 }; // Q0
-const Word16 lsf_ind_offs[TCXLPC_IND_NUMSTAGES] = { 0 }; // Q0
-
-const Word16 min_distance_thr[2][2] = /* 14Q1*1.28 */
-{
- /* GC, VC */
- /* WB */ { 580, 580 },
- /* NB */ {1000, 580 }
-};
-const Word16 lsf_q_diff_cb_8b_rf[256 * 16] = /* Q6 */
-{
- -3145, 863, -1389, 4087, 1110, 3193, 290, -3160, 824, 212, -2936, -5827, -10181, -15650, -13373, -3849,
- -4602, -3228, -8398, -1649, -5788, -8971, -2025, -2971, -1476, -2748, -2458, 966, -4, -1802, -1360, 654,
- -8629, -7702, 6280, 3296, -1205, 365, -5964, 3125, 2443, 1442, 1149, -3835, -9867, -4238, -1977, -1955,
- -2629, -759, -2056, -2297, -1839, 1678, -2412, -7539, -13208, -9624, -1688, -2171, 943, -454, 536, 2644,
- -2840, -1391, -10500, 2516, 907, 146, -2762, -6750, 2949, -2282, -4614, -5663, -7773, -5510, -5947, -3727,
- -4006, -939, -2500, -771, -3414, -4521, -6417, -4064, 3698, 3969, 4300, 4177, -3195, -10419, -13072, -6695,
- -4284, -1172, -4415, -1601, -6029, 66, -4338, -2300, -3402, -5614, -7181, -7288, 7154, 6538, 64, -3263,
- -6470, -4503, -9698, -5885, 235, 5049, 2698, -3656, -3600, -6261, -4270, 766, 1037, -1511, -1274, 1800,
- 669, 2937, -3464, -1034, -4098, -11296, -382, -4610, -9613, -2081, 3947, 2832, 2962, -332, -9039, -10702,
- -11109, -5950, -7200, -6525, -4260, -5060, -8936, -91, -672, 4557, 3192, -147, -2247, 1566, -734, -3007,
- -2411, 1587, -2575, 2172, -3270, 10648, 7093, 1517, 1512, -392, 49, -9117, -16895, -908, -8443, -9923,
- -1934, -603, -6588, 5335, -1565, -11521, 5944, -5092, -615, -2221, -7703, -1903, -5195, 2323, 3958, 3050,
- -7094, 5361, -7885, -3299, -3282, -3125, -1888, -406, 1522, -23, -1506, -6075, -8517, -7605, -3450, -3362,
- -3573, -2421, 1385, -181, -11027, 4778, -4014, -4956, 7316, 3138, 2351, 3406, -1998, -968, -2375, -3262,
- -141, 6652, 11944, -4131, -2073, -2592, -1562, 1521, -1804, -2585, -2685, -5798, -10850, -11629, -4300, -4287,
- -1569, 2229, 2330, 3147, -1026, -7010, 265, -1320, -3648, 1942, -5375, 73, 10348, 3913, -5535, -5938,
- -5642, -3433, -8423, 1178, -540, -4790, -1976, 4686, 1701, -1323, -2009, -5997, -5693, -3852, -7604, -5361,
- -1784, -325, -8561, -17592, 1663, 1377, 2347, -245, -2426, 141, -137, 985, -4926, -7898, -3559, 895,
- -2548, -1563, -5007, 7311, 4409, 3177, 3920, 1546, -725, -5252, -9754, -9267, -5701, -6900, -961, 1772,
- -1676, 889, -4798, 8060, 3460, -1911, 415, -4044, -6146, -12074, -10588, 13056, 2765, 1396, -4737, -4905,
- 943, 3342, -8515, 4676, -774, -3963, -5503, -1625, 3909, -3614, 12347, 2835, -9710, 5877, 297, -918,
- -5317, -2799, -3708, -4084, -8175, -6155, 1752, 6801, 7493, 6271, 4083, 3132, -809, -4200, -5389, -5982,
- -5060, -5285, -1533, -2751, 2259, -3893, -3473, -108, -4711, -2627, -2069, -2320, -172, 1547, 770, 309,
- -4485, -2618, -7238, 1767, -2965, 6693, 5256, 18, -1789, -5076, 7167, 3204, -1242, 1628, 4519, 1796,
- -114, 1225, -3083, 321, -4002, 4834, -3014, -741, -4189, -5946, 6871, -2068, -13016, -9772, -3235, 2044,
- 559, 10477, -9704, -7733, -8989, -10787, -10342, -8585, -2844, 1474, 5638, 9798, 10986, 9105, 4619, 2186,
- 1576, 9039, 4354, 2073, 1861, -1492, -715, 1840, -6736, -10798, 994, -2921, -6369, 779, 2668, -443,
- -2067, -1020, 1, 14571, 2253, -2163, 5255, 973, -1722, 4173, 102, -3633, -1430, -1720, 1243, 1749,
- -6589, -1601, -9469, -5581, 3018, 1186, -11, 1252, 5708, 3338, 187, -3950, -6035, -3294, -106, -1130,
- -2490, 445, -2543, -3283, -3432, -6963, 9950, 4072, 2294, 4517, 2736, 8173, 4270, -8347, -9374, 4776,
- -66, 3476, 537, 2659, -677, 1552, 1974, -1703, -2139, -634, -1988, 694, 1921, -12938, -16525, 5848,
- -9849, 7389, 4653, -1158, 1340, -2250, -2460, -2201, -3122, -90, 3974, 5105, 9127, 8701, 6184, 3770,
- -5086, -3159, -3197, -9944, -7474, 961, 1158, -3536, 1050, 5572, -1480, -11120, -9276, -1841, -2086, -24,
- -1019, -346, -6765, -8343, -6302, -3019, -5606, 2728, -3994, -6909, 10146, 6321, -230, -393, -846, -1536,
- -1598, 3610, 3330, -233, -1215, -1953, -1330, 19, -4839, -10681, -11699, -1104, 1146, -6143, -6849, 422,
- 892, 7937, -5005, -5547, 1756, -4020, -3420, -6811, -6304, -7812, -6019, 5109, 5503, 5568, 4600, 6472,
- -3296, -2230, -6010, 3497, 5502, -2291, -2342, -6544, -12576, 2192, -1004, -5205, -500, -6764, -6200, 1816,
- 5114, 4922, 6498, 6613, 4909, 2318, -5626, -11915, 3072, 11570, 1766, 4361, 552, -8139, -14006, -17228,
- -3321, -1514, -473, 3295, -1028, -4536, -12374, 12452, 7396, -2269, -5052, 554, 1053, -4370, -5859, 97,
- -2532, 2546, -4920, -13800, 8116, 2425, 1695, -2088, -5105, -346, -2869, -2457, 9336, 13166, 6150, 5166,
- -2329, 72, 11513, -3075, -7745, -5492, -8015, -5108, -16, 3261, 876, -357, -3241, -2956, -4265, -2320,
- -7869, -6495, -16668, -1339, -3678, 975, -2740, -2776, 3755, 141, -190, 1026, 5972, 3232, -924, -3212,
- -1077, 568, -5606, 1478, -243, 2479, 10198, 3667, 682, -2873, -9164, -9042, 2186, 4347, -750, 5303,
- 556, 5098, -6825, -2564, -3946, -5752, 1977, -6171, -5627, 4580, -835, -6362, 10132, 9511, 6475, 2861,
- 3320, 11074, -483, 2698, -20, -4084, -4213, -3931, -231, -17, -1826, -2737, -5920, -1539, -1897, -3347,
- -1346, 2075, -1230, -5248, 10906, 9461, 5046, 3485, -267, -948, 4273, 1889, 81, -488, -4763, -5532,
- -1237, 6446, 3974, 5166, -723, -10033, 8338, 4102, 683, 1474, 624, -5287, -8628, -7519, -6290, 1767,
- 207, 2676, 870, 13754, 7087, 2357, -922, -1734, -4651, 352, 14028, 10050, 8916, 2725, -5722, -9415,
- 364, 3660, -813, 4370, -2151, -2115, 5570, -2545, -8167, -1978, -8301, -10715, 959, -5127, -11250, -7721,
- -1668, -1437, -5508, -11155, -15130, 6829, 6070, -1555, -3048, -314, -528, 1714, 1474, -42, -541, 3361,
- -15356, -12047, -4659, -1598, 4105, 3069, 2375, 3647, 1217, 140, -2518, -4195, -3080, 2155, 66, -570,
- 84, 1523, -742, 13326, 5544, -2653, -5484, -3816, -9239, -10794, 6967, 2095, -4231, -2102, 4368, 8737,
- 2959, 3968, -2430, 4601, 317, 5804, -3547, -11099, 5849, 273, -5513, 767, -9421, -11095, 3029, 8472,
- -518, 2355, 2733, 53, -1439, -2709, -394, 5355, -2408, -3122, 8729, 5660, 7771, 4999, -7588, -15134,
- -2240, 2281, 6677, -5155, 5663, 266, -4355, -7052, -3825, -2235, -2745, -3212, -2018, 1828, 1971, 2086,
- -1241, 699, -2126, 3835, 1147, 4456, -3810, -23, 1284, -4878, 3807, 14029, 2820, -6773, 9556, 6600,
- -1716, 315, -3259, -3282, -2859, -2219, 3508, -3452, -7850, 623, -5558, -2168, 1842, -8228, -885, 15388,
- -8177, -7705, -14377, -6808, -7099, -7676, -4141, -5548, 3677, 5846, 6160, 10031, 11318, 8141, 3326, 904,
- -3072, 1139, 1875, 4811, 3767, 7294, 4507, 1476, -1622, -6385, 384, 3318, -3867, -10447, -6387, -4252,
- -19, 1102, -6317, 3433, -1856, -5732, 7225, -2107, -6977, 9620, 7964, 3013, 7152, 4986, -2184, 2136,
- -524, 1479, -923, 3729, -259, 227, 6477, 2660, 4208, 1017, -423, -6090, -13677, 5309, 702, 2721,
- -822, 2175, 1717, 3580, 1133, 3835, 980, 13265, 6367, 2741, 7462, 6211, -2347, -7635, 4781, 4132,
- -8168, 13481, 5777, -963, 643, -2853, -2086, -1593, -2092, 2348, 3867, 413, 461, 1644, -259, -1656,
- -846, 1615, -2805, 935, 3206, 1907, 7862, 3901, -975, 4507, 3151, 1433, 15449, 4412, -1221, 1001,
- -3952, 1411, -2148, -1025, -2553, -4164, -4725, -3465, -2654, -3828, -6151, -7679, -5881, -2007, -581, -2499,
- -1744, 4546, -8725, -6274, -1364, -1087, -2198, -4504, -3542, -1966, -516, -802, 448, -162, -1277, -2081,
- -12133, -10923, 10206, 4436, 611, -2300, -4926, -4708, -5138, -3373, 2358, 295, -370, 4406, 2947, 351,
- 1477, 3584, 3776, 4714, -1508, 2029, 426, -5245, -2805, -5852, -8752, 199, -3945, 10358, 10127, 4852,
- -1894, 528, -776, 2698, -1298, -7579, -12457, -12545, 2483, 2421, -140, 723, -395, -292, -4196, -1766,
- -3071, 1449, -3716, 3712, -3017, 543, -391, -1984, 3301, 375, 1107, -2635, 4730, 870, -19666, -12653,
- -2823, 3165, 5399, -10321, -6087, -2824, -329, -1699, -268, -1995, -2254, 2744, 319, 51, 2834, 452,
- -2837, -240, -1298, 2244, 1977, 3061, 3676, -1207, -3774, -2607, -3405, 9701, 12102, -3052, -10263, 1164,
- -1548, -515, -3862, 1117, 3329, 4105, -804, -4141, -9321, -3136, 1792, 3484, 2025, -6747, -11991, -10905,
- -3361, -2922, -3472, 1165, -3055, -1620, -4751, -8940, -477, 1932, 1054, 4687, 5735, 5566, 2447, -778,
- 1791, 3768, 602, -2421, -6876, 9505, 7350, 2428, -3175, -6252, -707, -3720, -7723, -42, 4292, -1141,
- -2469, 269, -1028, 1057, -890, 383, -128, 821, -2854, -5548, -2437, -3349, 3935, 1474, 14267, 13393,
- -3416, 14072, 1196, -3166, -4252, -711, 521, 2462, 5346, 1483, -4287, -7676, -5805, -321, 867, 475,
- -1674, 1391, 539, -471, -5201, -25, 6911, -2142, 10454, 10963, 1353, -2831, -3219, -131, -3005, -4468,
- 3476, 4986, 6318, -2959, -9204, -87, 3906, -833, -247, 5687, 451, 716, -2970, -5788, -6743, -9436,
- 4831, 6767, 3852, 2164, -1362, -1404, -3260, -4807, 2809, -2699, -4693, 21984, 10803, 4063, 2353, 6177,
- -2813, -890, -5363, -165, -5755, -20361, 3639, 4639, -2073, 1798, -1097, -6169, 30, -1827, -4590, -2586,
- -5855, -6418, -10115, -6038, 2674, 3620, 1206, 1379, -520, 5333, 5334, 3618, 439, -1048, 439, 777,
- -7871, 2657, -3649, 7671, 10875, 5285, 423, 1869, -2283, -6081, -2750, -3935, -1815, 2851, 754, -2545,
- -2253, -245, 87, 3432, 4323, 803, -3981, -8416, -12174, 6263, 9281, 7472, 2558, 327, -3198, -1436,
- -1398, -211, -6595, 4670, 63, 2041, -4372, 967, 2444, -9123, -11355, 1727, -4221, -3144, 6411, 4338,
- -4409, -3256, -6504, 6064, 4055, -2268, 5638, 5466, 82, -516, 6974, 5206, 1235, -364, -4919, -6016,
- 2, 7, -5, 5, 1, 2, -8, 4, 4, 2, 4, 5, 0, -1, -3, 1,
- -1139, 1101, -1501, -3122, 2059, 9130, 5593, -2976, -5845, -8198, 10800, 771, -4815, 20594, 5385, 9434,
- -497, 877, -5365, -1190, -2940, -6216, 4700, 872, -2276, 9901, 5530, 417, -4381, -9743, -1935, -1025,
- -3555, -643, -5254, -6674, -6586, -4879, -3791, -2733, 1046, 2275, 3157, 3643, 8384, 10607, 11929, 9237,
- 1573, 3323, 130, 12128, 9521, 6522, 4035, -1444, -7190, 565, 2160, -2808, -3716, -9398, -1115, 4631,
- -1938, -2034, -5142, 6407, 5972, 302, -3078, -7362, -12229, 6591, 5640, 1240, 2727, 3243, 9738, 7334,
- -8793, 935, -4176, 103, 2398, 1724, 1579, 7649, 5685, 2791, 1754, -453, -5030, -4870, -3871, -3139,
- -243, 3111, -2068, 3022, -4587, -11340, 14571, 7771, 3558, 5750, 1203, 4665, -1981, -109, 4442, 1369,
- -2041, 3713, 1013, 1345, 4716, 129, 3062, 1444, -3639, -6184, 7457, 7819, 958, -8391, -8799, 9312,
- 235, 3895, 12172, 2716, -1347, -1094, -4869, -880, 7519, 9011, 9914, 5683, 5909, 7805, 4428, 2129,
- -1538, -36, -678, 1486, -649, 1517, -5121, 8530, 5048, -1844, -4781, -9145, -11353, -8076, -4133, -307,
- -2707, 80, -5905, -4315, -4389, -6758, -6105, -9003, -10744, -1701, 3765, 6091, 10523, 7504, 4350, 4312,
- 786, 3663, 9280, 6578, 391, 1514, -7019, 5089, 3483, -6871, -8172, -180, -7469, 1419, -121, 838,
- 2692, 6995, 1431, -1074, 1394, -268, -1170, -3367, -7586, -5698, 7587, 7378, 5733, 8353, 10152, 10834,
- -8158, -6271, -9914, 9985, 5364, -2601, -1959, -6260, -4097, 3235, 2097, -196, 2968, 3371, 2095, -1207,
- -2269, 648, -1910, 7766, 5356, 3667, 981, 2825, 4288, 6668, 696, -661, 4042, -5356, -12858, -3646,
- -4703, -3239, 10100, -2312, -256, -2120, -2612, 4835, -1675, 1068, 5746, -140, -869, 3620, 3505, 1703,
- -3250, -2423, -1423, -674, -4843, 10905, 4109, 635, -1606, -6241, -2449, 3295, 6275, 14389, 8002, 4352,
- -842, 3170, 1430, 1513, -4583, -12820, 1470, -4220, -8952, 6987, 4718, 532, -2136, -3700, -1727, 4512,
- -3663, -2257, -8998, 5471, 843, -2858, -4142, 5134, 7250, 525, 3002, 118, 423, 6929, 5389, -1003,
- -3457, -2564, 4399, 5758, -1462, 9992, 2582, 885, 6350, -670, -4446, -5882, -1814, -1178, -3073, 1157,
- 2529, 7505, 5440, 202, -5746, -976, 8235, 1049, -181, -142, -6919, -6675, 18283, 16554, 8385, 3001,
- 2266, 12753, -3253, -3832, -7200, -5627, -4778, -925, 239, 539, 2225, 324, 3182, 1914, -309, -507,
- 5074, 4381, 9167, 1915, -3908, 1754, -5997, 2537, 17796, 13293, 7314, 12286, 1815, -4329, -8064, -20774,
- -2484, 4942, 14515, 5406, -2595, -1380, 8417, 5956, 1651, 1559, -1389, 24, -6421, -4047, 2557, -1331,
- -3164, 848, 15096, 9663, 6043, 3180, 595, 2733, 830, 1861, 9051, 8435, 8904, 6571, 2208, -762,
- -135, 870, -2484, -3227, -9497, -586, 14177, 5880, -3708, 505, -1483, -415, 2507, -1973, -13853, -8468,
- -3854, -2420, -9258, -4766, -3435, -2360, 10467, 7572, 598, -4099, 3457, 402, -195, 4193, 2023, 1851,
- -4359, -3760, -1315, -585, 11411, 2958, 5446, 1608, 228, 4691, 1446, -1971, -3898, -3822, -1651, -1697,
- 5112, 1738, -12375, 11069, 8416, -139, -721, 740, -8678, -7527, 10378, 4791, 5388, 2724, 4652, 1931,
- -1419, 520, -6325, 10393, 8379, 2544, -2104, -11110, 7461, 2884, -1766, 548, -217, -2709, -1287, -2598,
- 1996, 4969, 3862, 5813, -629, -7138, 7107, 9009, 5157, 1564, 5244, 1326, 78, 263, -4389, -5858,
- -5423, -34, 1648, 2316, -3981, -5525, -1762, -996, 2075, 878, 718, 1458, 613, 3914, 3912, 2074,
- -1176, 643, -3222, -444, 779, 9634, 14238, 11755, 3727, 1970, -1421, 3653, 1795, -2315, 10947, 8623,
- 19, 6095, 3277, 2648, 2148, 509, 3577, 978, 1862, 5842, 1302, -3853, -10993, -12406, 858, 7763,
- -4944, -1993, -5563, 833, -1365, -2240, -25, 2546, 10150, 10369, 10670, 10551, 9322, 5582, 881, -1029,
- -763, 4474, 9314, 8818, 2703, 4844, 7776, 1684, 1, -3980, -9739, 5565, 2667, 1185, 2203, 1611,
- -635, 724, -4112, 8414, 3049, 1437, 2314, -2611, -5835, 5541, -3027, 1017, 14246, 10165, 9910, 14393,
- 2201, 3204, -295, 2519, -855, 5303, -2184, -12725, 10839, 1337, 154, -5290, -7908, 9490, 4292, 5533,
- 544, 3574, 602, -783, -3121, 21721, 8166, -1137, 4729, -2399, 2504, 3721, -2704, -10309, 4957, 8028,
- 2782, 11109, 5440, 2691, -3942, 3286, 2848, -532, -186, -2661, 7318, 6015, -1200, 2174, 5498, -379,
- 4440, 6050, 3576, -819, -3697, 13144, 9664, -2178, 2966, 3302, -623, 10572, 15713, 9000, 2137, -5160,
- -1593, 613, 3985, -7128, -5989, 2429, 721, -5488, -11848, 981, -3054, -4499, -4102, -7743, -7416, -340,
- -2759, -2449, -4426, -6796, -13804, -7472, -1409, -1103, 181, 3071, 434, -741, 1045, 1976, 1407, 1365,
- -2578, -1275, 5323, 9313, 4798, -1130, -6220, -2101, -3402, -868, -1959, -4365, -4536, -1626, -3701, -5011,
- -3479, -3407, -9706, 4812, -812, -4014, 2558, -5416, -10543, -5186, -3840, 1189, 3804, 5839, 4744, 1003,
- -3585, -2339, -4745, 3869, -2763, 1306, -6059, -8604, -1377, -5116, -730, -1693, -3321, 888, -685, 876,
- -3492, 910, -7012, -2555, -5147, -1372, -1910, -8518, 2661, 7652, 6967, 7296, 4514, -4741, -9827, 873,
- -1258, 4649, 3654, 653, -5264, -5509, -4222, 1703, 3992, -5102, -4342, -6447, 6603, 2642, -923, 6242,
- -992, 647, 1228, -3124, -3463, 15067, 838, -6186, -3433, 872, 97, 2876, 3686, -2643, -6780, 356,
- -1727, 2555, 2552, -1938, -8798, -773, -757, -3588, -7005, -6121, 4601, 235, -4446, 2984, 1353, -776,
- -15055, -12154, -6273, 84, 390, -3286, -4758, -3713, -2185, -1512, 1403, 3479, 7578, 6327, 5045, 3075,
- 2469, 8960, 6679, 3813, 1059, 9183, 2971, 4300, -1040, -927, -2376, -6240, -5131, -6030, -7385, -7560,
- 933, 4512, -899, -1226, -7230, -10649, 11249, 4655, -7924, -5423, -5107, 993, 588, 2896, 4305, 1369,
- -1938, 11282, -2696, -7285, 1163, -6289, -344, -2329, 3632, 2191, -1017, -1404, -2305, -6223, -2822, -1369,
- -3688, -918, -3118, 256, -5446, 8638, 6195, 2855, 7432, 6937, 8638, 4020, -3296, -4260, 21, -3914,
- 3006, 5845, 16377, 17059, 3579, 103, 204, -563, 1735, 6204, -405, -2618, -7929, -14028, -9415, -5277,
- 303, 934, -305, 3211, -2970, 2963, 10231, 2833, 1656, 1162, -4439, 6346, 9314, 7062, -5015, -15980,
- -320, 499, -14803, 4610, 2112, -4049, 7242, -245, -3115, 1323, -1276, -4286, -1951, 100, -1389, -1612,
- -4391, -2691, -5202, -11000, 373, -2423, 4221, 4146, 1045, 503, -4063, -2244, 2311, 1646, -1779, -3188,
- -3374, 346, -3243, -3662, 5971, 5519, 3022, 516, -4538, -6550, -5227, -6165, -4919, -1105, 30, 721,
- 2935, 3922, -1041, 4217, 2528, 1985, 661, -824, -10133, -13715, 8714, 2218, 3769, 3384, 1193, -6246,
- -5357, -2959, -8106, 5394, 1542, -4964, -7749, -4183, 877, 1146, 8307, 2891, -4905, -5775, 1888, 1442,
- -2472, -850, 1278, 1397, -4545, -3625, -11722, 9811, 7790, 7832, 12234, 6079, -2436, -890, -1820, -234,
- -3905, -1081, -7818, 2577, -299, 5742, 4982, -1421, 3506, -604, -4944, 2130, 544, 1545, -2399, -3202,
- -895, -203, 783, -203, -2734, 10200, 7718, 3943, -6098, 9859, 9374, 6777, 2263, -2089, 866, 3381,
- -3828, 1991, -2866, -1612, 747, -3896, 6041, 2875, -5838, -6829, -2319, -1146, -8845, -10612, 3630, 2942,
- -509, 5457, 1119, -3222, -3623, -6421, -9746, -8661, 5658, 8283, 8062, 6310, 1787, 454, 1766, 2750,
- -1632, 7787, 5349, 243, -1526, 3143, 5218, 10290, 1446, -6324, -3035, -1055, 2974, -7871, 39, 3664,
- -769, -9, -8896, 9699, 4546, -1295, 6107, -4534, 3367, 1450, -3607, 8816, 3219, -5601, 1298, 12366,
- -7130, -4420, -6848, 3453, 3599, 4371, 609, -6059, 8057, 9067, 2408, -3523, -6908, -6822, -6636, -2017,
- -477, 5145, -1462, -475, -2003, -3769, 7781, 4563, 4437, 2134, -2726, 15777, 2839, -1929, 2913, 2174,
- 841, 2396, 754, 14163, 4130, -1807, -177, -3884, -6782, 9287, 1864, -599, 5913, -2587, -10749, 5856,
- 1304, 7980, -2237, -2092, -4384, -828, 552, -6108, 2193, 10107, 6057, 9885, 13003, 8977, 4006, -926,
- -1523, 1282, -1805, -2709, -6024, -7618, -10251, 832, -689, -1488, 1528, -1635, -4512, -3974, 3366, 5884,
- -2891, -646, -4227, -16787, 4586, 2689, -48, 1956, -5398, -5693, 4030, 1138, 2292, 2634, 6453, 3271,
- -3526, 9059, 2896, 8101, 3313, -270, -1336, -3002, 826, -1572, -3793, -2235, -1597, 272, 910, -778,
- -1195, 3634, 1576, 2036, -3675, -10512, -6414, -3268, -9714, -6636, 3287, -947, 6643, 7755, 4317, 2928,
- -592, -46, -6118, -3775, 11750, 5301, -2878, -7240, -4674, 1543, -626, -1300, -608, -1661, -4053, -3154,
- -2514, -545, 771, 7292, 3641, 749, -1664, -1652, 2686, 8715, 10176, 4547, -6065, -7417, -6454, -4928,
- -576, 940, 681, 2977, -2947, -1968, -6468, 10093, 7720, -2235, -3869, -8057, -4152, 7399, 8617, 5658,
- -1043, 1637, -3699, -5968, 13092, 1526, 1185, -3128, -2234, 3343, 5773, 9935, 7870, 6240, 3284, 3932,
- 377, 5872, 3528, 3824, -852, -1575, -3799, -8401, -5628, -3612, -2451, 1396, 1471, -1669, -579, -384,
- -6978, -4522, -6731, -1881, 1485, -73, -38, -3990, 11379, 4104, 1154, 5492, 3709, -645, -641, -750,
- -97, 2556, 1619, 3351, 1996, 10845, 8411, 2751, 3099, -165, -6582, -11822, 8128, 7722, 4495, 3322,
- 950, 2744, -2039, -3959, -6098, -2113, 4512, -1699, -758, 3243, -4760, 7788, 11837, 5336, 7626, 5509,
- -4876, 13906, -3059, 1351, 4037, 2283, 614, -5014, 2149, 613, 744, -4239, -5981, -4296, -1799, -3121,
- -2111, 3530, -1221, 1654, 9442, 10361, 6422, 7826, 7510, 7790, 3836, -323, -761, 1652, 330, -386,
- -3239, 3070, 7009, -1209, 6710, 213, 5225, 3105, 1173, 842, -1774, -5027, -3901, -1359, -2786, -3513,
- 1481, 1904, 7402, 23443, 5946, -3615, -1528, -4317, -2629, 11277, 7171, 5620, 7938, 4715, 3575, -3794,
- 2315, 5200, 63, 4010, -400, -2074, 6624, -516, -731, -2133, -10088, 6969, -3380, -7450, -7347, -6915,
- -3407, -3447, -1422, -4020, -11809, 3562, 3865, 570, 7656, 6367, 5964, 802, -2306, 5862, 7700, 6476,
- -17049, -2577, 3748, -1004, 990, 2569, 4487, 2137, -3540, -3508, 608, -2102, 90, 4634, 3115, 1273,
- -1960, -1414, 1516, 9460, 6833, 2088, -3598, -3590, -2554, -1783, 2680, 2127, 939, 8562, 4170, 1914,
- 3335, 6241, -2988, 1816, 3233, -951, 587, -5590, -3415, -926, -7987, 8897, 3700, -12712, 5722, 4683,
- -756, 1823, 2804, 3392, -2019, 801, -2923, 43, 5720, 2302, 3604, 14791, 4960, -425, -7298, -6606,
- 205, 5909, 8599, 4641, -4600, -1580, -4536, -5178, 2346, 6910, 3641, -2630, -6079, 351, 5478, 5524,
- 151, 1252, -2569, 6834, 5377, 4284, 450, -1607, 7257, 4429, -2568, 9851, 9183, 2197, 20053, 9155,
- -1462, 924, -3196, -3257, -8953, 6147, 6251, -3186, 3285, 3198, 2326, 1225, -8446, -11295, 5393, 10785,
- -2381, -2014, -9329, 4719, -880, -2308, -4714, 4429, 3675, -1874, 3253, 9686, 12557, 9338, 4719, 3836,
- -3103, 7031, 11258, 6883, 11690, 8131, 3644, -307, -2590, -274, 1004, -1314, -166, 3063, 695, -1815,
- -2455, 811, -1161, 2731, 5931, 2352, 3361, -363, -7371, 2805, 4053, 3586, 7364, 242, -1692, 17531,
- -4497, -535, 286, 214, 3804, 11412, 4562, -1157, 550, 4841, 1657, -4984, -6307, 1482, 5745, 3540,
- -2763, -1313, -1385, 3735, -2423, 5601, 14635, 10815, 9726, 6141, 4010, 3556, -104, -3353, -7143, 7077,
- -245, 8209, 15457, 5234, 1860, -2195, -4620, -4895, -4263, -759, 2016, 2664, 3153, 2966, 1601, 30,
- -4764, -1351, 3227, 2660, 1556, 198, 5379, 11277, 8580, 6978, 2506, 3310, 13165, 9623, 7120, 1665,
- -59, 558, 3194, 1299, -2918, -2455, 3754, -3394, -3634, -2782, -7987, -7903, -7058, -2214, -1060, 2183,
- -1954, -186, -11418, -2859, -1110, -2027, -932, -2040, 1282, 174, -161, -2628, -3341, 2675, 4169, 2475,
- -5934, -5196, 10580, 9382, 1417, -1362, -2572, -4391, 7418, 4314, 148, 31, -82, 461, -2595, -570,
- -3639, -2081, -1014, 4355, 5943, 6217, 2491, -4106, -6520, -4050, -5030, -2053, 6821, 6135, 2456, 1015,
- -3447, -1303, -5380, -6759, -3272, -129, -4989, -11231, 5106, 1264, -3433, -3327, -3139, -1282, 1031, 1558,
- 4180, 1592, -3435, 2252, -4803, -6443, 8937, 1696, -5599, 9240, 5481, -328, 3197, -4392, -12452, -16482,
- -4613, 5693, 11596, -9035, 1399, 1388, 5182, 4750, 958, 310, -866, 829, 5122, 1203, -115, -759,
- -3551, -1843, -3272, -1753, -195, 17324, 8182, -502, -2987, -146, -2640, 6865, 6979, -3675, -6047, 12865,
- 3739, 8307, 5634, -2783, 96, 1167, -274, -636, -5808, -8880, 835, 6363, 5092, -700, -8229, -7634,
- -6799, -5871, 4391, 1265, -1493, 440, -7322, 2387, 1763, -1406, 4030, 8075, 8810, 5655, 1375, 2309,
- 3191, 6527, 2671, -128, -5345, 14221, 13006, 1792, -548, -2974, -7549, -3471, 1835, -1490, -3556, -4240,
- -3368, -1748, -3945, 8349, 2444, -5349, 5825, 4222, -1891, -3570, -10832, 8764, 2791, 5495, 9332, 5366,
- 1020, 5766, -8313, 522, -568, -20, -2169, 3981, 6641, 4235, 1781, -4362, -7143, -3864, -2205, -3217,
- -3300, -1346, -1200, 5950, -1315, -285, 2642, -180, 12986, 11560, 5996, 6755, -2578, -1417, 1848, 5560,
- 10662, 13080, 11225, 419, -4335, -128, 6716, 1638, -4903, 154, -2404, -4228, 5262, -364, -5170, -12310,
- 360, 1588, 2173, 8939, 4304, 7241, 367, -2361, 6569, 837, -4801, 8650, 7208, 5996, 3566, 1112,
- -5017, 4300, 2649, 3064, -6110, -14292, 2204, 13008, 5245, 1594, -6536, -11045, 5146, -211, -4067, -11435,
- -530, 1840, 187, -12175, 1984, -1576, 3659, 4293, -1971, 8025, 8287, 4420, 3935, 358, -1691, -2707,
- -3429, 252, 1235, 3895, 13024, 5900, 317, 1720, 3724, 1510, -3576, -6091, -8218, -3620, -844, -406,
- 2105, 7096, 3064, 3952, 2071, -2774, 8459, 1501, -10913, 1387, -405, 12863, 2328, 4475, 3498, -1584,
- -3085, -920, -7032, 8494, 2146, 1346, 1867, -404, 1886, -1042, -378, -2121, -10433, -7336, 15525, 9808,
- -15685, -7623, 1925, 2963, 4001, -105, 3843, 5498, 4039, 6151, 6044, 3867, 1730, 2971, 1484, -319,
- 3080, 9412, -1223, -3973, 4734, 2248, 3127, 1119, -1738, -1669, -1477, -1472, 1412, 1213, 773, 1674,
- -730, 2282, 495, 1849, 753, 4313, 2052, 11060, 2638, -4153, 12967, 4232, 1600, 8305, 6247, 4101,
- 1078, -516, -6160, -2738, -3949, 549, 2665, 313, -11805, 5780, 13753, 4964, -3343, -3825, 7392, 657,
- -3356, -672, 2091, 1930, -1942, -6931, -7983, -7306, 1452, 3417, 9758, 12537, 14305, 11570, 5653, 1593,
- 2820, 8229, 5573, 6212, 5169, 4568, 4877, 1219, -5520, -3569, -4997, 3799, -1152, -6233, 13054, 8210,
- -1905, -1112, -1728, 19102, 8663, -331, 3226, 1066, -1807, 8189, 5678, 1987, 4661, 3278, 7947, 11458,
- -4574, -517, -5124, 4711, -740, 416, 4847, 4427, 11056, 3251, -1915, -3528, -2529, -2213, 1857, 1203,
- 316, 3731, 4619, -1294, -3138, -336, 8691, 7311, 3124, 9892, 5880, 614, 1873, 1916, 3856, 3588,
- 1323, 8284, 7332, 4197, 626, 4877, 9117, 4163, 1998, 4387, 5489, 4184, 2124, -5170, -10914, 3921,
- -1504, 12727, 938, 3478, 1876, -1017, 389, 3233, 8278, 8027, 8392, 12663, 13264, 9858, 5767, 4287,
- -4008, 49, -1854, -5454, -9369, 5309, -1597, 6002, 6031, -2543, -4793, -2340, -2559, 229, -983, -2068,
- -3514, 815, -7510, -3824, -931, -1573, -1337, -1189, -2019, 245, 4084, 4416, 6165, 7239, 3899, 2461,
- -4781, -2173, 17577, 2751, -894, 2264, 1789, -623, 992, -322, -3113, -1854, -1553, 2213, 731, 850,
- 2054, 3456, 3747, 3842, 980, -940, -5065, -5905, 423, -2009, 74, 3933, 13511, 12742, 8908, 5783,
- 894, 6872, -2742, 7127, 5497, -660, -2361, -3114, -5552, -884, -1825, -8536, 4278, 4047, 3263, 2117,
- 46, 3829, 3392, 7000, 5004, 11640, 7090, 2661, 2072, 3834, 6408, 9453, 4328, -5807, -11811, -6081,
- 1119, 3292, 8329, 5549, -1361, -4414, -15806, 7144, 6824, -4515, -1143, 4774, 1451, 5261, 4830, 5562,
- -1393, 5662, 4446, 1807, 8826, 6248, 6415, 4547, -1665, 1181, 6405, 5864, 8293, 10387, 7545, 4688,
- 1312, 7883, 6317, -3965, -8535, -2725, 1117, -5447, -7012, 3655, 3196, 4576, 6822, -341, -646, 6098,
- -6332, -4527, -5839, 4942, 2805, 6652, 925, -1187, 3859, 4466, 5194, 4814, 7489, 8532, 2922, 2874,
- -1137, 1068, 2253, 3741, -2505, 9887, 10247, 3472, 9158, 1176, -2976, 1937, -2064, 7351, 6057, 2696,
- 532, 4702, 4601, 502, -1350, -5364, 9112, 2103, -4340, 18, -1329, -2532, 2939, 15707, 4071, -2154,
- -628, 13794, -2239, -2982, -3391, -2332, -1483, 5699, 7418, 5487, 5469, 3426, 2471, 2248, -610, -2978,
- 4520, 7035, 8360, 8190, 4367, 11231, 9045, 6518, 5468, 6414, -626, -2179, -2327, -6601, -11740, -18010,
- 872, 6597, 9823, 6115, 5121, 3028, -3065, 9266, 9664, 2144, 2461, -758, -3373, -348, -421, -2786,
- -2998, -2310, 5826, 14327, 10399, 10344, 5906, 4646, 4013, 7488, 6656, 3601, 212, 2499, 812, -4251,
- -3455, -259, -2801, -3743, -3930, 4402, 11531, 8368, 3812, 2663, -1885, -3062, -3413, -12432, -6348, -1832,
- -2574, 1227, -6578, -7396, -131, 1139, 3464, 2303, 6848, 4302, 422, 1994, 4840, 6023, 4369, 1222,
- -5186, -3043, -5221, 9413, 9009, 6329, 6302, 7712, 4428, -1745, -1711, 1216, 1855, 1215, 1003, 58,
- 3844, 4380, -2452, 17587, 5229, 106, 3809, 5238, 2909, -6280, 6367, 4649, 3777, 2815, 4377, 9833,
- -3469, 6722, -2982, 1867, 2944, 3428, -115, -6063, 4740, 2369, 3681, 2580, 319, 76, 4169, 1079,
- 5357, 7937, 8749, 6732, 3237, 475, 10599, 7708, 2300, 9384, 6872, 6516, 11437, 2109, -2788, -10922,
- -2925, 1420, 3109, 500, 6953, 1289, -522, 1064, 2885, 6445, 3595, 2000, 2669, 2797, 2174, 873,
- 1980, 6159, 1331, 1321, -1922, 6722, 11666, 3321, -1515, 1233, -1664, 9262, 9668, 2502, 13862, 9666,
- 3582, 10575, 2715, -603, 596, -1567, 4182, 49, 2208, 1795, 10525, 9472, -2866, -8439, 7591, 11197,
- -2356, 153, -10244, -4768, -2178, -2408, 1367, 708, 4615, 9681, 13007, 14875, 15382, 12708, 8355, 5074,
- -358, 1803, 1987, 7888, 9168, 16089, 2288, -2716, -1669, 1078, 1165, 5324, 4412, -4354, 298, 6519,
- 4826, 9355, 6507, 12087, 4177, -6, 2865, -2898, -5149, 6100, -1829, 80, 12459, 4967, 591, 7846,
- -3452, 13887, -142, 4052, 5842, 3702, 4535, 2718, 4976, 3690, 1377, -72, -1938, -836, 961, -1944,
- 4315, 5391, 6496, 1795, -2279, 20485, 16142, 9768, 8889, 6390, 1789, 3149, 4186, 487, -922, -2249,
- -1225, 14246, 10277, 980, 2427, 180, 5713, 4730, -901, 590, 3351, 1871, 4389, 4760, 8650, 3433,
- 1760, 3580, 5798, 6813, 4246, 17695, 7227, 4364, 2222, 13912, 11731, 10965, 14919, 7273, -6023, 6474,
-};
-
-/*----------------------------------------------------------------------------------*
- * LSF quantization - Scaling factors
- *----------------------------------------------------------------------------------*/
-
-/* Stable ISP vector in Q15 */
-const Word16 stable_ISP_fx[16] = { 32139, 30274, 27247, 23170, 18206, 12540, 6393, 0, -6390, -12537, -18203, -23170, -27243, -30271, -32139, 1475 };
-/* Stable LSP vector in Q15 */
-/* This LSP corresponds to GEWB_Ave_fx Q15*/
-const Word16 stable_LSP_fx[16] = { 32437, 31676, 29486, 25681, 21564, 16413, 10838, 5385, -735, -6405, -11986, -17040, -22052, -26346, -29678, -31784 };
-
-/* stable ISF vector */
-const Word16 stable_ISF_fx[M] =/*15Q16*/
-{ 1023, 2048, 3072, 4096, 5120, 6144, 7168, 8192, 9216, 10240, 11264, 12288, 13311, 14335, 15361, 3978 };
-
-/*----------------------------------------------------------------------------------*
- * LSF quantization - Mean LSF vectors
- *----------------------------------------------------------------------------------*/
-/* These are not used anywhere */
-/* Length 16 vector in Scale = 2.56f */
-const Word16 means_wb_cleanspeech_lsf16k0[16] = { 727, 1426, 2582, 3554, 4548, 5481, 6397, 7293, 8170, 9010, 9972, 11003, 12072, 13034, 14097, 14956 };
-/* Length 16 vector in Scale = 2.56f */
-const Word16 means_swb_cleanspeech_lsf25k6[16] = { 786, 1840, 2892, 3833, 4778, 5658, 6641, 7662, 8692, 9630, 10603, 11534, 12489, 13387, 14349, 15217 };
-/* Length 16 vector in Scale = 2.56f */
-const Word16 means_swb_cleanspeech_lsf32k0[16] = { 757, 1855, 2862, 3798, 4705, 5661, 6742, 7692, 8658, 9577, 10513, 11401, 12358, 13269, 14275, 15149 };
-
-
-/* An 16-by-1 matrix */
-const Word16 SVWB2_Ave_fx[16] = { 998, 1488, 2682, 3823, 5084, 6305, 7485, 8686, 9861, 11004, 12339, 13664, 15088, 16330, 17663, 18754 }; // Q2.56
-/* An 16-by-1 matrix */
-const Word16 IANB_Ave_fx[16] =
-{
- 726, 1433, 2493, 3408, 4340, 5215, 6103, 6947, 7772, 8536, 9252, 10012, 10909, 12427, 13997, 15193
-}; // Q2.56
-/* An 16-by-1 matrix */
-const Word16 IAWB_Ave_fx[16] =
-{
- 577, 1350, 2526, 3535, 4539, 5504, 6497, 7460, 8445, 9396, 10371, 11319, 12307, 13268, 14249, 15207
-}; // Q2.56
-/* An 16-by-1 matrix */
-const Word16 IAWB2_Ave_fx[16] =
-{
- 731, 1777, 3194, 4386, 5629, 6806, 8012, 9164, 10329, 11469, 12731, 14037, 15326, 16538, 17801, 18927
-}; // Q2.56
-/* Length 16 vector in Scale = 2.56f */
-const Word16 UVNB_Ave_fx[16] = { 1018, 1764, 2856, 3751, 4611, 5410, 6233, 6961, 7685, 8304, 8859, 9325, 9977, 11741, 13699, 15074 };
-/* Length 16 vector in Scale = 2.56f */
-const Word16 UVWB_Ave_fx[16] = { 898, 1900, 3172, 4190, 5181, 6161, 7134, 8066, 8995, 9888, 10784, 11636, 12527, 13396, 14301, 15183 };
-/* Length 16 vector in Scale = 2.56f */
-const Word16 SVNB_Ave_fx[16] = { 890, 1268, 1930, 2902, 3938, 4823, 5832, 6644, 7487, 8202, 8906, 9545, 10788, 12565, 13959, 15183 };
-/* Length 16 vector in Scale = 2.56f */
-const Word16 SVWB_Ave_fx[16] = { 832, 1248, 1949, 3083, 4131, 5117, 6179, 7067, 8008, 8922, 9875, 10741, 11785, 12860, 13968, 15048 };
-/* Length 16 vector in Scale = 2.56f */
-const Word16 GEWB_Ave_fx[16] = { 742, 1350, 2354, 3495, 4446, 5456, 6434, 7331, 8309, 9218, 10145, 11044, 12042, 13063, 14101, 15103 };
-/* Length 16 vector in Scale = 2.56f */
-const Word16 GEWB2_Ave_fx[16] = { 909, 1783, 3227, 4443, 5685, 6851, 7996, 9116, 10213, 11263, 12465, 13754, 15090, 16293, 17621, 18695 };
-/* Length 16 vector in Scale = 2.56f */
-const Word16 GENB_Ave_fx[16] = { 836, 1344, 2257, 3263, 4173, 5031, 5950, 6707, 7514, 8234, 8881, 9439, 10393, 12226, 13855, 15135 };
-/* Length 16 vector in Scale = 2.56f */
-const Word16 TRNB_Ave_fx[16] = { 919, 1335, 2106, 3142, 4092, 4938, 5905, 6670, 7490, 8199, 8868, 9444, 10544, 12383, 13900, 15156 };
-/* Length 16 vector in Scale = 2.56f */
-const Word16 TRWB_Ave_fx[16] = { 834, 1326, 2151, 3341, 4305, 5299, 6318, 7198, 8167, 9071, 10001, 10867, 11871, 12912, 13986, 15046 };
-/* Length 16 vector in Scale = 2.56f */
-const Word16 TRWB2_Ave_fx[16] = { 945, 1546, 2866, 4150, 5342, 6568, 7660, 8809, 9894, 10934, 12170, 13577, 14981, 16280, 17614, 18778 };
-/* Length 16 vector in Scale = 2.56f */
-const Word16 AUNB_Ave_fx[16] = { 887, 1443, 2356, 3194, 4105, 4949, 5841, 6635, 7437, 8181, 8867, 9478, 10385, 12182, 13858, 15131 };
-/* Length 16 vector in Scale = 2.56f */
-const Word16 AUWB_Ave_fx[16] = { 810, 1468, 2476, 3417, 4396, 5342, 6311, 7215, 8171, 9078, 10030, 10969, 12014, 13075, 14146, 15133 };
-/* Length 16 vector in Scale = 2.56f */
-const Word16 AUWB2_Ave_fx[16] = { 933, 1745, 3040, 4157, 5379, 6490, 7646, 8725, 9852, 10930, 12214, 13647, 15062, 16297, 17636, 18768 };
-
-
-
-
-
-/* Length 16 vector in Q = 15 */
-const Word16 Predictor0_fx[16] = { 27361, 27361, 27361, 27197, 27197, 27197, 26378, 26460, 26214, 25985, 26460, 26460, 25985, 25723, 25723, 24740 };
-/* Length 16 vector in Q = 15 */
-const Word16 Predictor1_fx[16] = { 27034, 27034, 27034, 26640, 26313, 26640, 26640, 26132, 26214, 26214, 26460, 26870, 26870, 26706, 27034, 26640 };
-/* Length 16 vector in Q = 15 */
-const Word16 Predictor2_fx[16] = { 24248, 23593, 24510, 24248, 24510, 24019, 24019, 23757, 23757, 24019, 24248, 24248, 23593, 23101, 23593, 23101 };
-/* Length 16 vector in Q = 15 */
-const Word16 Predictor3_fx[16] = { 24248, 24248, 24740, 24248, 24510, 23757, 23429, 23101, 22610, 23101, 23593, 24740, 25002, 24740, 25002, 24838 };
-/* Length 16 vector in Q = 15 */
-const Word16 Predictor4_fx[16] = { 19005, 18350, 19268, 19005, 19268, 18776, 18776, 18514, 18514, 18776, 19005, 19005, 18350, 17859, 17695, 17203 };
-/* Length 16 vector in Q = 15 */
-const Word16 Predictor5_fx[16] = { 23839, 23593, 23593, 23839, 23839, 23593, 23593, 23593, 23839, 24084, 24347, 24576, 24576, 23364, 23364, 23364 };
-/* Length 16 vector in Q = 15 */
-const Word16 Predictor6_fx[16] = { 24084, 23839, 24084, 23593, 23593, 22938, 22381, 21791, 21135, 21955, 22381, 24347, 24576, 23593, 24576, 24347 };
-/* Length 16 vector in Q = 15 */
-const Word16 Predictor7_fx[16] = { 24347, 24084, 24347, 24347, 24347, 24084, 24347, 24576, 24576, 24740, 25068, 24347, 24084, 23839, 23364, 24740 };
-/* Length 16 vector in Q = 15 */
-const Word16 Predictor8_fx[16] = { 24740, 24740, 24740, 24576, 24576, 24576, 24084, 23839, 23593, 23364, 23839, 23839, 23364, 23101, 23101, 22118 };
-
-/* An 16-by-16 matrix */
-const Word16 CNG_SN1_fx[256] =
-{//Qlog2(2.56)
- 600, 1640, 3039, 4257, 5512, 6740, 7989, 9169, 10393, 11612, 12880, 14100, 15378, 16554, 17816, 18918,
- 1188, 2487, 3746, 4903, 6103, 7261, 8437, 9587, 10776, 11954, 13172, 14355, 15564, 16712, 17913, 19012,
- 346, 799, 2259, 3555, 4876, 6175, 7516, 8803, 10073, 11323, 12631, 13938, 15282, 16553, 17817, 19039,
- 439, 1616, 3446, 4743, 6073, 7288, 8553, 9726, 10947, 12106, 13312, 14474, 15650, 16773, 17894, 18977,
- 921, 1800, 2976, 4007, 5105, 6137, 7178, 8150, 9057, 9914, 11009, 12545, 13671, 15502, 17428, 18927,
- 896, 1899, 3035, 4128, 5301, 6429, 7604, 8719, 9886, 11059, 12417, 13621, 14962, 16135, 17475, 18460,
- 722, 1507, 2537, 3437, 4328, 5190, 6018, 6841, 7587, 8343, 8925, 9511, 9919, 11075, 13613, 15021,
- 315, 612, 1671, 2910, 3990, 5083, 6120, 7170, 8188, 9173, 10148, 11186, 12250, 13262, 14290, 15284,
- 885, 1928, 3010, 3973, 4952, 5900, 6848, 7769, 8701, 9609, 10581, 11540, 12508, 13450, 14412, 15349,
- 338, 1020, 2657, 3736, 4839, 5791, 6806, 7760, 8738, 9659, 10627, 11567, 12534, 13468, 14416, 15334,
- 1126, 1964, 2999, 3855, 4764, 5608, 6482, 7286, 8109, 8827, 9570, 10649, 11999, 13125, 14223, 15252,
- 385, 815, 2000, 2939, 3906, 4879, 5793, 6734, 7661, 8526, 9309, 10146, 11597, 12955, 14106, 15241,
- 633, 1445, 2400, 3293, 4235, 5171, 6143, 7084, 8057, 8980, 9924, 10924, 11987, 12998, 14016, 15058,
- 584, 1248, 2250, 3131, 4050, 4920, 5811, 6652, 7471, 8244, 8913, 9480, 10188, 12225, 13871, 15123,
- 1157, 1820, 2745, 3505, 4354, 5097, 5932, 6648, 7408, 8034, 8635, 9083, 9977, 12228, 13819, 15108,
- 572, 1401, 2514, 3501, 4503, 5465, 6469, 7435, 8416, 9328, 10306, 11309, 12328, 13303, 14306, 15261,
-};
-
-const Word16 SVWB2_SN1_fx[256] = {//Qlog2(2.56)
- -257, -385, -673, 926, 1408, 874, 735, 512, 624, 587, 493, 688, 845, 521, 428, 95,
- -32, -90, 1046, 666, 329, -59, -324, -282, -712, -783, -229, 28, -354, -434, -497, -351,
- 182, 111, 512, 746, 365, 91, -214, -477, -401, -496, -931, -1180, -1422, -1085, -456, -9,
- -286, -387, -325, 317, 172, 274, 238, 550, 555, 574, 618, 717, 751, 611, 441, 233,
- 96, 178, 203, -112, -464, -591, -212, 124, 32, 192, 244, 94, -41, -293, -507, -649,
- -94, -164, 1011, 926, 688, 461, 593, 587, 398, 400, 351, 486, 482, 424, 294, 219,
- -260, -356, -458, -252, -162, -350, -394, -255, 30, 173, 90, 64, 93, 157, 66, 2,
- 43, 100, -48, -596, -852, -787, -569, -536, -780, -607, -169, -125, -75, 96, 98, 154,
- 240, 203, 404, 79, -202, -555, -718, -1023, -1158, -1390, -1537, -774, -478, -173, -63, 272,
- -164, -291, -405, 1049, 779, 349, 224, 12, 265, 37, -182, -446, -396, -81, -16, -146,
- 75, 45, -248, -832, 729, 416, 499, 178, -115, 16, 79, 243, 265, 77, -69, -43,
- 639, 705, 482, -40, -529, -198, -109, -399, -242, -433, -713, -811, -934, -777, -332, 26,
- 110, 166, -54, -792, -974, 386, 190, 192, 67, -172, -141, -298, -539, -400, -139, 80,
- 147, 307, 168, 52, -285, -270, -212, -179, 138, 200, 194, 64, 476, 673, 636, 500,
- 5, 38, -176, 212, 752, 433, 322, 500, 560, 276, 107, -245, -358, -768, -817, -1065,
- -233, -294, -581, -1147, -869, 77, 144, 335, 269, 501, 638, 719, 614, 376, 219, 172
-};
-
-/* An 16-by-16 matrix */
-const Word16 SVWB2_SN2_fx[256] = {//Qlog2(2.56)
- -100, -130, -545, -834, 489, 501, 523, 297, 137, 198, 270, 172, 17, -50, -147, -63,
- 333, 351, 143, 142, 47, -137, -131, -323, -216, -32, 105, 264, 541, 425, 342, 153,
- -93, -168, 184, 605, 372, 237, 186, 175, 307, 321, 448, 205, -128, -481, -477, -512,
- -24, -30, 26, -47, -159, -88, -344, -130, -88, -280, -742, -901, -264, 176, 38, -26,
- 258, 250, 114, -75, -186, -326, -360, -237, 268, 532, 236, -341, -556, -334, -181, -30,
- 123, 241, 118, 205, 441, 172, 49, -158, -273, -214, -428, -729, -758, -532, -289, -112,
- -160, -224, -512, 393, 460, 216, 179, -94, -78, -320, -473, 13, 224, 196, 127, 37,
- -35, -65, 360, 164, -185, -563, -683, -357, -634, -61, 400, 133, -232, -264, -174, 32,
- -140, -196, -470, -355, -532, -323, -268, -76, 260, 258, 218, 161, 206, 266, 234, 168,
- 99, 109, -60, -368, -564, -49, 75, -60, -160, -654, -847, 162, 278, 76, -24, 42,
- 12, 88, 124, -54, -91, 197, 289, 211, 240, 184, 10, 16, 560, 677, 619, 350,
- -37, -91, 771, 654, 291, 165, 104, 43, -224, -365, -411, -78, -90, -20, 85, 168,
- 45, 1, 58, 80, 293, 411, 443, 655, 604, 642, 624, 529, 373, 227, 166, 128,
- -176, -124, -182, -131, -260, -127, 350, 460, 425, 260, -76, -400, -605, -506, -121, -49,
- -96, -92, -274, -176, -220, -323, -399, -505, -610, -530, 124, 268, 235, 272, 128, 160,
- -6, 80, 145, -198, -197, 38, -15, 100, 45, 58, 542, 524, 197, -128, -324, -448
-};
-
-/* SVWB2_AR1 * 2.56f */
-const Word16 SVWB2_AR1_fx[128] = {//Qlog2(2.56)
- -28, -38, -122, 74, 296, 148, 146, 120, 148, 36, -11, -163, -223, -299, -290, -320,
- -22, -30, -138, -319, -385, 159, 124, 51, 32, -44, -15, -78, -96, -53, 40, 64,
- -96, -144, -205, -96, 80, 96, 152, 246, 206, 193, 265, 333, 320, 232, 131, 32,
- 108, 106, 102, 37, -14, -17, -61, -144, -161, -160, -257, -404, -540, -316, -124, 18,
- 22, 12, 34, -14, -52, -106, -144, -266, -346, -472, -401, -30, -4, -43, -88, -10,
- -52, -117, -203, 415, 324, 171, 121, -31, 48, -31, -60, -65, 128, 193, 141, 67,
- -47, -86, 430, 334, 193, 136, 85, 82, 1, -34, 47, 84, 2, -30, -77, -45,
- -4, -14, -9, -38, -136, -242, -217, -54, -38, 179, 191, 61, 42, -3, 5, -37
-};
-
-/* SVWB2_AR2 * 2.56f */
-const Word16 SVWB2_AR2_fx[128] = {//Qlog2(2.56)
- 12, 16, -46, -156, -329, -293, 43, 141, 61, 15, -9, 29, -74, -41, -37, 16,
- -47, -81, -136, 82, -33, -111, -268, -293, 109, 136, 53, -58, -51, 62, 64, 14,
- -15, -19, -171, -347, 258, 161, 88, 13, -57, -26, -59, 24, 10, 14, -41, -8,
- 33, 38, 139, 157, 31, 65, -14, 52, 63, 30, -8, -1, -182, -341, -344, -258,
- 14, 16, 46, 6, -54, -64, -136, -132, -318, -303, 261, 146, -19, -57, -30, 30,
- -34, -34, 21, 93, 163, 201, 290, 257, 225, 296, 209, 197, 72, 26, 57, 1,
- 33, 66, 73, -8, -104, 44, 31, -13, 70, 72, -17, -48, 430, 373, 218, 92,
- 1, -2, 74, 172, 67, -3, -34, -25, -156, -219, -432, -288, -181, -35, 113, 112
-};
-
-/*----------------------------------------------------------------------------------*
- * LSF quantization - LSF mode/codebook selection tables
- *----------------------------------------------------------------------------------*/
-const Word16 CB_lsf[] =
-{
- -1, /* Mode 0 : INACTIVE NB, Safety net */
- -1, /* Mode 1 : UNVOICED NB, Safety net */
- 0, /* Mode 2 : VOICED NB, Safety net */
- 2, /* Mode 3 : GENERIC NB, Safety net */
- 2, /* Mode 4 : TRANSITION NB, Safety net */
- 4, /* Mode 5 : AUDIO NB, Safety net */
- -1, /* Mode 6 : INACTIVE WB, Safety net */
- -1, /* Mode 7 : UNVOICED WB, Safety net */
- 5, /* Mode 8 : VOICED WB, Safety net */
- 7, /* Mode 9 : GENERIC WB, Safety net */
- 7, /* Mode 10 : TRANSITION WB, Safety net */
- 9, /* Mode 11 : AUDIO WB, Safety net */
- -1, /* Mode 12 : INACTIVE WB16k, Safety net */
- -1, /* Mode 13 : UNVOICED WB16k, Safety net */
- 14, /* Mode 14 : VOICED WB16k, Safety net */
- -1, /* Mode 15 : GENERIC WB 16k, Safety net */
- 10, /* Mode 16 : TRANSITION WB16k, Safety net */
- -1, /* Mode 17 : AUDIO WB16k, Safety net */
- 13 /* Mode 18 : CNG, Safety net */
-}; // Q0
-
-const Word16 CB_p_lsf[] =
-{
- 0, /* Mode 0 : INACTIVE NB, Predictive */
- 1, /* Mode 1 : UNVOICED NB, Predictive */
- 4, /* Mode 2 : VOICED NB, Predictive */
- 4, /* Mode 3 : GENERIC NB, Predictive */
- -1, /* Mode 4 : TRANSITION NB, Predictive */
- -1, /* Mode 5 : AUDIO NB, Predictive */
- 0, /* Mode 6 : INACTIVE WB, Predictive */
- 1, /* Mode 7 : UNVOICED WB, Predictive */
- 6, /* Mode 8 : VOICED WB, Predictive */
- 6, /* Mode 9 : GENERIC WB, Predictive */
- -1, /* Mode 10 : TRANSITION WB, Predictive */
- -1, /* Mode 11 : AUDIO WB, Predictive */
- 0, /* Mode 12 : INACTIVE WB16k, Predictive */
- -1, /* Mode 13 : UNVOICED WB16k, Predictive */
- 11, /* Mode 14 : VOICED WB16k, Predictive */
- 8, /* Mode 15 : GENERIC WB16k, Predictive */
- -1, /* Mode 16 : TRANSITION WB16k, Predictive */
- 10, /* Mode 17 : AUDIO WB16k, Predictive */
- 9, /* Mode 18 : GENERIC WB, MA Predictive */
-}; // Q0
-
-
-const Word16 *const ModeMeans_fx[] = { IANB_Ave_fx, UVNB_Ave_fx, SVNB_Ave_fx, GENB_Ave_fx, TRNB_Ave_fx, AUNB_Ave_fx, IAWB_Ave_fx, UVWB_Ave_fx,
- SVWB_Ave_fx, GEWB_Ave_fx, TRWB_Ave_fx, AUWB_Ave_fx, IAWB2_Ave_fx, NULL, SVWB2_Ave_fx, GEWB2_Ave_fx, TRWB2_Ave_fx, AUWB2_Ave_fx
-}; //Qlog2(2.56)
-const Word16 * const Predictors_fx[] = { Predictor6_fx, NULL, Predictor1_fx, Predictor3_fx, NULL, Predictor6_fx,Predictor5_fx, NULL, Predictor0_fx,
- Predictor2_fx, NULL, Predictor5_fx, Predictor7_fx, NULL, Predictor8_fx, Predictor4_fx, NULL, Predictor7_fx
-}; // Q15
-
-const Word16 CBsizes[] =
-{
- 1,2,4,8,16,32,64
-}; // Q0
-
-
-const Word16 CBbits[] =
-{
- -1, /* Mode 0 : INACTIVE NB, Safety net */
- -1, /* Mode 1 : UNVOICED NB, Safety net */
- 4, /* Mode 2 : VOICED NB, Safety net */
- 5, /* Mode 3 : GENERIC NB, Safety net */
- 5, /* Mode 4 : TRANSITION NB, Safety net */
- 4, /* Mode 5 : AUDIO NB, Safety net */
- -1, /* Mode 6 : INACTIVE WB, Safety net */
- -1, /* Mode 7 : UNVOICED WB, Safety net */
- 4, /* Mode 8 : VOICED WB, Safety net */
- 5, /* Mode 9 : GENERIC WB, Safety net */
- 5, /* Mode 10 : TRANSITION WB, Safety net */
- 4, /* Mode 11 : AUDIO WB, Safety net */
- -1, /* Mode 12 : INACTIVE WB16k, Safety net */
- -1, /* Mode 13 : UNVOICED WB16k, Safety net */
- 4, /* Mode 14 : VOICED WB16k, Safety net */
- -1, /* Mode 15 : GENERIC WB16k, Safety net */
- 4, /* Mode 16 : TRANSITION WB16k, Safety net */
- -1, /* Mode 17 : AUDIO WB16k, Safety net */
- 4, /* Mode 18: CNG, Safety net */
-}; // Q0
-
-
-const Word16 CBbits_p[] =
-{
- 5, /* Mode 0 : INACTIVE NB, Predictive */
- 4, /* Mode 1 : UNVOICED NB, Predictive */
- 3, /* Mode 2 : VOICED NB, Predictive */
- 3, /* Mode 3 : GENERIC NB, Predictive */
- -1, /* Mode 4 : TRANSITION NB, Predictive */
- 0, /* Mode 5 : AUDIO NB, Predictive */
- 5, /* Mode 6 : INACTIVE WB, Predictive */
- 4, /* Mode 7 : UNVOICED WB, Predictive */
- 3, /* Mode 8 : VOICED WB, Predictive */
- 3, /* Mode 9 : GENERIC WB, Predictive */
- -1, /* Mode 10 : TRANSITION WB, Predictive */
- 0, /* Mode 11 : AUDIO WB, Predictive */
- 5, /* Mode 12 : INACTIVE WB16k, Predictive */
- -1, /* Mode 13 : UNVOICED WB16k, Predictive */
- 3, /* Mode 14 : VOICED WB16k, Predictive */
- 5, /* Mode 15 : GENERIC WB16k, Predictive */
- -1, /* Mode 16 : TRANSITION WB16k, Predictive */
- 5, /* Mode 17 : AUDIO WB16k, Predictive */
- 5, /* Mode 9 : GENERIC WB, Predictive */
-}; // Q0
-
-
-
-const Word16 BitsVQ[]=
-{
- -1, /* Mode 0 : INACTIVE NB, Safety net */
- -1, /* Mode 1 : UNVOICED NB, Safety net */
- 8, /* Mode 2 : VOICED NB, Safety net */
- 9, /* Mode 3 : GENERIC NB, Safety net */
- 9, /* Mode 4 : TRANSITION NB, Safety net */
- 4, /* Mode 5 : AUDIO NB, Safety net */
- -1, /* Mode 6 : INACTIVE WB, Safety net */
- -1, /* Mode 7 : UNVOICED WB, Safety net */
- 8, /* Mode 8 : VOICED WB, Safety net */
- 9, /* Mode 9 : GENERIC WB, Safety net */
- 9, /* Mode 10 : TRANSITION WB, Safety net */
- 4, /* Mode 11 : AUDIO WB, Safety net */
- -1, /* Mode 12 : INACTIVE WB16k, Safety net */
- -1, /* Mode 13 : UNVOICED WB16k, Safety net */
- 8, /* Mode 14 : VOICED WB16k, Safety net */
- -1, /* Mode 15 : GENERIC WB16k, Safety net */
- 8, /* Mode 16 : TRANSITION WB16k, Safety net */
- -1, /* Mode 17 : AUDIO WB16k, Safety net */
- 4, /* Mode 18: CNG, Safety net */
-}; // Q0
-
-
-const Word16 BitsVQ_p[]=
-{
- 5, /* Mode 0 : INACTIVE NB, Predictive */
- 8, /* Mode 1 : UNVOICED NB, Predictive */
- 6, /* Mode 2 : VOICED NB, Predictive */
- 6, /* Mode 3 : GENERIC NB, Predictive */
- -1, /* Mode 4 : TRANSITION NB, Predictive */
- 0, /* Mode 5 : AUDIO NB, Predictive */
- 5, /* Mode 6 : INACTIVE WB, Predictive */
- 12, /* Mode 7 : UNVOICED WB, Predictive */
- 6, /* Mode 8 : VOICED WB, Predictive */
- 6, /* Mode 9 : GENERIC WB, Predictive */
- -1, /* Mode 10 : TRANSITION WB, Predictive */
- 0, /* Mode 11 : AUDIO WB, Predictive */
- 5, /* Mode 12 : INACTIVE WB16k, Predictive */
- -1, /* Mode 13 : UNVOICED WB16k, Predictive */
- 6, /* Mode 14 : VOICED WB16k, Predictive */
- 5, /* Mode 15 : GENERIC WB16k, Predictive */
- -1, /* Mode 16 : TRANSITION WB16k, Predictive */
- 5, /* Mode 17 : AUDIO WB16k, Predictive */
- 5, /* Mode 18 : GENERIC WB, MA Predictive */
-}; // Q0
-
-
-const Word16 predmode_tab_float[][6] =
-{
- {1,1,2,2,0,2},
- {1,1,2,2,0,2},
- {1,-1,2,1,0,1},
- {1,1,2,1,0,1} /* should check how is the cb for audio mode at 13.2*/
-};
-
-const Word16 predmode_tab[][6] =
-{
- {1,1,2,2,0,2},
- {1,1,2,2,0,2},
- {1,-1,2,1,0,1},
- {1,1,2,1,0,2} /* should check how is the cb for audio mode at 13.2*/
-}; // Q0
-
-
-const Word16 SVNB_SN1_fx[256] =
-{//Qlog2(2.56)
- 135, 109, 135, -153, -549, 214, 416, 195, 291, 247, 100, -127, -579, -160, -66, -32,
- -107, -150, -274, -149, 642, 594, 338, 183, 81, -31, -14, -150, -387, -40, -44, -18,
- 73, 42, 171, 339, 213, 42, -137, -277, -379, -441, -440, -478, 270, 126, -4, 6,
- -307, -479, -636, -596, -100, 83, 167, 200, 260, 376, 523, 1051, 1142, 490, 249, 108,
- -148, -215, -324, -570, -917, -685, -208, 127, 285, 353, 441, 940, 1100, 458, 229, 100,
- 427, 432, 548, 426, 133, 13, -9, -141, -108, -144, -195, -419, -733, -144, -109, -45,
- -115, -220, -194, 661, 896, 688, 489, 351, 211, 258, 147, 30, -746, -784, -156, -95,
- 16, -48, -88, -430, -798, 36, 204, 68, 174, 162, 20, 61, 627, 266, 102, 48,
- -252, -370, -630, -614, 680, 1024, 869, 598, 419, 259, 193, 27, 90, 156, 53, 27,
- -48, 33, 26, -227, -556, -766, -391, 231, 413, 282, 226, 89, 194, 187, 44, 30,
- -204, -291, -345, -131, 125, 72, 16, -29, -106, -49, -27, 183, 714, 277, 114, 49,
- -11, 205, 285, 69, -58, -207, -301, -160, -30, -2, 12, -99, -580, -178, -80, -41,
- 120, 189, 281, 427, 234, 138, 124, 126, 50, 205, 121, 76, -797, -1204, -235, -133,
- 63, -18, 146, 666, 480, 236, 134, -39, -97, -130, -175, -378, -746, -159, -106, -46,
- 386, 399, 415, 157, -175, -282, -315, -318, -222, -225, -267, -342, 317, 152, 15, 14,
- 39, 56, 71, -95, -387, -509, -595, -466, -395, -186, -24, 421, 814, 292, 127, 52
-};
-
-/* An 16-by-16 matrix in Scale = 2.56f */
-const Word16 SVNB_SN2_fx[256] =
-{//Qlog2(2.56)
- -16, 111, 111, -89, -115, -404, -514, 162, 277, 41, -94, -89, 15, 31, 2, 2,
- -82, -99, -25, -287, -464, 204, 18, -123, -38, 56, 109, 198, 160, 96, 41, 19,
- -95, -62, -242, -415, 318, 118, -121, 44, 74, 40, 85, 114, 52, 36, 21, 8,
- 29, 40, 43, 23, -202, -149, 288, 149, -20, -109, -186, -275, -127, 18, -25, -6,
- 20, 36, -97, -228, 565, 508, 134, 42, -70, -237, -258, -259, -123, -9, -29, -10,
- -72, -169, 492, 463, 193, 204, -13, -75, -82, -125, -181, -230, -181, -10, -40, -12,
- -108, -221, -229, 648, 575, 288, 146, 1, -14, -4, -51, -120, -81, -14, -17, -5,
- -199, -264, -309, 209, 8, -128, 24, -47, 87, 257, 240, 185, 93, 70, 34, 16,
- 25, 82, -60, -155, -407, -615, 29, 100, -113, 32, 207, 258, 203, 111, 49, 21,
- 37, 127, 95, 4, 112, -45, -217, -158, -277, -407, -304, -152, 72, 52, -6, 0,
- -30, -81, -116, -416, -219, 677, 538, 328, 213, 60, -60, -109, -78, 0, -5, 0,
- 9, -15, 26, 75, -175, -336, -673, -586, 238, 310, 198, 189, 212, 126, 48, 24,
- -18, -4, -80, 102, 130, -116, -268, -471, -567, -104, 205, 221, 143, 81, 29, 12,
- 4, 39, 65, 115, 88, 189, 136, 124, 49, 106, 37, 89, -375, -626, -114, -73,
- 540, 525, 472, 221, 118, -31, 15, 7, -71, -139, -108, -93, -13, -4, -13, -8,
- -44, -44, -143, -272, -525, -365, 479, 502, 312, 225, 161, 72, 28, 42, 26, 12
-};
-
-const Word16 GETRNB_SN1_fx[512] =
-{//Qlog2(2.56)
- -119, -271, -427, 447, 321, 58, 37, -105, -65, 99, 106, 21, -277, 53, 9, -6,
- -93, -241, -433, -826, -1028, 17, 180, 138, 320, 234, 152, 235, 973, 594, 199, 96,
- -300, -474, -553, -497, -374, -231, -224, -170, -145, 51, 154, 714, 1338, 690, 271, 118,
- -115, -228, -248, 9, -27, -196, -240, -269, -293, -310, -276, -254, 769, 481, 117, 59,
- 172, 58, 469, 585, 512, 336, 145, -52, -167, -344, -379, -487, 285, 377, 27, 27,
- 81, 34, 574, 859, 818, 702, 521, 344, 177, 23, -116, -274, -611, -78, -61, -35,
- 76, 19, -104, -388, -687, 54, 279, 144, 237, 223, 110, 9, -335, 4, 3, -10,
- 115, 380, 486, 446, 389, 316, 239, 249, 197, 207, 162, 141, -435, -1516, -409, -136,
- -146, -348, -425, 645, 998, 790, 609, 468, 282, 287, 153, 87, -461, -592, -88, -64,
- -249, -471, -835, -642, 589, 960, 887, 637, 442, 286, 242, 132, 142, 299, 99, 44,
- 128, 37, -120, -314, -571, -730, -868, -558, -259, -109, 8, 413, 1145, 593, 210, 92,
- 151, 331, 267, 130, -24, -89, -133, -43, -75, 57, 19, 94, -469, -796, -124, -90,
- -339, -468, -292, -34, 76, 179, 231, 269, 259, 281, 275, 204, -93, 157, 53, 16,
- 33, 176, 25, -201, -311, -497, -509, -242, -47, 6, 86, 48, -165, 176, 24, 8,
- 27, 223, 461, 500, 479, 475, 489, 560, 635, 741, 924, 1347, 1546, 806, 277, 54,
- 510, 464, 402, 114, -80, -285, -290, -321, -283, -368, -325, -424, 388, 402, 52, 38,
- 521, 614, 732, 549, 428, 278, 180, 81, 14, -110, -204, -355, -649, -32, -56, -36,
- 72, 26, 262, 263, 159, 113, 60, -10, -73, -121, -201, -329, -768, -61, -60, -39,
- 85, 57, 116, -40, -78, -159, -154, -247, -220, -366, -331, -532, -35, 344, 0, 25,
- 527, 919, 1339, 1225, 1190, 1023, 774, 577, 393, 160, -4, -184, -281, 29, -21, -12,
- -230, -283, -338, -379, -313, -293, -163, -122, 15, 97, 243, 168, 361, 449, 102, 61,
- 378, 369, 369, 136, 42, -72, -73, -154, -155, -260, -270, -444, -562, 173, -36, -9,
- 168, 108, -36, -347, -559, -436, -254, -263, -236, -227, -247, -238, 796, 488, 123, 62,
- -151, -118, 163, 452, 430, 484, 456, 418, 377, 363, 256, 183, -403, -1429, -382, -126,
- -204, -366, -652, -512, 428, 353, 182, 88, -10, -94, -54, -11, 801, 527, 151, 76,
- 60, 79, -169, -465, -789, -844, -55, 181, 209, 172, 210, 107, 260, 399, 91, 52,
- -69, -205, -377, -164, 647, 584, 302, 151, 32, -135, -136, -223, -269, 170, 4, 5,
- 38, 418, 885, 979, 990, 1027, 870, 804, 669, 537, 360, 241, -336, -1281, -338, -111,
- -420, -700, -912, -622, -337, -51, 67, 173, 326, 554, 766, 1395, 1656, 894, 390, 178,
- -141, -252, -507, -822, -1084, -845, -280, 20, 149, 242, 393, 951, 1428, 740, 303, 135,
- -120, -37, 31, 105, 72, 99, 53, 117, 59, 171, 120, 177, -414, -993, -160, -98,
- -382, -612, -631, -167, 4, 104, 130, 141, 242, 325, 348, 430, 1048, 651, 222, 109
-};
-
-/* An 16-by-16 matrix in Scale = 2.56f */
-const Word16 GETRNB_SN2_fx[256] =
-{//Qlog2(2.56)
- -27, 71, 45, -4, 28, 69, 25, 94, 45, 90, 45, 87, -177, -567, -116, -59,
- -208, -147, 531, 399, 199, 113, -21, -28, -34, -38, -48, -46, -47, 18, -1, -1,
- 69, -20, -115, -355, -380, 388, 379, 193, 134, 37, -42, -60, -35, 29, 6, 5,
- 107, 89, -98, -189, 379, 289, 68, 22, -71, -179, -187, -192, -137, 4, -17, -7,
- -44, -81, -371, -448, 226, 75, -52, 43, 40, 36, 79, 120, 130, 76, 36, 15,
- 131, 115, 192, 177, 25, -7, -23, -95, -132, -184, -206, -245, -200, -12, -29, -11,
- 45, -25, -249, 50, -189, -358, 253, 145, -39, 27, 34, -20, -52, 13, 1, 2,
- -254, -155, 23, -89, -30, 23, -23, -21, -45, -86, -92, -109, -48, 52, 3, 3,
- -248, -233, 139, 213, 232, 361, 349, 401, 373, 301, 230, 207, 204, 101, 32, 14,
- 491, 546, 409, 147, 34, -18, 52, 59, 48, 27, 14, 7, -1, -37, -16, -9,
- 36, 41, 0, -21, -29, -64, -207, -346, -516, -355, -64, 73, 156, 94, 30, 11,
- -28, -173, -278, 506, 427, 164, 111, 21, -33, -61, -78, -90, -32, 39, 4, 4,
- -44, -60, -215, -373, -485, -270, 12, 151, 271, 265, 215, 178, 153, 71, 32, 17,
- 110, 155, -29, -259, -218, -183, -175, -132, -85, -98, -87, -93, -77, 0, -9, -4,
- -116, -14, 235, 1, -238, -398, -419, -55, 109, 77, 62, 74, 73, 47, 16, 8,
- -20, -108, -219, 246, 20, -184, -328, -449, -67, 142, 125, 110, 91, 74, 28, 13
-};
-
-/* An 16-by-16 matrix in Scale = 2.56f */
-const Word16 AUNB_SN1_fx[256] =
-{//Qlog2(2.56)
- -180, -79, -51, 39, 66, 99, 48, 108, 56, 127, 34, 46, -470, -845, -141, -90,
- -212, 82, 284, 422, 416, 416, 313, 289, 233, 210, 108, 55, -439, -1323, -336, -123,
- -9, 405, 532, 659, 710, 798, 844, 971, 1072, 1181, 1464, 1913, 2028, 1232, 549, 265,
- 75, 49, 330, 493, 448, 329, 204, 67, -18, -134, -235, -400, -605, -30, -67, -36,
- -9, -7, -95, -222, -322, -421, -321, -233, -110, -86, 67, -19, 3, 345, 41, 30,
- 153, 34, -172, -386, -500, -548, -503, -420, -317, -207, -114, 183, 1096, 661, 198, 94,
- 616, 501, 471, 220, 157, 55, 4, -161, -178, -314, -267, -389, 216, 429, 46, 38,
- -559, -854, -789, -369, -153, 64, 146, 296, 388, 520, 574, 958, 1481, 898, 340, 164,
- 131, 137, 116, 57, 64, -21, -38, -112, -123, -199, -214, -379, -641, 83, -53, -21,
- -101, -324, -648, -801, -835, -737, -501, -296, -86, 144, 400, 1025, 1501, 861, 322, 151,
- -231, -397, -512, -506, -308, -200, -127, -91, -18, 17, 94, 114, 798, 625, 161, 88,
- -518, -617, -201, 103, 258, 279, 273, 267, 281, 251, 214, 114, 58, 270, 70, 31,
- 17, -86, -78, -82, -22, -73, -171, -299, -334, -431, -422, -526, 517, 511, 71, 53,
- 276, 182, -40, -336, -461, -93, 342, 267, 166, 18, -43, -196, -146, 236, 18, 14,
- 227, 338, 224, 188, 107, 80, 57, 92, 34, 80, -5, -4, -515, -927, -174, -100,
- 731, 744, 797, 675, 590, 438, 328, 215, 144, 24, -96, -239, -486, -175, -65, -41
-};
-
-const Word16 SVWB_SN1_fx[256] =
-{//Qlog2(2.56)
- -71, -61, -170, -563, -962, -845, 186, 421, 282, 344, 260, 155, 186, 52, -18, -11,
- -107, -139, -289, -270, 788, 615, 249, 174, -1, -24, 159, 106, -46, -183, -187, -107,
- -144, -221, -215, 359, 192, -34, -186, -326, -256, -124, -49, 84, 214, 237, 186, 91,
- 218, 332, 335, 41, -191, -394, -614, -543, -415, -379, -285, -153, -86, -101, -69, -13,
- 587, 616, 732, 419, 270, 252, 102, 40, 53, -35, -57, -34, 19, -14, -15, -120,
- -76, -222, -127, 1216, 1188, 815, 532, 320, 311, 228, 34, -59, -96, -86, -44, -38,
- -176, -282, -507, -455, 1122, 1359, 965, 742, 610, 448, 474, 412, 185, 127, 127, -24,
- -156, -225, 16, 458, 423, 438, 393, 400, 525, 658, 682, 681, 612, 438, 267, 68,
- 89, 120, 172, 355, 195, -8, -22, -67, -110, -40, -93, -163, -382, -685, -926, -468,
- -227, -362, -452, -577, -213, -22, 56, 82, 132, 216, 348, 420, 358, 299, 257, 143,
- 38, -77, 117, 856, 486, 282, 16, -154, -130, -315, -618, -783, -892, -545, -88, 59,
- 218, 324, 232, -162, -583, -552, 126, 62, -40, -27, -227, -348, -334, -324, -238, -65,
- 82, 16, -20, -539, -787, 604, 340, 259, 260, -53, -251, -211, -12, 127, 171, 99,
- -24, 168, 202, -142, -223, -448, -282, 122, 148, 155, 363, 380, 347, 263, 124, -68,
- 165, 150, 226, 95, -172, -257, -413, -510, -533, -734, -1014, -1206, -834, -162, 6, 97,
- -78, -72, -81, -322, -605, -731, -740, -564, -356, -219, -151, 11, 200, 237, 212, 170
-};
-
-const Word16 SVWB_SN2_fx[256] =
-{//Qlog2(2.56)
- -126, -152, -342, -423, 311, 95, 3, 29, -93, 4, 227, 193, 142, 120, 93, 62,
- 190, 258, 382, 310, 166, -11, -77, -67, -217, -327, -330, -378, -461, -309, -142, -47,
- -16, -58, -77, -339, -534, 469, 399, 237, 290, 135, 34, 86, -14, -77, -30, 10,
- 13, -4, 644, 572, 412, 438, 272, 286, 234, 177, 118, 147, 131, 138, 127, 38,
- -73, -88, -112, 42, 36, 141, 424, 386, 504, 576, 523, 483, 431, 328, 233, 59,
- -120, -169, -270, -445, -593, -268, -133, -138, -11, 56, 133, 210, 166, 116, 122, 137,
- 282, 370, 255, 76, -89, -191, 139, 80, 12, 176, 185, 145, 244, 253, 173, -18,
- 13, 14, -43, 73, -59, -270, -448, -622, -59, 374, 353, 293, 189, -54, -199, -122,
- -75, -106, -281, -312, 585, 405, 185, 62, -176, -319, -330, -400, -418, -162, -4, 78,
- -31, -11, -79, -83, -88, -274, -343, -431, -623, -518, -148, -11, -17, -21, 21, 90,
- -101, -173, -240, 444, 303, 121, 104, -37, 185, 134, -45, -136, -164, 4, 153, 114,
- -8, 40, 107, -76, -254, -551, -673, 288, 318, 25, 14, -62, -97, -2, 13, -20,
- 87, 127, 80, 216, 336, 147, 188, 165, -10, 125, 193, 87, -126, -396, -736, -669,
- 2, 4, 96, 185, 6, 62, -37, -136, -177, -250, -227, 201, 744, 651, 351, 74,
- -16, -39, -82, -177, -380, -183, -24, -109, -194, -407, -641, -615, -157, 146, 191, 167,
- -21, -12, -39, -63, -159, -128, 20, 6, 16, 39, -60, -243, -594, -733, -364, 46
-};
-
-const Word16 GETRWB_SN1_fx[512] =
-{//Qlog2(2.56)
- -232, -191, 282, 248, 344, 390, 428, 490, 538, 592, 620, 607, 533, 372, 261, 136,
- -59, -227, -418, -288, -247, -448, -501, -644, -760, -922, -1112, -1204, -523, -130, 12, 131,
- 139, 838, 1402, 1327, 1465, 1391, 1371, 1342, 1220, 1147, 1041, 910, 733, 518, 335, 181,
- 211, 148, -94, -275, -484, -586, -541, -634, -583, -511, -424, -322, -285, -299, -194, -87,
- 410, 362, 337, 73, -36, -113, -180, -274, -373, -493, -501, -473, -393, -361, -271, -251,
- -85, -366, -819, -532, 753, 688, 414, 203, 24, -43, 129, 60, -100, -123, -97, -114,
- 4, 37, 484, 514, 340, 225, 89, 59, 40, 3, -5, -1, -11, -49, -43, -48,
- -223, -471, -661, -567, -496, -519, -464, -542, -484, -343, -276, -185, -43, 17, 84, 133,
- -106, -312, -668, -741, 385, 329, 121, -157, -423, -710, -957, -1280, -1143, -330, -20, 131,
- 250, 157, 71, -310, -552, -740, -745, -778, -827, -1064, -1336, -1629, -788, -195, -44, 131,
- 140, 633, 970, 864, 867, 761, 683, 648, 572, 544, 516, 469, 383, 238, 143, 55,
- 116, 143, 229, 134, -25, -120, -232, -333, -535, -642, -985, -1259, -1873, -1727, -330, -10,
- -64, -82, -62, -232, -308, -346, -296, -272, -153, -26, 108, 205, 232, 158, 129, 53,
- 82, -92, -309, -791, -1128, -259, -243, -405, -367, -637, -903, -1084, -675, -199, 17, 146,
- -247, -569, -886, -758, -334, -206, -158, -150, -64, 57, 190, 252, 261, 210, 163, 129,
- -23, -319, -458, 791, 718, 400, 233, -81, -174, -400, -758, -1048, -1338, -1038, -288, -6,
- 50, 462, 303, -47, -122, -134, 15, 137, 179, 222, 266, 249, 219, 123, 80, 30,
- -116, -332, -650, -1104, -1367, -691, -376, -295, -178, -199, -170, -24, 125, 95, 125, 168,
- -66, -314, -526, 325, 156, -56, -114, -287, -126, -185, -292, -298, -189, -81, 1, 23,
- 147, -30, -291, -771, -939, 262, 182, 126, 127, -100, -163, -134, -91, -95, -52, -19,
- -225, -496, -449, -61, 46, 135, 182, 247, 324, 404, 457, 464, 420, 305, 209, 106,
- 418, 312, 415, 74, -156, -345, -400, -634, -769, -1057, -1362, -1841, -1848, -471, -147, 87,
- 38, 19, -232, -552, -698, -941, -483, 119, 54, -34, 70, -68, -144, -192, -253, -236,
- 80, -30, -214, -157, -292, -312, -283, -347, -384, -372, -487, -503, -746, -950, -1372, -644,
- 44, 55, 124, 181, 125, 109, 61, 29, -73, -54, -206, -278, -638, -929, -1563, -1742,
- 802, 823, 726, 353, 272, 122, 117, 94, 80, 40, 68, 47, 42, -19, -26, -69,
- 50, -97, -306, -666, -918, -1109, -1124, -776, -710, -728, -675, -486, -150, -3, 93, 160,
- 81, -144, -131, 319, 227, -96, -236, -517, -711, -949, -1231, -1644, -1625, -444, -117, 86,
- -230, -237, 586, 799, 931, 1023, 1077, 1179, 1133, 1101, 1027, 909, 731, 515, 330, 171,
- 448, 632, 1047, 782, 631, 390, 155, -82, -342, -685, -1103, -1520, -1779, -931, -214, 34,
- -77, -352, -353, 787, 938, 677, 513, 352, 284, 278, 247, 181, 141, 73, 8, -39,
- 54, 42, -67, -298, -465, -593, -533, -547, -626, -741, -977, -1317, -1665, -613, -119, 80
-};
-
-const Word16 GETRWB_SN2_fx[256] =
-{//Qlog2(2.56)
- -202, -246, -356, -356, -232, -164, -79, 4, 78, 130, 152, 165, 170, 141, 90, 70,
- 38, 78, -72, -185, -446, -552, 269, 295, 104, 77, -54, -184, -168, -72, -32, -2,
- 69, 93, 39, 116, 100, 46, 50, -1, -2, 62, 8, -105, -404, -656, -494, -224,
- -285, -305, 263, 97, 29, 33, -24, 54, 35, 25, -4, -6, -30, 13, 20, 21,
- -28, -70, -160, 34, 5, -145, -264, -425, -539, -329, -19, 228, 411, 280, 141, 51,
- 244, 245, 19, -319, -461, -184, -10, 47, 220, 293, 309, 330, 281, 140, 71, 12,
- -128, -251, -374, 424, 279, 68, 35, -68, 13, 45, -6, -41, -73, -17, 8, 27,
- -55, -7, 438, 500, 493, 442, 286, 211, 68, -39, -117, -167, -180, -131, -75, -63,
- 30, 31, 69, 114, -172, -407, -596, -391, 102, 169, 158, 131, 46, 4, -6, -3,
- 69, 76, 33, 238, 164, 119, 160, 165, 273, 342, 383, 419, 456, 378, 262, 96,
- -55, 43, -59, -273, -200, -286, -287, -221, -247, -245, -194, -160, -129, -36, -31, 3,
- -35, -46, -272, -357, 484, 246, -11, 21, -123, -197, -102, -94, -96, -22, 6, 6,
- -117, -188, -252, -227, 0, 460, 506, 526, 501, 389, 250, 131, -28, -32, 24, 17,
- 399, 511, 390, 146, 80, -84, -81, -57, -123, -138, -95, -82, -51, -33, -14, -45,
- -9, 12, 300, 304, 182, 27, -197, -258, -344, -393, -384, -318, -140, -5, -6, 6,
- 64, 25, -7, -256, -306, 381, 243, 96, -17, -190, -285, -246, -65, 48, 37, 29
-};
-
-const Word16 AUWB_SN1_fx[256] =
-{//Qlog2(2.56)
- 328, 137, 358, 330, 184, 145, -60, -294, -555, -784, -945, -872, -601, -337, -155, -33,
- 32, -212, -488, -651, -752, -877, -892, -886, -853, -795, -705, -549, -330, -224, -127, -9,
- 372, 327, 197, 33, 13, -55, -87, -124, -125, -148, -144, -168, -175, -184, -127, -125,
- 752, 727, 623, 519, 449, 350, 309, 289, 272, 252, 185, 124, 118, 35, 22, -20,
- 14, 144, 296, 432, 416, 325, 177, 166, 151, 123, 109, 104, 47, -22, -45, -49,
- 310, 112, -141, -529, -654, -53, 162, -33, -297, -551, -772, -817, -540, -287, -95, -7,
- -158, 241, 443, 543, 559, 579, 566, 606, 610, 622, 602, 578, 485, 331, 197, 104,
- -471, -530, 37, 272, 397, 442, 466, 523, 561, 592, 608, 576, 485, 348, 222, 133,
- 162, 0, -87, -85, -151, -331, -410, -603, -767, -1030, -1348, -1812, -1735, -678, -284, -6,
- -156, 36, 15, 26, 41, 118, 201, 265, 339, 382, 420, 435, 377, 264, 159, 84,
- -69, -274, -411, -158, 60, -56, -190, -305, -371, -389, -411, -407, -338, -276, -173, -99,
- 0, -26, -196, -379, -369, -327, -193, -148, -77, -10, 63, 98, 98, 49, 40, -5,
- -149, -432, -729, -923, -927, -766, -568, -455, -333, -219, -122, -29, 11, 9, 20, 54,
- 177, 64, -60, -232, -411, -552, -557, -550, -509, -464, -380, -331, -297, -288, -215, -170,
- -16, 439, 971, 1104, 1209, 1323, 1339, 1374, 1317, 1223, 1107, 983, 781, 535, 315, 151,
- -432, -727, -686, -340, -156, -40, 18, 102, 169, 257, 306, 335, 296, 213, 137, 97
-};
-
-/* An 16-by-16 matrix in Scale = 2.56f */
-const Word16 TRWB2_SN1_fx[256] =
-{//Qlog2(2.56)
- -74, -384, -764, -964, -1122, -912, -819, -740, -728, -572, -379, -317, -250, -51, -67, 85,
- -311, -618, -439, -108, 156, 257, 404, 543, 643, 729, 732, 572, 446, 329, 236, 164,
- 523, 1549, 1557, 1476, 1374, 1192, 1068, 923, 901, 788, 717, 401, 262, 6, -100, -368,
- -13, -80, -189, -386, -486, -357, -216, -63, 65, 189, 248, 194, 218, 219, 205, 169,
- -104, -519, -772, 492, 224, 18, -203, -244, -126, -220, -362, -417, -271, -71, -34, -50,
- -202, 124, 811, 975, 1326, 1468, 1613, 1527, 1474, 1366, 1220, 906, 700, 509, 351, 207,
- -57, -196, -238, -281, -267, -239, -190, -137, -27, 4, 77, -178, -256, -553, -669, -1105,
- -183, -211, 804, 789, 685, 529, 479, 403, 371, 313, 279, 49, -19, -156, -179, -335,
- 758, 848, 608, 313, 271, 176, 177, 73, 106, 61, 59, -159, -203, -287, -268, -343,
- 199, 70, 95, -29, -245, -411, -745, -1009, -1473, -1921, -2633, -1648, -537, -284, -87, 207,
- 82, -217, -460, -646, -718, -821, -983, -1282, -1580, -2108, -1863, -609, -407, -122, -50, 243,
- -132, 364, 364, 340, 489, 496, 596, 606, 704, 756, 777, 616, 521, 409, 305, 211,
- 123, -189, -91, -306, -319, -407, -600, -679, -911, -855, -566, -249, -65, -1, -65, -25,
- 79, -58, -103, -150, -268, -265, -426, -479, -614, -671, -1005, -1378, -2027, -1547, -568, -52,
- -275, -669, -1070, -1097, -688, -433, -340, -148, -27, 194, 309, 277, 229, 188, 82, 127,
- 397, 1343, 1482, 1729, 1978, 2012, 1969, 1852, 1729, 1574, 1407, 1087, 848, 636, 431, 278
-};
-
-/* An 16-by-16 matrix in Scale = 2.56f */
-const Word16 TRWB2_SN2_fx[256] =
-{//Qlog2(2.56)
- 50, -66, -486, -850, 504, 345, 261, 10, -207, -218, -174, -18, 72, 69, 3, 24,
- -171, -439, -632, 390, 143, -89, -292, -314, -227, -157, 33, 181, 185, 204, 128, 167,
- 458, 459, 78, -250, -365, -381, -353, -382, -327, -284, -191, -18, 3, 37, 29, 95,
- -169, -227, -423, -448, -485, -426, -364, -284, -238, -184, -228, -190, -145, 17, 65, 145,
- -4, -120, -170, -333, -677, -782, -719, -391, -112, 232, 464, 392, 275, 215, 121, 139,
- -94, -130, 453, 295, -45, -286, -444, -473, -519, -428, -268, -40, -12, 46, 39, 118,
- -189, -245, 805, 815, 518, 293, 162, 110, -67, -158, -223, -120, -36, 15, 26, 60,
- 23, 130, 107, 0, -31, -66, 33, 22, 101, -10, -32, -232, -281, -590, -672, -1089,
- 51, 106, 157, 132, 40, 11, -73, -66, -165, -294, -561, -770, -742, -489, -202, 4,
- 25, 230, 286, 179, 75, 18, 15, 24, 109, 187, 310, 334, 328, 291, 237, 212,
- -238, -492, -550, 563, 764, 610, 542, 427, 373, 261, 166, 171, 122, 34, -21, -92,
- -359, -462, -10, 22, -42, -2, 78, 167, 154, 155, 74, 73, 66, 94, 89, 126,
- -5, -110, -374, -546, -386, -136, 95, 305, 437, 570, 615, 558, 463, 335, 209, 151,
- 23, 376, 292, 235, 485, 519, 657, 549, 478, 338, 186, 7, -28, -155, -95, -188,
- 166, 139, -277, -716, -822, 234, 319, 326, 234, 36, -155, -317, -247, -80, 49, 117,
- 431, 853, 745, 512, 325, 139, 83, -31, -25, -47, -17, -12, -24, -43, -5, 13
-};
-
-/* An 16-by-16 matrix in Scale = 2.56f */
-const Word16 AUWB2_SN1_fx[256] =
-{//Qlog2(2.56)
- -107, -446, -835, -1041, -1152, -1161, -1146, -969, -828, -533, -251, -242, -139, 172, 95, 466,
- 1052, 1008, 1052, 875, 864, 748, 783, 690, 754, 715, 688, 342, 195, -32, -251, -509,
- -311, -170, 366, 632, 748, 863, 983, 1042, 1118, 1188, 1133, 895, 728, 621, 460, 418,
- 608, 525, 322, 30, -237, -483, -862, -1178, -1651, -2184, -2770, -1349, -430, -28, 128, 562,
- 296, 171, -192, -429, -488, -470, -492, -473, -448, -352, -242, -309, -337, -210, -265, -182,
- 831, 703, 456, 217, 165, 65, 17, -53, -67, -78, -38, -222, -340, -329, -349, -391,
- 162, -13, -158, -335, -526, -705, -986, -1245, -1640, -2149, -2754, -1344, -372, -12, 134, 564,
- -79, -389, -569, -699, -811, -940, -1058, -1299, -1534, -2077, -1953, -507, -216, 143, 191, 607,
- -106, -116, -210, -225, -323, -330, -494, -491, -700, -757, -1057, -1424, -2222, -1509, -259, 348,
- -366, -748, -1177, -1216, -1017, -698, -444, -154, 10, 285, 361, 284, 255, 359, 187, 365,
- 77, 447, 418, 475, 453, 459, 475, 515, 562, 648, 658, 452, 367, 334, 244, 204,
- 10, 197, 170, 166, 144, 60, 52, -2, -20, -40, 18, -238, -279, -434, -451, -807,
- -460, -713, -547, -153, 64, 243, 386, 492, 620, 752, 759, 536, 445, 324, 151, -32,
- -246, -396, -413, -371, -354, -317, -307, -228, -195, -101, -36, -174, -197, -162, -261, -349,
- -329, -240, 326, 462, 428, 344, 405, 374, 439, 434, 467, 127, 85, -154, -248, -683,
- -12, 15, -222, -227, -31, 124, 200, 294, 357, 541, 607, 459, 376, 352, 282, 283
-};
-
-/* An 16-by-32 matrix */
-const Word16 IAA_MA1_fx[512] =
-{//Qlog2(2.56)
- -175, -490, -520, -631, -645, -614, -610, -548, -503, -432, -353, -301, -238, -141, -67, 26,
- 301, 407, 227, 96, -12, -18, -13, 2, 39, 107, 124, 92, 83, 100, 62, 72,
- -280, -737, -569, -164, -9, 100, 141, 211, 252, 281, 274, 217, 206, 219, 117, 106,
- -266, -753, -841, -587, -487, -345, -263, -167, -114, -30, 8, 32, 34, 61, 55, 104,
- -91, -137, -293, -349, -352, -326, -268, -247, -178, -129, -56, -96, -11, 219, 49, 56,
- -18, 1, -33, -14, -19, -5, -22, -14, -43, -37, -104, -143, -375, -770, -190, -100,
- 72, -22, -121, -220, -320, -378, -500, -587, -729, -795, -1056, -1305, -1691, -1090, -452, -60,
- 19, -279, -453, -580, -588, -739, -858, -1044, -1281, -1614, -921, -376, -273, -84, -2, 187,
- 853, 759, 591, 376, 260, 122, 39, -71, -133, -184, -209, -297, -299, -171, -124, -83,
- 266, 34, -182, -367, -516, -686, -881, -1121, -1414, -1834, -2110, -997, -519, -274, -109, 137,
- -2, -8, 42, 91, 172, 211, 298, 336, 433, 409, 546, 1043, 1499, 1038, 410, 189,
- 86, 254, 259, 254, 246, 219, 184, 122, 79, 11, -55, -170, -363, -934, -371, -188,
- 168, 167, -122, -244, -325, -340, -359, -343, -331, -291, -278, -270, -272, -162, -101, -46,
- -244, -459, -367, -340, -295, -220, -173, -107, -22, 53, 103, 293, 1084, 807, 260, 117,
- -319, -650, -685, -427, -290, -105, 25, 161, 303, 418, 587, 1074, 1563, 1085, 400, 170,
- 146, 257, 282, 295, 303, 294, 297, 262, 237, 193, 92, 341, 1220, 884, 315, 144,
- -291, -558, 147, 201, 282, 280, 310, 302, 313, 306, 292, 239, 198, 188, 106, 94,
- -11, -8, -156, -204, -231, -250, -265, -289, -269, -316, -322, -450, -488, -676, -778, -973,
- -117, -27, 4, 96, 174, 229, 271, 310, 344, 362, 344, 273, 209, 180, 109, 106,
- -260, -290, 151, 269, 406, 442, 551, 590, 679, 681, 900, 1293, 1631, 1132, 477, 221,
- -37, 374, 394, 414, 419, 395, 345, 313, 282, 255, 211, 126, 84, 51, -10, -53,
- 404, 327, 174, 28, -124, -290, -490, -695, -1011, -1111, -529, -288, -183, -69, -7, 142,
- 563, 752, 585, 555, 512, 478, 424, 396, 376, 343, 300, 194, 193, 162, 78, 46,
- -59, -131, -35, 49, 54, -12, -92, -185, -243, -289, -288, -344, -326, 0, -38, 6,
- 496, 582, 564, 514, 521, 490, 486, 436, 432, 320, 456, 1060, 1523, 1058, 419, 194,
- 174, 77, 18, -89, -112, -196, -165, -247, -222, -326, -332, -494, 499, 617, 121, 60,
- 315, 299, 229, 137, 78, -3, -40, -138, -198, -307, -375, -502, -515, -25, -88, -49,
- -232, -29, 353, 399, 485, 487, 523, 526, 556, 559, 520, 415, 328, 283, 187, 166,
- 182, 385, 403, 453, 515, 572, 635, 691, 787, 852, 1154, 1483, 1779, 1231, 524, 246,
- -273, -492, -185, -97, -52, -51, -17, -27, 13, 20, 45, -20, 52, 244, 58, 56,
- 20, -3, -241, -267, -194, -86, 4, 75, 140, 191, 200, 154, 137, 146, 85, 77,
- 92, 628, 611, 708, 706, 716, 672, 694, 655, 619, 550, 432, 354, 284, 204, 172
-};
-
-/* An 16-by-16 matrix in Scale = 2.56f */
-const Word16 UVD_MA1_fx[256] =
-{//Qlog2(2.56)
- -301, -503, -426, -187, -131, -64, -45, -20, 11, 56, 63, 90, 110, 175, 97, 33,
- 161, 353, 474, 502, 709, 782, 794, 765, 632, 532, 406, 285, 230, 145, 97, 52,
- -37, -5, 205, 323, 412, 349, 221, 91, -6, -59, -86, -112, -32, 209, 73, 23,
- -273, -615, -820, -794, -834, -838, -822, -819, -751, -701, -641, -562, -391, -271, -184, -63,
- 262, 168, 104, -9, -78, -163, -141, -199, -191, -249, -245, -317, -168, 535, 109, 33,
- -410, -675, -681, -611, -500, -396, -273, -183, -47, 60, 194, 357, 1044, 1080, 335, 140,
- 154, 185, 256, 238, 203, 238, 280, 260, 300, 267, 258, 196, 121, -618, -263, -60,
- 345, 705, 859, 786, 743, 584, 425, 267, 168, 105, 74, 28, 119, 267, 105, 39,
- -39, -166, -230, -196, -255, -276, -318, -349, -387, -438, -539, -613, -752, -956, -1353, -1628,
- 498, 479, 414, 231, 98, 5, -18, -41, -60, -78, -91, -96, -81, 72, 30, -8,
- 41, 120, 65, 141, 117, 186, 249, 299, 418, 520, 566, 618, 692, 579, 321, 166,
- -236, -278, -69, 13, 113, 362, 445, 539, 503, 387, 269, 172, 120, -21, 1, 4,
- -103, -46, -137, -132, -108, -97, -67, -37, -8, 41, 82, 107, 43, -605, -189, -56,
- -220, -315, -482, -516, -489, -445, -415, -362, -304, -205, -136, -68, -7, 131, 70, 25,
- -10, -121, -210, -237, -224, -302, -246, -310, -271, -343, -285, -364, 28, 703, 135, 54,
- 118, 50, -67, -166, -349, -416, -442, -446, -439, -420, -382, -319, -245, -209, -140, -82
-};
-
-/* An 16-by-16 matrix in Scale = 2.56f */
-const Word16 UVD_MA2_fx[256] =
-{//Qlog2(2.56)
- -75, -64, -150, -231, -272, -278, -248, -194, -156, -107, -74, -43, -92, -21, 9, 5,
- 393, 275, -12, -156, -208, -215, -162, -132, -115, -109, -94, -85, -104, -10, 5, -1,
- -297, -389, -99, -78, -66, -19, -12, 8, 0, -3, -15, -22, -113, -82, -16, 2,
- 59, -11, 5, -33, -11, -61, -70, -139, -143, -239, -207, -223, 711, 701, 143, 68,
- -195, 406, 222, 49, -6, -23, -6, 9, 0, 13, 26, 49, -44, -129, -18, -7,
- 23, -30, -141, 79, -18, -76, -55, -14, 44, 98, 88, 86, -96, -351, -112, -39,
- 380, 329, 235, 173, 141, 72, 25, -4, -6, -19, -21, -33, -55, -23, 3, -1,
- -81, -210, -284, 158, 396, 290, 163, 59, -25, -22, -10, -6, -46, -32, 9, 5,
- 9, 34, -15, 5, 23, -48, -127, -243, -347, -421, -455, -475, -495, -449, -294, -163,
- -13, -171, -416, -414, -245, -25, 69, 102, 104, 84, 50, 33, -38, -4, 0, 5,
- 50, 118, 68, 37, 147, 319, 371, 355, 291, 204, 130, 81, 21, 46, 36, 22,
- -95, -108, 311, 214, -28, -153, -226, -192, -129, -69, -42, -11, -48, -17, 13, 2,
- -185, -223, -104, 26, 53, 89, 132, 181, 258, 346, 397, 445, 392, 241, 125, 58,
- 83, 33, -9, -81, 40, 99, 56, 8, -51, -85, -106, -124, -196, 5, 5, 0,
- 143, 148, 19, -121, -247, -211, -67, 83, 198, 268, 290, 300, 240, 164, 86, 37,
- -198, -136, 370, 372, 300, 240, 156, 113, 79, 60, 44, 29, -35, -38, 6, 7
-};
-
-/* An 16-by-16 matrix in Scale = 2.56f */
-const Word16 UVWB_MA3_fx[256] =
-{//Qlog2(2.56)
- -26, 23, 7, -6, -1, 3, 40, 35, -43, -24, 56, 157, 265, 423, 382, 260,
- 61, -300, -130, -101, -8, 106, 108, 114, 88, 43, -2, -33, -56, 67, 29, 13,
- -31, 47, 45, -121, 46, 22, 111, 233, -256, -252, -123, -71, -31, 54, 56, 33,
- 20, -154, 67, 198, -232, -167, -86, -12, 79, 116, 88, 78, 44, 75, 27, -7,
- -14, 153, -166, 21, 107, 64, 233, -223, -147, -27, -1, 43, 61, 70, 50, 18,
- 3, -115, -8, 143, 192, 193, -124, -195, -198, -162, -75, 14, 45, 83, 79, 49,
- 12, -57, 25, -29, -11, 12, -7, -13, -12, 31, 74, 99, -10, -421, -209, -111,
- -25, 115, 119, -19, -117, -164, -203, -237, -206, -169, -110, -41, -11, 15, 1, -7,
- -13, 170, -143, -128, -224, -94, 1, 96, 144, 102, 29, 2, -37, 46, 7, -12,
- -11, 10, -34, 38, 24, 86, 149, 211, 240, 279, 247, 218, 154, 161, 74, 15,
- -24, 64, 110, 125, -24, 123, 161, 166, 177, 18, -112, -116, -141, -117, -113, -91,
- -4, -20, -17, -11, -27, 13, -15, -40, -58, -157, -252, -283, -288, -186, -162, -112,
- -20, 2, 32, 44, -31, -49, 8, 13, 55, -59, -162, -212, -61, 384, 115, 36,
- -4, 42, -75, 92, 268, -203, -125, 10, 52, 121, 72, -43, -109, -47, -66, -76,
- -39, 76, 268, -254, -28, 87, 2, 91, 85, 68, 89, 96, 42, 90, 39, 4,
- 2, 2, -56, 7, 67, -31, -219, -192, -24, 146, 249, 269, 209, 199, 106, 31
-};
-
-/* An 16-by-8 matrix in Scale = 2.56f */
-const Word16 GESVNB_AR1_fx[128] =
-{//Qlog2(2.56)
- -25, -64, -140, -118, 270, 240, 127, 70, 20, -40, -56, -111, -82, 64, 2, 5,
- 81, 104, 71, 70, 0, -49, -54, -73, -59, -92, -102, -201, -404, -52, -40, -15,
- -112, -217, -251, -202, -34, 57, 58, 62, 79, 127, 177, 306, 524, 315, 112, 53,
- 17, -6, 34, 66, 14, -26, -174, -196, -142, -131, -102, -97, 180, 154, 29, 17,
- 5, -27, -107, -197, -343, -333, -182, -143, -91, -17, 43, 120, 383, 267, 83, 40,
- -1, -15, -35, -56, -169, -145, 86, 101, 77, 48, 29, 78, -9, 68, 15, 9,
- 3, 9, 320, 450, 385, 348, 215, 155, 105, 45, -13, -75, -272, -129, -52, -23,
- 4, 49, 54, 90, 92, 101, 59, 69, 20, 70, 23, 43, -280, -624, -114, -55
-};
-
-/* An 16-by-8 matrix in Scale = 2.56f */
-const Word16 GESVNB_AR2_fx[128] =
-{//Qlog2(2.56)
- -22, -35, -31, -166, -164, 217, 212, 155, 166, 123, 67, 33, -21, -41, -3, -1,
- -14, -20, -16, -70, -77, -53, 23, -7, -98, -123, -99, -49, 357, 114, 36, 19,
- -57, -119, -303, -215, -33, -103, -97, -117, -105, -102, -67, -134, -176, 113, 16, 8,
- -12, 14, 30, -37, -112, -226, -206, -25, 125, 134, 99, 83, 55, -4, 9, 4,
- -19, 23, 171, 57, 13, -15, -26, -42, -65, -69, -77, -169, -351, -105, -49, -21,
- -14, -10, 8, 35, 161, 104, -74, -102, -135, -47, 45, 264, 52, -69, -1, -5,
- 213, 284, 230, 121, 50, 12, 43, 48, 27, -7, -24, -39, 75, 1, -9, -3,
- -75, -137, -89, 275, 164, 65, 125, 91, 86, 91, 56, 10, 9, -10, 0, 0
-};
-
-/* An 16-by-8 matrix in Scale = 2.56f */
-const Word16 GESVWB_AR1_fx[128] =
-{//Qlog2(2.56)
- -3, -16, -31, 2, -81, -123, -226, -260, -196, -122, -20, 78, 178, 145, 84, 46,
- 55, 42, 15, 32, -48, -81, -109, -137, -187, -264, -330, -387, -363, -176, -38, 37,
- -32, -70, -144, -269, -337, -183, 59, 58, 44, 49, 42, 51, 72, 50, 26, 38,
- -18, -58, -79, 125, 352, 291, 180, 118, 72, 25, -23, -82, -185, -167, -33, 6,
- -10, 135, 544, 517, 517, 561, 515, 528, 500, 472, 413, 383, 318, 219, 118, 57,
- -54, -280, -614, -548, -521, -522, -448, -479, -457, -438, -377, -355, -318, -271, -222, -89,
- -62, -96, -86, -10, 104, 155, 120, 112, 190, 264, 291, 272, 232, 166, 95, 27,
- 33, 61, 155, 121, 9, -28, 6, 103, 64, 17, 4, -2, -31, -88, -209, -206
-};
-
-/* An 16-by-8 matrix in Scale = 2.56f */
-const Word16 GESVWB_AR2_fx[128] =
-{//Qlog2(2.56)
- -147, -326, -421, -91, -22, -25, -14, -21, 32, 76, 104, 102, 65, 47, 50, 41,
- -39, -16, 61, -13, -38, -56, 47, 153, 195, 213, 212, 220, 245, 245, 209, 86,
- -34, -73, 82, 387, 199, 71, 56, -18, -33, -56, -88, -79, -5, 59, 55, 29,
- -7, -21, -21, -158, -123, 304, 226, 168, 124, 8, -75, -91, -54, -5, 37, 30,
- -26, -22, -67, -225, 107, 38, -82, -113, -213, -205, -62, 28, 89, 95, 52, 17,
- 227, 404, 325, 134, 45, -16, 3, -15, -55, -65, -55, -54, -18, -8, 1, -14,
- 19, 30, 12, 28, 48, 13, 2, -47, -38, 41, 29, -8, -154, -315, -411, -242,
- 8, 24, 29, -61, -215, -329, -237, -106, -12, -12, -64, -118, -167, -119, 8, 52
-};
-
-/* An 16-by-32 matrix in Scale = 2.56f */
-const Word16 GEWB2_MA1_fx[512] =
-{//Qlog2(2.56)
- 659, 1694, 1634, 1513, 1305, 1098, 933, 805, 733, 624, 525, 339, 239, 50, -35, -215,
- 6, 65, 125, 55, -85, -126, -272, -316, -507, -586, -1010, -1278, -1941, -1910, -426, 78,
- 281, 315, 236, -4, -102, -171, -232, -335, -362, -425, -488, -603, -669, -736, -648, -593,
- 29, -251, -582, -871, -969, -897, -991, -1077, -1275, -1480, -998, -393, -247, -9, 28, 271,
- -60, -361, 401, 552, 236, 35, -196, -215, -496, -683, -911, -820, -576, -299, -240, -141,
- 416, 574, 662, 350, 133, -160, -431, -781, -1200, -1652, -2035, -1092, -449, -192, -11, 263,
- -206, -609, -931, 28, -229, -358, -543, -462, -377, -360, -336, -251, -105, 35, 26, 80,
- 369, 1256, 1380, 1571, 1726, 1727, 1644, 1521, 1350, 1156, 984, 748, 580, 395, 254, 108,
- -147, -479, -330, -73, -272, -441, -685, -837, -1139, -1458, -1370, -414, -208, -12, 14, 213,
- -50, 100, -82, -253, -7, 119, 294, 392, 494, 578, 589, 523, 462, 383, 300, 249,
- -94, -362, -575, -770, -987, -999, -922, -697, -582, -305, -135, -31, -8, 23, -33, 62,
- 29, -64, -4, -123, -344, -414, -679, -767, -1152, -1401, -2105, -1905, -582, -300, -64, 223,
- 428, 990, 1019, 809, 681, 470, 366, 179, 126, -26, -141, -363, -423, -536, -437, -545,
- -133, -357, 364, 241, -39, -227, -334, -305, -426, -292, -102, 87, 159, 182, 160, 190,
- 560, 764, 531, 156, 22, -18, 23, -20, 19, 0, 13, -61, -35, -44, -12, -48,
- 33, -235, -634, -1093, 136, -31, -68, -285, -529, -535, -462, -249, -95, -53, -116, -61,
- -188, -628, -894, 702, 700, 373, 196, 51, 95, -56, -191, -181, -173, -132, -116, -218,
- 37, -188, -661, -1087, -1322, -258, -186, -181, -238, -372, -418, -508, -433, -197, -73, 28,
- -231, -222, 911, 875, 669, 440, 363, 301, 257, 192, 147, 68, 77, 43, 57, 17,
- -4, -187, -356, -410, -569, -499, -584, -568, -660, -703, -965, -1201, -1540, -708, -252, 87,
- 220, 64, -67, -357, -572, -744, -913, -1176, -1439, -1894, -2152, -762, -419, -146, -10, 281,
- -253, -627, -1075, -1206, -721, -398, -337, -188, -118, 50, 125, 198, 200, 190, 96, 164,
- -348, -741, -854, -357, -163, -103, -26, 143, 231, 318, 335, 325, 274, 233, 167, 190,
- -143, -256, -191, -280, -250, -191, -82, 37, 126, 102, 67, -130, -202, -430, -495, -810,
- 232, 107, -22, -341, -497, -523, -607, -646, -746, -690, -478, -295, -160, -77, -53, -7,
- -33, -98, -258, -501, -589, -438, -316, -168, -58, 82, 175, 219, 249, 259, 237, 226,
- -393, -665, -19, 185, 249, 266, 378, 468, 499, 508, 464, 388, 310, 238, 186, 145,
- -240, -99, 408, 480, 693, 761, 946, 943, 951, 893, 782, 613, 482, 351, 260, 163,
- -23, 523, 885, 903, 1172, 1287, 1482, 1491, 1476, 1402, 1240, 1005, 787, 604, 433, 292,
- 262, 988, 904, 732, 734, 665, 715, 656, 673, 615, 541, 372, 284, 139, 68, -84,
- -119, 446, 1118, 1215, 1372, 1280, 1208, 989, 881, 675, 557, 319, 227, 23, -39, -256,
- -102, 178, 379, 252, 365, 319, 455, 377, 413, 278, 225, -36, -67, -351, -375, -772
-};
-
-/* An 16-by-32 matrix in Scale = 2.56f */
-const Word16 GEWB_MA1_fx[512] =
-{//Qlog2(2.56)
- 269, 268, 416, 287, 157, 7, -132, -276, -482, -701, -1025, -1350, -1642, -982, -321, -49,
- 237, 949, 1374, 1228, 1337, 1219, 1123, 1016, 852, 752, 664, 559, 448, 306, 194, 83,
- -6, -176, -373, -111, -221, -387, -483, -639, -753, -786, -774, -655, -328, -114, -25, 27,
- 135, 164, -4, -181, -364, -528, -464, -424, -393, -314, -242, -185, -104, -61, -32, -37,
- 15, -218, -322, 668, 597, 343, 196, -5, -46, -159, -359, -524, -629, -548, -308, -95,
- 242, 463, 767, 661, 558, 403, 268, 191, 71, -4, -51, -103, -141, -176, -161, -142,
- -179, -147, 715, 865, 970, 932, 822, 763, 602, 514, 436, 370, 285, 189, 106, 36,
- -49, -227, -589, -933, -1172, -700, -248, -175, -132, -132, -125, -103, -47, -49, -12, 60,
- -7, -227, -404, 272, 83, -50, -165, -319, -343, -501, -731, -939, -1013, -607, -202, -2,
- -76, -271, -661, -582, 296, 86, -60, -166, -335, -314, -213, -285, -324, -280, -164, -39,
- -264, -452, -111, 171, 229, 357, 355, 461, 509, 517, 489, 441, 347, 246, 158, 75,
- 67, -49, -340, -546, -758, -919, -876, -727, -658, -567, -492, -400, -234, -140, -63, 36,
- -142, 94, 514, 400, 406, 389, 379, 413, 391, 377, 354, 314, 245, 156, 94, 34,
- 97, -47, -316, -620, -874, -179, -206, -290, -304, -514, -690, -723, -503, -252, -73, 39,
- 485, 674, 532, 195, 38, -60, 17, 52, 63, 74, 85, 62, 35, -10, -22, -51,
- -105, -23, 287, 394, 469, 609, 706, 860, 933, 933, 874, 789, 638, 465, 297, 148,
- -223, -499, -837, -813, -391, -231, -178, -182, -81, 2, 84, 113, 131, 142, 127, 107,
- -64, 269, 879, 849, 1013, 1157, 1250, 1337, 1263, 1176, 1048, 900, 703, 502, 318, 165,
- 61, 1, -198, -209, -345, -417, -280, -280, -307, -272, -341, -418, -604, -738, -887, -394,
- 45, 77, 124, 152, 99, 43, 20, -4, -91, -85, -192, -280, -544, -754, -1176, -1296,
- 173, 69, -49, -226, -344, -479, -489, -618, -727, -909, -1122, -1446, -1292, -492, -205, 10,
- -80, -80, 338, 285, 123, 48, -76, -80, -105, -118, -108, -80, -58, -28, -9, -8,
- 74, -79, -292, -618, -756, 345, 216, 180, 143, -73, -186, -223, -200, -143, -52, -21,
- -253, -519, -578, -188, -96, -35, -7, 27, 133, 218, 258, 258, 231, 180, 120, 70,
- 273, 740, 950, 736, 701, 635, 611, 602, 566, 533, 494, 447, 350, 230, 131, 42,
- -100, -345, -702, -352, 709, 682, 485, 324, 161, 112, 148, 25, -88, -106, -86, -101,
- 307, 265, 253, 65, -63, -75, -169, -282, -390, -501, -550, -532, -406, -296, -186, -132,
- -26, 70, 50, -84, -89, 28, 106, 199, 305, 391, 450, 469, 419, 301, 191, 80,
- 22, 39, -154, -426, -597, -497, -159, -69, 41, 95, 114, 114, 99, 33, -7, -40,
- -162, -356, -511, -461, -475, -513, -477, -485, -395, -249, -136, -71, -4, 33, 54, 64,
- -82, -295, -562, 241, 65, -163, -227, -384, -237, -229, -266, -223, -94, 10, 41, 31,
- -104, -323, -302, 733, 646, 418, 271, 149, 155, 154, 119, 99, 89, 63, 13, -16
-};
-
-/* An 16-by-32 matrix in Scale = 2.56f */
-const Word16 AUWB2_MA1_fx[512] =
-{//Qlog2(2.56)
- 391, 298, 179, -37, -225, -387, -627, -864, -1216, -1644, -2108, -804, -277, -5, 121, 468,
- 351, 213, 141, -75, -130, -164, -332, -410, -524, -573, -575, -474, -331, -103, -22, 201,
- 81, 874, 1137, 1223, 1242, 1262, 1238, 1185, 1141, 1085, 993, 733, 570, 424, 256, 145,
- -6, -25, -105, -147, -327, -342, -587, -620, -954, -1143, -1878, -2059, -356, -100, 134, 477,
- -197, -505, -826, -1043, -863, -485, -296, -103, -6, 178, 269, 245, 231, 320, 243, 413,
- -518, -605, 282, 430, 532, 596, 676, 748, 808, 861, 834, 681, 534, 498, 293, 337,
- -244, -563, -720, -599, -500, -494, -627, -739, -1028, -1219, -297, 9, 71, 272, 285, 563,
- -448, -854, -916, -518, -287, -52, 56, 245, 347, 524, 557, 497, 416, 452, 321, 437,
- 150, 113, 28, -26, 1, -80, -177, -226, -193, -156, -62, -227, -240, -383, -535, -809,
- -240, -246, -174, -66, 80, 149, 244, 284, 413, 434, 473, 158, 56, -167, -326, -723,
- 131, -11, 141, 32, 24, -122, -397, -610, -888, -812, 30, 232, 306, 371, 341, 446,
- -158, -545, -529, 151, 142, -101, -426, -716, -1031, -1479, -1550, -352, -132, 145, 187, 517,
- 148, -104, -445, -841, -31, 183, -86, -316, -615, -660, -231, 84, 192, 275, 201, 311,
- -183, -220, -243, -182, -237, -176, -266, -233, -336, -339, -650, -1019, -1652, -846, -52, 387,
- -104, -117, -254, -332, -191, 1, 64, 182, 317, 495, 626, 574, 519, 508, 456, 505,
- -151, -237, 492, 479, 273, 139, 36, -60, -119, 74, 174, 188, 298, 366, 347, 478,
- 158, 23, -210, -450, -673, -637, -423, -331, -133, 14, 128, 69, 62, 143, 171, 313,
- 501, 394, 37, -57, 67, 70, 46, 35, 92, 120, 337, 258, 276, 283, 368, 500,
- 42, -157, -398, -600, -742, -780, -781, -980, -1166, -1629, -968, -149, -99, 188, 209, 529,
- -240, 190, 465, 543, 575, 565, 605, 596, 653, 599, 583, 279, 203, -51, -186, -589,
- 316, 371, 417, 372, 293, 189, 230, 154, 184, 91, 94, -175, -198, -358, -454, -736,
- 72, -159, -362, -499, -633, -690, -794, -739, -662, -456, -360, -338, -251, -6, 50, 346,
- -202, -332, -428, -462, -508, -440, -552, -647, -885, -1217, -1733, -619, -162, 95, 202, 510,
- -91, -391, -709, -884, -1012, -1001, -936, -714, -509, -198, 42, 99, 119, 261, 238, 496,
- -370, 92, 476, 604, 681, 762, 826, 893, 934, 1001, 954, 783, 629, 590, 412, 467,
- -193, -22, -28, 46, 214, 387, 502, 643, 728, 864, 859, 723, 581, 569, 435, 483,
- 223, 291, 633, 508, 350, 141, -156, -476, -930, -1417, -1809, -764, -206, 77, 191, 515,
- -475, -791, -417, 75, 201, 343, 408, 549, 612, 707, 686, 572, 463, 457, 321, 373,
- 842, 716, 669, 593, 419, 423, 373, 321, 273, 280, 354, 217, 193, 232, 175, 294,
- 116, -60, -144, -299, -421, -551, -732, -952, -1203, -1662, -1996, -537, -240, 55, 138, 486,
- -323, -665, -686, -214, -201, -260, -373, -329, -333, -165, 66, 96, 175, 310, 291, 486,
- -19, 43, 35, 40, 42, 55, 63, 101, 133, 194, 222, 152, 117, 145, 133, 213
-};
-
-const Word16 *const Quantizers_fx[] = { SVNB_SN1_fx, SVNB_SN2_fx, GETRNB_SN1_fx, GETRNB_SN2_fx, AUNB_SN1_fx,SVWB_SN1_fx, SVWB_SN2_fx, GETRWB_SN1_fx,
- GETRWB_SN2_fx, AUWB_SN1_fx,/* U13, */
- TRWB2_SN1_fx, TRWB2_SN2_fx, AUWB2_SN1_fx, CNG_SN1_fx, SVWB2_SN1_fx, SVWB2_SN2_fx
-};//Qlog2(2.56)
-
-const Word16 *const Quantizers_p_fx[] = { IAA_MA1_fx, UVD_MA1_fx, UVD_MA2_fx, UVWB_MA3_fx, GESVNB_AR1_fx, GESVNB_AR2_fx, GESVWB_AR1_fx, GESVWB_AR2_fx,
- GEWB2_MA1_fx,GEWB_MA1_fx, AUWB2_MA1_fx, SVWB2_AR1_fx, SVWB2_AR2_fx
-};//Qlog2(2.56)
-
-const Word16 vals_fx[NO_LEADERS][MAX_NO_VALS] = /*Q1 */
-{
- {2, 0, 0, 0},
- {1, 0, 0, 0},
- {2, 0, 0, 0},
- {4, 0, 0, 0},
- {3, 1, 0, 0},
- {2, 0, 0, 0},
- {4, 2, 0, 0},
- {3, 1, 0, 0},
- {2, 0, 0, 0},
- {4, 2, 0, 0},
- {4, 0, 0, 0},
- {3, 1, 0, 0},
- {5, 1, 0, 0},
- {4, 2, 0, 0},
- {4, 2, 0, 0},
- {6, 2, 0, 0},
- {3, 1, 0, 0},
- {5, 3, 1, 0},
- {4, 2, 0, 0},
- {4, 0, 0, 0},
- {6, 2, 0, 0},
- {3, 1, 0, 0},
- {5, 3, 1, 0},
- {4, 2, 0, 0},
- {4, 2, 0, 0},
- {6, 2, 0, 0},
- {6, 4, 2, 0},
- {3, 1, 0, 0},
- {5, 3, 1, 0},
- {5, 1, 0, 0},
- {7, 1, 0, 0},
- {4, 2, 0, 0},
- {4, 0, 0, 0},
- {6, 2, 0, 0},
- {6, 4, 2, 0},
- {8, 0, 0, 0},
- {3, 1, 0, 0},
- {5, 3, 1, 0},
- {5, 3, 1, 0},
- {7, 3, 1, 0},
- {4, 2, 0, 0},
- {6, 4, 2, 0},
- {6, 4, 2, 0},
- {6, 0, 0, 0},
- {8, 2, 0, 0},
- {3, 0, 0, 0},
- {5, 3, 1, 0},
- {5, 3, 1, 0},
- {7, 3, 1, 0},
-};
-
-const Word16 no_vals[NO_LEADERS]= {2,1,2,2,2,2,3,2,1,3,2,2,2,3,3,3,2,3,3,2,3,2,3,2,3,3,4,2,3,2,2,3,2,2,4,2,2,3,3,3,3,4,4,2,3,1,3,3,3}; // Q0
-
-const Word16 no_vals_ind[NO_LEADERS][MAX_NO_VALS]=
-{
- {2,6,0,0},
- {8,0,0,0},
- {4,4,0,0},
- {1,7,0,0},
- {1,7,0,0},
- {6,2,0,0},
- {1,2,5,0},
- {2,6,0,0},
- {8,0,0,0},
- {1,4,3,0},
- {2,6,0,0},
- {3,5,0,0},
- {1,7,0,0},
- {1,6,1,0},
- {2,2,4,0},
- {1,1,6,0},
- {4,4,0,0},
- {1,1,6,0},
- {2,4,2,0},
- {3,5,0,0},
- {1,3,4,0},
- {5,3,0,0},
- {1,2,5,0},
- {2,6,0,0},
- {3,2,3,0},
- {1,5,2,0},
- {1,1,1,5},
- {6,2,0,0},
- {1,3,4,0},
- {2,6,0,0},
- {1,7,0,0},
- {3,4,1,0},
- {4,4,0,0},
- {1,7,0,0},
- {1,1,3,3},
- {1,7,0,0},
- {7,1,0,0},
- {1,4,3,0},
- {2,1,5,0},
- {1,1,6,0},
- {4,2,2,0},
- {1,1,5,1},
- {1,2,1,4},
- {2,6,0,0},
- {1,2,5,0},
- {8,0,0,0},
- {1,5,2,0},
- {2,2,4,0},
- {1,2,5,0}
-}; // Q0
-
-
-const Word16 C_VQ[LATTICE_DIM+1][LATTICE_DIM+1] =
-{
- {1,0,0,0,0,0,0,0,0},
- {1,1,0,0,0,0,0,0,0},
- {1,2,1,0,0,0,0,0,0},
- {1,3,3,1,0,0,0,0,0},
- {1,4,6,4,1,0,0,0,0},
- {1,5,10,10,5,1,0,0,0},
- {1,6,15,20,15,6,1,0,0},
- {1,7,21,35,35,21,7,1,0},
- {1,8,28,56,70,56,28,8,1}
-};
-
-const Word16 C_VQ_fx[LATTICE_DIM + 1][LATTICE_DIM + 1] =
-{
- {1,0,0,0,0,0,0,0,0},
- {1,1,0,0,0,0,0,0,0},
- {1,2,1,0,0,0,0,0,0},
- {1,3,3,1,0,0,0,0,0},
- {1,4,6,4,1,0,0,0,0},
- {1,5,10,10,5,1,0,0,0},
- {1,6,15,20,15,6,1,0,0},
- {1,7,21,35,35,21,7,1,0},
- {1,8,28,56,70,56,28,8,1}
-}; // Q0
-
-const UWord32 table_no_cv[] = //Q0
-{
- 0, 112, 240, 1360, 1376, 2400, 4192, 5536, 9120, 9376, 18336, 18448, 25616, 26640, 33808, 40528, 40752,
- 49712, 56880, 83760, 84208, 88688, 95856, 117360, 124528, 142448, 153200, 155888, 159472, 195312, 198896, 199920, 235760, 236880,
- 238928, 274768, 274784, 275808, 311648, 333152, 340320, 367200, 410208, 423648, 423760, 425104, 425232, 446736, 500496, 522000, 0
-};
-//Q0
-const Word32 table_no_cv_fx[] = { 0, 112, 240, 1360, 1376, 2400, 4192, 5536, 9120, 9376, 18336, 18448, 25616, 26640, 33808, 40528, 40752,
- 49712, 56880, 83760, 84208, 88688, 95856, 117360, 124528, 142448, 153200, 155888, 159472, 195312, 198896, 199920,
- 235760, 236880, 238928, 274768, 274784, 275808, 311648, 333152, 340320, 367200, 410208, 423648,423760, 425104, 425232, 446736, 500496, 522000
- ,0
-}; // Q0
-
-
-const Word16 pi0[] =
-{
- 28,1,70,8,8,28,168,28,1,280,28,56,8,56,420,56, 70, 56,420, 56, 280, 56, 168, 28, 560, 168,336,28,280,28,8,
- 280,70, 8, 1120, 8, 8, 280, 168, 56, 420, 336, 840, 28, 168, 1, 168, 420, 168
-}; // Q0
-
-const Word16 pl_HQ_fx[] = /* Q1 vectors in first layers */
-{
- 2, 2, 0, 0, 0, 0, 0, 0, /* 112, 4, 28 */
- 1, 1, 1, 1, 1, 1, 1, 1, /* 128, 128, 1 */
- 2, 2, 2, 2, 0, 0, 0, 0, /* 1120, 16, 70 */
- 4, 0, 0, 0, 0, 0, 0, 0, /* 16 , 2, 8 */
- 3, 1, 1, 1, 1, 1, 1, 1, /* 5 */ /* 1024,128, 8 */
- 2, 2, 2, 2, 2, 2, 0, 0, /* 1792, 64, 28 */
- 4, 2, 2, 0, 0, 0, 0, 0, /* 1344, 8, 168 */
- 3, 3, 1, 1, 1, 1, 1, 1, /* 3584, 128, 28*/
- 2, 2, 2, 2, 2, 2, 2, 2, /*256, 256, 1*/
- 4, 2, 2, 2, 2, 0, 0, 0, /* 10 */ /* 8960, 32, 280 */
- 4, 4, 0, 0, 0, 0, 0, 0, /* 112, 4, 28 */
- 3, 3, 3, 1, 1, 1, 1, 1, /* 7168, 128, 56 */
- 5, 1, 1, 1, 1, 1, 1, 1, /* 1024, 128, 8*/
- 4, 2, 2, 2, 2, 2, 2, 0, /* 7168, 128, 56*/
- 4, 4, 2, 2, 0, 0, 0, 0, /* 15 */ /* 6720, 16, 420 */
- 6, 2, 0, 0, 0, 0, 0, 0, /* 224, 4, 56 */
- 3, 3, 3, 3, 1, 1, 1, 1, /* 8960, 128, 70 */
- 5, 3, 1, 1, 1, 1, 1, 1, /* 7168, 128, 56*/
- 4, 4, 2, 2, 2, 2, 0, 0, /* 26880, 64, 420 */
- 4, 4, 4, 0, 0, 0, 0, 0, /*20 */ /* 448, 8, 56 */
- 6, 2, 2, 2, 0, 0, 0, 0, /* 4480, 16, 280 */
- 3, 3, 3, 3, 3, 1, 1, 1, /* 7168, 128, 56 */
- 5, 3, 3, 1, 1, 1, 1, 1, /* 21504, 128, 168 */
- 4, 4, 2, 2, 2, 2, 2, 2, /* 7168, 256, 28 */
- 4, 4, 4, 2, 2, 0, 0, 0, /* 25 */ /* 17920, 32, 560 */
- 6, 2, 2, 2, 2, 2, 0, 0, /* 10752, 64, 168 */
- 6, 4, 2, 0, 0, 0, 0, 0, /* 2688, 8, 336 */
- 3, 3, 3, 3, 3, 3, 1, 1, /* 3584, 128, 28 */
- 5, 3, 3, 3, 1, 1, 1, 1, /* 35840,128,280*/
- 5, 5, 1, 1, 1, 1, 1, 1, /*30 */ /* 3584, 128, 28*/
- 7, 1, 1, 1, 1, 1, 1, 1, /* 1024,128, 8 */
- 4, 4, 4, 2, 2, 2, 2, 0,
- 4, 4, 4, 4, 0, 0, 0, 0,
- 6, 2, 2, 2, 2, 2, 2, 2,
- 6, 4, 2, 2, 2, 0, 0, 0,
- 8, 0, 0, 0, 0, 0, 0, 0,
- 3, 3, 3, 3, 3, 3, 3, 1,
- 5, 3, 3, 3, 3, 1, 1, 1,
- 5, 5, 3, 1, 1, 1, 1, 1,
- 7, 3, 1, 1, 1, 1, 1, 1,
- 4, 4, 4, 4, 2, 2, 0, 0,
- 6, 4, 2, 2, 2, 2, 2, 0,
- 6, 4, 4, 2, 0, 0, 0, 0,
- 6, 6, 0, 0, 0, 0, 0, 0,
- 8, 2, 2, 0, 0, 0, 0, 0,
- 3, 3, 3, 3, 3, 3, 3, 3,
- 5, 3, 3, 3, 3, 3, 1, 1,
- 5, 5, 3, 3, 1, 1, 1, 1,
- 7, 3, 3, 1, 1, 1, 1, 1
-};
-/*----------------------------------------------------------------------------------*
- * LSF quantization for CNG
- *----------------------------------------------------------------------------------*/
-
-const Word16 cng_sort[] = {/*5f */1,1,0,1,0,0, /* 4f */0,1,0,1,0,0,1,1,1,1}; // Q0
-
-
-const Word16 perm_MSLVQ[][4] =
-{
- /* 5f*/
- {6,11,7,15},
- {6,15,-1,0},
- {5,8,7,15},
- {7,10,-1,0},
- {-1,0,0,0},
- {-1,0,0,0},
- /* 4f */
- {-1,0,0,0},
- {0,9,7,10},
- {-1,0,0,0},
- {7,15,-1,0},
- {-1,0,0,0},
- {-1,0,0,0},
- {6,10,7,11},
- {6,11,7,12},
- {6,11,7,12},
- {6,11,7,12}
-}; // Q0
-
-const Word16 pl_par[] = /* 1 if even number of signs */
-{
- 0, 1, 0, 0, -1, 0, 0, 1, 0, 0,
- 0, -1, 1, 0, 0, 0, 1, -1, 0, 0,
- 0, -1, 1, 0, 0, 0, 0, 1, -1, 1, -1, 0,
- 0, 0, 0, 0, -1, 1, -1, 1, 0, 0, 0, 0, 0, 1, -1, 1, -1
-}; // Q0
-
-const Word16 scales_fx[][6] =//Q11
-{
- {3129, 0, 0, 3138, 0, 0, }, /* 14 */
- {3287, 0, 0, 3138, 0, 0, }, /* 15 */
- {2611, 5034, 0, 3138, 0, 0, },
- {2611, 5034, 0, 3340, 0, 0, },
- {2165, 3674, 5931, 2363, 3809, 6281, },
- {1898, 2986, 4745, 2116, 3668, 7045, }, /* 28 */ /* mode 0 UV WB*/
- {2630, 5480, 0, 2972, 0, 0, },
- {2802, 0, 0, 2869, 5073, 0, },
- {1763, 2546, 3723, 2515, 4559, 21109, },
- {2195, 3961, 7440, 2501, 6017, 21961, },
- {1841, 2902, 1386, 2116, 3762, 22309, },
- {1700, 2710, 1288, 1866, 3246, 20660, }, /* 32 */ /* mode 1 UV NB*/
-
-
- {3222, 0, 0, 3391, 0, 0, },
- {2537, 4923, 0, 3187, 0, 0, },
- {2161, 3482, 9091, 3391, 0, 0, },
- {2560, 4923, 8462, 2775, 4835, 0, },
- {2163, 3656, 9263, 2699, 5296, 0, },
- {2040, 3082, 6871, 2427, 3637, 5587, },
- {1903, 2841, 6875, 2212, 3484, 5908, },
- {1888, 3058, 6900, 2212, 3484, 5908, },
- {1888, 3058, 6900, 2183, 3469, 6420, },
- {1888, 3058, 6900, 1970, 3174, 8081, },
- {1528, 2269, 5876, 1964, 3033, 8002, },
- {1577, 2445, 5782, 1858, 2871, 4334, },
-
- {1532, 2259, 5870, 2421, 1661, 6824, }, /* 34 */
-
- {1386, 1972, 4356, 1487, 2216, 4514, }, /* 37 */ /* mode 2 V WB*/
- {3357, 0, 0, 2494, 4426, 0, },
- {2634, 5009, 0, 2888, 0, 0, },
- {2224, 3539, 7696, 2494, 4426, 0, },
- {2120, 3226, 9861, 2494, 4426, 0, },
- {1974, 3140, 10121, 2494, 4426, 0, },
- {1722, 2454, 4059, 2494, 4426, 0, },
- {1839, 2658, 4473, 2490, 5456, 0, },
- {1722, 2533, 4581, 2038, 3394, 5808, },
-
- {1427, 2009, 4184, 1915, 3082, 1350, },
- {1370, 1862, 2720, 2017, 1339, 3914, }, /* 37 */ /* mode 3 V NB */
-
- {2482, 3885, 0, 0, 0, 0, },
- {3346, 0, 0, 3418, 0, 0, },
- {2638, 4962, 0, 3418, 0, 0, },
- {2482, 3885, 0, 3418, 0, 0, },
- {2218, 3617, 6502, 3418, 0, 0, },
- {2124, 3295, 8659, 3418, 0, 0, },
- {2243, 3398, 5562, 2693, 5132, 0, },
- {1927, 2839, 4549, 2693, 5132, 0, },
- {1860, 2675, 3893, 2703, 5372, 0, },
- {2202, 3619, 1618, 2703, 5372, 0, },
- {2093, 3135, 1554, 2273, 3594, 5313, },
- {2202, 3619, 1618, 2238, 3895, 6173, },
- {1829, 3015, 1382, 2259, 3625, 5820, },
- {1864, 3170, 1403, 2114, 3381, 5147, },
- {1692, 2572, 1294, 2009, 3158, 4540, }, /* 32 (31.995) */ /* G WB*/
- {2425, 3707, 5655, 0, 0, 0, },
- {3299, 0, 0, 3314, 0, 0, },
- {2425, 3707, 5655, 3174, 0, 0, },
- {2425, 3707, 5655, 3314, 0, 0, },
- {2177, 3557, 6113, 3314, 0, 0, },
- {2208, 3738, 6476, 3009, 4606, 0, },
- {2816, 1874, 4264, 3009, 4606, 0, },
- {1966, 2914, 1434, 2683, 4366, 0, },
- {2302, 1626, 3895, 2628, 4714, 0, },
- {2206, 3537, 1571, 2560, 3996, 6105, },
- {1911, 3013, 1403, 2560, 3996, 6105, },
- {1898, 3277, 1380, 2363, 3637, 5845, },
- {2144, 1479, 3656, 2163, 3363, 5532, },
- {1989, 1409, 3090, 2136, 3543, 6003, },
- {1882, 1356, 2800, 2165, 3703, 6285, }, /* 32 (31.987) */ /* G NB*/
- {3312, 0, 0, 3394, 0, 0, },
- {2611, 4706, 0, 3201, 0, 0, },
- {2679, 4821, 0, 2841, 0, 0, },
- {2644, 4952, 0, 2775, 5003, 0, },
- {2210, 3623, 6169, 2841, 0, 0, },
- {2210, 3623, 6169, 2714, 5233, 0, },
- {1837, 2744, 5333, 2191, 3459, 5175, },
- {1837, 2744, 5333, 1923, 2978, 4266, },
- {1853, 2718, 5323, 2271, 1591, 3492, },
- {1561, 2255, 4831, 1923, 2978, 4266, },
- {1626, 2511, 6513, 2271, 1591, 3492, }, /* 33 */
- /* mode 6 T WB */
- {3336, 0, 0, 2439, 4528, 0, },
- {2615, 5237, 0, 2800, 0, 0, },
- {2216, 3607, 8047, 2439, 4528, 0, },
- {2085, 3144, 5751, 2439, 4528, 0, },
- {1933, 3025, 5659, 2439, 4528, 0, },
- {1864, 3572, 6793, 2439, 4528, 0, },
- {1884, 3375, 6283, 1985, 3447, 8096, },
- {1513, 2275, 5517, 1800, 2890, 4721, },
- {1452, 2114, 5564, 1659, 2550, 3736, }, /* 32 */ /* mode 7 T NB */
-
- {1552, 2286, 4022, 2497, 4139, 1634,},
- {1432, 2118, 4051, 2497, 4139, 1634, }, /* 32 */ /* mode 8 G 16k */
-
- {1487, 2150, 3779, 2775, 1761, 4516, },
- {1386, 2042, 3418, 2775, 1761, 4516, }, /* 33 (32.983) */ /* T 16k */
-
- {3371, 0, 0, 2568, 5036, 0, },
- {2198, 3815, 6617, 3437, 0, 0, },
- {2198, 3815, 6617, 2568, 5036, 0, },
- {1948, 3056, 5112, 2570, 6085, 0, },
- {2351, 3770, 1665, 2570, 6085, 0, }, /* 26 */
- {1233, 1780, 2904, 2589, 1565, 4542, }, /* 36 */ /* mode 10 AUDIO_WB 36 + 4 + 1 */
-
- {1747, 3623, 9062, 0, 0, 0, },
- {2071, 3406, 9017, 3232, 0, 0, },
- {2071, 3406, 9017, 2462, 4964, 0, },
- {1804, 3314, 8471, 2462, 4964, 0, },
- {1735, 3668, 9146, 2462, 4964, 0, }, /* 27 */ /* AUDIO_NB */
- {1372, 2277, 4893, 2462, 4964, 0, }, /* 28 */ /* AUDIO_NB */
- {2316, 3717, 1630, 2591, 5722, 0, },
- {1167, 1647, 2451, 2380, 3992, 1491, }, /* 36 */ /* mode 12 AUDIO_WB 16k 15-36 + 4 + 1*/
- {2140, 3248, 7688, 3418, 0, 0, },
- {1802, 2621, 5784, 2251, 3553, 0, },
- {1702, 2488, 5994, 2230, 3498, 5077, },
- {1782, 2718, 5951, 2183, 3521, 5480, },
-
- {1581, 2298, 4815, 2961, 1933, 4243, },
-
- {1436, 2001, 3559, 1939, 2976, 4264, },
-
- {1473, 2091, 3484, 2292, 1626, 3473, },
-
- {1311, 1810, 3547, 1546, 2232, 3170, }, /* 37 (36.995) */ /* VOICED 16k */
- {2494, 1630, 4676, 2642, 6810, 0, },
- {3256, 1710, 9085, 2247, 6287, 0, },
-
- {2036, 5360, 0, 2234, 4573, 7080, },
- {1817, 3222, 7256, 2228, 3742, 6281, },
- {1714, 2535, 3897, 2658, 5728, 0, },
- {2331, 5788, 0, 2265, 5726, 8993, },
- {1927, 3955, 9161, 1395, 2593, 4768, },
- {2769, 8872, 0, 1679, 3164, 8550, },
- {2750, 7387, 0, 1759, 2976, 5304, },
- {2474, 5612, 0, 1554, 2540, 4469, },
- {2300, 5603, 0, 1790, 3068, 5296, },
- {1882, 5061, 0, 1260, 2195, 4293, },
- {3170, 9232, 0, 1690, 4461, 8817, },
- {2492, 5935, 0, 1509, 2492, 3953, },
-
- {1999, 4485, 11706, 3084, 1315, 8624, },
- {2267, 5315, 0, 2666, 1237, 1802}, /* CNG */
-
-};/* An 6-by-146 matrix in Scale = 2048.00f */
-
-const Word16 scales_p_fx[][6] =
-{//Q11
- {2998, 4862, 0, 0, 0, 0, },
- {2591, 5251, 0, 3355, 0, 0, },
- {2177, 3488, 5745, 2650, 4819, 0, },
- {2177, 3926, 6273, 2796, 0, 0, },
- {1872, 2892, 4553, 2650, 4819, 0, },
- {1806, 2869, 4919, 2689, 4999, 0, },
- {2777, 1776, 4868, 2191, 3453, 5214, },
- {1733, 2761, 5214, 2204, 3568, 5444, },
- {1731, 2824, 5255, 2087, 3230, 5003, },
- {1548, 2435, 5732, 2220, 3695, 5648, },
- {1546, 2494, 5777, 1933, 2935, 4041, },
- {1483, 2529, 6025, 2570, 1737, 4096, },
- {1407, 2279, 4788, 1747, 2720, 3981, },
- {1327, 2107, 3760, 1749, 2777, 4016, },
- {1327, 2107, 3760, 1407, 2167, 3891, }, /* 39 (38.488) */ /* V WB*/ /* 14 */
- {3303, 0, 0, 0, 0, 0, },
- {2595, 5069, 0, 3316, 0, 0, },
- {2077, 3338, 5046, 2632, 4405, 0, },
- {1829, 2847, 4739, 3000, 4708, 0, },
- {1905, 2869, 4403, 2621, 4616, 0, },
- {1829, 2847, 4739, 2613, 4518, 6111, },
- {1829, 2847, 4739, 2122, 3371, 5061, },
- {1755, 2738, 5046, 2136, 3543, 5376, },
- {1567, 2497, 3181, 2122, 3371, 5061, },
- {1616, 2720, 3383, 2154, 3654, 5542, },
- {1565, 2507, 3185, 1884, 2955, 4168, },
- {1358, 2173, 2535, 2824, 1839, 3996, },
- {1378, 2261, 2675, 2578, 1696, 4002, },
- {1364, 2193, 2558, 1645, 2542, 3541, },
- {1348, 2128, 2486, 1946, 1333, 2927, }, /* 39 (38.512) */ /* V NB*/ /* 29 */
- {3277, 0, 0, 3181, 0, 0, },
- {2322, 4067, 6748, 3181, 0, 0, },
- {2021, 3662, 5446, 3373, 0, 0, },
- {1841, 3281, 5282, 3373, 0, 0, },
- {1632, 2650, 4383, 3373, 0, 0, },
- {1632, 2650, 4383, 2734, 4557, 0, },
- {1518, 2357, 3719, 2734, 4557, 0, },
- {1632, 2650, 4383, 2429, 3957, 0, },
- {1518, 2357, 3719, 2384, 3734, 5671, },
- {1450, 2306, 4000, 2204, 3543, 5687, },
- {1352, 2148, 3217, 2204, 3543, 5687, },
- {1356, 2101, 3183, 2200, 3918, 6189, },
- {1352, 2148, 3217, 2947, 1896, 4364, },
- {1290, 1978, 3117, 2687, 1804, 4520, },
- {1264, 1886, 2963, 2114, 3172, 1548, }, /* 35 (34.994) */ /* G WB*/ /* 44 */
- {3267, 0, 0, 3076, 0, 0, },
- {2300, 3985, 7643, 3076, 0, 0, },
- {2116, 4250, 8886, 2906, 5009, 0, },
- {2017, 3672, 12216, 2623, 4760, 0, },
- {1804, 3289, 14326, 2906, 5009, 0, },
- {1729, 3240, 14377, 2623, 4760, 0, },
- {1616, 3113, 14752, 2623, 4760, 0, },
- {1780, 3168, 14326, 2109, 3592, 6353, },
- {1673, 3056, 14582, 2109, 3592, 6353, },
- {1546, 2830, 14608, 2109, 3592, 6353, },
- {1446, 2693, 14797, 2109, 3592, 6353, },
- {1411, 2654, 14930, 2081, 3840, 6633, },
- {1430, 2611, 14764, 1872, 3170, 4983, },
- {1391, 2693, 14930, 2517, 3779, 1665, },
- {1391, 2693, 14930, 2433, 1581, 4004, }, /* 35 (34.952) */ /* G NB*/ /* 59 */
-
- {2070, 3639, 5652, 3305, 0,0,},
- {1747, 2830, 4231, 2550, 5487, 0,},
- {2472, 1593, 4522, 2550, 5487, 0,},
- {2472, 1593, 4522, 2075, 3752, 6253},
- {2472, 1593, 4522, 2908, 1786, 4772,},
- {1075, 1577, 2198, 1669, 2533, 1161}, /* 40 (39.990) */ /* AUDIO_WB */ /* 65 */
-
- {2191, 3668, 7993, 3275, 0, 0, },
- {1679, 2492, 4278, 2570, 4690, 0, },
- {1597, 2394, 5110, 2570, 4690, 0, },
- {2202, 1481, 4835, 2273, 4016, 7150, },
-
- {1415, 2107, 4786, 2118, 3668, 8200, }, /* 31 */ /*AUDIO_NB */ /* 70 */
- {1374, 2204, 5337, 1956, 3168, 5149, }, /* 32 */ /*AUDIO_NB */ /* 71 */
- {2425, 4336, 1589,3420, 2165, 1380, },
- {1067, 1530, 2116, 1630, 2730, 1110,}, /* 40 */ /* mode AUDIO_WB 16k */ /* 73*/
-
- {3439, 0, 0, 2626, 5061, 0, },
- {2228, 3787, 6543, 3455, 0, 0, },
- {2228, 3787, 6543, 2626, 5061, 0, },
- {2306, 3459, 1618, 2626, 5061, 0, },
- {1905, 2830, 1397, 2626, 5061, 0, },
- {2284, 1626, 3793, 2623, 6212, 0, },
- {1720, 2818, 1276, 1638, 2900, 8724, }, /* 36 (35.998) */ /* INACTIVE NB */
- {1640, 2351, 3690, 0, 0, 0, },
- {2230, 3711, 6496, 3434, 0, 0, },
- {2230, 3899, 6597, 3115, 5396, 0, },
- {1731, 2482, 3961, 2689, 4954, 0, },
- {1595, 2243, 3482, 2689, 4954, 0, },
- {1481, 2079, 3408, 2689, 4954, 0, },
- {1829, 1335, 2945, 2204, 1475, 3674, }, /* 36 (35.929) */ /* INACTIVE WB*/
- {2783, 4723, 0, 3418, 0, 0, },
- {2206, 3946, 7262, 3418, 0, 0, },
- {2206, 4162, 7328, 2927, 5552, 0, },
- {1706, 2566, 4311, 2628, 5235, 0, },
- {1589, 2359, 3805, 2628, 5235, 0, },
- {1473, 2183, 3547, 2628, 5235, 0, },
- {1927, 1333, 3205, 1479, 2437, 3973, }, /* 36 (35.915) */ /* INACTIVE 16k*/
-
- {2646, 5077, 0, 3156, 0, 0, },
- {2462, 3897, 0, 3156, 0, 0, },
- {2105, 3361, 5028, 3375, 0, 0, },
- {2554, 1798, 4770, 3375, 0, 0, },
- {1767, 2781, 5165, 3375, 0, 0, },
- {1673, 2503, 4116, 2200, 3656, 5597, },
- {1669, 1253, 2623, 2161, 3531, 6046, }, /* 32 (31.990) */ /* UNVOICED NB*/
-
- {3164, 0, 0, 3170, 0, 0, },
- {3359, 0, 0, 3170, 0, 0, },
- {2636, 5630, 0, 3170, 0, 0, },
- {2636, 5630, 0, 3387, 0, 0, },
- {2437, 4149, 0, 3387, 0, 0, },
- {1907, 2986, 5018, 2650, 5616, 0, },
- {1796, 2859, 5605, 2214, 3719, 6881, }, /* 28 (27.996) */ /* UNVOICED WB */
- {2316, 3351, 0, 2808, 0, 0, },
- {1913, 2615, 1491, 2370, 3475, 0, },
- {1706, 2380, 1348, 2357, 3455, 0, },
- {1538, 2114, 1225, 2357, 3455, 0, },
- {1452, 2058, 1167, 2171, 3629, 5569, },
- {1528, 2050, 1231, 2056, 3693, 5923, },
- {1522, 2048, 1227, 1917, 3811, 5886, },
- {1587, 1257, 2124, 1630, 2671, 3901, }, /* 39 (38.301) */ /* VOICED 16k */
- {1831, 2742, 5220, 2679, 5327, 0, },
- {1475, 2073, 3273, 3097, 1896, 4377, },
- {1395, 1993, 3377, 2828, 1794, 4360, },
- {1401, 1974, 3359, 2392, 3637, 1612, },
- {1368, 1915, 3176, 2081, 3109, 1458, },
- {1350, 1866, 2918, 2738, 1821, 1315, },
- {1350, 1866, 2918, 1718, 2636, 1243, }, /* 37 (36.989) */ /* GENERIC 16k*/
- {3344, 0, 0, 3455, 0, 0, },
- {2204, 3666, 6025, 3455, 0, 0, },
- {1708, 2517, 3871, 3455, 0, 0, },
- {1921, 2875, 4409, 2675, 5386, 0, },
- {2744, 1815, 4751, 2675, 5386, 0, },
- {1706, 2560, 3908, 2675, 5386, 0, },
- {1706, 2484, 3836, 2304, 3766, 5773, },
- {1567, 2380, 3461, 2097, 3559, 5812, },
- {1485, 2150, 3668, 3031, 1888, 6357, },
- {1458, 2073, 3172, 3060, 1849, 6889, },
- {1350, 1898, 2779, 3060, 1849, 6889, },
- {1683, 1257, 2638, 1864, 3090, 4618, },
- {1722, 1278, 2617, 2378, 1561, 3703, },
- {1716, 1274, 2593, 2212, 1456, 3502, },
- {1704, 1268, 2611, 1921, 2929, 1319, }, /* 37 (36.971) */ /* GENERIC 12.8k MA*/
- {1810, 2763, 5263, 2691, 5343, 0, },
- {1456, 2085, 3308, 3035, 1886, 7027, },
-
- {1391, 1995, 3398, 1942, 3172, 7062, },
-
- {1702, 1266, 3033, 1911, 3101, 4731, },
- {1671, 1249, 2871, 2920, 1796, 4639, },
- {1612, 2574, 1221, 1759, 2963, 4979, },
- {1612, 2574, 1221, 2265, 1505, 3398}, /* 37 (36.993) */ /* AUDIO 16k */
-
-};
-
-const Word16 sigma_MSLVQ_fx[][16] =
-{//Qlog2(2.56)
- {3},
- {3},
- {107, 113, 160, 185, 202, 211, 219, 222, 222, 217, 218, 270, 327, 176, 66, 43},
- {125, 130, 182, 185, 191, 199, 204, 207, 205, 191, 179, 227, 305, 261, 95, 64},
- {123, 123, 176, 197, 207, 218, 228, 235, 232, 218, 209, 272, 342, 216, 89, 68},
- {219, 212, 255, 271, 273, 274, 260, 255, 250, 248, 249, 302, 328, 394, 85, 37},
- {3},
- {3},
- {113, 134, 220, 253, 260, 275, 274, 287, 304, 323, 321, 325, 349, 350, 376, 332},
- {158, 179, 242, 248, 246, 259, 257, 267, 278, 274, 276, 289, 309, 309, 312, 306},
- {146, 146, 222, 256, 261, 278, 290, 302, 318, 313, 323, 352, 394, 407, 415, 399},
- {217, 227, 287, 303, 316, 310, 296, 304, 303, 305, 317, 327, 355, 321, 305, 279},
- {3},
- {3},
- {193, 216, 283, 320, 343, 359, 375, 408, 413, 445, 479, 489, 502, 466, 456, 479},
- {230, 238, 312, 330, 334, 329, 339, 357, 353, 358, 391, 403, 441, 459, 379, 497},
- {231, 277, 304, 322, 347, 353, 366, 372, 373, 397, 438, 451, 424, 413, 381, 447},
- {264, 287, 364, 386, 384, 373, 382, 373, 393, 403, 448, 438, 403, 430, 401, 586},
- {224, 298, 262, 264, 258, 244, 260, 283, 313, 295, 275, 279, 260, 286, 286, 399},
- {411, 314, 301, 332, 335, 343, 356, 409, 430, 413, 363, 364, 338, 332, 315, 412},
- {136, 269, 343, 367, 405, 430, 411, 421, 444, 466, 435, 423, 328, 247, 235, 240},
- {178, 433, 305, 268, 258, 252, 253, 246, 250, 250, 245, 256, 242, 273, 300, 371},
- {349, 334, 335, 341, 336, 331, 343, 425, 505, 722, 783, 655,1006, 862, 346, 248},
- {315, 306, 323, 306, 300, 278, 276, 287, 380, 394, 327, 333, 339, 382, 370, 626},
- {236, 250, 241, 231, 241, 245, 238, 221, 215, 190, 181, 178, 183, 428, 184, 55},
- {113, 189, 360, 312, 332, 326, 296, 268, 272, 282, 320, 275, 219, 203, 179, 143},
- {273, 255, 245, 237, 242, 236, 214, 217, 223, 260, 233, 193, 187, 183, 174, 163},
- {111, 321, 275, 219, 213, 207, 202, 205, 205, 225, 239, 208, 192, 187, 168, 152},
- {383, 326, 300, 287, 290, 292, 276, 251, 258, 291, 430, 521, 397, 305, 274, 269},
- {152, 221, 271, 291, 344, 310, 308, 257, 252, 256, 339, 491, 499, 199, 179, 107},
- {226, 237, 236, 239, 250, 238, 228, 223, 227, 241, 311, 312, 299, 313, 421, 360},
- {221, 238, 214, 220, 246, 244, 232, 221, 210, 208, 200, 229, 368, 431, 106, 71},
- {249, 259, 267, 283, 278, 275, 251, 237, 203, 209, 198, 279, 543, 509, 122, 90},
- {192, 249, 256, 235, 231, 230, 213, 215, 210, 247, 284, 237, 214, 210, 199, 181},
-};
-
-/* An 16-by-33 matrix in Scale = 32768.00f */
-const Word16 inv_sigma_MSLVQ_fx[][16] =//Q15
-{
- {32767},
- {32767},
- {783, 746, 523, 453, 416, 397, 384, 378, 378, 386, 384, 310, 256, 477, 1273, 1935},
- {670, 647, 461, 452, 440, 421, 412, 405, 410, 440, 468, 369, 275, 321, 883, 1305},
- {679, 682, 477, 426, 405, 385, 368, 357, 362, 385, 401, 308, 245, 388, 942, 1231},
- {383, 395, 329, 309, 307, 307, 322, 329, 335, 338, 337, 278, 256, 213, 989, 2243},
- {32767},
- {32767},
- {740, 628, 382, 332, 322, 305, 306, 292, 276, 259, 261, 258, 240, 240, 223, 253},
- {530, 469, 346, 338, 341, 323, 326, 314, 302, 306, 304, 290, 271, 272, 269, 274},
- {576, 576, 378, 327, 322, 302, 289, 278, 264, 268, 259, 238, 213, 206, 202, 210},
- {386, 370, 292, 277, 266, 271, 284, 276, 276, 275, 264, 257, 236, 262, 275, 300},
- {32767},
- {32767},
- {435, 389, 296, 262, 244, 233, 223, 205, 203, 188, 175, 172, 167, 180, 184, 175},
- {365, 352, 268, 254, 251, 255, 247, 235, 237, 234, 214, 208, 190, 183, 221, 169},
- {363, 302, 276, 261, 241, 237, 229, 226, 225, 211, 191, 186, 198, 203, 220, 188},
- {318, 292, 230, 218, 218, 225, 219, 225, 213, 208, 187, 192, 208, 195, 209, 143},
- {374, 281, 320, 318, 325, 344, 322, 296, 268, 284, 305, 301, 322, 294, 293, 210},
- {204, 267, 279, 253, 250, 245, 235, 205, 195, 203, 231, 231, 248, 252, 266, 204},
- {616, 312, 245, 229, 207, 195, 204, 199, 189, 180, 193, 198, 256, 340, 356, 349},
- {471, 194, 275, 313, 325, 333, 332, 342, 335, 336, 342, 328, 347, 307, 280, 226},
- {241, 251, 250, 246, 250, 254, 245, 197, 166, 116, 107, 128, 83, 97, 242, 339},
- {266, 274, 259, 274, 279, 302, 304, 292, 221, 213, 257, 252, 247, 219, 227, 134},
- {355, 336, 348, 363, 348, 342, 353, 379, 391, 442, 462, 472, 458, 196, 456,1518},
- {744, 443, 233, 269, 253, 257, 283, 313, 308, 298, 262, 305, 383, 413, 469, 585},
- {308, 330, 343, 353, 347, 356, 392, 387, 376, 322, 359, 435, 448, 458, 482, 514},
- {756, 261, 305, 384, 394, 406, 415, 409, 409, 372, 352, 403, 438, 448, 498, 552},
- {219, 257, 280, 293, 289, 288, 304, 335, 325, 289, 195, 161, 211, 275, 306, 312},
- {550, 380, 309, 288, 244, 271, 272, 326, 332, 328, 248, 171, 168, 421, 468, 781},
- {371, 355, 356, 350, 336, 353, 368, 376, 369, 348, 269, 269, 281, 268, 199, 233},
- {380, 353, 392, 381, 342, 344, 362, 379, 399, 403, 420, 367, 228, 195, 789,1184},
- {337, 324, 314, 297, 301, 305, 335, 354, 414, 401, 425, 301, 154, 165, 690, 927},
- {438, 337, 327, 357, 363, 365, 394, 390, 400, 340, 295, 354, 392, 399, 421, 462},
-};
-
-/* An 16-by-19 matrix in Scale = 32768.00f */
-const Word16 inv_sigma_p_fx[][16] =//Q15
-{
- {552, 513, 469, 494, 486, 478, 492, 496, 496, 482, 480, 388, 339, 276, 743, 760},
- {640, 492, 472, 478, 482, 471, 470, 471, 623, 504, 501, 477, 459, 425, 421, 408},
- {1001, 939, 696, 589, 545, 480, 456, 451, 444, 462, 472, 424, 342, 441, 1567, 3002},
- {609, 534, 419, 432, 444, 403, 406, 407, 391, 425, 452, 378, 269, 278, 818, 1939},
- {32767},
- {574, 507, 459, 432, 425, 415, 440, 442, 449, 450, 490, 443, 299, 270, 1377, 2451},
- {591, 499, 456, 457, 449, 441, 448, 446, 443, 436, 420, 397, 364, 342, 496, 475},
- {482, 512, 498, 426, 280, 225, 422, 1411, 404, 404, 402, 385, 364, 342, 355, 361},
- {917, 831, 572, 507, 482, 430, 406, 399, 385, 365, 364, 344, 313, 309, 311, 335},
- {533, 436, 371, 399, 398, 368, 367, 348, 343, 342, 338, 319, 306, 305, 311, 334},
- {32767},
- {641, 523, 458, 434, 415, 410, 412, 395, 397, 394, 386, 381, 366, 392, 413, 419},
- {449, 380, 364, 366, 354, 362, 362, 356, 337, 323, 293, 296, 336, 352, 353, 283},
- {32767},
- {601, 485, 348, 262, 267, 266, 276, 285, 255, 233, 227, 235, 216, 237, 233, 212},
- {338, 279, 247, 244, 233, 239, 231, 232, 228, 215, 194, 194, 207, 210, 222, 180},
- {32767},
- {594, 466, 394, 376, 362, 358, 346, 350, 336, 332, 313, 329, 343, 358, 370, 419},
- {471, 409, 323, 325, 308, 295, 305, 290, 281, 280, 271, 262, 251, 255, 266, 312},
-};
-
-const Word16 sigma_p_fx[][16] =
-{//Qlog2(2.56)
- {152, 164, 179, 170, 172, 176, 171, 169, 169, 174, 175, 216, 247, 304, 113, 110},
- {131, 171, 178, 176, 174, 178, 178, 178, 135, 166, 167, 176, 183, 197, 199, 206},
- {84, 89, 120, 142, 154, 175, 184, 186, 189, 181, 178, 198, 245, 190, 54, 28},
- {138, 157, 200, 194, 189, 208, 207, 206, 214, 197, 186, 222, 311, 302, 103, 43},
- {3},
- {146, 165, 183, 194, 197, 202, 191, 190, 187, 186, 171, 189, 281, 311, 61, 34},
- {142, 168, 184, 183, 187, 190, 187, 188, 189, 193, 200, 212, 231, 245, 169, 177},
- {174, 164, 168, 197, 300, 372, 199, 59, 208, 208, 209, 218, 231, 246, 237, 232},
- {91, 101, 147, 165, 174, 195, 207, 210, 218, 230, 230, 244, 268, 272, 269, 250},
- {157, 192, 226, 210, 211, 228, 228, 241, 245, 246, 248, 263, 274, 275, 270, 251},
- {3},
- {131, 160, 183, 193, 202, 205, 203, 212, 212, 213, 217, 220, 229, 214, 203, 200},
- {187, 221, 231, 229, 237, 232, 232, 236, 249, 259, 286, 284, 250, 238, 238, 296},
- {3},
- {140, 173, 241, 320, 314, 315, 304, 295, 329, 359, 369, 357, 388, 354, 359, 396},
- {248, 300, 339, 344, 360, 350, 363, 361, 368, 391, 431, 433, 406, 400, 377, 467},
- {3},
- {141, 180, 213, 223, 232, 234, 242, 240, 250, 253, 268, 255, 245, 235, 227, 200},
- {178, 205, 259, 258, 273, 285, 275, 289, 299, 300, 310, 320, 335, 329, 316, 269},
-};
-
-const Word16 sigma_p_ivas_fx[][16] =
-{//Qlog2(2.56)
- {152, 164, 179, 170, 172, 176, 171, 169, 169, 174, 175, 216, 247, 304, 113, 110},
- {131, 171, 178, 176, 174, 178, 178, 178, 135, 166, 167, 176, 183, 197, 199, 206},
- {84, 89, 120, 142, 154, 175, 184, 186, 189, 181, 178, 198, 245, 190, 54, 28},
- {138, 157, 200, 194, 189, 208, 207, 206, 214, 197, 186, 222, 311, 302, 103, 43},
- {3},
- {146, 165, 183, 194, 197, 202, 191, 190, 187, 186, 171, 189, 281, 311, 61, 34},
- {142, 168, 184, 183, 187, 190, 187, 188, 189, 193, 200, 212, 231, 245, 169, 177},
- {174, 164, 168, 197, 300, 372, 199, 59, 208, 208, 209, 218, 231, 246, 237, 232},
- {91, 101, 147, 165, 174, 195, 207, 210, 218, 230, 230, 244, 268, 272, 269, 250},
- {157, 192, 226, 210, 211, 228, 228, 241, 245, 246, 248, 263, 274, 275, 270, 251},
- {3},
- {131, 160, 183, 193, 202, 205, 203, 212, 212, 213, 217, 220, 229, 214, 203, 200},
- {187, 221, 231, 229, 237, 232, 232, 236, 249, 259, 286, 284, 250, 238, 238, 296},
- {3},
- {127, 173, 226, 217, 264, 256, 290, 295, 297, 325, 334, 326, 302, 290, 275, 254},
- {248, 300, 339, 344, 360, 350, 363, 361, 368, 391, 431, 433, 406, 400, 377, 467},
- {3},
- {141, 180, 213, 223, 232, 234, 242, 240, 250, 253, 268, 255, 245, 235, 227, 200},
- {178, 205, 259, 258, 273, 285, 275, 289, 299, 300, 310, 320, 335, 329, 316, 269},
-};
-
-const Word16 inv_sigma_p_ivas_fx[][16] =
-{//Qlog2(2.56)
- {552, 513, 470, 494, 487, 478, 492, 496, 496, 482, 480, 389, 339, 276, 743, 760},
- {640, 492, 472, 478, 482, 471, 470, 471, 623, 504, 501, 477, 459, 425, 420, 408},
- {1002, 939, 696, 589, 545, 480, 456, 450, 444, 462, 472, 424, 342, 441, 1568, 2996},
- {609, 534, 419, 432, 444, 403, 406, 407, 392, 425, 452, 378, 269, 278, 818, 1940},
- {32767},
- {575, 507, 459, 432, 425, 415, 440, 442, 449, 450, 489, 443, 299, 270, 1378, 2449},
- {591, 499, 456, 457, 449, 441, 448, 446, 444, 435, 420, 397, 364, 342, 496, 475},
- {482, 512, 498, 426, 280, 225, 422, 1410, 404, 404, 402, 385, 364, 342, 355, 361},
- {918, 832, 572, 507, 482, 430, 406, 399, 385, 366, 364, 344, 313, 309, 311, 335},
- {533, 436, 371, 399, 398, 368, 367, 348, 343, 342, 338, 319, 306, 305, 311, 334},
- {32767},
- {641, 523, 458, 434, 415, 410, 412, 395, 397, 394, 386, 380, 366, 392, 413, 419},
- {449, 380, 364, 366, 355, 362, 362, 356, 337, 323, 293, 296, 336, 352, 353, 283},
- {32767},
- {659, 486, 371, 386, 318, 328, 289, 284, 283, 258, 251, 257, 278, 290, 305, 330},
- {338, 279, 247, 244, 233, 239, 231, 232, 228, 215, 194, 194, 207, 210, 222, 180},
- {32767},
- {594, 466, 394, 376, 362, 358, 346, 350, 336, 332, 313, 329, 343, 358, 370, 419},
- {471, 409, 323, 325, 308, 295, 304, 290, 281, 280, 271, 262, 251, 255, 266, 312}
-};
-
-const Word8 leaders_short[][MAX_NO_SCALES] = // Q0
-{{ 0, 0, 0},
-{ 1, 0, 0},
-{ 15, 3, 3},
-{ 2, 2, 0},
-{ 2, 0, 0},
-{ 2, 1, 0},
-{ 4, 0, 0},
-{ 9, 7, 6},
-{ 4, 1, 0},
-{ 5, 2, 0},
-{ 6, 3, 2},
-{ 5, 3, 1},
-{ 8, 3, 0},
-{ 9, 3, 0},
-{ 2, 2, 1},
-{ 9, 8, 5},
-{ 5, 5, 0},
-{ 17, 3, 0},
-{ 5, 2, 1},
-{ 7, 3, 0},
-{ 5, 4, 0},
-{ 5, 5, 1},
-{ 2, 2, 2},
-{ 4, 2, 2},
-{ 5, 2, 2},
-{ 6, 6, 5},
-{ 5, 3, 2},
-{ 6, 3, 0},
-{ 12, 3, 2},
-{ 15, 3, 2},
-{ 19, 3, 2},
-{ 7, 6, 3},
-{ 5, 4, 2},
-{ 9, 8, 2},
-{ 6, 5, 2},
-{ 5, 4, 1},
-{ 9, 9, 3},
-{ 6, 6, 2},
-{ 8, 6, 2},
-{ 8, 7, 2},
-{ 8, 8, 2},
-{ 4, 2, 0},
-{ 11, 8, 2},
-{ 13, 11, 2},
-{ 5, 5, 2},
-{ 16, 13, 2},
-{ 13, 12, 2},
-{ 18, 17, 2},
-{ 21, 17, 2},
-{ 18, 16, 2},
-{ 32, 28, 2},
-{ 8, 8, 4},
-{ 7, 5, 2},
-{ 13, 11, 9},
-{ 38, 31, 2},
-{ 4, 4, 2},
-{ 8, 8, 3},
-{ 9, 8, 3},
-{ 8, 5, 2},
-{ 10, 9, 3},
-{ 11, 10, 3},
-{ 13, 10, 3},
-{ 22, 10, 3},
-{ 23, 10, 3},
-{ 13, 11, 3},
-{ 15, 13, 3},
-{ 35, 15, 3},
-{ 32, 16, 3},
-{ 5, 5, 4},
-{ 8, 7, 4},
-{ 33, 31, 2},
-{ 9, 9, 4},
-{ 16, 12, 4},
-{ 17, 13, 4},
-{ 5, 5, 5},
-{ 7, 5, 5},
-{ 4, 3, 2},
-{ 8, 6, 5},
-{ 9, 6, 5},
-{ 9, 7, 5},
-{ 8, 8, 5},
-{ 3, 2, 0},
-{ 10, 8, 5},
-{ 11, 8, 5},
-{ 12, 8, 5},
-{ 13, 8, 5},
-{ 16, 8, 5},
-{ 18, 8, 5},
-{ 10, 9, 5},
-{ 18, 9, 5},
-{ 23, 21, 2},
-{ 13, 8, 8},
-{ 14, 10, 5},
-{ 11, 11, 5},
-{ 13, 11, 5},
-{ 13, 13, 5},
-{ 14, 13, 5},
-{ 15, 13, 5},
-{ 16, 13, 5},
-{ 17, 13, 5},
-{ 18, 13, 5},
-{ 18, 16, 5},
-{ 18, 17, 5},
-{ 19, 18, 5},
-{ 13, 10, 5},
-{ 21, 21, 5},
-{ 23, 21, 5},
-{ 24, 21, 5},
-{ 25, 23, 5},
-{ 32, 23, 5},
-{ 11, 10, 5},
-{ 8, 8, 6},
-{ 5, 5, 7},
-{ 8, 7, 7},
-{ 8, 8, 7},
-{ 10, 8, 7},
-{ 13, 8, 7},
-{ 10, 9, 7},
-{ 13, 11, 7},
-{ 9, 8, 8},
-{ 12, 8, 8},
-{ 23, 18, 5},
-{ 9, 9, 8},
-{ 11, 9, 8},
-{ 13, 9, 8},
-{ 18, 10, 8},
-{ 26, 10, 8},
-{ 27, 10, 8},
-{ 31, 10, 8},
-{ 40, 21, 11},
-{ 13, 11, 8},
-{ 13, 12, 8},
-{ 14, 12, 8},
-{ 18, 12, 8},
-{ 13, 13, 8},
-{ 14, 13, 8},
-{ 16, 13, 8},
-{ 18, 13, 8},
-{ 18, 16, 8},
-{ 18, 17, 8},
-{ 23, 18, 8},
-{ 23, 21, 8},
-{ 24, 21, 8},
-{ 28, 23, 8},
-{ 31, 31, 8},
-{ 36, 31, 8},
-{ 38, 31, 8},
-{ 11, 9, 9},
-{ 12, 9, 9},
-{ 13, 9, 9},
-{ 12, 11, 9},
-{ 42, 31, 2},
-{ 14, 12, 9},
-{ 13, 13, 9},
-{ 14, 13, 9},
-{ 16, 13, 9},
-{ 17, 13, 9},
-{ 18, 13, 9},
-{ 18, 14, 9},
-{ 18, 18, 9},
-{ 26, 25, 9},
-{ 13, 11, 10},
-{ 18, 12, 10},
-{ 18, 13, 10},
-{ 21, 14, 10},
-{ 22, 16, 10},
-{ 18, 18, 10},
-{ 23, 18, 10},
-{ 24, 18, 10},
-{ 24, 21, 10},
-{ 23, 22, 10},
-{ 24, 23, 10},
-{ 32, 25, 10},
-{ 34, 28, 10},
-{ 42, 31, 10},
-{ 17, 11, 11},
-{ 18, 13, 11},
-{ 21, 13, 11},
-{ 18, 17, 11},
-{ 18, 18, 11},
-{ 48, 35, 24},
-{ 18, 17, 12},
-{ 18, 18, 12},
-{ 20, 18, 12},
-{ 39, 30, 12},
-{ 31, 31, 12},
-{ 43, 34, 12},
-{ 16, 13, 13},
-{ 17, 13, 13},
-{ 16, 16, 13},
-{ 18, 17, 13},
-{ 20, 18, 13},
-{ 22, 18, 13},
-{ 23, 18, 13},
-{ 22, 21, 13},
-{ 23, 23, 13},
-{ 24, 23, 13},
-{ 43, 36, 13},
-{ 43, 40, 13},
-{ 43, 41, 13},
-{ 31, 30, 18},
-{ 24, 21, 14},
-{ 31, 31, 14},
-{ 23, 18, 16},
-{ 23, 23, 16},
-{ 31, 25, 16},
-{ 31, 29, 16},
-{ 45, 35, 16},
-{ 23, 21, 17},
-{ 23, 22, 17},
-{ 23, 23, 17},
-{ 31, 31, 17},
-{ 21, 18, 18},
-{ 23, 21, 18},
-{ 23, 22, 18},
-{ 27, 23, 18},
-{ 29, 23, 18},
-{ 32, 23, 18},
-{ 31, 27, 18},
-{ 30, 28, 18},
-{ 31, 28, 18},
-{ 43, 42, 13},
-{ 31, 31, 18},
-{ 32, 31, 18},
-{ 36, 31, 18},
-{ 46, 48, 18},
-{ 46, 32, 19},
-{ 43, 38, 19},
-{ 43, 42, 19},
-{ 32, 32, 20},
-{ 27, 23, 21},
-{ 31, 23, 21},
-{ 31, 24, 21},
-{ 32, 30, 21},
-{ 32, 31, 21},
-{ 43, 33, 21},
-{ 43, 34, 21},
-{ 24, 23, 23},
-{ 32, 32, 23},
-{ 48, 40, 23},
-{ 48, 46, 23},
-{ 28, 24, 24},
-{ 32, 31, 24},
-{ 34, 32, 24},
-{ 36, 32, 24},
-{ 48, 32, 24},
-{ 35, 10, 8},
-{ 40, 28, 25},
-{ 45, 31, 25},
-{ 44, 32, 25},
-{ 31, 31, 27},
-{ 39, 32, 27},
-{ 44, 32, 27},
-{ 32, 32, 28},
-{ 43, 32, 28},
-{ 48, 32, 28},
-{ 36, 36, 28},
-{ 48, 45, 28},
-{ 40, 32, 29},
-{ 44, 34, 30},
-{ 40, 32, 31},
-{ 41, 32, 31},
-{ 42, 32, 31},
-{ 44, 43, 31},
-{ 48, 37, 32},
-{ 48, 39, 32},
-{ 46, 43, 32},
-{ 48, 48, 34},
-{ 48, 36, 35},
-{ 48, 41, 35},
-{ 47, 43, 36},
-{ 48, 48, 37},
-{ 48, 48, 40},
-{ 48, 48, 45},
-{ 48, 48, 47},
-{ 48, 48, 48}};
-
-const UWord8 no_lead_idx[][2] = { // Q0
-{ 1, 1},
-{ 4, 1},
-{ 41, 1},
-{ 41, 4},
-{ 52, 32},
-{ 56, 38},
-{ 41, 1},
-{ 6, 5},
-{119, 14},
-{ 58, 18},
-{138, 21},
-{169, 40},
-{ 4, 4},
-{ 41, 1},
-{ 35, 1},
-{ 35, 4},
-{ 52, 4},
-{ 18, 8},
-{ 44, 41},
-{ 58, 6},
-{ 58, 9},
-{ 69, 26},
-{ 51, 34},
-{ 85, 34},
-{ 85, 38},
-{ 85, 42},
-{139, 40},
-{142, 33},
-{140, 64},
-{141, 73},
-{236, 124},
-{235, 133},
-{211, 160},
-{ 4, 3},
-{ 41, 1},
-{ 52, 3},
-{ 39, 3},
-{ 42, 3},
-{153, 3},
-{118, 9},
-{158, 44},
-{202, 93},
-{250, 201},
-{ 20, 0},
-{ 52, 0},
-{ 1, 1},
-{ 4, 1},
-{ 4, 4},
-{ 4, 4},
-{ 41, 1},
-{ 41, 4},
-{ 20, 4},
-{ 52, 4},
-{ 39, 4},
-{ 44, 41},
-{ 58, 6},
-{ 80, 41},
-{114, 9},
-{124, 9},
-{130, 21},
-{124, 58},
-{165, 34},
-{164, 39},
-{169, 40},
-{ 35, 0},
-{ 4, 4},
-{ 35, 1},
-{ 35, 4},
-{ 52, 4},
-{ 58, 5},
-{ 15, 5},
-{135, 3},
-{116, 41},
-{124, 24},
-{137, 24},
-{177, 26},
-{194, 44},
-{208, 52},
-{230, 58},
-{ 4, 4},
-{ 41, 1},
-{ 41, 4},
-{ 20, 4},
-{ 8, 6},
-{ 9, 8},
-{ 44, 41},
-{ 58, 6},
-{ 58, 9},
-{114, 9},
-{124, 9},
-{ 92, 21},
-{124, 58},
-{ 92, 51},
-{104, 91},
-{141, 51},
-{121, 91},
-{ 4, 3},
-{ 41, 1},
-{ 52, 3},
-{ 69, 3},
-{ 83, 3},
-{ 87, 3},
-{ 86, 44},
-{143, 74},
-{144, 112},
-{179, 78},
-{196, 78},
-{196, 78},
-{224, 78},
-{ 4, 3},
-{ 41, 1},
-{ 20, 1},
-{ 20, 4},
-{ 52, 4},
-{ 52, 3},
-{111, 5},
-{132, 4},
-{ 57, 41},
-{123, 41},
-{214, 3},
-{183, 81},
-{215, 41},
-{213, 32},
-{219, 44},
-{233, 52},
-{ 7, 52},
-{ 3, 57},
-{ 14, 59},
-{ 11, 53},
-{ 62, 0},
-{ 37, 4},
-{ 37, 3},
-{ 63, 3},
-{ 67, 3},
-{184, 3},
-{123, 41},
-{ 19, 124},
-{ 39, 4},
-{ 44, 41},
-{ 58, 6},
-{ 58, 9},
-{ 58, 44},
-{115, 32},
-{ 95, 16},
-{102, 21},
-{ 99, 38},
-{126, 58},
-{141, 57},
-{206, 56},
-{205, 120},
-{226, 124},
-{226, 133},
-{225, 182},
-{152, 3},
-{ 65, 3},
-{ 17, 14},
-{ 61, 22},
-{135, 3},
-{ 19, 11},
-{ 76, 25},
-{ 41, 36},
-{ 41, 33},
-{ 41, 7},
-{ 27, 10},
-{ 81, 15},
-{ 3, 2},
-{ 41, 36},
-{ 55, 31},
-{ 81, 7},
-};
-const UWord8 no_lead_p_idx[][2] = { // Q0
- { 5, 0},
-{ 3, 0},
-{ 41, 0},
-{ 35, 0},
-{ 52, 0},
-{ 1, 1},
-{ 4, 1},
-{ 4, 4},
-{ 3, 4},
-{ 41, 1},
-{ 41, 4},
-{ 35, 4},
-{ 52, 4},
-{ 39, 4},
-{ 44, 41},
-{ 58, 6},
-{ 80, 41},
-{ 15, 9},
-{ 94, 9},
-{110, 34},
-{ 96, 52},
-{ 98, 39},
-{105, 58},
-{107, 51},
-{105, 104},
-{109, 94},
-{145, 98},
-{207, 100},
-{239, 103},
-{240, 108},
-{207, 146},
-{ 4, 0},
-{ 41, 4},
-{ 39, 3},
-{ 94, 5},
-{ 80, 41},
-{ 94, 18},
-{ 94, 44},
-{ 96, 52},
-{106, 44},
-{121, 58},
-{107, 51},
-{199, 15},
-{197, 104},
-{198, 156},
-{221, 200},
-{ 4, 1},
-{ 3, 1},
-{ 3, 4},
-{ 41, 1},
-{ 35, 1},
-{ 35, 4},
-{ 52, 4},
-{ 39, 4},
-{ 88, 4},
-{135, 4},
-{135, 3},
-{190, 3},
-{155, 41},
-{135, 20},
-{190, 32},
-{194, 44},
-{231, 44},
-{230, 58},
-{231, 15},
-{242, 83},
-{253, 130},
-{ 4, 1},
-{ 32, 1},
-{ 58, 5},
-{ 39, 3},
-{ 43, 5},
-{ 45, 3},
-{ 48, 3},
-{ 46, 44},
-{ 49, 44},
-{ 90, 44},
-{ 50, 44},
-{ 54, 52},
-{ 70, 51},
-{151, 122},
-{151, 53},
-{ 52, 4},
-{ 39, 4},
-{ 83, 4},
-{ 89, 4},
-{ 80, 41},
-{ 85, 41},
-{100, 8},
-{101, 9},
-{ 85, 38},
-{ 85, 15},
-{195, 52},
-{234, 52},
-{217, 15},
-{254, 15},
-{251, 104},
-{ 10, 153},
-{ 18, 157},
-{ 19, 192},
-{ 19, 237},
-{ 19, 0},
-{ 52, 4},
-{153, 3},
-{159, 3},
-{171, 32},
-{185, 44},
-{186, 68},
-{ 85, 15},
-{220, 44},
-{218, 75},
-{227, 75},
-{ 1, 77},
-{228, 147},
-{ 15, 150},
-{ 18, 187},
-{ 16, 212},
-{ 16, 241},
-{ 17, 248},
-{ 4, 3},
-{ 52, 4},
-{ 52, 3},
-{161, 3},
-{166, 3},
-{149, 9},
-{247, 47},
-{178, 0},
-{ 41, 1},
-{ 20, 1},
-{ 20, 4},
-{ 52, 4},
-{ 58, 5},
-{117, 4},
-{117, 3},
-{153, 3},
-{182, 3},
-{204, 3},
-{162, 9},
-{163, 44},
-{167, 44},
-{173, 44},
-{254, 44},
-{ 12, 52},
-{254, 15},
-{ 13, 82},
-{244, 188},
-{ 3, 4},
-{ 52, 4},
-{ 58, 5},
-{153, 3},
-{190, 3},
-{209, 3},
-{243, 189},
-{ 41, 1},
-{ 20, 1},
-{ 39, 4},
-{ 88, 4},
-{ 97, 4},
-{138, 21},
-{ 6, 44},
-{ 1, 1},
-{ 4, 1},
-{ 4, 4},
-{ 5, 4},
-{ 41, 1},
-{ 41, 4},
-{ 20, 4},
-{ 52, 4},
-{ 39, 4},
-{ 83, 4},
-{135, 4},
-{ 80, 41},
-{116, 41},
-{136, 41},
-{110, 34},
-{ 13, 6},
-{113, 41},
-{114, 18},
-{ 91, 24},
-{125, 24},
-{127, 24},
-{163, 12},
-{168, 13},
-{172, 13},
-{128, 84},
-{174, 28},
-{252, 29},
-{249, 30},
-{246, 129},
-{246, 180},
-{ 9, 66},
-{110, 41},
-{155, 41},
-{154, 20},
-{158, 44},
-{203, 21},
-{232, 44},
-{210, 39},
-{223, 79},
-{222, 123},
-{229, 131},
-{238, 139},
-{238, 170},
-{ 4, 4},
-{ 4, 4},
-{ 41, 1},
-{ 20, 1},
-{ 20, 4},
-{ 52, 4},
-{ 39, 4},
-{ 88, 4},
-{135, 4},
-{ 80, 41},
-{110, 41},
-{136, 41},
-{134, 32},
-{176, 44},
-{193, 44},
-{195, 52},
-{210, 39},
-{242, 39},
-{ 6, 71},
-{ 2, 148},
-{ 4, 175},
-{ 5, 191},
-{110, 41},
-{204, 3},
-{216, 22},
-{210, 23},
-{195, 32},
-{220, 44},
-{210, 39},
-{222, 33},
-{245, 57},
-{255, 60},
-{ 8, 72},
-{ 8, 181},
-};
-
-const Word16 min_lat_bits_SN[] = {-1, -1, 17, 12, 17, 17, -1, -1, 17, 12, 17, 17, -1, -1, 22, -1, 32, 26 };
-//Q0
-const Word16 min_lat_bits_SN_fx[] = { -1, -1, 17, 12, 17, 17, -1, -1, 17, 12, 17, 17, -1, -1, 22, -1, 32, 26 };
-
-const Word16 min_lat_bits_pred[] = {17, 18, 9, 15, -1, 21, 17, 14, 9, 15, -1, 21, 17, -1, 24, 26, -1, 26, 16};
-//Q0
-const Word16 min_lat_bits_pred_fx[] = { 17, 18, 9, 15, -1, 21, 17, 14, 9, 15, -1, 21, 17, -1, 24, 26, -1, 26, 16 };
-
-const Word16 offset_lvq_modes_SN[] = {-1,-1,33,64,96, 129,-1,-1,12,43,79,109,-1,-1,137,-1,107,135,
- 112
- }; /* CNG */
-//Q0
-const Word16 offset_lvq_modes_SN_fx[] = { -1,-1,26,51,77,96,-1,-1,12,36,66,90,-1,-1,105,-1,88,102,112 }; /* CNG */
-
-const Word16 offset_lvq_modes_pred[] = {119, 153, 31, 67, -1, 102, 126, 160, 0, 46, -1, 82, 146, -1, 175, 191, -1, 225, 203};
-//Qlog2(1.6)
-const Word16 offset_lvq_modes_pred_fx[] = { 74, 95, 15, 45, -1, 66, 81, 102, 0, 30, -1, 60, 88, -1, 109, 117, -1, 139, 124 };
-
-const Word16 offset_in_lvq_mode_SN[][21] =
-{
- {0}, /* I NB */
- {0,1,1,1,1,1,2,3,3,3,3,4,4,4,5}, /* UV NB*/
- {0,1,1,1,1,2,3,4,5,5,6,6,7,7,7,7,7,8,8,8,9}, /* V NB */
- {0,0,0,0,1,1,1,2,3,4,5,6,6,7,8,9,10,11,12,13,14}, /* G NB */
- {0,1,1,1,1,2,3,4,5,5,5,6,6,6,7,8}, /* T NB */
- {0,0,0,0,1,2,2,2,2,3,4,5}, /* A NB */
- {0}, /* I WB */
- {0}, /* UV WB*/
- {1}, /* V WB */ /* granularity 1 */
- {1}, /* G WB */ /* granularity 1 */
- {1}, /* T WB */ /* granularity 1 */
- {1}, /* A WB */ /* granularity 1 */
- {0}, /* I 16k */
- {0}, /* UV 16k */
- {1}, /* V 16k */ /* granularity 1 */
- {0}, /* G 16k */
- {0,1}, /* T 16k */
- {0}, /* A 16k */
-};
-
-const Word16 offset_in_lvq_mode_SN_fx[][21] =
-{//Q0
- {0}, /* I NB */
- {0,1,1,1,1,1,2,3,3,3,3,4,4,4,5}, /* UV NB*/
- {0,1,1,1,1,2,3,4,5,5,6,6,7,7,7,7,7,8,8,8,9}, /* V NB */
- {0,0,0,0,1,1,1,2,3,4,5,6,6,7,8,9,10,11,12,13,14}, /* G NB */
- {0,1,1,1,1,2,3,4,5,5,5,6,6,6,7,8}, /* T NB */
- {0,0,0,0,1,2,2,2,2,3,4,5}, /* A NB */
- {0}, /* I WB */
- {0,1,1,1,2,3,3,3,3,3,3,4,4,4,5}, /* UV WB*/
- {0,1,1,1,2,3,3,3,4,5,6,7,8,9,9,10,11,12,12,12,13}, /* V WB */
- {0,0,0,0,1,1,1,2,3,4,5,6,6,7,8,9,10,11,12,13,14}, /* G WB */
- {0,1,1,1,2,3,3,4,5,5,5,6,6,7,8,9,10}, /* T WB */
- {0,0,0,0,1,2,2,2,3,4,4,4,4,4,4,4,4,4,4,5}, /* A WB */
- {0},
- {0},
- {0,0,0,0,0,0,1,2,3,3,4,5,6,6,6,7}, /* V 16k */
- {0}, /* G 16k */
- {0,1}, /* T 16k */
- {0}, /*{0,0,0,0,0,0,0,0,0,0,1} */ /* A 16k */
-};
-
-const Word16 offset_in_lvq_mode_pred[][32] =
-{
- {0,0,0,0,1,2,2,2,3,4,5,5,5,5,5,5,5,5,5,6}, /* I NB */
- {0,1,1,1,2,3,4,4,4,4,4,5,5,5,6}, /* UV NB */
- {0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,3,4,4,5,6,7,8,9,10,10,11,12,13,13,13,14}, /* V NB */
- {0,0,0,0,1,1,1,2,3,4,5,6,6,7,8,9,10,11,12,13,14}, /* G NB */
- {0}, /* T NB */
- {0,0,0,0,1,2,2,2,2,3,4,5}, /* A NB */
- {1}, /* I WB */
- {1}, /* UV WB */ /* granularity 1 */
- {1}, /* V WB */ /* granularity 1 */
- {1}, /* G WB */
- {0}, /* T WB */
- {1}, /* A WB */
- {0,0,0,0,1,2,2,2,3,4,5,5,5,5,5,5,5,5,5,6}, /* I 16k */
- {0}, /* UV 16k */
- {1}, /* V 16k */
- {1}, /* G 16k */
- {0}, /* T 16k */
- {1}, /* A 16k */
- {1}, /* G WB MA*/
-};
-
-const Word16 offset_in_lvq_mode_pred_fx[][32] =
-{//Q0
- {0,0,0,0,1,2,2,2,3,4,5,5,5,5,5,5,5,5,5,6}, /* I NB */
- {0,1,1,1,2,3,4,4,4,4,4,5,5,5,6}, /* UV NB */
- {0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,3,4,4,5,6,7,8,9,10,10,11,12,13,13,13,14}, /* V NB */
- {0,0,0,0,1,1,1,2,3,4,5,6,6,7,8,9,10,11,12,13,14}, /* G NB */
- {0}, /* T NB */
- {0,0,0,0,1,2,2,2,2,3,4,5}, /* A NB */
- {0,0,0,0,1,2,2,2,3,4,5,5,5,5,5,5,5,5,5,6}, /* I WB */
- {0,1,1,1,2,3,4,4,4,4,4,5,5,5,6}, /* UV WB */
- {0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,3,4,4,5,6,7,8,9,10,10,11,12,13,13,13,14}, /* V WB */
- {0,0,0,0,1,1,1,2,3,4,5,6,6,7,8,9,10,11,12,13,14}, /* G WB */
- {0}, /* T WB */
- {0,0,0,0,1,2,2,2,3,4,4,4,4,4,4,4,4,4,4,5}, /* A WB */
- {0,0,0,0,1,2,2,2,3,4,5,5,5,5,5,5,5,5,5,6}, /* I 16k */
- {0}, /* UV 16k */
- {0,0,0,0,0,0,1,2,3,3,4,5,6,6,6,7}, /* V 16k */
- {0,0,0,0,0,0,1,2,3,4,5,6}, /* G 16k */
- {0}, /* T 16k */
- {0,0,0,0,0,0,1,2,3,4,5,6}, /* A 16k */
- {0,0,0,0,0,1,1,1,2,3,4,5,6,6,7,8,9,10,11,12,13,14}, /* G WB MA*/
-};
-
-/*-----------------------------------------------------------------*
- * BC-TCVQ frame-end quantization tables (BC-TCVQ is used in Voiced mode for 16kHz isf)
- *-----------------------------------------------------------------*/
-const Word16 NTRANS[4][NUM_STATE] = {{0,2,4,6,8,10,12,14,0,2,4,6,8,10,12,14}, /* indices of previous state of first branche */
- {1,3,5,7,9,11,13,15,1,3,5,7,9,11,13,15}, /* indices of previous state of second branches */
- {4,2,1,3,0,2,1,3,2,0,3,1,7,0,3,1}, /* indices of previous subset of first branch */
- {2,0,3,6,2,0,3,1,0,2,1,3,0,2,1,5} /* indices of previous subset of second branch */
-}; // Q0
-
-const Word16 NTRANS2[4][NUM_STATE] = {{0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7},
- {8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15},
- {4,2,2,0,1,3,3,6,0,2,2,0,1,3,3,1},
- {2,0,0,2,3,1,1,3,7,0,0,2,3,1,1,5}
-}; // Q0
-
-/* BC-TCQ Bit Allocations */
-const Word16 BC_TCVQ_BIT_ALLOC_40B[M/2+4] = {1, 4, 5,5,4,4, 2,2,2,2, 5,4 }; /*1+39bit Q0*/
-
-const Word16 FixBranch_tbl[4][4][N_STAGE_VQ - 4] =
-{
- {{0, 0, 0, 0}, {1, 0, 0, 0}, {0, 1, 0, 0}, {1, 1, 0, 0}}, /* incase of initial state 0 */
- {{0, 0, 1, 0}, {1, 0, 1, 0}, {0, 1, 1, 0}, {1, 1, 1, 0}}, /* incase of initial state 4 */
- {{0, 0, 0, 1}, {1, 0, 0, 1}, {0, 1, 0, 1}, {1, 1, 0, 1}}, /* incase of initial state 8 */
- {{0, 0, 1, 1}, {1, 0, 1, 1}, {0, 1, 1, 1}, {1, 1, 1, 1}} /* incase of initial state 12 */
-}; // Q0
-
-/* Intra-Prediction */
-
-const Word16 SN_IntraCoeff_fx[N_STAGE_VQ - 1][2][2] = /* Q15 */
-{
- {{-14822, 26501}, {-17180, 10012}},
- {{ 317, 19858}, { -432, 13799}},
- {{ 4747, 22069}, { 2653, 19016}},
- {{ 6823, 20747}, { 7077, 19154}},
- {{ 1665, 25161}, { 2519, 13654}},
- {{ 166, 18043}, { -221, 9732}},
- {{ -781, 20026}, { -5332, 18882}}
-};
-
-const Word16 AR_IntraCoeff_fx[N_STAGE_VQ - 1][2][2] = /* Q15 */
-{
- {{-9584, 22162}, {-13849, 7127}},
- {{ 1604, 16400}, { 2861, 9414}},
- {{ 6537, 16475}, { 3498, 13792}},
- {{ 7879, 14434}, { 7021, 12992}},
- {{ 6329, 16215}, { 5200, 10052}},
- {{ 3062, 12146}, { 2147, 4857}},
- {{ 1226, 11040}, { -794, 6137}}
-};
-
-const Word16 scale_ARSN_fx[M] = /* Q14 */
-{
- 29994, 30153, 29506, 28534, 28246, 28618, 26388, 27029,
- 25726, 25474, 25797, 26540, 25613, 24968, 25880, 25584
-};
-
-const Word16 scale_inv_ARSN_fx[M] = /* Q15 */
-{
- 17898, 17806, 18196, 18815, 19005, 18760, 20342, 19864,
- 20870, 21076, 20811, 20228, 20962, 21502, 20745, 20985
-};
-
-/* TCVQ Codebook */
-
-const Word16 AR_TCVQ_CB_SUB1_fx[2][128][2] = /* x2.65 */
-{//Qlog2(2.56)
- {
- {-435 , -434}, {-233 , 124}, {-381 , 44}, {-274 , -88}, {-332 , -224}, {-563 , -600}, {-332 , 134}, { 53 , -739},
- {-567 , 0}, { 149 , 316}, {-191 , 541}, {-123 , 317}, {-493 , -634}, {-528 , 268}, {-321 , -386}, {-432 , -220},
- {-244 , -230}, { -33 , 454}, {-188 , -642}, {-131 , -215}, {-676 , 263}, {-472 , -403}, {-312 , -159}, {-340 , 297},
- {-121 , -217}, { -6 , 241}, {-203 , -211}, {-126 , -15}, {-734 , -374}, {-458 , -6}, {-297 , -27}, {-307 , -553},
- {-177 , 3}, {-175 , -273}, { 63 , 363}, { 133 , 527}, {-133 , -185}, {-449 , -1206}, {-287 , -281}, {-131 , 869},
- {-100 , -105}, { -75 , -179}, {-141 , 131}, { -32 , 108}, { -81 , 161}, {-446 , -230}, {-283 , -884}, {-128 , -165},
- {-153 , -451}, {-177 , -114}, {-113 , -127}, {-223 , -355}, {-246 , -447}, {-396 , -705}, {-280 , 329}, { -37 , -64},
- {-118 , 208}, { -82 , 64}, {-339 , -367}, { -58 , -132}, {-458 , 644}, {-381 , -543}, {-272 , 557}, { 62 , 75},
- {-307 , -829}, { 310 , 445}, { 73 , -26}, { 95 , 219}, { 223 , 611}, { 279 , 195}, { 430 , 575}, { 424 , 221},
- { -25 , 2}, { 323 , 236}, {-100 , -310}, { 11 , -35}, { 83 , -3}, { 281 , 738}, { 495 , 393}, { 89 , 1284},
- { 32 , 136}, { 29 , 34}, { 491 , 575}, { 105 , -188}, { 15 , -440}, { 285 , 10}, { 516 , -105}, { 313 , 704},
- { -6 , -274}, { -62 , -64}, { -12 , -127}, { 170 , 2387}, { 162 , 196}, { 336 , 413}, { 543 , 210}, { 231 , -70},
- { -2 , 691}, { 98 , 134}, { 25 , 141}, { 261 , 305}, { 312 , -322}, { 336 , 228}, { 561 , 781}, { 766 , 514},
- { -14 , -117}, { 166 , 905}, { -50 , 1}, { 471 , 369}, { 345 , 247}, { 347 , -383}, { 561 , 1128}, { 513 , 1030},
- { 100 , -15}, { 185 , 70}, { 167 , 131}, { 122 , 36}, { 561 , 743}, { 401 , 111}, { 595 , -579}, { 674 , 215},
- { 191 , 189}, { 38 , -78}, { 428 , 0}, { 261 , 136}, { -29 , -99}, { 405 , 308}, { 614 , 574}, {1682 , 1704}
- },
- {
- {-942 , -168}, {-262 , -361}, { -53 , -171}, {-245 , 472}, {-2145 , -2315}, {-1307 , 1261}, {-870 , -1940}, { -652 , -564},
- {-500 , 447}, {-578 , -198}, {-554 , 111}, { -98 , -84}, {-1315 , 0}, {-1229 , -1618}, {-868 , 230}, { -385 , 1061},
- {-768 , -998}, {-202 , -60}, {-283 , -197}, {-142 , -325}, { -558 , 755}, {-1217 , 456}, {-803 , 766}, { -982 , 743},
- {-415 , -357}, { -28 , 1054}, { 114 , -246}, { 81 , 732}, { -804 , -506}, {-1126 , -112}, {-797 , -132}, { -289 , -204},
- {-347 , -29}, { -37 , -259}, {-142 , -438}, {-249 , 87}, { -874 , 341}, {-1074 , -2635}, {-668 , -1552}, {-1140 , -764},
- {-245 , -513}, { -48 , 526}, { 14 , 395}, {-452 , -646}, { -441 , -969}, { -953 , -1284}, {-645 , -387}, { -736 , 111},
- {-163 , 305}, {-349 , 224}, {-225 , 736}, { 94 , -85}, { -302 , -549}, { -937 , -892}, {-605 , -1089}, { -64 , -101},
- {-161 , -211}, {-392 , -1299}, {-148 , 125}, { 14 , 131}, { -432 , -127}, { -920 , -510}, {-598 , -730}, { 85 , 154},
- { 25 , -155}, { -57 , 238}, { 471 , 276}, { 421 , 680}, { -173 , 316}, { 597 , 1805}, { 906 , -673}, { 538 , 450},
- {-267 , -805}, { 2 , -19}, { 222 , 219}, { 185 , 352}, { -33 , -178}, { 606 , 118}, { 959 , -70}, { 350 , -91},
- { -87 , 42}, { 727 , 905}, { 54 , 33}, { 316 , 44}, { 251 , 15}, { 610 , -122}, { 990 , 1436}, { 82 , 1480},
- { 181 , 535}, { 177 , 130}, { 700 , 565}, { 626 , 331}, { 279 , 551}, { 680 , 707}, {1012 , 727}, { 1057 , 766},
- { -13 , -396}, { 364 , 412}, { 442 , -181}, { 202 , -386}, { 565 , 1397}, { 740 , 2621}, {1080 , 361}, { 1118 , 191},
- { 81 , 266}, { 217 , -130}, { 349 , 1009}, { 678 , -476}, { 1361 , 878}, { 795 , 472}, {1267 , 1034}, { 1040 , 1255},
- { 351 , 201}, { -69 , -633}, { -36 , -1046}, { 808 , 30}, { 1300 , -198}, { 803 , 1026}, {1390 , -326}, { 2291 , 2479},
- { 166 , 13}, { 521 , 84}, { 255 , -717}, { 987 , 448}, { 777 , 220}, { 811 , 208}, {1395 , 2021}, { 1499 , 417}
- }
-};
-const Word16 AR_TCVQ_CB_SUB2_fx[2][64][2] =
-{//Qlog2(2.56)
- {
- {-357 , -53}, {-525 , 167}, {-232 , 255}, {-132 , -359}, {-940 , -221}, { -260 , -1296}, {-1197 , -455}, { -833 , 49},
- {-132 , -1}, {-401 , -280}, {-212 , -217}, {-194 , 92}, {-580 , -710}, { -862 , -750}, { -669 , 430}, { -521 , 719},
- {-620 , -454}, {-239 , 509}, { -15 , -575}, { 389 , 704}, {-890 , 518}, {-1154 , 84}, { -632 , -1023}, { -620 , -1263},
- {-268 , -470}, {-326 , -738}, { 44 , 635}, { 73 , 362}, {-226 , -22}, { -625 , -106}, { -720 , -114}, {-1114 , -1070},
- { 19 , -250}, { 83 , 99}, { 35 , -16}, { 263 , -316}, { 472 , 1096}, { -52 , -328}, { -249 , 971}, { 1387 , 876},
- { 10 , 203}, { 869 , 649}, { 225 , 170}, { 301 , 83}, {1256 , 482}, { 391 , -777}, { 1064 , -320}, { 52 , 1207},
- { 309 , 375}, { 469 , 226}, { 619 , 400}, { 60 , -93}, { 335 , 244}, { 316 , -65}, { -45 , -987}, { 648 , -294},
- { 218 , -66}, {-108 , -133}, { 500 , -19}, { 824 , 163}, { 483 , -443}, { 1297 , 240}, { 1000 , 1205}, { 623 , 1347}
- },
- {
- {-424 , -965}, { -46 , -194}, { 20 , 298}, {-333 , -278}, {-797 , -522}, {-868 , -60}, { -20 , -140}, {-1085 , -904},
- {-615 , -243}, {-367 , 22}, {-261 , -519}, {-111 , -27}, {-745 , 142}, {-484 , -1519}, { -329 , 13}, {-1077 , 92},
- {-529 , 218}, {-519 , -597}, {-276 , -72}, { -87 , -398}, { -51 , -1257}, {-291 , 409}, { -883 , 611}, { 176 , -401},
- {-134 , -245}, { 37 , 506}, { 23 , -10}, {-225 , 293}, {-913 , -1324}, {-174 , -290}, {-1086 , -386}, { -139 , -78},
- {-123 , 125}, { -26 , -738}, { 113 , -344}, { 175 , 182}, { 754 , -446}, {1207 , 529}, { 932 , 990}, { 136 , 122},
- { 267 , 327}, { 382 , -182}, { 718 , 471}, { 738 , 108}, { 158 , 130}, { 437 , 401}, { 358 , -667}, { 1380 , 836},
- { 184 , -17}, { 435 , 231}, { 403 , 63}, { 151 , -125}, {-109 , -237}, { 692 , -241}, { 1247 , 193}, { 885 , 324},
- {-283 , 661}, { 44 , 105}, { 156 , 911}, { 387 , 588}, { 690 , 1459}, { 664 , 1057}, { -38 , 1455}, { 645 , 909}
- }
-};
-const Word16 AR_TCVQ_CB_SUB3_fx[4][32][2] =
-{//Qlog2(2.56)
- {
- {-487 , 9}, {-456 , -400}, { 96 , 451}, {-239 , 422}, {-685 , -1309}, { 68 , -709}, {-302 , -1185}, { 481 , -287},
- {-287 , -697}, {-194 , 73}, {-159 , -132}, {-161 , -312}, {-809 , 417}, {-860 , -926}, { -26 , -71}, {-1052 , -432},
- { 53 , 134}, { 106 , -140}, { 336 , -18}, { 404 , 735}, {-109 , -516}, { 719 , -65}, { -34 , 1336}, { -171 , 905},
- { 52 , -347}, { 359 , 266}, { 715 , 351}, { 100 , 133}, { 87 , 130}, { 975 , 999}, {1257 , 547}, { 738 , 1372}
- },
- {
- {-340 , -464}, {-216 , -779}, { 104 , -403}, { -92 , -221}, {-760 , -602}, {-914 , -811}, {-661 , -895}, {-1292 , -290},
- {-317 , 131}, {-575 , -154}, {-228 , -129}, {-257 , 487}, {-286 , -1354}, { -93 , -259}, {-798 , 179}, { -815 , -1368},
- { 215 , 570}, { -2 , 73}, { 545 , 167}, { 250 , 188}, { 76 , 48}, {-943 , 587}, { 379 , 1232}, { 1070 , 112},
- { 117 , -27}, { 389 , -142}, { 18 , 214}, { 735 , 581}, {1098 , 1244}, { 451 , 408}, {1482 , 650}, { -174 , 1160}
- },
- {
- {-256 , -485}, { -67 , 571}, { -5 , 161}, {-171 , 153}, {-1188 , -440}, {-1081 , 110}, {-641 , -921}, {-232 , -96},
- {-511 , 146}, {-288 , -93}, { 484 , 665}, {-610 , -366}, { -357 , -899}, { -861 , -1088}, { -78 , -105}, {-265 , -845},
- { 15 , 18}, { 79 , -383}, {-205 , -258}, { 306 , 264}, { 28 , 69}, { 34 , 65}, {1170 , 669}, { 133 , 74},
- { 521 , 183}, { 132 , 84}, { 362 , -90}, { 57 , -181}, { 894 , 456}, { 1147 , 742}, { 212 , 274}, { 891 , 262}
- },
- {
- { 94 , 464}, { 8 , 138}, {-365 , -640}, {-399 , 172}, {-249 , -109}, { -94 , -316}, {-163 , -250}, {-598 , -704},
- {-185 , 36}, {-470 , -199}, { 65 , 241}, {-104 , -362}, {-220 , -801}, {-866 , -66}, {-931 , -400}, {-172 , -132},
- {-148 , -494}, { 465 , 251}, {-179 , -72}, { 439 , 287}, { 824 , 559}, { 33 , 134}, { 59 , 134}, { 88 , 146},
- { 186 , 43}, { 69 , -261}, { 267 , -96}, { 40 , 79}, { 84 , 130}, { 678 , 378}, { 811 , 448}, { 920 , 541}
- }
-};
-
-
-const Word16 SN_TCVQ_CB_SUB1_fx[2][128][2] =
-{//Qlog2(2.56)
- {
- {-639 , 105}, {-488 , -449}, {-530 , -811}, {-419 , -634}, {-781 , -1061}, {-585 , 386}, {-501 , -737}, {-489 , -728},
- {-702 , -685}, {-510 , -762}, {-390 , -287}, {-379 , -379}, {-573 , -848}, {-583 , -778}, {-500 , -810}, {-671 , -420},
- {-516 , 802}, {-265 , -492}, {-523 , -568}, {-195 , 2882}, {-600 , -172}, {-568 , -869}, {-497 , 663}, {-643 , -929},
- {-346 , -378}, {-253 , -313}, {-418 , 595}, {-240 , -465}, {-424 , -546}, {-556 , -305}, {-497 , 2453}, {-451 , -235},
- {-452 , -670}, {-368 , -624}, {-379 , -662}, {-305 , -85}, {-549 , 399}, {-546 , -644}, {-484 , -426}, {-387 , -546},
- {-325 , -550}, {-229 , 118}, { -83 , 1004}, {-120 , 465}, {-289 , -222}, {-516 , 155}, {-480 , 1494}, {-415 , 138},
- {-419 , -100}, {-347 , 1091}, {-434 , 76}, {-138 , -291}, {-434 , -719}, {-514 , 945}, {-473 , -26}, {-144 , -320},
- {-376 , 1505}, {-329 , 374}, {-316 , -504}, { -58 , -6}, {-270 , -466}, {-507 , -540}, {-466 , -181}, {-256 , -518},
- {-196 , 726}, { -88 , -356}, {-186 , -394}, { 31 , -201}, { -77 , -319}, { 408 , 136}, { 630 , 680}, { 875 , 1365},
- {-200 , -190}, { 166 , 1289}, { 600 , 1085}, { 276 , 464}, { 567 , 1575}, { 425 , 278}, { 666 , 377}, {1209 , 2344},
- {-182 , -409}, { -95 , -141}, { 65 , 507}, { 127 , 212}, { 340 , 235}, { 481 , 408}, { 721 , 1203}, {1112 , 756},
- { 162 , 362}, { 138 , 753}, {-169 , -128}, { 187 , -32}, { 68 , -93}, { 528 , 2866}, { 786 , 789}, {1247 , 1468},
- {-476 , 2428}, { 20 , 133}, { 2 , -236}, { 426 , 799}, { 393 , 590}, { 532 , 1562}, { 807 , 534}, {1410 , 1051},
- { -14 , -263}, { 83 , -158}, { 158 , -38}, { 616 , 550}, { 845 , 543}, { 536 , 238}, { 912 , 1521}, {1635 , 1344},
- { 115 , -55}, { 263 , 87}, {-126 , 234}, { 376 , 191}, { 459 , 2644}, { 542 , 927}, { 941 , 948}, {1896 , 1528},
- { -19 , 1853}, { 455 , 366}, { 545 , 283}, { 831 , 835}, {1217 , 846}, { 560 , 542}, {1013 , 650}, {1905 , 2343}
- },
- {
- {-528 , -246}, {-631 , 56}, {-717 , -277}, { -40 , 1327}, {-1011 , -688}, {-827 , -341}, {-656 , -1599}, { -992 , -1559},
- {-450 , 933}, {-540 , 2109}, {-598 , -1267}, {-387 , -512}, {-1100 , -1979}, {-812 , -617}, {-649 , -147}, { -874 , 586},
- {-720 , -601}, {-281 , -279}, {-578 , 635}, { 169 , 80}, {-1020 , -134}, {-794 , 259}, {-638 , 821}, { -907 , 42},
- {-709 , -1525}, {-482 , 1340}, {-232 , -979}, { 104 , 2314}, { -918 , -1179}, {-790 , 1284}, {-609 , 2259}, { -854 , -978},
- {-624 , 326}, {-194 , 1705}, { -88 , 1060}, { 383 , 1190}, { -415 , 15}, {-789 , -1145}, {-604 , 407}, { -869 , 1136},
- {-503 , -1047}, {-545 , -794}, {-128 , 471}, { 84 , 638}, { -591 , -1509}, {-699 , 1746}, {-600 , -369}, { -784 , 1642},
- {-221 , -668}, {-223 , 261}, { -82 , -446}, {-378 , -1215}, { -741 , 969}, {-689 , -863}, {-569 , -595}, {-1012 , -403},
- {-331 , 518}, {-175 , 787}, {-220 , -3}, { -46 , -841}, { -960 , 297}, {-666 , 68}, {-565 , -1364}, { -265 , -21},
- { 649 , 767}, { 255 , 360}, { 338 , -342}, {1664 , 1627}, { 205 , -226}, { 967 , 31}, {1217 , 928}, { 1697 , 1233},
- { 322 , 1445}, { 320 , 1790}, { 413 , 212}, { 994 , 209}, { 766 , 264}, { 974 , 883}, {1228 , 241}, { 1679 , 801},
- { 75 , 312}, { 754 , 1425}, { 348 , 621}, { 644 , 474}, { 1008 , 763}, {1036 , 2024}, {1354 , 530}, { 1611 , 2129},
- { 162 , 931}, { 883 , 822}, { 990 , 488}, { 615 , -203}, { 1929 , 1234}, {1059 , 1375}, {1382 , 1426}, { 2048 , 1599},
- { 602 , 162}, { 380 , 820}, { 709 , 1064}, {1168 , 1374}, { 549 , 583}, {1062 , 470}, {1415 , 1092}, { 2095 , 2234},
- { 187 , -630}, { 118 , -493}, { 714 , 1787}, {1298 , 673}, { 957 , 1258}, {1082 , 1124}, {1460 , 786}, { 2124 , 1205},
- { 34 , -189}, { 54 , -35}, { 798 , 0}, { 747 , 2378}, { 1420 , 1152}, {1118 , 1673}, {1492 , 2287}, { 2416 , 1618},
- {1159 , 1795}, { 389 , -126}, {1194 , 1003}, {1578 , 1002}, { 1294 , 366}, {1148 , 694}, {1513 , 1791}, { 2746 , 2096}
- }
-};
-
-const Word16 SN_TCVQ_CB_SUB2_fx[2][64][2] =
-{//Qlog2(2.56)
- {
- {-709 , -609}, {-615 , -1025}, {-430 , -321}, { -44 , 1032}, {-1050 , -32}, {-1028 , -1856}, {-970 , -109}, { -572 , -1426},
- {-568 , 154}, {-142 , -189}, { -80 , 533}, { -38 , -632}, { -391 , 1275}, { -986 , -732}, {-479 , -510}, { -966 , 96},
- {-847 , -1387}, {-895 , 607}, {-368 , -930}, {-386 , 352}, { -290 , 10}, { -833 , 94}, {-528 , 1718}, { -210 , 115},
- {-529 , 857}, {-727 , -230}, {-128 , 31}, { 133 , 76}, { -275 , -777}, { -615 , -1367}, {-339 , -13}, {-1035 , 1231},
- { 448 , 851}, { 599 , 106}, {1103 , 1112}, { 635 , 1249}, { 761 , 774}, { 531 , -71}, { 722 , 473}, { 767 , 413},
- { 258 , 276}, { 346 , -380}, { 487 , 504}, {1114 , 122}, { 882 , 1553}, { 1983 , 1239}, {2126 , 1217}, { 1742 , 1262},
- { 135 , -252}, { 216 , 545}, { 500 , -125}, {1379 , 1910}, { 304 , 76}, { 1509 , 609}, {1543 , 1385}, { 542 , 1831},
- {-240 , -467}, { 771 , 652}, { 913 , 280}, {1307 , 716}, { 1834 , 1029}, { 1049 , 491}, {1624 , 733}, { 2495 , 1944}
- },
- {
- {-729 , -852}, {-590 , 306}, {-398 , 295}, { -31 , 13}, {-659 , -75}, {-604 , -1229}, {-519 , -675}, {-823 , 47},
- {-755 , -207}, {-818 , -424}, {-705 , -1285}, {-258 , -828}, {-807 , -707}, {-182 , -712}, {-928 , 3}, {-455 , -1149},
- {-844 , 422}, {-596 , -1008}, {-504 , -470}, {-459 , 737}, {-338 , -728}, {-836 , 1028}, {-613 , 1242}, {-609 , 1292},
- {-285 , 36}, {-280 , -424}, { 100 , 126}, {-459 , -135}, {-159 , -151}, {-287 , 190}, { 56 , -262}, {-264 , -317},
- { -8 , 603}, { 63 , 301}, { 537 , -155}, { 289 , 569}, { 193 , -412}, { 864 , 79}, { 686 , 399}, { 842 , 1657},
- { 115 , -211}, { 608 , 340}, { 12 , -650}, { 711 , 1103}, { 101 , 510}, { 358 , -416}, {1266 , 453}, { 532 , 612},
- {-256 , -680}, { 41 , 1163}, { 597 , 793}, { 484 , -61}, { 476 , 256}, {1729 , 1246}, {1209 , 1483}, {1472 , 1113},
- { 389 , 330}, { 176 , -388}, {1025 , 317}, {1049 , 732}, {1480 , 1108}, {1285 , 616}, {1730 , 999}, {2001 , 1669}
- }
-};
-const Word16 SN_TCVQ_CB_SUB3_fx[4][32][2] =
-{//Qlog2(2.56)
- {
- {-377 , -872}, {-407 , 801}, {-611 , -449}, {-397 , -87}, {-476 , -1063}, {-797 , -249}, {-263 , -662}, {-473 , 1508},
- {-716 , 310}, {-616 , -982}, {-742 , -1326}, { 197 , 327}, {-894 , -1556}, {-871 , -1259}, {-708 , -1380}, {-789 , -848},
- { 64 , -313}, { -59 , -547}, { -2 , 67}, { 363 , -167}, { 633 , 1840}, { 232 , -357}, {1243 , 1492}, {1640 , 973},
- { 203 , 518}, { 511 , 946}, { 612 , 241}, {1085 , 724}, { 811 , 326}, { 863 , 241}, { 556 , 534}, {1956 , 2087}
- },
- {
- {-948 , 28}, {-827 , -1180}, {-348 , -331}, { -36 , 216}, {-1453 , -1162}, {-682 , -639}, {-747 , -1517}, {-704 , 1228},
- {-535 , -988}, {-550 , -109}, {-478 , 580}, {-310 , -699}, {-1308 , -225}, {-775 , -1581}, {-831 , -613}, {-120 , -222},
- { 32 , 200}, { 120 , -221}, { 470 , 466}, { 808 , 313}, { 950 , 711}, { 430 , -576}, {1984 , 1405}, {1645 , 887},
- { 131 , 1148}, { 286 , 508}, { 342 , -236}, {1003 , 1202}, { 317 , -726}, {1493 , 732}, {1336 , 694}, {2382 , 1772}
- },
- {
- {-874 , -374}, {-237 , 26}, { 15 , 870}, {-710 , 433}, { 40 , -769}, {-1059 , -1350}, { 65 , 208}, {-1012 , -1369},
- { -79 , -459}, {-671 , -942}, { -12 , 56}, {-162 , -431}, {-820 , -1073}, { -886 , -136}, {-327 , -501}, { -55 , -14},
- { 652 , 647}, { 365 , 411}, { 614 , 252}, { 154 , 215}, { 12 , 62}, { 226 , 177}, {1689 , 1213}, { 751 , 179},
- { 31 , 182}, { 281 , -291}, {-354 , -642}, { 939 , 924}, { 619 , 90}, { 1675 , 1130}, { 827 , 272}, { 1550 , 1446}
- },
- {
- {-366 , -916}, {-346 , -234}, {-518 , -140}, { 26 , 305}, {-254 , -92}, {-634 , -976}, {-493 , -1076}, {-334 , -913},
- {-566 , 68}, { 102 , 216}, {-296 , -927}, {-501 , -1030}, {-437 , -1006}, {-146 , -145}, {-211 , -202}, { 62 , 359},
- { 163 , -122}, { 759 , 553}, { 82 , 207}, {-177 , -243}, { 163 , 343}, {1152 , 929}, { 197 , 248}, { 43 , -147},
- { 169 , 371}, {-468 , -1043}, { 686 , 418}, { 563, 245}, {1052 , 843}, { 259 , 341}, {1063 , 637}, { 865 , 654}
- }
-};
-
-
-const Word16 AR_SVQ_CB1_fx[32][8] = /* x2.56 */
-{//Qlog2(2.56)
- { -1, 4, 16, 4, 45, -110, 10, 167, },
- { -3, 2, 8, -12, -7, 23, 279, -46, },
- { 0, 2, 1, 8, -73, -40, 71, -97, },
- { 0, 2, 42, 74, -39, 72, 27, 8, },
- { 0, 1, 9, -6, 40, -65, -55, -128, },
- { 0, 0, 8, -10, -43, 105, -5, -126, },
- { 0, 0, 12, -3, -98, -18, -88, -73, },
- { 0, 1, -6, -12, -49, -179, -30, -15, },
- { -1, 0, 24, 78, 25, -69, -26, -14, },
- { 0, 1, -1, -29, 23, -65, -126, 34, },
- { 2, -4, -23, -7, -13, -2, -22, -4, },
- { -1, 1, -2, 44, -54, -58, 107, 60, },
- { 0, 1, -3, -15, -54, 97, -100, 41, },
- { 0, -2, -81, 93, -13, 18, -31, -75, },
- { -1, 2, 0, -5, 166, -64, -48, 8, },
- { -2, 0, -27, -108, 36, 3, 12, -80, },
- { 0, 0, 0, 4, 82, -1, 79, 54, },
- { 1, -4, 5, -9, -38, 289, 16, 16, },
- { -1, 2, 6, -68, 61, 67, -31, 100, },
- { 3, -6, 2, -2, -1, -6, -217, 273, },
- { 0, 1, -43, -62, -7, -60, 28, 78, },
- { -1, 2, 10, 0, 76, 84, -55, -45, },
- { -1, -2, 4, 5, -32, 75, 70, 176, },
- { 2, -1, 0, 6, 27, 29, -220, -97, },
- { -1, 1, 90, -56, -10, -16, 29, 8, },
- { -1, 3, -10, 0, 2, -24, 49, -336, },
- { -1, 1, -8, -9, 55, -134, 105, -44, },
- { 0, 1, -16, 69, 51, 40, -51, 98, },
- { 0, 2, -12, -32, -140, 49, 50, 26, },
- { 0, 3, 8, 29, 77, 24, 76, -103, },
- { -1, 2, -24, -18, 7, 100, 94, 5, },
- { 0, -1, 10, 26, -87, -34, -56, 103, }
-};
-
-const Word16 AR_SVQ_CB2_fx[16][8] = /* x2.56 */
-{//Qlog2(2.56)
- { -37, -59, 208, -88, 54, 58, -16, -24, },
- { 0, -98, 9, -65, -182, -21, 19, 9, },
- { -1, 110, -8, 59, 201, 9, -38, -22, },
- { -1, 40, -22, -183, 46, -162, -38, -6, },
- { 12, 2, -193, 64, -43, -48, 11, 9, },
- { -83, 175, -8, -55, -65, 66, 26, 6, },
- { 29, 3, 2, -10, -100, 293, 75, -12, },
- { 7, -54, -76, -91, 63, 119, -84, -84, },
- { 3, 7, 6, 6, -30, 15, -176, 168, },
- { -10, 45, 26, 57, -92, -68, -117, -134, },
- { 0, -37, -34, -69, 106, 54, 121, 131, },
- { -25, -64, 7, 205, 1, 93, 27, 6, },
- { 64, 28, 51, 8, -7, 18, 27, 0, },
- { -20, 44, 57, 78, -55, -170, 88, 93, },
- { 12, -125, 12, 56, 100, -160, -87, -3, },
- { -7, -18, -7, -6, 36, -54, 175, -176, }
-};
-
-
-const Word16 W_DTX_HO_FX[HO_HIST_SIZE] = /* Q15 */
-{
- 6554, 5243, 4194, 3355, 2684, 2147, 1718, 344
-};
-
-
-const Word16 ENR_ATT_fx[5] = /*Q8*/
-{
- 459, 357, 281, 255, 255
-};
-
-
-const Word16 HO_ATT_FX[5] = /* Q15 */
-{
- 17597, 20205, 22410, 23198, 23198
-};
-
-const Word16 uniform_model[] = { MAX_AR_FREQ, MAX_AR_FREQ / 2, 0 }; // Q0
-
-
-/*-----------------------------------------------------------------*
- * LSF quantization - mid-frame quantization tables
- *-----------------------------------------------------------------*/
-
-
-const Word16 tbl_mid_gen_wb_2b_fx[] =//Q13
-{
- 3814, 5145, 5856, 5290, 5277, 4880, 4877, 4273, 3868, 3776, 3392, 3163, 3120, 3019, 3395, 5814,
- 1482, 861, 1968, 3198, 3105, 3737, 3749, 4525, 4982, 4828, 5023, 5335, 5327, 5296, 5092, 3444,
- 3955, 3851, 1520, 1666, 1554, 1385, 1537, 1276, 1443, 1526, 1597, 1636, 1867, 2041, 2483, 2059,
- 7038, 8112, 7324, 6969, 6877, 7028, 6987, 7098, 7003, 6955, 6927, 6808, 6685, 6459, 5871, 6047,
-};
-
-const Word16 tbl_mid_gen_wb_4b_fx[] =
-{//Q13
- 5532, 5133, 2125, 3516, 4905, 5624, 6338, 6918, 6854, 6354, 5345, 3996, 3603, 5588, 6962, 7511,
- 4218, 4157, 4892, 6332, 5786, 2931, 2749, 2306, 3420, 4629, 5591, 6249, 6638, 7273, 7904, 8379,
- 993, 369, 2927, 5138, 4840, 5892, 5331, 5158, 3956, 3130, 3324, 5022, 5292, 3974, 2488, 1119,
- 1067, 2471, 6356, 4184, 3166, 3224, 3980, 5055, 4965, 4822, 3843, 2328, 1438, 916, 2514, 8248,
- 3788, 949, 522, 1709, 1932, 3306, 3287, 4521, 5432, 5291, 5644, 6116, 6166, 5943, 5631, 2088,
- 7865, 8237, 6466, 4043, 3793, 4589, 4885, 5405, 6002, 6746, 7203, 7361, 6982, 6157, 3994, 2143,
- 2837, 7217, 7926, 7751, 7605, 7549, 6937, 6852, 6270, 5895, 5612, 5245, 4862, 3654, 3139, 6321,
- 4317, 3387, 1035, 2799, 2769, 3400, 3054, 2246, 2307, 1829, 1456, 1007, 1055, 895, 782, 108,
- 7164, 8021, 6869, 6458, 6311, 5505, 5577, 4491, 3934, 3760, 3244, 2798, 2498, 2166, 1950, 4759,
- 5758, 5400, 1203, 687, 647, 963, 1486, 2000, 2998, 3179, 3634, 4296, 4465, 3719, 3275, 4785,
- 1051, 1802, 6133, 6475, 6875, 6981, 7181, 7303, 7136, 7036, 7276, 7197, 6986, 7118, 6659, 5813,
- 4095, 6275, 6049, 4850, 3198, 4942, 3257, 1456, 1327, 504, 559, 1472, 3985, 5835, 5772, 7356,
- 6814, 7430, 4049, 2579, 4315, 2443, 3236, 3107, 2458, 2891, 2553, 1923, 1871, 2068, 3583, -188,
- 412, 238, 247, 507, 498, 540, 811, 767, 679, 480, 416, 306, 574, 532, 731, 2227,
- 8495, 9589, 8346, 7953, 7655, 7990, 8089, 8412, 8530, 8482, 8421, 8420, 8464, 8242, 7698, 7341,
- 3085, 2920, 3059, 3020, 1227, -101, -417, -872, -195, 1126, 1766, 2513, 2649, 3451, 4444, 1734
-};
-
-
-const Word16 tbl_mid_gen_wb_5b_fx[] =
-{//Q13
- 6510, 8058, 7103, 6095, 6483, 5866, 6026, 6443, 6882, 6907, 7015, 6581, 5649, 4044, 2816, 2519,
- 3778, 2123, 3580, 4221, 2598, 4631, 2844, 4905, 5446, 4529, 5186, 6228, 6210, 5693, 6213, -4670,
- 9050, 9934, 8441, 7921, 7546, 7840, 7977, 8335, 8679, 8706, 8703, 8607, 8560, 8375, 7759, 6405,
- 4243, 5775, 2939, 5887, 4078, 3117, 5267, 5680, 4589, 2401, 731, 1011, 1657, 4733, 7051, 3992,
- 2508, 3156, 3347, 1605, 4450, 4633, 3476, 6019, 4083, 3824, 5133, 6020, 3253, 1368, 1736, 13507,
- 5934, 6372, 4494, 2957, 4424, 6667, 8167, 8413, 7957, 7139, 5518, 3059, 2829, 2821, 2773, 3274,
- 4984, 5566, 5831, 4556, 5732, 6738, 6689, 4683, 2265, 4214, 7242, 9989, 9776, 9068, 4748, 2292,
- 2601, 4933, 2764, 4923, 3763, 3678, 5596, 2079, 6108, 6824, 5507, 5612, 6793, 5553, 1140, 9993,
- 7084, 6685, 5313, 5196, 3111, 5337, 3535, 2476, 2477, 1737, 2090, 4033, 5680, 6548, 7310, 11811,
- 8140, 8602, 7166, 6738, 6018, 5299, 5686, 4722, 4108, 4456, 3713, 3131, 2658, 2336, 2250, 8051,
- 727, 1865, 6073, 3932, 2258, 2413, 4823, 5733, 5101, 6126, 4690, 1130, 1172, 1479, 3956, 7204,
- 6042, 1024, 5371, 5997, 4964, 5575, 5078, 5843, 6909, 8465, 8601, 6137, 5699, 8049, 9922, 8318,
- 2728, 1625, 4750, 5004, 5799, 4938, 6353, 3274, 1781, 3095, 1479, 3136, 5470, 1391, -626, 2422,
- 4407, 3228, 1266, 1488, 1222, 963, 1148, 1182, 1330, 1770, 860, 381, 813, 1268, 2352, 3956,
- 1683, -120, 83, 1239, 946, 1609, 1982, 3215, 3950, 4200, 4497, 4898, 4551, 3595, 2345, 2444,
- 1055, 3207, 7460, 6808, 7103, 6980, 7902, 8196, 6821, 6190, 6405, 7414, 7967, 7506, 6921, 9871,
- 3164, 7995, 8446, 8770, 8443, 8302, 7372, 7049, 6090, 5698, 5090, 4792, 4996, 4874, 4285, 6685,
- 3681, 319, 536, 3174, 4495, 5486, 5807, 5751, 5461, 4423, 3556, 3449, 5148, 7560, 6277, 3783,
- 1987, 4209, 6954, 5880, 7459, 7762, 4326, 4958, 5154, 2150, 2988, 2469, 1175, 1099, 3999, 3950,
- 1306, 2303, 7748, 8238, 6116, 2824, 1772, 1130, 2538, 3345, 5317, 4773, 3668, 5458, 5519, 5594,
- 4140, 4329, 3339, 3001, 2669, -79, -582, -1729, -680, 1294, 2752, 3700, 3627, 4428, 4950, 2744,
- 5309, 3611, 993, 3526, 2043, 3938, 2069, 1434, 4173, 2609, 2704, 3690, 3686, 1894, 1401, -1682,
- 6091, 4810, 970, 1063, 1707, 3056, 4597, 6742, 7397, 6913, 7359, 7884, 7571, 6830, 6039, 3823,
- 6599, 6006, 1248, 4330, 6935, 3784, 3535, 3902, 3221, 5384, 5691, 5997, 5975, 6731, 9125, 5385,
- 204, 242, 2009, 3375, 3412, 3407, 2691, 2547, 598, -150, 67, 250, 618, 1185, 1987, 1157,
- 4986, 7977, 6971, 1528, 86, 281, 1497, 3002, 4193, 4430, 4721, 5317, 6001, 6181, 6962, 5480,
- 6914, 7963, 5254, 3050, 5365, 3224, 3781, 3044, 2571, 3155, 2243, 1612, 2157, 2526, 2784, -1629,
- 7350, 6702, 2435, 1937, 2549, 1978, 2819, 2817, 2059, 2493, 3408, 2344, 1239, 1177, 914, 3763,
- 4362, 3105, -1457, -1760, 314, 1452, 2603, 1642, 1670, 1652, 2258, 2492, 3844, 4399, 5213, 660,
- 350, 357, 109, 83, -555, -886, -714, -587, -120, 25, 189, 531, 591, 146, 156, 1435,
- 498, 211, 3062, 6766, 7150, 8142, 7531, 7527, 7855, 6898, 6613, 6480, 5290, 4310, 5341, 4129,
- 2753, 6959, 7088, 4622, 2646, 2395, 1756, 325, 488, 259, -125, -577, -553, 615, 557, 4617,
-};
-
-
-
-const Word16 tbl_mid_voi_wb_1b_fx[] = /* Q13*/
-{
- 4551, 4599, 4754, 5035, 4982, 5228, 5318, 5603, 5699, 5652, 5642, 5766, 5825, 5874, 5819, 6056,
- 3816, 3355, 2321, 2712, 2900, 2715, 2790, 2508, 2506, 2610, 2617, 2419, 2538, 2622, 3004, 2725,
-};
-const Word16 tbl_mid_voi_wb_4b_fx[] =//Q13
-{
- 4337, 4235, 3526, 4083, 3514, 5457, 3168, 2509, 4418, 5021, 1313, 2952, 5347, 3893, 8325, 11758,
- 4180, 4037, 3965, 3481, 4028, 3284, 2644, 4585, 4749, 3076, 3211, 1101, 4175, 7440, 5745, -4105,
- 4239, 3957, 4450, 4974, 5400, 5734, 6246, 6586, 7774, 2699, 2783, 3474, 1345, -316, 5069, 4904,
- 3964, 3810, 2673, 3031, 2249, 3168, 3155, 4204, 7316, 7176, 8680, 7147, 4918, 4136, 3142, 3011,
- 4071, 3853, 3898, 3973, 3464, 2878, 5783, 5341, 1725, 801, 1194, 4239, 6866, 4950, 794, 6270,
- 3933, 3750, 4931, 3667, 3585, 2550, 4308, 5757, 4503, 7081, 4893, 1076, 109, 1650, 1887, 8861,
- 4803, 4827, 4969, 5511, 5768, 4327, 5277, 4934, 6909, 7672, 5355, 3940, 9990, 9622, 7457, 4202,
- 4515, 4259, 2444, 4847, 3728, 4599, 4975, 6144, 4087, 4367, 7025, 5028, 2405, 7014, 13366, 6264,
- 4746, 4556, 5408, 5866, 4733, 4088, 3965, 3329, 4669, 3105, 5918, 7824, 6026, 9177, 1856, 13229,
- 4130, 4214, 2516, 3542, 4847, 3751, 3704, 2380, 4190, 4787, 4651, 4981, 5702, -27, -2961, 129,
- 4461, 4724, 5233, 4680, 6010, 7222, 6351, 3069, 605, 5934, 5627, 3836, 3490, 6060, 3556, 2585,
- 4628, 4723, 5465, 4180, 4460, 6173, 5915, 7260, 4703, 4114, 3938, 9585, 8085, 3781, 7520, 625,
- 5002, 5621, 6352, 6914, 7170, 7719, 7585, 8408, 8360, 7883, 7370, 7222, 6616, 6002, 5565, 9394,
- 4059, 4121, 4178, 4417, 3437, 1460, 1031, 111, 585, 1708, 4219, 5419, 2585, 3195, 6149, 3221,
- 3394, 2776, 1970, 2707, 2983, 3931, 3247, 1729, 449, -109, -46, -469, 397, 1980, 2305, 1573,
- 3259, 1870, 242, 392, 748, 615, 1185, 1285, 2259, 2687, 2212, 1762, 2174, 1887, 1847, 2073,
-};
-const Word16 tbl_mid_voi_wb_5b_fx[] =//Q13
-{
- 4182, 3820, 4103, 5620, 4100, 4478, 3949, 5053, 2918, 3083, 4229, 3732, 1823, 6350, 17230, 4601,
- 4361, 4077, 2236, 4128, 3216, 4673, 6022, 6522, 5746, 4282, 3121, 4448, 6457, 12573, 4401, 7796,
- 4228, 4086, 4375, 4320, 4474, 4735, 4427, 5616, 5975, 138, 5887, 3722, 2304, -3430, 4995, 6246,
- 4320, 4344, 4008, 4327, 3323, 6835, 3627, 3330, 3123, 3971, 2382, 1801, 6422, 3162, 9038, 14129,
- 4193, 4202, 4413, 2703, 4175, 4330, 2615, 7600, 1717, 3506, 5671, 7170, 3545, 2350, -2738, 7287,
- 4170, 3912, 4323, 3821, 4450, 6765, 7496, 8107, 7447, 5525, 3088, 1963, 2014, 3330, 976, 1002,
- 4583, 4419, 3584, 4125, 4783, 5133, 3188, 5000, 4812, 4639, 10038, 7018, 5114, 5567, 3292, -6364,
- 3926, 4092, 2710, 2721, 1799, 3509, 4542, 3351, 4583, 5877, 6539, 5135, 981, 4029, 7221, 592,
- 4624, 4567, 4468, 4630, 5710, 5222, 5883, 2562, 8453, 2825, 109, 6491, 1210, 2921, 7292, 7118,
- 4245, 4160, 5119, 4356, 5544, 3034, 1507, 4179, 5971, 1949, 3388, 613, 4995, 9019, 6755, -628,
- 4905, 4962, 4529, 7025, 4905, 4470, 5063, 3440, 6348, 6102, 4319, 4395, 7515, 6549, -3697, 6513,
- 4683, 4592, 5303, 4593, 4171, 5264, 6116, 7434, 4105, 5454, 2544, 8493, 6491, 894, 8983, -2406,
- 3632, 3435, 3988, 4195, 3684, 2173, 6735, 4552, -339, 763, 308, 3463, 6123, 2895, 2831, 5715,
- 4316, 4111, 2236, 2682, 1058, 544, 2541, 1677, 3549, 2767, 3376, 5901, 6689, 5811, 6617, 3311,
- 4487, 4285, 4992, 3656, 5970, 4547, 3975, 5998, 4985, 6614, 4807, 1971, 14937, 4388, 6153, 3352,
- 4601, 4710, 4957, 4454, 4873, 7207, 5881, 3461, 2282, 1829, 5617, 9926, 10043, 7722, 3232, 4629,
- 3965, 3837, 2088, 4265, 5042, 3478, 4453, 2804, 4162, 4858, 4315, 4343, 5193, -1823, -5028, -1137,
- 3439, 2837, 2549, 4062, 2857, 2657, 2662, 5088, 10548, 8913, 6631, 6395, 5568, 3210, 2431, 3400,
- 4073, 3839, 5806, 5296, 3766, 2342, 2585, 891, 3144, 2988, 6807, 4626, 3700, 5854, 1543, 16158,
- 4189, 4045, 4293, 4527, 4008, 1413, 4871, 6081, 3297, 6546, 5006, -365, -2369, 1375, 5522, 8787,
- 4778, 4782, 4941, 4538, 4497, 3129, 4934, 4371, 7175, 6923, 8620, 10236, 8664, 10088, 10923, 7314,
- 4945, 5016, 6439, 6353, 6624, 6463, 6938, 7547, 7004, 7283, 7655, 7149, 7650, 2747, 3416, 14892,
- 4776, 5431, 5515, 6194, 5700, 5485, 2795, 5476, 4024, 8891, 2930, 7916, 3428, 8070, 5920, 13440,
- 4718, 4986, 4800, 5286, 6567, 6554, 6601, 1235, -1216, 6556, 6098, 3962, 4361, 5536, 5517, 3935,
- 4741, 4679, 5593, 4891, 3849, 5675, 6487, 6239, 7062, 12044, 10918, 2438, 3977, 7296, 8445, 6625,
- 4859, 5781, 6592, 7399, 8027, 8858, 8139, 8951, 8760, 5506, 6294, 6540, 6516, 7527, 7688, 4084,
- 4077, 3771, 3650, 3381, 3367, 4048, 3899, 4382, 3017, -2156, -1464, -2207, 828, 4838, 2071, 2363,
- 3796, 3437, 3558, 3842, 2170, 4311, 2602, 696, 1939, 2576, 1239, 328, -129, -647, 1702, 2893,
- 4015, 3506, 367, 1350, 3328, 3700, 3827, 2439, 1434, 3887, 2279, 1593, 3673, 5508, 3905, -2973,
- 4088, 3990, 3732, 3256, 4718, 1375, 152, -99, -254, 1140, 3578, 3316, 2195, 2408, 5027, 999,
- 3749, 3175, 1475, 686, 2006, 1959, 1558, 3059, 5374, 5014, 2439, 2396, 2467, 2218, 1031, 7866,
- 2037, 701, 124, 278, 328, 253, 660, 528, 826, 473, 801, 800, 1053, 1330, 804, 967,
-};
-
-
-const Word16 tbl_mid_unv_wb_4b_fx[] =//Q13
-{
- 5190, 3143, 50, 2521, 5180, 6320, 3890, 3365, 3582, 3517, 3406, 3049, 2864, 1621, 1932, -950,
- 6813, 6650, 2135, 972, 452, 1453, 3221, 1697, 3165, 4443, 5924, 6297, 3907, 2862, 3586, 4625,
- 3204, 2673, 6499, 4319, 1054, 559, 4404, 5815, 5072, 6625, 4493, 2479, 1773, 1606, 2099, 8330,
- 1924, 2666, 4171, 5517, 5898, 7238, 7318, 7696, 7250, 6269, 6164, 6038, 5249, 4284, 4147, 2828,
- 2834, 788, 77, 2016, 1824, 3224, 3441, 4472, 6286, 6717, 6783, 6743, 6715, 7051, 6562, 2531,
- 6386, 5634, 5761, 5184, 3523, 4284, 1867, 1045, 579, 1176, 1743, 2599, 5276, 5564, 5368, 7914,
- 1795, 1380, 5184, 9326, 8023, 3138, 1258, 1729, 3328, 3934, 5169, 5645, 5271, 5894, 5591, 5145,
- 5734, 5844, 8799, 8753, 5628, 5710, 5255, 4872, 5349, 3431, 3006, 2486, 1418, 974, 1115, 2035,
- 4194, 8421, 1812, 6078, 3003, 3455, 6719, 7501, 2120, 1892, 2658, 2317, 2296, 5735, 6553, 4485,
- 8072, 11456, 6455, 5069, 4918, 4936, 4819, 4932, 6029, 6246, 6289, 6704, 6749, 5337, 4526, 3974,
- 3709, 5584, 4884, -1502, 4864, 2333, 606, 5976, 6438, 2413, 1937, 3663, 5593, 6989, 6450, 3555,
- 3843, -6887, 3697, 3880, 4448, 4264, 5961, 4198, 3583, 3942, 3606, 3768, 4457, 4374, 4096, 4524,
- 2551, 6781, 7017, 2902, 9227, 8728, 7130, 1873, 2308, 4393, 3981, 3976, 4002, 4080, 4820, 5611,
- 220, -174, -43, -542, 449, 1470, 1759, 1893, 1294, 995, 723, 723, 769, 994, 1369, 4413,
- 1651, 2259, 3079, 2913, 1176, -491, -1262, -827, -217, 908, 1126, 1751, 1901, 1765, 2656, 247,
- 5380, 7307, 7727, 8135, 8270, 8471, 8792, 8573, 8335, 8420, 8057, 7562, 7119, 7458, 6806, 7385,
-};
-const Word16 tbl_mid_unv_wb_5b_fx[] =
-{//Q13
- 6237, 6323, 1151, 763, 4218, 6546, 8437, 8701, 7456, 6604, 4631, 2901, 3050, 1793, 1955, 2260,
- 5542, 4318, 5343, 5521, 5999, 5477, 5265, 5234, 4616, 3329, 3444, 1816, -442, 45, -2, 8922,
- 6370, 8208, 6583, 5630, 5401, 5458, 5188, 5595, 6637, 6891, 6962, 6967, 7014, 6330, 5445, 3101,
- 2750, 2858, 5206, 4594, 3310, 3494, 2463, 3410, 3405, 6151, 7682, 8593, 4440, 3715, 2946, -4371,
- 1157, 661, 3743, 6418, 7515, 8319, 7485, 7298, 7928, 7515, 6812, 5671, 5095, 5122, 4997, 3940,
- 5133, 3446, 2693, 1620, 1860, 2663, 4603, 6289, 7451, 7255, 7511, 7486, 8869, 8704, 8431, 6632,
- 2497, 6706, 7036, 3437, 10854, 8893, 6033, 3021, 2936, 4766, 4145, 4097, 5177, 4883, 5920, 7612,
- -152, -54, 3955, 1170, 5562, 4695, 1370, 8293, 3106, 1942, 5508, 4878, 3495, 1094, 1079, 5401,
- 482, 373, 220, -355, -236, -328, -426, -147, 244, 563, 567, 915, 1012, 676, 804, 2721,
- 437, 816, 3208, 3395, 2501, 3795, 4380, 2553, 399, 31, -519, -475, -162, 1755, 2852, 1040,
- 2067, 2125, 1247, 2393, 2872, 2218, 3502, 3977, 4712, 4275, 2600, 2380, 2314, 2893, 3555, 13929,
- 3967, -635, -1752, 2490, 303, 969, 1045, 2839, 5670, 4651, 5202, 5248, 4182, 4381, 5492, 53,
- 3041, 2494, 9264, 4970, 360, -3795, 6296, 6475, 4482, 6667, 5265, 2908, 2381, 2889, 3718, 5160,
- 3364, 4119, 5929, 3164, -745, 9368, 1652, -719, 6323, 5113, 1919, 1260, 2630, 3585, 2224, 3178,
- 1643, 837, 8074, 8337, 4237, 2332, 2190, -1176, 1968, 1238, 2354, 4756, 5269, 5759, 4962, 5411,
- 7590, 6471, 2635, 1869, 1209, 1505, 2118, 892, 1652, 3717, 5010, 3969, 2265, 2428, 3278, 5027,
- 7289, 8658, 11183, 8913, 6084, 6673, 5961, 4041, 3839, 2643, 2094, 3215, 2956, 2895, 3327, 5063,
- 5814, -4982, 1120, 2112, 4384, 5288, 6052, 4305, 4724, 5062, 3380, 4200, 5838, 7181, 6383, 4771,
- 3891, 7361, 4160, 1422, 4971, 939, 281, 3585, 4817, 1176, -306, 260, 3815, 8273, 7095, 1529,
- 8179, 19416, 3518, 3547, 4619, 4231, 3359, 3606, 5131, 4469, 5204, 5115, 4941, 4772, 4175, 5160,
- 4539, 5393, 2706, 5371, 1468, 8488, 10356, 2778, 1426, 371, 8093, 7808, 5208, 5996, 6081, 5057,
- 3266, 3481, -4953, -5638, 4022, 5502, 3586, 3117, 2737, 3826, 3658, 3933, 3602, 4920, 4959, 3483,
- 3846, 9592, 3360, 6480, 1215, 3170, 5218, 8641, 664, 2695, 3353, 1479, 1687, 6049, 7074, 4696,
- 2231, 4497, 6761, 6799, 5941, 5445, 8083, 7944, 5879, 3744, 2518, 6482, 6581, 6096, 6379, -133,
- 3360, 6078, 1064, 13807, 8185, 3605, 4327, 3777, 6211, 4977, 5015, 4871, 5825, 2506, 2130, 4946,
- 5412, 4507, 952, 4098, 5027, 3949, 3501, 1778, 1955, 2126, 1626, 3669, 4446, -1101, 736, -2708,
- 4824, 7481, 8884, -2619, -2754, 281, 4158, 3251, 4602, 2946, 3915, 6169, 6075, 3495, 3266, 4375,
- 6135, 2668, 6784, 10326, 6892, 5479, 1511, 3070, 6410, 9193, 6954, 1084, 2873, 7030, 8139, 5670,
- 7255, 5764, 5122, 5787, 3129, 5475, -2720, 3770, -827, 872, 1591, 4645, 7218, 5513, 5778, 6323,
- 1185, -13100, 5560, 5867, 4153, 2591, 4923, 3450, 2062, 4251, 4289, 3397, 3835, 2082, 2343, 3172,
- 4460, 4411, 3940, 4420, 9410, -2789, -2525, -2877, -1868, 2850, 4490, 4093, 3162, 3889, 3800, 3492,
- 6408, 8292, 8434, 8544, 8707, 9146, 9377, 9301, 9063, 8945, 8346, 8173, 7175, 7254, 6120, 7420,
-};
-
-
-/*------------------------------------------------------------------------------*
- * AVQ - RE8 tables
- *------------------------------------------------------------------------------*/
-
-const Word16 select_table22[5][9] =
-{
- {1, 1, 1, 1, 1, 1, 1, 1, 1},
- {0, 1, 2, 3, 4, 5, 6, 7, 8},
- {0, 0, 1, 3, 6, 10, 15, 21, 28},
- {0, 0, 0, 1, 4, 10, 20, 35, 56},
- {0, 0, 0, 0, 1, 5, 15, 35, 70}
-}; // Q0
-
-/* value of leader element */
-const Word16 vals_a[36][4] =
-{
- {1}, {0,2}, {0,2}, {1,3}, {0,4}, {2,0}, {1,3}, {0,2,4},
- {2}, {1,3}, {2,0,4}, {0,4}, {1,5}, {1,3}, {2,0,4}, {0,2,4},
- {1,3,5}, {0,2,6}, {0,4}, {0,2,6}, {0,2,4,6}, {1,7}, {0,8}, {0,6},
- {0,2,8}, {0,4,8}, {1,9}, {0,2,10}, {0,8}, {0,6,10}, {0,12}, {0,4,12},
- {0,10}, {0,2,14}, {0,8,12}, {0,16}
-}; // Q0
-
-/* code parameter for every leader */
-const Word16 vals_q[36][4] =
-{
- {7,1}, {2,2,2}, {4,2,4}, {7,2,1}, {1,2,1}, {6,2,2}, {7,2,2}, {3,3,3,1},
- {8,1}, {7,2,3}, {5,3,4,1}, {2,2,2}, {7,2,1}, {7,2,4}, {7,3,2,1}, {4,3,4,2},
- {7,3,2,1}, {2,3,2,1}, {3,2,3}, {4,3,4,1}, {3,4,3,2}, {7,2,1}, {1,2,1}, {2,2,2},
- {3,3,3,1}, {2,3,2,1}, {7,2,1}, {2,3,2,1}, {2,2,2}, {2,3,2,1}, {1,2,1}, {2,3,2,1},
- {2,2,2}, {2,3,2,1}, {2,3,2,1}, {1,2,1}
-}; // Q0
-
-/* codebook start address for every leader */
-const UWord16 Is[36] =
-{
- 0, 128, 256, 1376, 240, 0, 1792, 2400, 5376, 5632, 12800, 3744,
- 21760, 22784, 31744, 38912, 45632, 3856, 52800, 53248, 57728, 60416, 4080, 61440,
- 61552, 62896, 63120, 64144, 64368, 64480, 64704, 64720, 64944, 65056, 65280, 65504
-}; // Q0
-
-/* A3 - Number of the absolute leaders in codebook Q3 */
-const Word16 AA3[NB_LDQ3] =
-{
- 0, 1, 4, 2, 3, 7, 11, 17, 22
-}; // Q0
-
-/* A4 - Number of the absolute leaders in codebook Q4 */
-const Word16 AA4[NB_LDQ4] =
-{
- 5, 6, 8, 9, 10, 12, 13, 14, 15,
- 16, 18, 19, 20, 21, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 34, 35
-}; // Q0
-
-/* I3 - Cardinality offsets for absolute leaders in Q3 */
-const UWord16 II3[NB_LDQ3] =
-{
- 0, 128, 240, 256, 1376, 2400, 3744, 3856, 4080
-}; // Q0
-
-/* I4 - Cardinality offset for absolute leaders in Q4 */
-const UWord16 II4[NB_LDQ4] =
-{
- 0, 1792, 5376, 5632, 12800, 21760, 22784, 31744, 38912,
- 45632, 52800, 53248, 57728, 60416, 61440, 61552, 62896, 63120,
- 64144, 64368, 64480, 64704, 64720, 64944, 65056, 65280, 65504
-}; // Q0
-
- /* Position of the first absolute leader on a spherical shell (or sphere) */
-const Word16 Da_pos[NB_SPHERE] =
-{
- 0, 2, 5, 8, 13, 18, 20, 22, 23, 25, 26, 27, 27, 28, 28, 28,
- 29, 30, 31, 31, 32, 32, 32, 32, 32, 34, 35, 35, 35, 35, 35, 35
-}; // Q0
-
-/* Number of absolute leaders on a spherical shell */
-const Word16 Da_nb[NB_SPHERE] =
-{
- 2, 3, 3, 5, 5, 2, 2, 1, 2, 1, 1, 0, 1, 0, 0, 1,
- 1, 1, 0, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 1
-}; // Q0
-
-/* Identification code of an absolute leader */
-const Word16 Da_id[NB_LEADER] =
-{
- 0x0001, 0x0004, 0x0008, 0x000B, 0x0020, 0x000C, 0x0015, 0x0024,
- 0x0010, 0x001F, 0x0028, 0x0040, 0x004F, 0x0029, 0x002C, 0x0044,
- 0x0059, 0x00A4, 0x0060, 0x00A8, 0x00C4, 0x012D, 0x0200, 0x0144,
- 0x0204, 0x0220, 0x0335, 0x04E4, 0x0400, 0x0584, 0x0A20, 0x0A40,
- 0x09C4, 0x12C4, 0x0C20, 0x2000
-}; // Q0
-
-/* Codebook number for each absolute leader */
-const Word16 Da_nq[NB_LEADER+2] =
-{
- 2, 2, 3, 3, 2, 4, 4, 3, 4, 4, 4, 3, 4, 4, 4, 4,
- 4, 3, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 0, 100
-}; // Q0
-
-
-/*------------------------------------------------------------------------------*
- * SWB TBE tables
- *------------------------------------------------------------------------------*/
-
-const Word16 skip_bands_SWB_TBE[NUM_SHB_SUBFR+1] = {0, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, 300, 320}; /* bands for SWB TBE quantisation Q0*/
-const Word16 skip_bands_WB_TBE[NUM_SHB_SUBFR/2+1] = {0, 10, 20, 30, 40, 50, 60, 70, 80}; /* bands for WB TBE quantisation Q0*/
-
-const Word16 interpol_frac_shb[NB_SUBFR * 2] =
-{
- 22938, 9830, 13107, 19660, 3277, 29490, 0, 32767 /* Q15*/
- /*0.7f, 0.3f, 0.4f, 0.6f, 0.1f, 0.9f, 0.0f, 1.0f */
-};
-/* All pass filter coeffs for interpolation and decimation by a factor of 2 */
-const Word16 AP1_STEEP_FX[ALLPASSSECTIONS_STEEP] = { 1985, 14072, 26500 }; /*Q15 Format */
-const Word16 AP2_STEEP_FX[ALLPASSSECTIONS_STEEP] = { 7230, 20838, 30852 }; /*Q15 Format */
-const Word16 cos_fb_exc_fx[32] = /* Q15 */
-{
- /*Q35*/
- 32767, 32138, 30274, 27246, 23170, 18205, 12540, 6393,
- 0, -6393, -12540, -18205, -23170, -27246, -30274, -32138,
- -32768, -32138, -30274, -27246, -23170, -18205, -12540, -6393,
- 0, 6393, 12540, 18205, 23170, 27246, 30274, 32138,
-};
-
-const Word16 Hilbert_coeffs_fx[4 * NUM_HILBERTS][HILBERT_ORDER1 + 1] = /* Q14 */
-{
- { 0, 14320, 0, -30699, 0, 16384}, /* num_Real[0] */
- {11897, 0, -28240, 0, 16384, 0}, /* num_Imag[0] */
- {16384, 0, -30699, 0, 14320, 0}, /* den_Real[0] */
- {16384, 0, -28240, 0, 11897, 0}, /* den_Imag[0] */
- {7671, 0, -23855, 0, 16384, 0}, /* num_Real[1] */
- { 2505, 0, -18139, 0, 16384, 0}, /* num_Imag[1] */
- {16384, 0, -23855, 0, 7671, 0}, /* den_Imag[1] */
- {16384, 0, -18139, 0, 2505, 0}, /* den_Imag[1] */
-};
-
-
-/* Overlap add window for SHB excitation used in analysis and synthesis */
-
-const Word16 window_shb_fx[L_SHB_LAHEAD] = /*sin, 1, sin */
-{
- /*Q15(round) */
- 1513, 4527, 7502, 10413, 13236, 15945, 18518, 20934, 23170, 25210,
- 27034, 28627, 29976, 31069, 31898, 32454, 32733, 32767, 32767, 32767,
-};
-
-/* Upsampled overlap add window for SHB excitation used transition generation */
-
-const Word16 window_shb_32k_fx[2 * L_SHB_LAHEAD] =
-{
- /*Q15(round) */
- 1513, 3020, 4527, 6015, 7502, 8958, 10413, 11825, 13236, 14590,
- 15945, 17232, 18518, 19726, 20934, 22052, 23170, 24190, 25210, 26122,
- 27034, 27830, 28627, 29301, 29976, 30523, 31069, 31483, 31898, 32176,
- 32454, 32593, 32733, 32751, 32767, 32767, 32767, 32767, 32767, 32767,
-};
-
-/* Short overlap add window for SHB excitation used in anal and synth */
-
-const Word16 subwin_shb_fx[SHB_OVERLAP_LEN + 1] =
-{
- /*Q15(round) */
- 0, 202, 802, 1786, 3129,
- 4799, 6754, 8946, 11321, 13821,
- 16384,18947, 21447, 23822, 26014,
- 27969, 29639, 30982, 31966, 32566,
- 32767
-};
-
-const Word16 window_wb_fx[L_SHB_LAHEAD / 4] =/*sin, 1 */
-{ 7502, 18518, 27034, 31898, 32767 }; /*Q15*/
-
-/* Short overlap add window for SHB excitation used in anal and synth */
-
-const Word16 subwin_wb_fx[SHB_OVERLAP_LEN / 2 + 1] =
-{ 0, 5126, 10126, 14876, 19261, 23170, 26510, 29197, 31164, 32365, 32767 }; // Q15
-
-/* Window for calculating SHB LPC coeffs */
-
-const Word16 win_lpc_shb_fx[(L_LOOK_12k8 + L_SUBFR + L_FRAME) * 5 / 8] =
-{
- /*Q15 */
- 1, 4, 10, 18, 28, 40, 54, 71, 89, 110, 134, 159, 186, 216, 248,
- 282, 318, 357, 397, 440, 485, 532, 581, 632, 686, 741, 799, 859, 921,
- 984, 1050, 1119, 1189, 1261, 1335, 1411, 1490, 1570, 1652, 1736, 1823,
- 1911, 2001, 2093, 2187, 2283, 2381, 2481, 2582, 2686, 2791, 2898, 3007,
- 3118, 3230, 3345, 3461, 3579, 3698, 3819, 3942, 4067, 4193, 4321, 4451,
- 4582, 4715, 4849, 4985, 5123, 5261, 5402, 5544, 5687, 5832, 5978, 6126,
- 6275, 6426, 6577, 6730, 6885, 7041, 7197, 7356, 7515, 7676, 7837, 8000,
- 8164, 8329, 8496, 8663, 8831, 9001, 9171, 9342, 9515, 9688, 9862, 10037,
- 10213, 10390, 10567, 10745, 10924, 11104, 11285, 11466, 11648, 11830, 12013,
- 12197, 12381, 12566, 12751, 12937, 13123, 13310, 13497, 13684, 13872, 14060,
- 14249, 14438, 14627, 14816, 15006, 15195, 15385, 15575, 15765, 15955, 16146,
- 16336, 16526, 16716, 16907, 17097, 17287, 17477, 17667, 17856, 18046, 18235,
- 18424, 18612, 18801, 18989, 19176, 19364, 19551, 19737, 19923, 20109, 20294,
- 20478, 20662, 20846, 21028, 21210, 21392, 21573, 21753, 21932, 22111, 22289,
- 22466, 22642, 22818, 22992, 23166, 23339, 23510, 23681, 23851, 24020, 24188,
- 24355, 24520, 24685, 24848, 25011, 25172, 25332, 25491, 25648, 25804, 25960,
- 26113, 26266, 26417, 26567, 26715, 26862, 27007, 27152, 27294, 27435, 27575,
- 27713, 27850, 27985, 28119, 28251, 28381, 28510, 28637, 28762, 28886, 29008,
- 29129, 29248, 29364, 29480, 29593, 29705, 29815, 29923, 30029, 30133, 30236,
- 30337, 30435, 30532, 30627, 30720, 30811, 30901, 30988, 31073, 31156, 31238,
- 31317, 31394, 31469, 31543, 31614, 31683, 31750, 31815, 31878, 31938, 31997,
- 32054, 32108, 32161, 32211, 32259, 32305, 32349, 32390, 32430, 32467, 32502,
- 32535, 32566, 32595, 32621, 32645, 32667, 32687, 32705, 32720, 32734, 32745,
- 32753, 32760, 32765, 32767
-};
-
-
-const Word16 win_lpc_hb_wb_fx[(L_LOOK_12k8 + L_SUBFR + L_FRAME) * 5 / 32] =
-{//Q15
- 17, 70, 157, 279, 435, 625, 849, 1106,
- 1396, 1718, 2071, 2454, 2867, 3309, 3779, 4276,
- 4799, 5346, 5917, 6510, 7125, 7759, 8411, 9081,
- 9766, 10465, 11177, 11900, 12633, 13373, 14120, 14872,
- 15627, 16384, 17141, 17896, 18648, 19395, 20135, 20868,
- 21591, 22303, 23002, 23687, 24357, 25009, 25643, 26258,
- 26851, 27422, 27969, 28492, 28989, 29459, 29901, 30314,
- 30697, 31050, 31372, 31662, 31919, 32143, 32333, 32489,
- 32611, 32698, 32751
-};
-
-const Word16 win_lpc_hb_wb_ivas_fx[(L_LOOK_12k8 + L_SUBFR + L_FRAME) * 5 / 32] =
-{//Q15
- 6, 51, 140, 274,
- 453, 675, 940, 1247,
- 1596, 1985, 2414, 2882,
- 3386, 3926, 4499, 5106,
- 5743, 6410, 7104, 7823,
- 8566, 9331, 10114, 10915,
- 11731, 12559, 13398, 14245,
- 15099, 15955, 16813, 17669,
- 18523, 19370, 20209, 21037,
- 21853, 22654, 23437, 24202,
- 24945, 25664, 26358, 27025,
- 27662, 28269, 28842, 29382,
- 29886, 30354, 30783, 31172,
- 31521, 31828, 32093, 32315,
- 32494, 32628, 32717, 32762
-};
-
-
-const Word16 ola_win_shb_switch_fold_fx[L_SUBFR16k] =
-{//Q15
- 322, 965, 1608, 2250, 2892, 3532, 4171, 4808,
- 5444, 6077, 6708, 7336, 7962, 8585, 9204, 9819,
- 10431, 11039, 11643, 12242, 12836, 13426, 14010, 14589,
- 15162, 15730, 16291, 16846, 17395, 17937, 18472, 18999,
- 19520, 20033, 20538, 21035, 21525, 22006, 22478, 22942,
- 23397, 23843, 24279, 24707, 25125, 25533, 25931, 26320,
- 26698, 27066, 27423, 27770, 28106, 28431, 28746, 29049,
- 29341, 29622, 29891, 30149, 30395, 30630, 30853, 31063,
- 31262, 31449, 31624, 31786, 31936, 32074, 32200, 32313,
- 32413, 32501, 32577, 32640, 32691, 32729, 32754, 32766
-};
-
-/* Window for calculating whitening filter for SHB excitation */
-
-const Word16 win_flatten_fx[L_FRAME16k / 2] = /*Q15 */
-{
- 3, 13, 28, 50, 78, 113, 154, 200, 254, 313,
- 378, 450, 528, 611, 701, 797, 899, 1006, 1120, 1239,
- 1365, 1496, 1632, 1775, 1923, 2076, 2235, 2400, 2569, 2745,
- 2925, 3110, 3301, 3496, 3697, 3902, 4112, 4327, 4546, 4770,
- 4999, 5232, 5469, 5710, 5955, 6205, 6458, 6715, 6976, 7240,
- 7508, 7779, 8054, 8331, 8612, 8896, 9183, 9472, 9764, 10059,
- 10356, 10655, 10956, 11260, 11566, 11873, 12182, 12493, 12805, 13119,
- 13434, 13750, 14067, 14385, 14703, 15023, 15342, 15663, 15983, 16304,
- 16625, 16945, 17265, 17586, 17905, 18224, 18542, 18860, 19176, 19492,
- 19806, 20119, 20431, 20741, 21049, 21355, 21660, 21963, 22263, 22561,
- 22857, 23150, 23441, 23729, 24014, 24297, 24576, 24852, 25125, 25395,
- 25661, 25923, 26182, 26437, 26689, 26936, 27179, 27418, 27653, 27884,
- 28110, 28332, 28549, 28761, 28969, 29172, 29370, 29563, 29751, 29934,
- 30112, 30284, 30451, 30613, 30769, 30920, 31065, 31205, 31338, 31467,
- 31589, 31705, 31816, 31921, 32020, 32113, 32199, 32280, 32355, 32423,
- 32486, 32542, 32592, 32636, 32673, 32704, 32730, 32748, 32761, 32767
-};
-
-const Word16 win_flatten_4k_fx[L_FRAME16k / 8] = /*Q15 */
-{
- 13, 114, 315, 615, 1013, 1505, 2089, 2761,
- 3517, 4353, 5263, 6241, 7282, 8378, 9525, 10713,
- 11937, 13188, 14458, 15741, 17027, 18310, 19580, 20831,
- 22055, 23243, 24390, 25486, 26527, 27505, 28415, 29251,
- 30007, 30679, 31263, 31755, 32153, 32453, 32654, 32755
-};
-
-const Word16 wb_bwe_lsfvq_cbook_8bit_fx[256 * 6] =
-{//Q15
- 2107, 3430, 5123, 6677, 9403, 13197,
- 4031, 5069, 7343, 8910, 10647, 12245,
- 2037, 3542, 6708, 8763, 10505, 12655,
- 5732, 6373, 7912, 9546, 12584, 14230,
- 2028, 3337, 5473, 7880, 10269, 12450,
- 5809, 6497, 8317, 9624, 11497, 14007,
- 2428, 3962, 5675, 7724, 11361, 13385,
- 6348, 8307, 8898, 9948, 11058, 13350,
- 3552, 4421, 5896, 7143, 9975, 13233,
- 5719, 6344, 7482, 8403, 10765, 13455,
- 3509, 4379, 5896, 7437, 11765, 14307,
- 4521, 8122, 8791, 9856, 11232, 14020,
- 2175, 3970, 7788, 9803, 11334, 12910,
- 4511, 8156, 8886, 10450, 12686, 14959,
- 4223, 5285, 7053, 8423, 11317, 14566,
- 7159, 8379, 9040, 10122, 11799, 14270,
- 1866, 3064, 4848, 7227, 11225, 13963,
- 5915, 6631, 8740, 10002, 11385, 12726,
- 3342, 4547, 6475, 9404, 11994, 13418,
- 6156, 6880, 8932, 10353, 12380, 13746,
- 2648, 4972, 7575, 9476, 12117, 13875,
- 5822, 6526, 8747, 10941, 12671, 13971,
- 4032, 5110, 7592, 9267, 11374, 14390,
- 6864, 8384, 9086, 10649, 12944, 15026,
- 3661, 4636, 6668, 8329, 10374, 12185,
- 5802, 6444, 8344, 9811, 12234, 14843,
- 3593, 4436, 6663, 8693, 11539, 14272,
- 5110, 8270, 9006, 10703, 12269, 13901,
- 1992, 3229, 5616, 9085, 11419, 13254,
- 4319, 5859, 9602, 11396, 12836, 14199,
- 3836, 4822, 8285, 10190, 11728, 13302,
- 8016, 8698, 10179, 11434, 12944, 14783,
- 1891, 3329, 6168, 8307, 10818, 14213,
- 5803, 6442, 7973, 9131, 11090, 12657,
- 2803, 5499, 8093, 9694, 11223, 12849,
- 6222, 6981, 8615, 9848, 12016, 13380,
- 2543, 4747, 7638, 9373, 11129, 13652,
- 5912, 6615, 9006, 10553, 11959, 13312,
- 3604, 4520, 7650, 9833, 12161, 14748,
- 7970, 8729, 9780, 10789, 12483, 13985,
- 3793, 4716, 7041, 8547, 10610, 13601,
- 5640, 6235, 7313, 8370, 12057, 14300,
- 3765, 4699, 6784, 9512, 12663, 14216,
- 4634, 8363, 9195, 10385, 11477, 13310,
- 2462, 4816, 8556, 10394, 11920, 13468,
- 3698, 7974, 9207, 10962, 13507, 15208,
- 3738, 4667, 7545, 10775, 13024, 14559,
- 7267, 8610, 9509, 11264, 12821, 14495,
- 2624, 4295, 6173, 8897, 12343, 14174,
- 6324, 7135, 8742, 10013, 12598, 14108,
- 4448, 5839, 8842, 10335, 11737, 13071,
- 6147, 6988, 9510, 10893, 12240, 13535,
- 3025, 5140, 7152, 9223, 11404, 13255,
- 5985, 6782, 9611, 11341, 12723, 14007,
- 4679, 5958, 8100, 9842, 11835, 13492,
- 7740, 8565, 9432, 10478, 12611, 14609,
- 3830, 4784, 7681, 9528, 11134, 12675,
- 5742, 6527, 8359, 10728, 13195, 14626,
- 4491, 5635, 7284, 8749, 11594, 13785,
- 6772, 8490, 9253, 10943, 12476, 13973,
- 2024, 3588, 7524, 10453, 12198, 13858,
- 5783, 8882, 9978, 11763, 13237, 14829,
- 3979, 5009, 8342, 10323, 12231, 14313,
- 8148, 8903, 10193, 11350, 13246, 14490,
- 2297, 3810, 5638, 7265, 9162, 11514,
- 5809, 6518, 7832, 8766, 10327, 11957,
- 2535, 4591, 7415, 9080, 10623, 12257,
- 5948, 6598, 8515, 10082, 12721, 14188,
- 2443, 4278, 6581, 8172, 9883, 11807,
- 5913, 6535, 8878, 10296, 12141, 14245,
- 2428, 3925, 6409, 9835, 11962, 13628,
- 7430, 8531, 9302, 10259, 11444, 12933,
- 3701, 4694, 6372, 7671, 9445, 11571,
- 5822, 6470, 7807, 8885, 11506, 14529,
- 3742, 4580, 6232, 7860, 11252, 13127,
- 5710, 8330, 8943, 10243, 11696, 14511,
- 2607, 4197, 6714, 10408, 12714, 14320,
- 4116, 8438, 9717, 11018, 12156, 13663,
- 4224, 5318, 7486, 10110, 12779, 14331,
- 5565, 8413, 9115, 10930, 12588, 14759,
- 1898, 3150, 5779, 9497, 12432, 14439,
- 6274, 7186, 9258, 10404, 11733, 12952,
- 3700, 4591, 7575, 9533, 11461, 13777,
- 6234, 7104, 9032, 10986, 13088, 14417,
- 2354, 4579, 7744, 9960, 12629, 14802,
- 6050, 6729, 9345, 10745, 12436, 14253,
- 4345, 5529, 8117, 9718, 12433, 14109,
- 8009, 8701, 9863, 10954, 13046, 14474,
- 4184, 5186, 6876, 8428, 11236, 12973,
- 6113, 6842, 8386, 9659, 12892, 14707,
- 3989, 4936, 7152, 8879, 11743, 13632,
- 5169, 8411, 9209, 11361, 13452, 15076,
- 2397, 4387, 7033, 9035, 11821, 13736,
- 3607, 8128, 10170, 11565, 12819, 14147,
- 4449, 5805, 8963, 10676, 12596, 14558,
- 7911, 8741, 10040, 11622, 13579, 15092,
- 2372, 4290, 6990, 8705, 10637, 13685,
- 6137, 6917, 8382, 9380, 10859, 12348,
- 3235, 5973, 8187, 10174, 12420, 14382,
- 6077, 6764, 8551, 9803, 12150, 14079,
- 2952, 5097, 6853, 8952, 12066, 14080,
- 6606, 7683, 9508, 10695, 12182, 13601,
- 3707, 4638, 7468, 10484, 12295, 13754,
- 7960, 8715, 10051, 11348, 12757, 14072,
- 4139, 5241, 7576, 9037, 10912, 13485,
- 5838, 6444, 7768, 8965, 12867, 14998,
- 4245, 5338, 7248, 9190, 12328, 14047,
- 6159, 8874, 9899, 11134, 12150, 13512,
- 2250, 4288, 8698, 10944, 12624, 14316,
- 3146, 6848, 9904, 11775, 13534, 14953,
- 4044, 5161, 8365, 10294, 12945, 14907,
- 7398, 8724, 9813, 11821, 13246, 14552,
- 2121, 3890, 6855, 9274, 12059, 14663,
- 6329, 7182, 8789, 10081, 13001, 14917,
- 4484, 5761, 8634, 10295, 12111, 14022,
- 6326, 7208, 9672, 11078, 12830, 14529,
- 3230, 5564, 7646, 9955, 12011, 13683,
- 4683, 6896, 10002, 11805, 13329, 14747,
- 4771, 6044, 8081, 10305, 12526, 14037,
- 8231, 9203, 10351, 11427, 12926, 14635,
- 4385, 5774, 7989, 9305, 10751, 12299,
- 5810, 6658, 9062, 11629, 13359, 14655,
- 4288, 5388, 7804, 9378, 11781, 13652,
- 4398, 8560, 9646, 11161, 12701, 14872,
- 1947, 3440, 7202, 10953, 13222, 14806,
- 4686, 8972, 10615, 12054, 13260, 14615,
- 3801, 4849, 8922, 11200, 12882, 14423,
- 8061, 8813, 10453, 11912, 13335, 14710,
- 2365, 3888, 5664, 7346, 10407, 14331,
- 4563, 5839, 7472, 8684, 10572, 12800,
- 2593, 4197, 6719, 9323, 11229, 12919,
- 6081, 6774, 8132, 9244, 12202, 13918,
- 2405, 3981, 6144, 8740, 11347, 13796,
- 5793, 6444, 8286, 10049, 12152, 13520,
- 2795, 4727, 6528, 8506, 11323, 13474,
- 6181, 8598, 9346, 10614, 11725, 13545,
- 4002, 5001, 6596, 7792, 9987, 13065,
- 5748, 6365, 7759, 9028, 11818, 13487,
- 3906, 4863, 6462, 7763, 10705, 14359,
- 4315, 8428, 9322, 10582, 11942, 14500,
- 2812, 4622, 7346, 10036, 11745, 13429,
- 4221, 8338, 9277, 11280, 12869, 14317,
- 4345, 5427, 7121, 8736, 12787, 14837,
- 7678, 8614, 9456, 10461, 12024, 13852,
- 2193, 3662, 5609, 7867, 12276, 14739,
- 6083, 6864, 8879, 10080, 11623, 13720,
- 4114, 5125, 7224, 9729, 11808, 13297,
- 6383, 7232, 9252, 10720, 12622, 14030,
- 2788, 5189, 8074, 9953, 11795, 14361,
- 6079, 6987, 8662, 10589, 12444, 14390,
- 4480, 5690, 7708, 9115, 11800, 14576,
- 7848, 8763, 9802, 10924, 12515, 14832,
- 3582, 4575, 6729, 9084, 11139, 12800,
- 5885, 6534, 8853, 10432, 12664, 14960,
- 3891, 4850, 7195, 8932, 12097, 14665,
- 5797, 8545, 9385, 11556, 12997, 14392,
- 1962, 3544, 7039, 9349, 11272, 13857,
- 4106, 5493, 9652, 12038, 13603, 14932,
- 4328, 5413, 7949, 10282, 12164, 13618,
- 8135, 8918, 10057, 11085, 13190, 15015,
- 2702, 4627, 6447, 8009, 10197, 13676,
- 5998, 6656, 8315, 9496, 11597, 13122,
- 3146, 6293, 8530, 10158, 11798, 13558,
- 6374, 7289, 8698, 9776, 11885, 14236,
- 3171, 5794, 7737, 9377, 11312, 13878,
- 6279, 7150, 9192, 10414, 12052, 14174,
- 4117, 5195, 7805, 9512, 12450, 14849,
- 7963, 8955, 10071, 11129, 12324, 13605,
- 4365, 5505, 7013, 8171, 10488, 13658,
- 6124, 6894, 8286, 9349, 11859, 14737,
- 3753, 4673, 6421, 8146, 12726, 14980,
- 5457, 8706, 9598, 11035, 12294, 14268,
- 2783, 4916, 7947, 10568, 12395, 14123,
- 3909, 8145, 9524, 11951, 14052, 15282,
- 3952, 5139, 8180, 11380, 13699, 15085,
- 7200, 9031, 10025, 11484, 12924, 14848,
- 2533, 4412, 6472, 8299, 11405, 14627,
- 6563, 7530, 9064, 10267, 12560, 14422,
- 4849, 6618, 8678, 10166, 11983, 13841,
- 6393, 7569, 9960, 11300, 12644, 13906,
- 3170, 5117, 7158, 9665, 11687, 14114,
- 6122, 7071, 10013, 11733, 13170, 14466,
- 4308, 5441, 7607, 9900, 11904, 14292,
- 8129, 9024, 10087, 11081, 12670, 14356,
- 4253, 5392, 8175, 9780, 11353, 12988,
- 5453, 6638, 8596, 11453, 13885, 15263,
- 4664, 5903, 7618, 9420, 12198, 13853,
- 7149, 8859, 9746, 11029, 12219, 14188,
- 2318, 4251, 7702, 9889, 11778, 14182,
- 6679, 9280, 10573, 11950, 13100, 14491,
- 4010, 5176, 8989, 10821, 12250, 13654,
- 8076, 8886, 10411, 11722, 12992, 14267,
- 2308, 4017, 6024, 7618, 9736, 13081,
- 6001, 6751, 7987, 8966, 10964, 13589,
- 2908, 5350, 7266, 8739, 10442, 12981,
- 6143, 6839, 9027, 10366, 12881, 14416,
- 2667, 4224, 6172, 8378, 10717, 12602,
- 6275, 7120, 9249, 10613, 12580, 14823,
- 2692, 4586, 6968, 9858, 12120, 14209,
- 7771, 8769, 9743, 10745, 11943, 13225,
- 4201, 5355, 7129, 8337, 9975, 11767,
- 6216, 7100, 8444, 9442, 11298, 13690,
- 4111, 5040, 6562, 8071, 12034, 13923,
- 6657, 8599, 9337, 10665, 12040, 14704,
- 3060, 5215, 7260, 10118, 12577, 14386,
- 5103, 8913, 10157, 11519, 12669, 14220,
- 4633, 5920, 7804, 9514, 12741, 14690,
- 6720, 8585, 9448, 11556, 13510, 15095,
- 2361, 3970, 6213, 9335, 13270, 15075,
- 6506, 7440, 9041, 10179, 12024, 13587,
- 4221, 5405, 8311, 9818, 11579, 14044,
- 6216, 7224, 9515, 11389, 13545, 15068,
- 2872, 5507, 8153, 10650, 13065, 14825,
- 6002, 6676, 9393, 11023, 12965, 14755,
- 4438, 5642, 8268, 10097, 12295, 14724,
- 7797, 8622, 9642, 10932, 13287, 15118,
- 4471, 5638, 7551, 9217, 11440, 12928,
- 6051, 6890, 8906, 10655, 13437, 15116,
- 3953, 4934, 7779, 9619, 12204, 14012,
- 5439, 8649, 9791, 12232, 13899, 15193,
- 2728, 4495, 6728, 9363, 11344, 14053,
- 4069, 8460, 9835, 11742, 13366, 14825,
- 4874, 6937, 9226, 10944, 12845, 14547,
- 8195, 9093, 10392, 11594, 13355, 15010,
- 2956, 5192, 7080, 8765, 11014, 14174,
- 6384, 7287, 8812, 9816, 11336, 12808,
- 2912, 6122, 9132, 10874, 12583, 14265,
- 6148, 6925, 8821, 10030, 12212, 14758,
- 2572, 4778, 7325, 9216, 11620, 14651,
- 6654, 7718, 9546, 10806, 12633, 14354,
- 4328, 5514, 8231, 10852, 12821, 14261,
- 8051, 9205, 10385, 11490, 12674, 13988,
- 4624, 6013, 7907, 9239, 11160, 13787,
- 5786, 6531, 8210, 9968, 13410, 15249,
- 3859, 4898, 7132, 9692, 13395, 15118,
- 6712, 8944, 10028, 11521, 12690, 14118,
- 2417, 4875, 9132, 11671, 13382, 14841,
- 4113, 8355, 10734, 12517, 13905, 15115,
- 4455, 5753, 7923, 10298, 13343, 15030,
- 6998, 8878, 10113, 12233, 13768, 15107,
- 2720, 4801, 6883, 9267, 12694, 14837,
- 6507, 7496, 9312, 10696, 13185, 14850,
- 4631, 6341, 9164, 10796, 12325, 13734,
- 6602, 7817, 9932, 11349, 13132, 14672,
- 3089, 5561, 7579, 9433, 12256, 14633,
- 6246, 7715, 10371, 12065, 13563, 14878,
- 4757, 6352, 8543, 10216, 12748, 14620,
- 8183, 9366, 10628, 11857, 13185, 14599,
- 4734, 6314, 8348, 9716, 11274, 12942,
- 5824, 6871, 9829, 12268, 13874, 15138,
- 4719, 6142, 8224, 9683, 11915, 14350,
- 6288, 8774, 9655, 11204, 12696, 14867,
- 2661, 4586, 7326, 10934, 13501, 15026,
- 5932, 9323, 10877, 12454, 13715, 15004,
- 4467, 6039, 8842, 11164, 13356, 14901,
- 7880, 9158, 10593, 12209, 13609, 14989,
-};
-
-const Word16 swb_tbe_lsfvq_cbook_8b[256 * LPC_SHB_ORDER] = /* Q15 */
-{
- 1705, 3230, 4202, 5086, 6148, 7221, 8127, 10728, 13656, 15364,
- 1668, 2958, 4063, 5644, 7356, 9440, 11046, 12261, 13228, 14503,
- 1546, 2917, 4226, 5477, 6976, 8349, 9709, 11882, 13218, 14715,
- 1158, 2729, 5177, 6967, 8297, 9611, 10655, 11668, 12757, 14415,
- 1616, 3005, 4368, 5810, 7107, 8129, 9376, 10457, 12738, 14835,
- 1232, 2451, 4145, 6446, 7741, 8993, 10377, 11898, 14213, 15314,
- 1638, 3089, 5134, 6351, 7360, 8304, 9787, 12377, 13755, 15209,
- 1264, 2543, 5564, 6686, 7958, 9481, 11021, 12517, 13875, 15147,
- 1304, 2537, 3713, 4863, 6564, 7910, 9400, 11794, 13268, 14834,
- 1652, 3245, 4686, 6405, 7931, 9223, 10591, 12020, 13193, 14759,
- 1302, 2619, 4287, 5884, 7166, 8556, 10512, 12471, 13767, 15075,
- 2034, 3467, 5577, 6530, 7674, 8783, 10920, 12798, 13727, 15002,
- 2621, 3956, 5275, 6542, 7509, 8517, 9456, 10781, 12456, 14099,
- 1496, 2653, 4147, 5637, 7370, 9233, 11817, 12986, 13968, 15046,
- 2224, 3324, 4700, 5868, 7211, 8638, 11369, 12695, 13600, 14559,
- 1267, 3050, 4707, 6321, 8663, 10140, 11174, 12453, 13425, 14844,
- 1662, 2980, 4155, 5414, 6639, 7797, 9253, 11360, 12838, 14440,
- 1521, 2856, 4944, 6367, 7506, 8857, 10971, 12183, 13275, 15006,
- 1454, 2859, 4563, 5971, 7186, 8569, 10151, 11770, 13396, 14984,
- 1143, 2942, 5267, 6840, 8377, 9457, 10589, 11615, 13892, 15271,
- 1674, 3053, 4605, 5768, 7104, 8452, 10094, 11782, 12793, 13758,
- 1702, 3261, 4723, 6245, 7899, 9494, 11010, 12387, 13680, 15066,
- 1365, 2796, 5406, 6505, 7488, 8679, 10447, 12000, 13637, 15046,
- 2090, 3931, 5788, 7157, 8254, 9717, 11007, 12081, 13238, 14880,
- 1952, 3157, 4132, 5164, 6334, 7389, 9004, 11798, 14096, 15505,
- 1641, 3212, 4919, 6364, 7863, 9311, 10766, 12234, 13694, 15054,
- 1653, 3008, 4213, 5354, 6980, 8821, 11185, 12685, 13903, 15251,
- 1856, 3444, 5146, 6579, 7801, 9250, 11062, 12947, 14145, 15291,
- 1365, 3567, 5552, 6474, 7332, 8254, 9952, 11364, 13505, 14951,
- 1488, 2896, 4521, 6279, 7880, 9446, 11418, 12921, 14431, 15465,
- 1516, 3174, 5364, 6410, 7295, 8285, 10799, 12594, 14172, 15424,
- 1738, 3416, 5237, 6878, 8440, 10539, 12105, 13063, 13924, 15150,
- 1431, 2659, 3909, 5328, 6641, 7950, 9347, 11037, 13510, 14992,
- 1400, 2646, 4233, 6366, 7749, 9220, 10560, 11594, 13046, 14992,
- 1115, 2198, 3607, 5279, 8055, 9774, 11024, 12426, 13972, 15232,
- 1360, 3418, 5724, 6973, 7912, 9078, 10810, 12437, 13630, 14826,
- 1422, 3051, 5132, 6141, 7206, 8275, 9355, 10859, 13814, 15202,
- 1080, 2227, 4117, 6404, 8080, 9318, 10934, 12404, 13688, 14827,
- 1611, 3423, 4928, 6214, 7426, 8723, 10502, 11915, 13438, 15105,
- 1947, 3524, 5198, 7008, 8358, 10006, 11397, 12444, 13583, 15135,
- 1394, 2672, 4004, 5681, 6953, 8301, 9815, 12000, 13709, 15079,
- 1788, 3193, 4579, 6221, 7874, 9170, 11186, 12647, 13521, 14538,
- 1548, 2811, 4058, 5331, 6528, 7769, 10982, 12743, 13822, 15131,
- 1751, 4007, 5154, 6463, 7935, 9470, 11103, 12406, 13337, 14520,
- 2004, 3172, 5079, 6116, 7109, 8155, 10351, 12192, 13413, 14773,
- 1644, 3185, 4750, 6290, 7816, 9271, 11041, 12831, 14139, 15341,
- 2311, 3779, 5116, 6100, 7321, 9139, 10353, 12134, 13834, 15172,
- 1723, 3339, 5049, 6754, 8353, 10290, 12048, 13157, 14206, 15460,
- 2218, 3501, 4639, 5764, 6789, 7834, 9804, 11907, 13182, 14689,
- 1640, 3173, 4679, 6202, 7660, 9120, 10773, 12395, 13894, 15200,
- 1591, 3070, 4537, 6005, 7341, 8802, 10480, 12240, 13768, 15130,
- 1169, 3611, 5983, 7054, 8601, 10022, 10948, 11927, 12834, 14747,
- 1708, 3191, 4642, 6156, 7396, 8805, 10028, 11733, 13206, 14857,
- 1519, 3082, 4752, 6484, 7730, 9328, 10796, 12003, 14524, 15513,
- 2153, 3558, 5162, 6714, 7762, 8857, 10008, 12012, 13725, 15209,
- 2680, 4053, 5310, 6996, 8309, 9343, 10361, 12333, 14224, 15498,
- 2356, 3805, 5032, 5970, 6915, 7880, 8924, 12060, 13838, 15185,
- 1807, 3439, 4962, 6483, 8013, 9556, 10952, 12327, 13686, 15059,
- 1571, 2900, 4208, 6449, 7675, 8592, 11138, 12775, 14181, 15422,
- 2006, 4262, 5508, 6414, 7621, 8725, 10788, 12605, 13609, 14776,
- 1785, 3741, 5267, 6702, 8097, 9460, 10487, 11481, 12889, 14885,
- 1647, 3223, 4795, 6391, 8007, 9620, 11575, 12955, 14100, 15381,
- 1518, 3214, 5233, 6509, 7687, 8803, 11778, 13932, 14760, 15491,
- 2136, 3647, 5373, 7317, 8671, 10261, 11786, 12933, 13820, 15186,
- 1633, 3265, 4672, 5640, 6776, 7783, 8907, 10184, 12066, 14492,
- 1690, 3028, 4184, 6049, 7489, 8678, 11045, 12244, 13372, 15016,
- 1649, 3080, 4358, 5795, 7364, 8601, 10257, 12126, 13328, 15113,
- 1850, 3286, 5392, 6765, 7826, 9185, 10506, 11776, 13248, 15163,
- 2111, 3522, 4870, 6087, 7162, 8385, 9645, 10861, 12341, 14302,
- 1529, 2909, 4136, 6783, 8064, 9325, 10942, 12094, 13886, 15169,
- 1847, 3281, 4752, 6098, 7310, 8744, 10129, 12278, 13554, 14930,
- 1149, 2767, 5869, 7479, 8514, 9723, 11235, 12300, 13871, 15068,
- 1689, 3066, 4325, 5613, 6772, 7936, 9051, 12135, 13730, 15025,
- 2127, 3394, 5263, 6880, 7874, 9155, 10305, 12136, 13494, 14437,
- 1682, 3054, 4412, 6053, 7380, 8465, 9817, 12460, 14155, 15285,
- 1799, 3430, 5123, 6594, 7934, 9609, 11472, 12791, 13686, 14849,
- 1899, 3656, 5369, 6355, 7516, 8800, 9888, 11646, 13024, 13965,
- 1410, 3252, 5101, 6050, 7480, 9912, 11739, 12806, 14085, 15186,
- 1487, 3934, 5351, 6390, 7519, 8890, 11488, 12818, 13787, 14941,
- 1562, 3156, 5075, 7044, 8872, 10271, 11479, 12632, 13907, 14993,
- 1548, 2926, 4338, 5796, 7011, 8143, 9336, 11323, 13461, 14904,
- 1421, 2907, 4736, 6272, 7730, 8977, 10453, 12374, 13840, 15234,
- 1495, 2996, 4496, 6036, 7545, 9034, 10534, 12014, 13486, 14958,
- 1388, 3203, 5691, 7076, 8578, 9661, 10874, 12326, 14433, 15423,
- 1248, 2983, 5304, 6423, 7544, 8611, 10290, 11682, 12904, 14549,
- 1496, 2988, 4632, 6342, 7852, 9329, 11175, 12546, 13758, 15182,
- 1373, 3379, 5067, 6179, 7379, 8775, 10005, 11464, 14147, 15386,
- 2537, 3849, 5533, 7263, 8318, 9657, 11346, 12355, 13955, 15314,
- 2113, 3405, 4419, 5268, 6436, 8005, 10292, 12442, 13655, 15176,
- 1620, 3681, 5454, 6406, 7459, 9354, 10872, 12035, 14163, 15279,
- 1903, 3232, 4517, 5758, 7156, 8851, 10670, 12413, 14518, 15565,
- 1714, 3779, 5166, 6557, 8107, 9168, 10560, 12854, 14208, 15329,
- 1926, 3645, 5521, 7072, 7999, 8974, 9806, 11088, 13527, 15298,
- 1820, 2840, 4726, 7091, 8261, 9758, 11218, 12148, 14064, 15262,
- 2072, 3303, 5391, 6710, 7504, 8497, 10457, 12394, 14480, 15541,
- 1627, 3294, 5209, 7432, 8846, 10147, 11517, 12890, 14488, 15411,
- 2172, 3405, 4580, 5623, 6732, 7648, 8485, 9913, 13396, 15213,
- 1581, 3058, 4633, 6225, 7724, 9238, 10779, 12240, 13650, 15094,
- 1675, 2927, 4090, 5753, 7461, 8922, 10277, 11670, 13987, 15336,
- 1868, 3611, 5256, 6927, 8093, 9434, 10998, 12144, 13380, 15165,
- 1498, 3635, 5273, 6823, 7825, 8916, 9811, 10903, 12514, 14884,
- 1448, 2626, 3930, 6895, 8348, 9746, 11404, 12565, 14288, 15325,
- 1945, 3408, 4987, 6340, 7627, 8954, 10251, 12381, 13481, 14983,
- 1956, 3759, 5388, 6894, 8466, 9962, 11460, 12759, 14145, 15321,
- 1670, 3271, 4588, 5970, 7185, 8366, 9640, 12011, 13488, 14833,
- 1964, 3444, 4826, 6213, 7936, 9097, 10785, 12617, 13612, 15229,
- 1646, 3390, 4669, 6049, 7001, 7940, 10461, 12478, 14675, 15704,
- 2202, 3782, 5107, 6754, 8280, 9628, 11687, 13028, 13871, 15207,
- 2354, 3830, 5174, 6360, 7555, 8997, 10681, 11977, 13066, 14781,
- 2351, 3525, 4892, 6386, 7616, 9133, 11859, 13061, 13946, 15004,
- 2252, 3772, 5155, 6485, 7799, 9145, 10769, 12561, 13763, 15241,
- 1714, 3107, 4725, 6097, 9158, 10459, 11619, 12699, 14346, 15256,
- 1830, 3506, 4969, 5973, 6900, 7836, 8994, 11088, 13366, 14860,
- 1856, 3406, 4898, 6367, 7810, 9186, 10422, 12172, 13969, 15331,
- 2006, 3382, 4743, 6100, 7430, 8753, 10805, 12234, 13673, 15195,
- 1491, 3607, 5343, 7464, 9179, 10087, 11024, 12099, 13199, 14956,
- 1749, 3371, 5121, 6500, 7646, 8770, 9968, 11673, 13339, 14931,
- 1857, 3506, 5083, 6595, 8200, 9739, 11138, 12528, 13884, 15137,
- 1780, 3860, 5581, 6692, 7837, 8989, 10304, 12318, 13611, 15109,
- 2164, 4463, 5655, 7632, 9047, 9922, 10784, 12950, 14723, 15589,
- 2305, 3300, 4366, 5608, 6857, 7795, 10006, 11950, 14376, 15700,
- 1628, 3408, 5074, 6761, 8312, 9687, 11104, 12332, 13619, 15076,
- 1842, 3314, 4771, 6460, 7463, 8661, 11191, 12739, 14592, 15633,
- 1808, 4360, 5904, 6869, 8134, 9174, 10780, 12589, 13995, 15150,
- 2966, 4354, 5686, 6983, 7938, 9092, 10062, 11747, 13307, 14611,
- 1932, 3293, 4910, 6818, 7690, 9074, 11715, 13019, 14429, 15478,
- 1978, 3772, 5429, 6580, 7448, 8496, 11755, 13132, 14549, 15560,
- 1881, 3635, 5627, 7292, 8573, 10911, 12325, 13200, 14068, 15243,
- 1436, 2716, 4002, 5347, 6553, 7646, 8955, 10690, 12967, 14784,
- 1426, 2825, 4206, 5726, 8100, 9391, 10712, 12262, 13506, 14954,
- 1448, 2767, 4089, 5265, 7185, 8684, 10378, 12257, 13431, 14803,
- 1669, 3312, 4990, 6887, 8050, 9595, 10943, 12015, 13145, 14920,
- 1534, 2814, 4191, 5933, 7393, 8687, 9865, 11185, 12958, 14743,
- 1397, 2706, 4322, 6052, 7618, 9168, 10995, 12433, 13931, 15267,
- 1717, 3164, 4630, 6329, 7519, 8846, 10088, 12116, 14012, 15197,
- 1606, 3316, 5165, 6942, 8278, 9625, 11461, 12806, 14095, 15299,
- 2014, 3357, 4281, 5076, 6191, 7372, 9501, 12414, 13419, 14901,
- 1322, 3655, 5269, 6494, 7613, 9253, 10752, 11974, 13302, 14833,
- 1687, 3291, 4718, 5817, 7001, 8136, 10741, 12692, 13884, 15224,
- 2255, 3723, 5555, 7021, 8101, 9345, 10765, 12705, 13693, 15223,
- 2376, 3715, 5249, 6505, 7410, 8345, 10176, 11618, 12708, 14488,
- 1842, 3232, 4371, 5954, 7832, 9126, 11296, 12743, 13862, 15331,
- 2046, 3597, 5325, 6453, 7353, 8588, 10588, 12082, 13664, 15152,
- 1970, 3564, 4925, 6547, 8672, 9980, 11383, 12786, 13969, 15234,
- 1497, 2938, 4909, 6099, 7102, 8072, 9514, 11294, 12761, 14578,
- 1666, 3164, 5098, 6255, 7350, 8902, 10694, 12503, 13808, 14980,
- 1467, 2774, 4556, 6308, 7435, 8644, 10040, 12356, 13597, 14776,
- 1915, 3618, 5160, 6707, 8479, 9521, 10481, 11536, 14163, 15479,
- 1857, 3466, 4760, 6205, 7312, 8801, 10376, 11978, 13161, 14235,
- 1615, 3107, 4710, 6452, 8069, 9877, 11348, 12575, 13751, 15049,
- 1563, 3092, 4977, 6851, 8056, 9025, 10327, 12181, 14039, 15192,
- 2294, 3843, 5781, 7222, 8505, 9851, 11210, 12802, 13676, 15158,
- 1931, 3436, 4681, 5837, 6908, 7825, 9440, 12600, 14162, 15305,
- 1572, 3189, 4879, 6680, 7970, 9293, 10974, 12193, 13506, 15218,
- 1759, 3172, 4687, 5950, 7484, 8874, 10563, 12821, 14112, 15299,
- 1461, 4009, 5495, 6608, 7867, 9497, 11307, 12520, 14357, 15467,
- 1922, 4314, 5736, 6599, 7481, 8598, 9852, 11345, 14012, 15280,
- 1249, 2609, 4690, 7006, 8061, 9011, 11477, 13214, 14382, 15337,
- 2251, 3776, 5514, 6458, 7300, 8078, 10961, 12696, 14279, 15567,
- 1697, 3374, 5134, 6984, 8675, 10700, 12194, 13233, 14184, 15464,
- 1985, 3326, 4440, 5685, 6870, 8207, 9545, 11223, 13672, 15143,
- 1453, 2824, 4722, 6476, 7730, 8963, 10217, 11743, 13545, 15152,
- 1217, 2442, 3821, 5409, 7315, 8949, 10797, 12564, 14281, 15410,
- 1546, 3204, 5604, 6730, 8040, 9677, 11029, 12107, 13803, 15267,
- 2042, 3424, 4830, 6328, 7473, 8525, 9386, 10755, 13398, 14998,
- 1106, 2508, 4816, 7337, 8399, 9630, 11278, 12453, 14067, 15024,
- 1764, 3305, 4955, 6537, 7767, 9117, 10404, 11961, 13576, 15021,
- 1604, 3797, 5700, 7128, 8515, 9896, 11389, 12534, 13696, 15136,
- 1623, 3004, 4355, 6217, 7351, 8437, 9819, 11537, 13974, 15340,
- 2457, 3890, 4962, 5848, 7311, 9718, 11213, 12292, 13705, 15111,
- 1601, 3330, 4648, 6043, 7138, 8179, 11247, 13078, 14768, 15641,
- 2457, 3677, 5174, 6432, 7982, 10024, 11164, 12170, 13704, 15112,
- 1552, 3777, 5267, 6325, 7532, 8642, 9894, 12404, 13569, 14620,
- 1961, 3463, 4720, 6498, 8059, 9304, 11486, 12824, 14102, 15458,
- 2443, 3699, 5252, 6348, 7638, 8733, 10224, 12666, 13768, 15009,
- 2204, 3657, 5086, 6792, 8300, 10152, 12313, 13306, 14079, 15287,
- 2360, 3731, 5002, 6094, 6952, 8009, 9152, 11586, 13038, 14158,
- 1888, 3469, 4880, 6183, 7603, 9244, 10801, 12319, 13657, 15002,
- 1670, 3283, 4591, 6080, 7801, 8951, 10534, 12572, 13620, 14969,
- 1304, 4140, 5864, 7008, 8377, 9651, 10825, 11805, 13637, 15300,
- 2077, 3547, 4890, 6216, 7303, 8608, 9810, 11796, 13525, 14984,
- 1658, 3252, 4916, 6498, 8069, 9529, 11029, 12538, 13903, 15184,
- 2206, 3648, 4949, 6636, 7875, 8833, 9853, 12624, 14448, 15475,
- 3039, 4664, 5792, 7321, 8798, 9724, 10485, 12329, 14465, 15650,
- 1885, 3201, 5227, 6590, 7343, 8049, 9372, 12313, 14594, 15645,
- 1826, 3446, 5138, 6665, 8008, 9352, 10668, 12583, 13810, 15065,
- 1455, 3065, 5233, 6306, 7404, 8776, 11422, 12775, 14032, 15239,
- 2395, 4674, 5883, 6877, 7900, 9322, 10931, 12537, 13765, 14888,
- 1840, 4359, 5629, 6875, 7968, 9185, 10266, 11861, 13202, 14464,
- 1662, 3278, 4865, 6555, 8122, 10011, 11874, 13087, 14128, 15418,
- 1643, 3366, 5837, 7033, 7854, 8928, 11487, 12972, 14409, 15467,
- 1878, 3685, 5789, 7325, 8714, 10906, 12273, 13110, 13834, 14837,
- 2259, 3652, 4995, 6055, 7005, 7900, 8843, 10024, 12609, 14736,
- 1568, 2949, 4504, 6035, 7428, 9194, 10893, 12444, 13595, 14939,
- 1678, 3143, 4416, 5872, 7501, 8768, 10418, 12127, 13144, 14622,
- 1878, 3549, 5481, 7178, 8322, 9347, 10532, 12117, 13554, 15167,
- 2055, 3346, 4814, 6193, 7418, 8757, 10144, 11365, 12698, 14779,
- 1486, 2779, 3954, 6134, 8290, 9646, 10767, 12112, 14441, 15428,
- 1787, 3511, 4962, 6055, 7295, 8858, 10179, 12437, 13813, 15217,
- 1374, 3184, 5771, 7998, 9354, 10209, 11249, 12469, 14015, 15248,
- 1627, 2947, 4046, 5182, 6798, 8225, 9770, 12661, 14250, 15408,
- 2117, 3704, 5007, 6630, 8002, 9222, 10550, 12108, 13472, 15034,
- 1365, 2885, 4896, 6144, 7426, 9137, 10283, 12727, 14709, 15505,
- 2073, 3691, 5305, 6800, 8134, 9508, 11139, 12857, 13896, 15239,
- 1564, 4084, 5497, 6495, 7391, 8539, 10468, 11705, 12804, 14704,
- 1844, 3180, 4380, 5754, 8181, 9923, 11738, 12995, 14138, 15232,
- 2157, 3736, 5059, 5932, 7192, 8916, 11216, 12783, 13945, 15189,
- 1782, 2860, 4362, 7179, 9083, 10438, 11580, 12929, 14789, 15500,
- 1651, 3273, 4587, 5886, 7069, 8346, 9787, 11277, 13152, 14811,
- 1549, 3138, 5049, 6704, 7803, 9102, 10748, 12577, 13813, 15215,
- 1674, 3187, 4709, 6204, 7622, 9024, 10541, 12135, 13576, 15063,
- 1888, 3562, 5468, 7111, 8694, 9948, 11111, 12286, 14070, 15300,
- 1905, 3158, 5368, 6372, 7554, 8719, 10568, 12430, 13449, 14427,
- 1953, 3411, 4718, 6545, 8090, 9298, 11232, 12723, 13668, 15077,
- 1459, 3444, 5688, 6814, 7843, 8977, 10119, 12107, 14316, 15368,
- 2450, 4363, 5827, 7349, 8683, 10032, 11143, 12131, 13519, 15058,
- 2482, 3664, 4763, 5944, 7191, 8390, 10105, 12234, 13702, 15188,
- 1838, 3465, 5255, 6751, 8016, 9254, 10946, 12321, 13790, 15337,
- 2497, 3548, 4702, 5987, 7645, 8883, 10740, 12247, 14393, 15540,
- 1717, 3679, 5335, 6587, 8564, 9808, 10735, 12675, 14672, 15558,
- 2454, 3997, 5364, 6810, 8026, 8913, 9715, 11315, 14258, 15605,
- 1906, 3443, 4901, 6363, 8186, 9716, 11074, 13186, 14701, 15474,
- 1992, 3246, 5488, 6514, 7455, 8324, 10807, 13238, 14763, 15579,
- 1721, 3438, 5244, 7173, 9106, 10873, 12178, 13181, 14060, 15415,
- 2191, 3555, 4802, 6108, 7015, 7850, 8947, 11115, 14483, 15593,
- 1925, 3232, 4601, 6574, 7791, 8989, 11038, 12282, 13630, 15136,
- 1816, 3167, 4292, 5730, 7588, 9096, 10743, 12341, 13760, 15252,
- 2069, 3850, 5424, 6815, 8274, 9569, 10910, 12283, 13835, 15185,
- 2419, 3773, 5288, 6591, 7672, 8909, 9832, 10975, 13163, 14998,
- 1215, 2710, 4939, 6437, 8745, 9918, 11200, 12553, 14234, 15384,
- 1867, 3527, 5134, 6496, 7656, 8923, 10602, 12568, 13896, 15276,
- 2259, 4214, 5751, 7270, 8590, 10120, 11611, 12822, 14130, 15258,
- 1911, 3261, 4446, 5685, 6897, 8494, 10128, 11970, 13707, 15106,
- 1762, 3549, 4874, 6153, 8146, 9634, 10690, 11886, 13713, 15057,
- 2371, 3716, 4778, 6111, 7097, 8063, 10544, 12615, 14716, 15724,
- 2254, 3759, 5627, 6870, 7896, 9379, 11627, 12889, 13795, 15272,
- 2516, 4000, 5378, 6444, 7496, 8634, 9767, 12110, 13503, 14640,
- 2385, 3201, 4283, 6677, 8216, 9689, 11654, 12319, 14142, 15367,
- 2775, 4055, 5455, 6553, 7821, 8901, 10890, 12775, 13696, 14884,
- 1568, 3940, 5341, 6824, 9355, 10305, 11405, 12879, 14291, 15334,
- 2436, 3807, 5183, 6189, 7099, 8116, 9655, 11275, 13641, 15137,
- 1755, 3340, 4871, 6382, 7790, 9316, 10921, 12432, 13903, 15217,
- 1932, 3246, 4603, 6454, 7590, 8678, 10609, 12641, 13938, 15245,
- 1417, 4366, 6289, 7362, 8846, 10151, 11160, 12134, 13593, 15216,
- 1820, 3378, 4782, 6421, 7788, 9056, 10070, 11271, 13614, 15297,
- 1855, 3399, 4933, 6526, 8097, 9655, 11043, 12475, 14301, 15370,
- 1901, 3653, 6053, 7290, 8154, 8986, 10262, 12993, 14405, 15387,
- 1958, 4295, 5824, 8196, 9580, 10318, 11267, 12551, 13716, 15374,
- 2082, 4060, 5500, 6423, 7298, 8128, 9713, 12497, 14442, 15562,
- 1878, 3425, 4781, 7062, 8455, 9625, 10810, 12311, 13948, 15201,
- 2035, 3727, 4804, 6256, 7248, 9235, 11563, 13120, 14882, 15662,
- 2143, 3982, 6527, 7709, 8742, 9804, 11240, 12658, 14397, 15409,
- 2593, 4431, 5861, 7222, 8381, 9351, 10400, 11837, 13286, 15326,
- 1840, 3798, 5465, 6800, 7919, 9752, 12004, 13265, 14424, 15420,
- 2157, 4145, 5394, 6454, 7240, 8776, 11093, 12831, 14856, 15708,
- 1467, 3782, 5811, 8123, 9314, 10456, 11641, 13211, 14562, 15331,
-};
-
-
-const Word16 wac_swb_h[LPC_SHB_ORDER] =
-{//Q15
- 32758,
- 32731,
- 32686,
- 32622,
- 32541,
- 32442,
- 32325,
- 32191,
- 32039,
- 31870
-};
-
-const Word16 wac_swb_l[LPC_SHB_ORDER] =
-{//Q15
- 29673,
- 20874,
- 7850,
- 25873,
- 12831,
- 5927,
- 10541,
- 239,
- 15037,
- 30328
-};
-
-const Word16 wac_swb_ivas_h[LPC_SHB_ORDER] =
-{//Q15
- 32749,
- 32731,
- 32686,
- 32622,
- 32541,
- 32442,
- 32325,
- 32191,
- 32039,
- 31870
-};
-
-const Word16 wac_swb_ivas_l[LPC_SHB_ORDER] =
-{//Q15
- 2624,
- 20874,
- 7850,
- 25873,
- 12831,
- 5927,
- 10541,
- 239,
- 15037,
- 30328
-};
-
-const Word16 lbr_wb_bwe_lsfvq_cbook_2bit_fx[4 * 4] =
-{
- /*Q15 */
- 3876, 5920, 8951, 11884,
- 6556, 7979, 10835, 13133,
- 4401, 6781, 10676, 13493,
- 8453, 9693, 12024, 13921,
-};
-
-const Word16 SHBCB_SubGain5bit_fx[128] =
-{
- /*Q14 */
- -2388, -7806, -6576, -6024,
- -7066, -5430, -4998, -3495,
- -16722, -15343, -960, -7940,
- -26291, -5921, -4917, -4378,
- -1526, -6621, -8475, -9624,
- -8047, -4086, -8940, -3043,
- -3630, -5129, -4964, -7381,
- -270, -18662, -24233, -25418,
- -9246, -7551, -5584, -2053,
- -2091, -4622, -9199, -14628,
- -4645, -2197, -10255, -9697,
- -2438, -9386, -11737, -4570,
- -14366, -11436, -8252, -819,
- -16192, -16332, -17043, -225,
- -5407, -8588, -7577, -2296,
- -26309, -21930, -7522, -2514,
- -3260, -4246, -7947, -6614,
- -1820, -5520, -15272, -19764,
- -3706, -3737, -5850, -10520,
- -10081, -4050, -4065, -5001,
- -3908, -9909, -2881, -9604,
- -520, -11156, -12620, -12768,
- -4539, -5149, -6208, -4462,
- -4866, -7672, -4235, -4407,
- -9163, -13411, -2975, -3915,
- -12267, -7568, -3842, -2827,
- -7181, -4914, -2608, -9392,
- -6275, -2868, -5962, -6511,
- -12962, -1034, -8517, -10992,
- -8247, -7608, -2502, -5026,
- -5812, -4998, -3860, -5778,
- -16907, -5974, -4434, -3276,
-};
-
-
-const Word16 HBCB_SubGain5bit_fx[128] =
-{//Q8
- -15224, -17789, -9897, -5048, -456, -1232, -2238, -2782,
- -3391, -3864, -4026, -4045, -2017, -1311, -878, -1973,
- -12837, -15376, -8273, -4141, -2791, -3037, -2403, -342,
- -3388, -3646, -3471, -2829, -157, -2025, -2318, -2243,
- -14652, -16433, -7699, -1188, -2567, -1755, -346, -1682,
- -2068, -2321, -2344, -2348, -1759, -1038, -1865, -2041,
- -11396, -13719, -7749, -2734, -809, -1935, -1886, -781,
- -2136, -1940, -942, -1571, -1926, -2378, -2572, -2145,
- -17531, -19267, -7721, -2672, -714, -675, -1516, -2071,
- -1925, -2325, -2523, -2657, -1644, -1674, -2036, -2017,
- -12781, -14601, -6714, -1380, -2093, -1704, -1124, -756,
- -2776, -2687, -2066, -1202, -1102, -680, -1956, -2376,
- -14436, -15846, -4918, -2071, -1613, -744, -1807, -1381,
- -620, -1294, -2026, -2162, -794, -1755, -1167, -1762,
- -11627, -13377, -5876, -1959, -1009, -1879, -1027, -1915,
- -1734, -1265, -2001, -1018, -698, -1733, -2172, -1195,
-
-};
-
-
-const Word32 SHBCB_FrameGain64_fx[64] =
-{
- /* Q18 */
- 11553, 19429, 27466, 35948, 45184, 54817, 65050, 76114,
- 88089, 100815, 114314, 128727, 144236, 160812, 178639, 197656,
- 217917, 239688, 263098, 288617, 315962, 345380, 376751, 410569,
- 446867, 485779, 527885, 574220, 624562, 679333, 738912, 803391,
- 873329, 949299, 1032054, 1121728, 1219559, 1327347, 1446046, 1576547,
- 1720983, 1881933, 2062979, 2266614, 2496129, 2759206, 3060575, 3409584,
- 3818114, 4295643, 4868000, 5551295, 6368310, 7329048, 8475924, 9889403,
- 11649918, 13794493, 16487623, 19979932, 24732260, 31339886, 41958624, 64261100,
-};
-
-/* 4 bit Quantizer table for SHB overall gain */
-
-const Word32 SHBCB_FrameGain16_fx[16] =
-{
- /*Q18*/
- 38968, 125277, 254474, 493383, 1043711, 2083177, 3792746, 6395076,
- 10256080, 15738899, 23269902, 34118236, 48362464, 71128080, 107459896, 192888864
-};
-
-/* 18th order elliptic Bandpass filter at 14.15 to 20 kHz sampled at 48 kHz b0,b1,b2,a0,a1,a2 */
-
-const Word16 full_band_bpf_1_fx[6][5] = /*in Q13*/
-{
- { 789, 802, 248, 802, 789},
- { 789, 1199, 838, 1199, 789},
- { 789, 136, -1123, 136, 789},
- { 8192, 19654, 24391, 17059, 6561},
- { 8192, 15339, 20118, 13819, 6190},
- { 8192, 21155, 26558, 17237, 5599}
-};
-
-/* 12th order elliptic Bandpass filter at 16.3 to 19.8 kHz sampled at 48 kHz b0,b1,b2,a0,a1,a2 */
-
-const Word16 full_band_bpf_2_fx[6][5] = /*in Q13*/
-{
- { 492, 912, 974, 912, 492},
- { 492, 1161, 1353, 1161, 492},
- { 492, 259, -311, 259, 492},
- { 8192, 22912, 30622, 21214, 7143},
- { 8192, 20364, 27329, 18844, 6886},
- { 8192, 23496, 31199, 20826, 6487}
-};
-
-/* 12th order elliptic Bandpass filter at 15.4 to 20.0 kHz sampled at 48 kHz b0,b1,b2,a0,a1,a2 */
-
-const Word16 full_band_bpf_3_fx[6][5] = /*in Q13*/
-{
- {611, 888, 717, 888, 611},
- {611, 1211, 1214, 1211, 611},
- {611, 197, -671, 197, 611},
- {8192, 21727, 28230, 19588, 6871},
- {8192, 18438, 24377, 16796, 6567},
- {8192, 22683, 29442, 19400, 6081}
-};
-
-/* 4-bit/3-bit TD SWB BWE differential LSF scalar quantizer tables */
-
-const Word16 lsf_q_cb_size[NUM_Q_LSF] = {16, 16, 8, 8, 8}; // Q0
-const Word16 lsf_q_num_bits[NUM_Q_LSF] = { 4, 4, 3, 3, 3 }; // Q0
-
-/* Tables for approximation of upper half of SWB LSFs */
-
-const Word16 mirror_point_q_cb_fx[MIRROR_POINT_Q_CB_SIZE] = { 471, 692, 896, 1216 }; // Q15
-
-const Word16 allpass_poles_3_ov_2[9] = /* Q15 */
-{
- 2368,
- 20545,
- 30606,
- 25520,
- 7188,
- 31808,
- 28575,
- 14384,
- 32472
-};
-
-const Word16 decimate_3_ov_2_lowpass_num_fx[3] = /* Q15 */
-{
- 6399,
- 12797,
- 6399
-};
-
-const Word16 decimate_3_ov_2_lowpass_den_fx[3] = /* Q15 */
-{
- 32767,
- 0,
- 5624
-};
-
-
-/*------------------------------------------------------------------------------*
- * WB BWE tables
- *------------------------------------------------------------------------------*/
-const Word16 F_2_5_fx[64] = /*Q10 */
-{
- 1189, 675, -5106, -5293, 10476, -12, 10860, 10026,
- -382, -616, 6426, 339, 9681, 9068, 3002, 2216,
- 3208, 3042, 8255, -604, 16133, 5171, 17641, 18769,
- -2529, -3248, -1447, -1991, 15511, 14855, 11631, 11996,
- 9654, -124, 7267, -1617, 12799, 3237, 10598, 1555,
- 5510, -1775, 1149, -2292, 12659, 12425, 4382, -1814,
- 6305, 5629, 3404, -2632, 19555, 9582, 7835, 7619,
- -517, -3795, 19031, 11574, 19156, 18748, 23563, 23465,
-};
-/*------------------------------------------------------------------------------*
- * SWB BWE tables
- *------------------------------------------------------------------------------*/
-
-const Word16 swb_bwe_trans_subband[SWB_FENV_TRANS+1] = {240, 316, 392, 476, 560}; // Q0
-const Word16 swb_bwe_trans_subband_width[SWB_FENV_TRANS] = {76, 76, 84, 84}; // Q0
-
-const Word16 sqrt_swb_bwe_trans_subband_width_fx[SWB_FENV_TRANS] = { 17854, 17854, 18770, 18770 };/*Q11 */
-
-const Word16 sqrt_swb_bwe_subband_fx_L1[SWB_FENV] = { 16384, 20066, 16384, 20066, 16384, 20066, 16384, 20066, 20066, 20066, 20066, 20066, 23170, 23170 }; /*Q12 */
-
-const Word16 sqrt_swb_bwe_subband_fx_L2[SWB_FENV / 2] = { 25905, 25905, 25905, 25905, 28378, 28378, 32767 }; /*Q12 */
-
-const Word16 swb_bwe_subband[SWB_FENV+1] = {240, 256, 280, 296, 320, 336, 360, 376, 400, 424, 448, 472, 496, 528, 560}; // Q0
-const Word16 fb_bwe_subband[DIM_FB + 1] = { 640, 680, 720, 800 }; // Q0
-const Word16 fb_bwe_sm_subband[DIM_FB] = { 656, 696, 760 }; // Q0
-const Word16 swb_inv_bwe_subband_width_fx[SWB_FENV] = { 2048,1365,2048,1365,2048,1365,2048,1365,1365,1365,1365,1365,1024,1024 };//Q15
-const Word16 swb_bwe_sm_subband[SWB_FENV] = {248, 268, 288, 308, 328, 348, 368, 388, 412, 436, 460, 484, 512, 544}; // Q0
-const Word16 smooth_factor_fx[SWB_FENV - 1] = { 1638, 1638, 1638, 1638, 1638, 1638, 1638, 1366, 1366, 1366, 1366, 1024, 1024 };//Q15
-
-const Word16 fb_bwe_subband_float[DIM_FB+1] = {640, 680, 720, 800}; // Q0
-const Word16 fb_inv_bwe_subband_width_fx[DIM_FB] = { 819, 819, 409 };//Q15
-const Word16 fb_bwe_sm_subband_float[DIM_FB] = {656, 696, 760}; // Q0
-const Word16 fb_smooth_factor_fx[DIM_FB] = { 1024, 819, 512 };//Q15
-
-
-const Word16 EnvCdbk11_fx[N_CB11 * DIM11] = /*Q8 */
-{
- -2220, 29, 1168, 2124, 2180, 1208, 741,
- 1521, -312, -843, -1523, -1970, -2205, -2541,
- 746, 1835, 3461, 4398, 4292, 4184, 3462,
- 1627, 2475, 2937, 2839, 2198, 1729, 1325,
- -514, -731, -557, -200, 100, 475, 540,
- 655, 956, 1272, 1083, 774, 687, 459,
- 5987, 5460, 4689, 4192, 3845, 3615, 3393,
- 3571, 4840, 5784, 6266, 5933, 5158, 4433,
- 2959, 2087, 1180, 979, 1180, 1371, 1636,
- 6029, 6157, 6431, 6762, 6998, 7153, 7050,
- -822, 210, 450, 178, -639, -1346, -1577,
- 4451, 4184, 4111, 4329, 4833, 5232, 5512,
- 3420, 3994, 4321, 4205, 3684, 3154, 2651,
- -3734, -2305, -1388, -324, 22, -847, -1141,
- 850, 510, 896, 1780, 2130, 2688, 2826,
- 3294, 2823, 2510, 2516, 3029, 3413, 3843,
- -3563, -3409, -3199, -2917, -2584, -2282, -1981,
- -2738, -3185, -3752, -4320, -4484, -4524, -4329,
- -7534, -7481, -7283, -7175, -6757, -6281, -5865,
- -4868, -4836, -4603, -4422, -4086, -3738, -3323,
- -13896, -13775, -13484, -13339, -12926, -12399, -11970,
- 8409, 8420, 8305, 8103, 7954, 7778, 7496,
- 7180, 6845, 6369, 5971, 5557, 5309, 5027,
- 4633, 4008, 3267, 2422, 2072, 1778, 1510,
- 10128, 10432, 10540, 10473, 10176, 9837, 9586,
- 2933, 2695, 2060, 1286, 424, -254, -825,
- -10032, -9847, -9544, -9420, -9000, -8508, -8084,
- 1830, 927, -158, -388, -360, -368, -287,
- -21962, -21904, -21548, -21471, -21004, -20511, -20064,
- -6090, -6142, -5937, -5852, -5493, -5104, -4671,
- -1382, -1640, -2205, -2557, -2785, -3019, -2994,
- -1300, -1567, -1744, -1642, -1409, -1080, -902,
-};
-
-const Word16 EnvCdbk1st_fx[N_CB1ST * DIM1ST] = /*Q8 */
-{
- -1819, -1138, 751,
- -494, 162, -826,
- -3199, -123, 2479,
- -2071, 238, -429,
- -1819, 1780, 1233,
- 284, 1187, -1123,
- -1689, -722, -484,
- -1256, 52, -1336,
- -604, 3738, -1297,
- 555, 412, 743,
- -626, -1685, 1527,
- 145, 1557, -224,
- -638, 1370, 1589,
- -1188, 37, -410,
- -428, -3320, 1860,
- 2597, -95, -2876,
- -742, -583, -684,
- 1607, -1671, -1874,
- -1111, -936, -1374,
- 275, -2314, 518,
- 2682, 2368, -302,
- 1809, -555, -579,
- 3193, -1270, -1208,
- 750, 84, 154,
- -1160, 429, 1098,
- 816, -613, -2897,
- 2159, -1885, 1245,
- -671, 426, 3177,
- 867, -144, -639,
- 843, -1888, 2271,
- 1542, 259, -148,
- -1680, 1027, 285,
- 162, -763, 1666,
- -1916, 1175, -1227,
- -345, -907, -151,
- 1979, 1062, 402,
- -1231, 2437, 3130,
- -2422, 361, 1040,
- -4314, -4106, -4221,
- 146, -1200, -1828,
- 485, 889, -3847,
- 384, -2461, -2845,
- 1526, -600, 1599,
- -838, -571, 1097,
- 1776, -3393, 4058,
- -3330, 2429, 1732,
- 468, -2140, -934,
- 833, 2292, -1129,
- -20, -1029, 652,
- -346, 168, 1834,
- -1730, 838, 2234,
- 1622, -1695, -194,
- -3198, -773, 228,
- 1070, 1741, 285,
- 1655, -212, -1628,
- 2178, 604, 1784,
- 1801, -3224, -848,
- -819, 348, 187,
- 16, 300, 244,
- 769, 201, 1554,
- 719, -394, 780,
- 311, 2853, 185,
- 1163, 489, -1022,
- -330, 459, 877,
- 109, -541, -691,
- -509, -267, 478,
- -340, -417, -1403,
- -860, -675, -2703,
- 1025, 826, 250,
- -1043, 1008, -434,
- -1042, -631, 60,
- -173, 332, -2084,
- 984, 919, -2042,
- -1257, -2287, 339,
- 366, -1309, -158,
- 1041, 1039, 1083,
- 3566, 918, 227,
- 62, -139, 936,
- 2424, 730, -1022,
- -745, 1954, 427,
- -1091, -1358, -478,
- -173, 2121, -2367,
- -2175, 2535, -1946,
- -880, -1964, -1549,
- -249, -1203, -927,
- -2377, -443, -1775,
- -1439, -582, 2037,
- -529, -3679, -550,
- 608, -284, -1566,
- 201, 63, -344,
- 1376, 218, 816,
- 2471, -348, 479,
- -1388, 988, -2674,
- 1429, -3538, 1125,
- 864, -1351, 845,
- 301, 977, 408,
- -1122, 3364, 1107,
- -213, 730, -329,
- 839, -683, -92,
- 631, 1172, 2364,
- 598, 685, -329,
- -780, -1317, 448,
- -424, -153, -199,
- 768, -331, 2825,
- 882, -1047, -975,
- -375, -1835, -299,
- 2861, -3375, -3158,
- 2099, 2168, -2630,
- 1602, 1930, 1451,
- 1294, 1265, -586,
- -2500, -2570, -2667,
- -806, -1529, 3272,
- -522, 1072, 478,
- 4035, -2491, 480,
- -1908, 2414, -178,
- -1563, -143, 438,
- 205, 861, 1287,
- -691, 963, -1374,
- -2359, -2032, -886,
- 162, -442, 160,
- 194, 2494, 1960,
- -2533, -2578, 1924,
- 267, 1701, 937,
- 2919, 2950, 2382,
- -670, 2102, -859,
- -3147, 1385, -215,
- 1482, -595, 415,
- 228, 290, -1060,
-};
-
-const Word16 EnvCdbk2nd_fx[N_CB2ND * DIM2ND] = /*Q8 */
-{
- 1104, -1833, -1110, -954,
- 757, 853, -176, 286,
- -873, -587, -7, 1458,
- -462, -553, -350, 104,
- 1938, 1957, -1340, -703,
- 1202, -779, 21, 1996,
- -2851, -169, 1049, 940,
- -1355, -726, -1788, 1076,
- -767, -641, -646, -880,
- 135, -832, -197, -889,
- -826, 3, 279, -502,
- -714, 544, -526, 375,
- 291, -1076, -816, -3929,
- -1175, -475, 2219, -642,
- 197, -219, -1052, -1601,
- 1175, -162, -695, -336,
- 1124, 126, -2326, -1573,
- 1164, -1323, -1958, 1074,
- -2080, -2152, 113, 649,
- -637, -860, 721, 267,
- -609, 1658, -1006, -1352,
- 1631, 2225, 2128, 1827,
- -1112, -1351, 1856, 1656,
- -2132, 1006, 770, -1294,
- -472, 776, 1661, 2248,
- -121, -574, -1481, -316,
- 2565, -1081, 188, 293,
- 398, 2598, 704, -1129,
- 1023, 104, 550, 499,
- -416, 127, 253, -1894,
- 456, -2578, 190, 1018,
- -1488, 286, -1202, -915,
- -1164, 1874, 1651, 302,
- -1312, -1547, -1625, -1516,
- 170, -233, 817, 1209,
- -1090, 341, 709, 725,
- 854, 819, -278, -1083,
- -15, 113, 286, 283,
- 1166, -906, 1880, 301,
- 342, -7, -587, 776,
- -785, -1259, -1166, 3194,
- -1630, -1071, 300, -1080,
- -12, 190, -538, -493,
- 351, 907, 1929, -1534,
- 480, 36, 593, -526,
- 813, 1216, 986, 89,
- 98, 1010, -2272, 268,
- 2766, -102, -1307, -873,
- -1660, -467, -365, 47,
- 1496, 1277, -228, -2791,
- 1565, -669, 520, -1598,
- -361, 1078, 457, -364,
- 543, -950, 28, 248,
- 1904, 815, -1034, 1125,
- -13, -1951, 1085, -1005,
- -2223, 1519, -624, 857,
- 1121, 831, 872, 1295,
- 193, 2284, -422, 609,
- -156, 827, -733, 2065,
- -3390, -3384, -3197, -3220,
- 31, 896, 539, 978,
- -21, 408, 1502, 405,
- -583, -1662, -665, -164,
- 2193, 976, 613, -436,
-};
-
-const Word16 EnvCdbk3rd_fx[N_CB3RD * DIM3RD] = /*Q8 */
-{
- 1031, -2454, 748,
- 2770, 2442, 1761,
- -2348, 4079, -959,
- 1874, -735, -2242,
- -59, 35, 201,
- -1518, 162, 1809,
- -1977, -1063, -103,
- 2485, 1212, -863,
- 882, 192, 39,
- 1356, 851, 979,
- -1377, -2961, -1477,
- 497, -808, 593,
- -394, -748, -1564,
- -950, -198, -436,
- -503, -1420, -234,
- 318, 985, -1905,
- -118, 1783, 1563,
- 220, 929, 400,
- 857, 37, -995,
- -807, 1943, -409,
- -743, -524, 552,
- 940, 1643, -299,
- 805, -1421, -768,
- -2330, 705, 156,
- 61, 203, 1213,
- -138, 517, -642,
- 64, -501, -435,
- 2194, -625, 157,
- -1600, 341, -1611,
- 1137, -351, 2353,
- -811, -1715, 1522,
- -870, 613, 446,
-};
-
-const Word16 EnvCdbk4th_fx[N_CB4TH * DIM4TH] = /*Q8 */
-{
- 1024, -210, -207, 591,
- -280, -2486, -951, 958,
- 1539, 1136, 411, 1314,
- 1761, -202, 1339, 203,
- -2438, -2109, -2028, -2125,
- 1849, -1408, -670, 144,
- -469, 2674, -1589, -3604,
- 1642, -702, 139, 2476,
- -483, 372, -861, 540,
- -119, 827, 863, 952,
- 23, 99, -24, -303,
- 488, -2233, -1432, -1399,
- 54, -43, 96, -1527,
- 1170, 133, -119, -717,
- 258, -1215, -439, 160,
- -1049, 793, 970, -770,
- -1914, -1245, 1281, 422,
- -1194, 1005, 176, -2368,
- -1631, 1316, -1125, -361,
- 1124, 1132, 61, -2186,
- 790, -2055, 1174, 938,
- 2974, 3874, 2315, 2040,
- -300, 2484, 59, -860,
- 543, 1307, -1868, -725,
- 389, -115, -945, -146,
- -1837, -578, -620, 975,
- 389, 1779, 1732, 296,
- 377, 897, 1555, 2269,
- -854, 26, 590, 1413,
- -780, -985, 1389, 2639,
- 312, -277, -935, -3289,
- 1740, 1852, 641, -519,
- 738, 898, -466, 115,
- 1187, -286, -1514, -1309,
- 74, -801, -583, -987,
- 510, -667, 430, -191,
- 418, -303, 806, 1258,
- -1083, -1065, 362, -2114,
- -1075, 82, 260, 286,
- -2579, 14, 75, -854,
- -661, -634, 482, -581,
- -338, -306, 3255, 388,
- -230, -24, 1161, 205,
- 256, 546, -141, 1379,
- -63, -775, -484, 1478,
- -517, -546, -451, 86,
- 1473, -1201, 430, -1892,
- 394, 831, 620, -664,
- 334, 64, 1773, -1576,
- -1783, 1270, 1020, 944,
- 1023, 98, -1908, 1330,
- -560, -1044, 380, 707,
- -427, -708, -1815, -90,
- -54, 2298, -537, 1151,
- -499, 703, -1018, 3322,
- 92, 717, -607, -1032,
- -1313, -1393, -580, -485,
- 34, -2192, 788, -860,
- 2641, 628, -776, -259,
- -702, -159, -1483, -1638,
- -33, -63, 97, 553,
- 692, 523, 548, 349,
- -913, 54, -456, -702,
- -341, 944, 157, 100,
-};
-
-
-const Word16 EnvCdbkFB_fx[N_CB_FB * DIM_FB] = /*Q7 */
-{
- -2126, -1242, -945,
- 1628, -686, -539,
- 1230, 2245, 2532,
- 2822, 3094, 2669,
- -12376, -11507, -11342,
- 2678, 3533, 3510,
- 489, 903, 689,
- 1930, 2929, 3025,
- 3424, 4179, 4050,
- -2500, -1707, -1415,
- -3511, -2563, -2224,
- -865, -987, -1212,
- -424, 891, 1919,
- 1976, 2520, 2277,
- 673, 1667, 1945,
- 5169, 6024, 5983,
- -1367, -501, -236,
- -254, 679, 989,
- -18974, -18088, -17834,
- -23007, -22053, -22109,
- 2262, 2301, -625,
- -124, 431, 372,
- 1454, 1962, 1791,
- 200, 1094, 1347,
- -997, -110, 213,
- -697, 267, 602,
- -3066, -2172, -1876,
- -4358, -3493, -3164,
- -360, 59, -472,
- -1813, -919, -601,
- 4204, 4967, 4913,
- 953, 1457, 1245
-};
-
-const Word16 Mean_env_fb_fx[DIM_FB] = { 1760, 805, 473 }; /*Q8 */
-
-const Word16 w_NOR_fx[SWB_FENV] = /*Q15 */
-{
- 32767, 32056, 31374, 30720, 30093, 29491, 28913,
- 28357, 27822, 27307, 26810, 26331, 25869, 25423,
-};
-const Word16 Mean_env_fx[SWB_FENV] = /*Q8 */
-{
- 7327, 7414, 7181, 7160, 6889, 6866, 6746,
- 6651, 6385, 6152, 5873, 5668, 5435, 5222,
-};
-
-const Word16 Env_TR_Cdbk1_fx[N_CB_TR1 * DIM_TR1] = /*Q8 */
-{
- 229, -2347,
- 8199, 7726,
- -312, 1700,
- 9881, 5949,
- 8942, 8358,
- 3865, 3287,
- 2405, 796,
- 3664, 1433,
- 3059, 2215,
- 618, 874,
- -5479, -4636,
- 2237, 2512,
- 4265, 2428,
- 6583, 2065,
- 4548, 6579,
- 11325, 7340,
- 10578, 9264,
- 8491, 6457,
- -1380, -2484,
- 3377, 5069,
- 7393, 5120,
- 4798, 4440,
- 5506, 7614,
- -3371, -3982,
- 2806, 2959,
- 2242, 3550,
- 1334, 3065,
- 2055, -1350,
- 815, 5507,
- 4940, 1457,
- -1950, -1046,
- 653, -1133,
- 872, -3622,
- -1756, 245,
- 5792, 5542,
- 4084, 7696,
- 4569, 5204,
- -810, -1555,
- 10127, 10384,
- 11341, 11713,
- 6365, 4996,
- 8641, 10527,
- 5914, 3366,
- 4522, 3266,
- 5217, 2830,
- 8107, 8980,
- 3952, 5858,
- 5848, 8990,
- 6424, 5931,
- 5185, 3823,
- 6367, 6917,
- 3548, 2683,
- 1634, 2098,
- 2729, -89,
- 6964, 7664,
- 3179, 3561,
- 6388, 4193,
- 4024, 4828,
- -378, 434,
- 9338, 9507,
- 7593, 3483,
- -6835, -6317,
- 5207, 5029,
- 11326, 10488,
- 7411, 6086,
- 10072, 8255,
- -6099, -5652,
- 7074, 8702,
- -12228, -11384,
- -11471, -10567,
- -13025, -12253,
- -12879, -11289,
- -13952, -13062,
- -16214, -15389,
- -11659, -10789,
- -12351, -11477,
- -12789, -11947,
- -15139, -14249,
- -11326, -11219,
- -11950, -11093,
- -11800, -10928,
- -23738, -22881,
- 12795, 11890,
- -3793, -2879,
- -27373, -26492,
- -11928, -11531,
- -12110, -11258,
- -20492, -19634,
- -14371, -13608,
- -12591, -11728,
- -14055, -11739,
- 9471, 7272,
- -11184, -10335,
- -13313, -11673,
- -12209, -10610,
- -13465, -12761,
- 7690, 7115,
- 2564, 4496,
- 5587, 4551,
- -813, -562,
- -4483, -5521,
- 1556, 98,
- 2, 3468,
- 1410, 1339,
- 4049, 161,
- -4538, -4026,
- -9866, -9115,
- -1616, -4727,
- 2457, 1653,
- 631, 2155,
- -17982, -17082,
- 2628, 6088,
- -10791, -9933,
- -12426, -11566,
- 4322, 4000,
- -1574, 2162,
- -7968, -7599,
- 1523, 4192,
- 5621, 6537,
- -2511, -1987,
- 12471, 9218,
- 8746, 4971,
- 3642, 4148,
- 5089, 5948,
- 350, -92,
- 7028, 6683,
- -2430, -3216,
- -3974, -886,
-};
-
-const Word16 Env_TR_Cdbk2_fx[N_CB_TR2 * DIM_TR2] = /*Q8 */
-{
- 2639, 375,
- -481, 1694,
- -2400, -3306,
- 86, -4018,
- -1301, 47,
- 734, 299,
- 957, -1039,
- 2204, 1486,
- 361, -1136,
- 2628, -838,
- -2010, 1296,
- 373, 127,
- -573, 2604,
- 689, -1554,
- 1676, -371,
- 1298, 279,
- -901, 1086,
- 1747, -2723,
- 214, -657,
- -731, -909,
- 1545, -1658,
- -369, -2208,
- -1276, 1748,
- 1141, -522,
- 186, -1893,
- -1260, -2016,
- -478, -504,
- 1287, 1882,
- -97, -1400,
- -1372, -1165,
- 800, -152,
- 413, -240,
- -208, -858,
- -90, -399,
- 492, 2519,
- 913, 1368,
- -344, 282,
- 305, 526,
- -251, 860,
- -1066, 567,
- -2800, -687,
- 1, 674,
- 176, 878,
- -716, -153,
- 706, 831,
- -1083, -424,
- 419, 1192,
- -132, 565,
- 708, -2406,
- 600, -661,
- 1712, 2969,
- -1974, 379,
- -672, 208,
- 26, 296,
- -1821, -501,
- -513, 635,
- 266, 1737,
- -221, 1232,
- -3498, 1632,
- -337, -66,
- -552, -1427,
- 1329, 850,
- -718, -2948,
- -3, 0,
-};
-
-const Word16 Mean_env_tr_fx[5] = { 6971, 6095, 6111, 4995 }; /*Q8 */
-
-/*------------------------------------------------------------------------------*
- * LR MDCT SWB BWE coding tables
- *------------------------------------------------------------------------------*/
-
-
-const Word16 gain_table_SWB_BWE_fx[NB_SWB_SUBBANDS] = { -6554/*-0.4f*/, 1638/*0.1f*/, 9830/*0.6f*/, 18022/*1.1f*/ }; /* Q14 */
-
-const Word16 bits_lagIndices_modeNormal[NB_SWB_SUBBANDS] = {2, 2, 1, 1}; // Q0
-const Word16 subband_offsets_12KBPS[NB_SWB_SUBBANDS] = {SWB_SB_OFF0_12KBPS, SWB_SB_OFF1_12KBPS, SWB_SB_OFF2_12KBPS, SWB_SB_OFF3_12KBPS}; // Q0
-const Word16 subband_offsets_16KBPS[NB_SWB_SUBBANDS] = {SWB_SB_OFF0_16KBPS, SWB_SB_OFF1_16KBPS, SWB_SB_OFF2_16KBPS, SWB_SB_OFF3_16KBPS}; // Q0
-
-/* Search offset for the subbands that use a partial search */
-const Word16 subband_search_offsets[NB_SWB_SUBBANDS] =
-{
- 0, 0, 64, 64
-}; // Q0
-
-
-
-/* SPT : shorten subband length table */
-const Word16 bw_SPT_tbl[2][SPT_SHORTEN_SBNUM]=
-{
- {15, 31, 31, 31}, /* 13.2kbps: original band_width 53, 66, 82, 102 */
- {15, 15, 31, 31} /* 16.4kbps: original band_width 51 64, 80, 90 */
-};
-
-
-/* Harmonic Mode */
-const Word16 bits_lagIndices_mode0_Har[NB_SWB_SUBBANDS_HAR_SEARCH_SB] = {1,1}; // Q0
-
-
-/* 13.2 kbps */
-const Word16 subband_offsets_sub5_13p2kbps_Har[NB_SWB_SUBBANDS_HAR] =
-{
- SWB_SB_OFF0_SUB5_12KBPS_HAR, SWB_SB_OFF1_SUB5_12KBPS_HAR, SWB_SB_OFF2_SUB5_12KBPS_HAR, SWB_SB_OFF3_SUB5_12KBPS_HAR
-}; // Q0
-
-/* Search offset for the subbands that use a partial search */
-const Word16 subband_search_offsets_13p2kbps_Har[NB_SWB_SUBBANDS_HAR_SEARCH_SB] =
-{
- 120, 210
-}; // Q0
-
-/* 16.4 kbps */
-const Word16 subband_offsets_sub5_16p4kbps_Har[NB_SWB_SUBBANDS_HAR] =
-{
- SWB_SB_OFF0_SUB5_16KBPS_HAR, SWB_SB_OFF1_SUB5_16KBPS_HAR, SWB_SB_OFF2_SUB5_16KBPS_HAR, SWB_SB_OFF3_SUB5_16KBPS_HAR
-}; // Q0
-
-/* Search offset for the subbands that use a partial search */
-const Word16 subband_search_offsets_16p4kbps_Har[NB_SWB_SUBBANDS_HAR_SEARCH_SB] =
-{
- 120, 210
-}; // Q0
-
-
-/*------------------------------------------------------------------------------*
- * HQ core tables
- *------------------------------------------------------------------------------*/
-const Word16 wscw16q15_fx[240] =/*Q15 */
-{
- -32768, -32766, -32764, -32759, -32754, -32747, -32738, -32729, -32717, -32705, -32691,
- -32675, -32658, -32640, -32621, -32600, -32577, -32553, -32528, -32501, -32473, -32444,
- -32413, -32381, -32348, -32313, -32276, -32239, -32200, -32159, -32117, -32074, -32029,
- -31984, -31936, -31887, -31837, -31786, -31733, -31679, -31624, -31567, -31508, -31449,
- -31388, -31326, -31262, -31197, -31131, -31063, -30994, -30924, -30853, -30780, -30705,
- -30630, -30553, -30475, -30395, -30315, -30232, -30149, -30064, -29979, -29891, -29803,
- -29713, -29622, -29530, -29436, -29341, -29245, -29148, -29049, -28949, -28848, -28746,
- -28642, -28537, -28431, -28324, -28216, -28106, -27995, -27883, -27770, -27655, -27540,
- -27423, -27305, -27186, -27066, -26944, -26821, -26698, -26573, -26447, -26320, -26191,
- -26062, -25931, -25800, -25667, -25533, -25398, -25262, -25125, -24986, -24847, -24707,
- -24565, -24423, -24279, -24135, -23989, -23843, -23695, -23546, -23397, -23246, 23095,
- 22942, 22788, 22634, 22478, 22322, 22164, 22006, 21846, 21686, 21525, 21363,
- 21199, 21035, 20871, 20705, 20538, 20371, 20202, 20033, 19863, 19692, 19520,
- 19347, 19174, 18999, 18824, 18648, 18472, 18294, 18116, 17937, 17757, 17576,
- 17395, 17213, 17030, 16846, 16662, 16477, 16291, 16105, 15917, 15730, 15541,
- 15352, 15162, 14972, 14781, 14589, 14397, 14204, 14010, 13816, 13621, 13426,
- 13230, 13033, 12836, 12639, 12441, 12242, 12043, 11843, 11643, 11442, 11241,
- 11039, 10837, 10634, 10431, 10228, 10024, 9819, 9615, 9409, 9204, 8998,
- 8791, 8585, 8377, 8170, 7962, 7754, 7545, 7336, 7127, 6918, 6708,
- 6498, 6288, 6077, 5866, 5655, 5444, 5232, 5020, 4808, 4596, 4383,
- 4171, 3958, 3745, 3532, 3319, 3105, 2892, 2678, 2464, 2250, 2036,
- 1822, 1608, 1394, 1179, 965, 751, 536, 322, 107
-};
-const Word16 wscw16q15_8_fx[40] =/*Q15 */
-{
- -32762, -32711, -32610, -32459, -32258, -32007, -31706, -31357,
- -30959, -30514, -30022, -29483, -28899, -28270, -27598, -26883,
- -26127, -25330, -24494, -23621, 22711, 21766, 20788, 19777,
- 18736, 17666, 16569, 15447, 14300, 13132, 11943, 10736,
- 9512, 8274, 7022, 5760, 4490, 3212, 1929, 643
-};
-const Word16 wscw16q15_16_fx[80] =/*Q15 */
-{
- -32766, -32754, -32729, -32691, -32640, -32577, -32501, -32413,
- -32313, -32200, -32074, -31936, -31786, -31624, -31449, -31262,
- -31063, -30853, -30630, -30395, -30149, -29891, -29622, -29341,
- -29049, -28746, -28431, -28106, -27770, -27423, -27066, -26698,
- -26320, -25931, -25533, -25125, -24707, -24279, -23843, -23397,
- 22942, 22478, 22006, 21525, 21035, 20538, 20033, 19520,
- 18999, 18472, 17937, 17395, 16846, 16291, 15730, 15162,
- 14589, 14010, 13426, 12836, 12242, 11643, 11039, 10431,
- 9819, 9204, 8585, 7962, 7336, 6708, 6077, 5444,
- 4808, 4171, 3532, 2892, 2250, 1608, 965, 322
-};
-const Word16 wscw16q15_32_fx[160] =/*Q15 */
-{
- -32768, -32764, -32758, -32749, -32736, -32720, -32701, -32679, -32654, -32626, -32594,
- -32559, -32522, -32481, -32437, -32389, -32339, -32286, -32229, -32169, -32107, -32041,
- -31972, -31900, -31825, -31747, -31665, -31581, -31494, -31403, -31310, -31214, -31114,
- -31012, -30906, -30798, -30687, -30572, -30455, -30335, -30212, -30086, -29957, -29825,
- -29690, -29553, -29412, -29269, -29123, -28974, -28823, -28668, -28511, -28351, -28188,
- -28023, -27855, -27684, -27511, -27335, -27156, -26975, -26791, -26604, -26415, -26223,
- -26029, -25833, -25633, -25432, -25228, -25021, -24812, -24601, -24387, -24171, -23953,
- -23732, -23509, -23284, 23056, 22827, 22595, 22361, 22125, 21886, 21646, 21403,
- 21159, 20912, 20663, 20413, 20160, 19905, 19649, 19390, 19130, 18868, 18604,
- 18338, 18071, 17802, 17531, 17258, 16984, 16708, 16430, 16151, 15871, 15588,
- 15305, 15019, 14733, 14445, 14155, 13865, 13572, 13279, 12984, 12688, 12391,
- 12093, 11793, 11492, 11191, 10888, 10584, 10279, 9973, 9666, 9358, 9049,
- 8740, 8429, 8118, 7806, 7493, 7180, 6865, 6550, 6235, 5919, 5602,
- 5285, 4967, 4649, 4330, 4011, 3692, 3372, 3052, 2731, 2411, 2090,
- 1768, 1447, 1126, 804, 483, 161
-};
-
-/* Codebook for quantization of norms */
-const Word32 dicn_fx[40] = /* Q=14 */
-{
- 2147483647, 1518500224,
- 1073741824, 759250112,
- 536870912, 379625056,
- 268435456, 189812528,
- 134217728, 94906264,
- 67108864, 47453132,
- 33554432, 23726566,
- 16777216, 11863283,
- 8388608, 5931642,
- 4194304, 2965821,
- 2097152, 1482910,
- 1048576, 741455,
- 524288, 370728,
- 262144, 185364,
- 131072, 92682,
- 65536, 46341,
- 32768, 23170,
- 16384, 11585,
- 8192, 5793,
- 4096, 2896
-};
-
-const Word32 dicn_pg_fx[45] = /* Q12 */
-{
- 536870912, 451452834, 379625056, 319225344, 268435456,
- 225726416, 189812528, 159612672, 134217728, 112863208,
- 94906264, 67108864, 47453132, 33554432, 23726566,
- 16777216, 11863283, 8388608, 5931641, 4194304,
- 2965821, 2097152, 1482910, 1048576, 741455,
- 524288, 370728, 262144, 185364, 131072,
- 92682, 65536, 46341, 32768, 23170,
- 16384, 11585, 8192, 5793, 4096,
- 2896, 2048, 1448, 1024, 724
-};
-const Word16 expPkEnrg_tbl[45] =
-{
- 0, 0, 0, 0, 0, 2, 2, 2, 2,
- 4, 4, 4, 6, 6, 8, 8, 10, 10,
- 12, 12, 14, 14, 16, 16, 18, 18, 20,
- 20, 22, 22, 24, 24, 26, 26, 28, 28,
- 30, 30, 32, 32, 34, 34, 36, 36, 38
-}; // Q0
-
-const Word32 manPkEnrg_tbl[45] =
-{
- 2147483646, 1518500308, 1073741787, 759250076, 536870912,
- 1518500294, 1073741787, 759250076, 536870912, 1518500294,
- 1073741787, 536870912, 1073741787, 536870912, 1073741787,
- 536870912, 1073741787, 536870912, 1073741606, 536870912,
- 1073741968, 536870912, 1073741244, 536870912, 1073741244,
- 536870912, 1073744140, 536870912, 1073744140, 536870912,
- 1073744140, 536870912, 1073744140, 536870912, 1073697800,
- 536870912, 1073697800, 536870912, 1073883168, 536870912,
- 1073512448, 536870912, 1073512448, 536870912, 1073512448
-}; // Q0
-const Word32 E_max5_tbl[40] =
-{
- 2047999999, 1448154663, 1024000000, 1448154663, 1024000000,
- 1448154663, 1024000000, 1448154663, 1024000000, 1448154663,
- 1024000000, 1448154663, 1024000000, 1448154663, 1024000000,
- 1448154663, 1024000000, 1448154785, 1024000000, 1448154785,
- 1024000000, 1448154296, 1024000000, 1448154296, 1024000000,
- 1448156250, 1024000000, 1448156250, 1024000000, 1448156250,
- 1024000000, 1448156250, 1024000000, 1448125000, 1024000000,
- 1448125000, 1024000000, 1448250000, 1024000000, 1448000000
-}; // Q0
-
-
-const Word16 resize_huffsizn[32] =
-{
- 0, 0, 0, 0, 0, 11, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2,
- 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, 0
-}; // Q0
-
-const Word16 huffsizn[32] =
-{
- 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 4, 4, 3, 3,
- 3, 3, 4, 4, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7
-}; // Q0
-
-const Word16 huffnorm_tran[32] =
-{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,122, 10, 6, 1,
- 0, 3, 2, 26, 58, 186, 442, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-}; // Q0
-
-const Word16 huffsizn_tran[32] =
-{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 5, 3, 2, 2,
- 2, 4, 6, 8, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-}; // Q0
-
-const Word16 pgain_huffsizn[32] =
-{
- 10, 11, 10, 10, 9, 8, 6, 5, 5, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 5, 5, 6, 7, 7, 8, 10, 10, 12, 12
-}; // Q0
-
-const Word16 dicnlg2_float[40] =
-{
- 34, 33, 32, 31, 30, 29, 28, 27, 26, 25,
- 24, 23, 22, 21, 20, 19, 18, 17, 16, 15,
- 14, 13, 12, 11, 10, 9, 8, 7, 6, 5,
- 4, 3, 2, 1, 0, -1, -2, -3, -4, -5
-}; // Q0
-
-/*** Table for quantization of MLT coefficients ***/
-const Word16 norm_order_48[NB_SFM] =
-{
- 0, 1, 8, 9, 16, 20, 24, 28, 32, 36, 40, 41, 37, 33, 29, 25, 21, 17, 11, 10, 3, 2,
- 4, 5, 12, 13, 18, 22, 26, 30, 34, 38, 42, 43, 39, 35, 31, 27, 23, 19, 15, 14, 7, 6
-}; // Q0
-
-const Word16 norm_order_32[SFM_N_SWB] =
-{
- 0, 1, 8, 9, 16, 20, 24, 28, 32, 36, 37, 33, 29, 25, 21, 17, 11, 10, 3, 2,
- 4, 5, 12, 13, 18, 22, 26, 30, 34, 38, 35, 31, 27, 23, 19, 15, 14, 7, 6
-}; // Q0
-
-const Word16 norm_order_16[SFM_N_WB] =
-{
- 0, 1, 8, 9, 16, 20, 24, 21, 17, 11, 10, 3, 2,
- 4, 5, 12, 13, 18, 22, 25, 23, 19, 15, 14, 7, 6
-}; // Q0
-
-const Word16 intl_bw_16[N_INTL_GRP_16] = {16, 16}; // Q0
-const Word16 intl_bw_32[N_INTL_GRP_32] = {16, 24}; // Q0
-const Word16 intl_bw_48[N_INTL_GRP_48] = {16, 24, 32}; // Q0
-
-const Word16 intl_cnt_16[N_INTL_GRP_16] = {4, 1}; // Q0
-const Word16 intl_cnt_32[N_INTL_GRP_32] = {4, 4}; // Q0
-const Word16 intl_cnt_48[N_INTL_GRP_48] = {4, 3, 2}; // Q0
-
-const Word16 band_start_HQ[44] =
-{
- 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88,
- 96, 104, 112, 120, 128, 144, 160, 176, 192, 208, 224, 240,
- 256, 280, 304, 328, 352, 376, 400, 424, 448, 472, 496, 520,
- 544, 576, 608, 640, 672, 704, 736, 768
-}; // Q0
-
-const Word16 band_end_HQ[44] =
-{
- 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96,
- 104, 112, 120, 128, 144, 160, 176, 192, 208, 224, 240, 256,
- 280, 304, 328, 352, 376, 400, 424, 448, 472, 496, 520, 544,
- 576, 608, 640, 672, 704, 736, 768, 800
-}; // Q0
-
-const Word16 band_len_HQ[44] =
-{
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 16, 16,
- 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
- 32, 32, 32, 32, 32, 32, 32, 32
-}; // Q0
-
-const Word16 band_start_wb[26] =
-{
- 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88,
- 96, 104, 112, 120, 128, 144, 160, 176, 192, 208, 224, 240,
- 256, 288
-}; // Q0
-
-const Word16 band_end_wb[26] =
-{
- 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96,
- 104, 112, 120, 128, 144, 160, 176, 192, 208, 224, 240, 256,
- 288, 320
-}; // Q0
-
-const Word16 band_len_wb[26] =
-{
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 16, 16,
- 32, 32
-}; // Q0
-const Word16 band_len_harm_float[SFM_N_HARM_FB] = // Q0
-{
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 16, 16, 16, 16, 16, 16, 32, 32, 32, 48, 48, 48, 48, 64, 64, 64, 96
-};
-
-const Word16 band_start_harm[SFM_N_HARM_FB] =//Q0
-{
- 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120,
- 128, 144, 160, 176, 192, 208, 224, 256, 288, 320, 368, 416, 464, 512, 576, 640, 704
-};
-
-const Word16 band_end_harm[SFM_N_HARM_FB] =//Q0
-{
- 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128,
- 144, 160, 176, 192, 208, 224, 256, 288, 320, 368, 416, 464, 512, 576, 640, 704, 800
-};
-
-const Word16 rat_fx[SFM_N_WB] = { 24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576,
- 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 13107, 13107
-};//Q14
-
-const Word16 sfm_width[20] = {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 8}; // Q0
-const Word16 a_map[20] = {8, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 5, 7, 11}; // Q0
-
-
-const Word32 SQRT_DIM_fx[65] = /* sqrt(x) for x = 0, 1, ..., 64. in Q15 */
-{
- 0, 32768, 46341, 56756, 65536, 73271, 80265, 86696,
- 92682, 98304, 103622, 108679, 113512, 118147, 122607, 126910,
- 131072, 135106, 139023, 142832, 146543, 150162, 153696, 157150,
- 160530, 163840, 167085, 170268, 173392, 176461, 179478, 182445,
- 185364, 188238, 191069, 193858, 196608, 199320, 201996, 204636,
- 207243, 209818, 212361, 214874, 217358, 219814, 222243, 224646,
- 227023, 229376, 231705, 234010, 236293, 238555, 240795, 243014,
- 245213, 247393, 249554, 251696, 253820, 255926, 258015, 260088,
- 262144
-};
-
-
-
-/*------------------------------------------------------------------------------*
- * HQ core tables for SWB signals
- *------------------------------------------------------------------------------*/
-
-const Word16 short_window_48kHz_fx[L_FRAME48k / 2 / 2] = /* second half is symetric and omitted Q15*/
-{
- 107, 322, 536, 751, 965, 1179, 1394, 1608, 1822, 2036, 2250, 2464, 2678, 2892, 3105, 3319,
- 3532, 3745, 3958, 4171, 4383, 4596, 4808, 5020, 5232, 5444, 5655, 5866, 6077, 6288, 6498, 6708,
- 6918, 7127, 7336, 7545, 7754, 7962, 8170, 8377, 8585, 8791, 8998, 9204, 9409, 9615, 9819, 10024,
- 10228, 10431, 10634, 10837, 11039, 11241, 11442, 11643, 11843, 12043, 12242, 12441, 12639, 12836, 13033, 13230,
- 13426, 13621, 13816, 14010, 14204, 14397, 14589, 14781, 14972, 15162, 15352, 15541, 15730, 15917, 16105, 16291,
- 16477, 16662, 16846, 17030, 17213, 17395, 17576, 17757, 17937, 18116, 18294, 18472, 18648, 18824, 18999, 19174,
- 19347, 19520, 19692, 19863, 20033, 20202, 20371, 20538, 20705, 20871, 21035, 21199, 21363, 21525, 21686, 21846,
- 22006, 22164, 22322, 22478, 22634, 22788, 22942, 23095, 23246, 23397, 23546, 23695, 23843, 23989, 24135, 24279,
- 24423, 24565, 24707, 24847, 24986, 25125, 25262, 25398, 25533, 25667, 25800, 25931, 26062, 26191, 26320, 26447,
- 26573, 26698, 26821, 26944, 27066, 27186, 27305, 27423, 27540, 27655, 27770, 27883, 27995, 28106, 28216, 28324,
- 28431, 28537, 28642, 28746, 28848, 28949, 29049, 29148, 29245, 29341, 29436, 29530, 29622, 29713, 29803, 29891,
- 29979, 30064, 30149, 30232, 30315, 30395, 30475, 30553, 30630, 30705, 30780, 30853, 30924, 30994, 31063, 31131,
- 31197, 31262, 31326, 31388, 31449, 31508, 31567, 31624, 31679, 31733, 31786, 31837, 31887, 31936, 31984, 32029,
- 32074, 32117, 32159, 32200, 32239, 32276, 32313, 32348, 32381, 32413, 32444, 32473, 32501, 32528, 32553, 32577,
- 32600, 32621, 32640, 32658, 32675, 32691, 32705, 32717, 32729, 32738, 32747, 32754, 32759, 32764, 32766, 32767,
-};
-const Word16 short_window_32kHz_fx[L_FRAME32k / 2 / 2] = /* second half is symetric and omitted Q15*/
-{
- 161, 483, 804, 1126, 1447, 1768, 2090, 2411, 2731, 3052, 3372, 3692, 4011, 4330, 4649, 4967,
- 5285, 5602, 5919, 6235, 6550, 6865, 7180, 7493, 7806, 8118, 8429, 8740, 9049, 9358, 9666, 9973,
- 10279, 10584, 10888, 11191, 11492, 11793, 12093, 12391, 12688, 12984, 13279, 13572, 13865, 14155, 14445, 14733,
- 15019, 15305, 15588, 15871, 16151, 16430, 16708, 16984, 17258, 17531, 17802, 18071, 18338, 18604, 18868, 19130,
- 19390, 19649, 19905, 20160, 20413, 20663, 20912, 21159, 21403, 21646, 21886, 22125, 22361, 22595, 22827, 23056,
- 23284, 23509, 23732, 23953, 24171, 24387, 24601, 24812, 25021, 25228, 25432, 25633, 25833, 26029, 26223, 26415,
- 26604, 26791, 26975, 27156, 27335, 27511, 27684, 27855, 28023, 28188, 28351, 28511, 28668, 28823, 28974, 29123,
- 29269, 29412, 29553, 29690, 29825, 29957, 30086, 30212, 30335, 30455, 30572, 30687, 30798, 30906, 31012, 31114,
- 31214, 31310, 31403, 31494, 31581, 31665, 31747, 31825, 31900, 31972, 32041, 32107, 32169, 32229, 32286, 32339,
- 32389, 32437, 32481, 32522, 32559, 32594, 32626, 32654, 32679, 32701, 32720, 32736, 32749, 32758, 32764, 32767,
-};
-
-const Word16 short_window_16kHz_fx[L_FRAME16k / 2 / 2] = /* second half is symetric and omitted Q15*/
-{
- 322, 965, 1608, 2250, 2892, 3532, 4171, 4808, 5444, 6077, 6708, 7336, 7962, 8585, 9204, 9819,
- 10431, 11039, 11643, 12242, 12836, 13426, 14010, 14589, 15162, 15730, 16291, 16846, 17395, 17937, 18472, 18999,
- 19520, 20033, 20538, 21035, 21525, 22006, 22478, 22942, 23397, 23843, 24279, 24707, 25125, 25533, 25931, 26320,
- 26698, 27066, 27423, 27770, 28106, 28431, 28746, 29049, 29341, 29622, 29891, 30149, 30395, 30630, 30853, 31063,
- 31262, 31449, 31624, 31786, 31936, 32074, 32200, 32313, 32413, 32501, 32577, 32640, 32691, 32729, 32754, 32766,
-};
-
-const Word16 short_window_8kHz_fx[L_FRAME8k / 2 / 2] = /* second half is symetric and omitted Q15*/
-{
- 643, 1929, 3212, 4490, 5760, 7022, 8274, 9512,
- 10736, 11943, 13132, 14300, 15447, 16569, 17666, 18736,
- 19777, 20788, 21766, 22711, 23621, 24494, 25330, 26127,
- 26883, 27598, 28270, 28899, 29483, 30022, 30514, 30959,
- 31357, 31706, 32007, 32258, 32459, 32610, 32711, 32762,
-};
-
-const Word16 inv_jp2[64] =//Q15
-{
- 16384, 10923, 8192, 6554, 5461, 4681, 4096, 3641, 3277, 2979, 2731, 2521, 2341, 2185, 2048, 1928,
- 1820, 1725, 1638, 1560, 1489, 1425, 1365, 1311, 1260, 1214, 1170, 1130, 1092, 1057, 1024, 993,
- 964, 936, 910, 886, 862, 840, 819, 799, 780, 762, 745, 728, 712, 697, 683, 669,
- 655, 643, 630, 618, 607, 596, 585, 575, 565, 555, 546, 537, 529, 520, 512, 504
-};
-const Word16 subf_norm_groups[4][11] =
-{
- {0,1,8,9,16,20,24,28,32,36,40},
- {2,3,10,11,17,21,25,29,33,37,41},
- {4,5,12,13,18,22,26,30,34,38,42},
- {6,7,14,15,19,23,27,31,35,39,43}
-}; // Q0
-
-const Word16 gain_att_fx[40] = /* Q=15 */
-{
- 15711, 19367, 21781, 23743, 24899, 25929, 26758, 27514,
- 28059, 28562, 28994, 29398, 29693, 29970, 30213, 30442,
- 30619, 30786, 30936, 31077, 31190, 31298, 31395, 31488,
- 31564, 31637, 31704, 31768, 31822, 31873, 31920, 31966,
- 32005, 32042, 32077, 32111, 32140, 32168, 32195, 32220
-};
-
-const Word16 stab_trans_fx[10] = /* Q15 */
-{
- 16384, 11381, 7232, 4292, 2433,
- 1341, 728, 391, 209, 112
-};
-
-const Word16 env_stab_tp_fx[2][2] = /* Q15 */
-{
- {32735, 16384},
- {33, 16384}
-};
-
-const Word16 att_step_fx[4] = /* Q=13 */
-{
- 32767, 16384, 10923, 8192
-};
-
-const Word32 table_logcum_fx[563] =//Q16
-{
- 0, 0, 0, 65536, 169408, 300480, 452650, 622058, 806041,
- 1002649, 1210393, 1428099, 1654816, 1889761, 2132272, 2381791, 2637833,
- 2899977, 3167853, 3441134, 3719526, 4002767, 4290623, 4582876, 4879332,
- 5179812, 5484152, 5792200, 6103816, 6418871, 6737244, 7058822, 7383500,
- 7711180, 8041769, 8375181, 8711333, 9050150, 9391557, 9735485, 10081869,
- 10430647, 10781759, 11135150, 11490766, 11848556, 12208469, 12570461, 12934487,
- 13300503, 13668469, 14038345, 14410092, 14783676, 15159061, 15536214, 15915101,
- 16295692, 16677956, 17061866, 17447390, 17834504, 18223180, 18613394, 19005122,
- 19398338, 19793020, 20189146, 20586692, 20985640, 21385968, 21787658, 22190686,
- 22595040, 23000696, 23407638, 23815850, 24225314, 24636014, 25047934, 25461060,
- 25875374, 26290862, 26707510, 27125304, 27544232, 27964278, 28385428, 28807674,
- 29231000, 29655392, 30080844, 30507338, 30934866, 31363416, 31792978, 32223540,
- 32655092, 33087624, 33521126, 33955588, 34391000, 34827352, 35264636, 35702840,
- 36141960, 36581988, 37022908, 37464716, 37907404, 38350964, 38795388, 39240668,
- 39686792, 40133760, 40581560, 41030188, 41479632, 41929888, 42380948, 42832808,
- 43285456, 43738892, 44193104, 44648088, 45103840, 45560348, 46017612, 46475624,
- 46934376, 47393864, 47854080, 48315024, 48776684, 49239060, 49702144, 50165928,
- 50630412, 51095588, 51561452, 52028000, 52495224, 52963124, 53431688, 53900916,
- 54370808, 54841348, 55312540, 55784380, 56256856, 56729972, 57203720, 57678096,
- 58153096, 58628716, 59104952, 59581800, 60059256, 60537316, 61015980, 61495236,
- 61975084, 62455524, 62936548, 63418156, 63900340, 64383100, 64866428, 65350328,
- 65834792, 66319816, 66805396, 67291536, 67778224, 68265456, 68753240, 69241560,
- 69730424, 70219816, 70709744, 71200208, 71691192, 72182704, 72674736, 73167280,
- 73660344, 74153920, 74648008, 75142600, 75637704, 76133296, 76629400, 77125992,
- 77623080, 78120656, 78618728, 79117280, 79616320, 80115840, 80615832, 81116312,
- 81617256, 82118680, 82620568, 83122920, 83625744, 84129024, 84632768, 85136968,
- 85641624, 86146728, 86652288, 87158304, 87664760, 88171664, 88679008, 89186792,
- 89695016, 90203680, 90712776, 91222304, 91732256, 92242648, 92753464, 93264704,
- 93776368, 94288448, 94800952, 95313872, 95827208, 96340960, 96855120, 97369696,
- 97884672, 98400064, 98915856, 99432048, 99948648, 100465640, 100983040, 101500832,
- 102019016, 102537592, 103056568, 103575928, 104095672, 104615808, 105136328, 105657232,
- 106178520, 106700184, 107222232, 107744656, 108267456, 108790632, 109314176, 109838096,
- 110362384, 110887040, 111412064, 111937448, 112463208, 112989320, 113515800, 114042640,
- 114569832, 115097392, 115625304, 116153568, 116682184, 117211160, 117740480, 118270152,
- 118800168, 119330536, 119861248, 120392312, 120923712, 121455448, 121987536, 122519960,
- 123052720, 123585816, 124119248, 124653016, 125187120, 125721552, 126256320, 126791416,
- 127326840, 127862592, 128398664, 128935072, 129471800, 130008856, 130546224, 131083920,
- 131621936, 132160272, 132698920, 133237888, 133777176, 134316768, 134856688, 135396912,
- 135937440, 136478288, 137019440, 137560912, 138102688, 138644768, 139187152, 139729840,
- 140272832, 140816128, 141359712, 141903616, 142447808, 142992304, 143537104, 144082192,
- 144627568, 145173248, 145719232, 146265504, 146812064, 147358912, 147906048, 148453488,
- 149001200, 149549216, 150097504, 150646096, 151194960, 151744112, 152293536, 152843264,
- 153393264, 153943536, 154494096, 155044944, 155596064, 156147456, 156699120, 157251072,
- 157803296, 158355792, 158908560, 159461616, 160014928, 160568512, 161122368, 161676496,
- 162230896, 162785568, 163340496, 163895696, 164451168, 165006896, 165562896, 166119152,
- 166675664, 167232448, 167789504, 168346816, 168904368, 169462208, 170020288, 170578624,
- 171137232, 171696080, 172255200, 172814560, 173374192, 173934064, 174494192, 175054576,
- 175615216, 176176096, 176737232, 177298608, 177860256, 178422128, 178984256, 179546640,
- 180109264, 180672128, 181235248, 181798608, 182362208, 182926064, 183490144, 184054480,
- 184619056, 185183872, 185748928, 186314224, 186879760, 187445520, 188011536, 188577776,
- 189144272, 189710992, 190277936, 190845136, 191412560, 191980208, 192548112, 193116224,
- 193684592, 194253168, 194821984, 195391040, 195960320, 196529824, 197099568, 197669520,
- 198239712, 198810144, 199380784, 199951648, 200522752, 201094080, 201665616, 202237392,
- 202809376, 203381600, 203954032, 204526688, 205099568, 205672672, 206246000, 206819536,
- 207393296, 207967280, 208541472, 209115888, 209690528, 210265376, 210840432, 211415712,
- 211991216, 212566912, 213142848, 213718976, 214295328, 214871888, 215448672, 216025664,
- 216602864, 217180272, 217757888, 218335712, 218913760, 219492000, 220070464, 220649120,
- 221228000, 221807072, 222386368, 222965856, 223545552, 224125456, 224705568, 225285872,
- 225866400, 226447120, 227028032, 227609168, 228190496, 228772016, 229353760, 229935680,
- 230517824, 231100160, 231682688, 232265424, 232848352, 233431472, 234014800, 234598336,
- 235182048, 235765968, 236350080, 236934400, 237518896, 238103600, 238688496, 239273600,
- 239858880, 240444352, 241030032, 241615888, 242201952, 242788192, 243374640, 243961264,
- 244548096, 245135104, 245722304, 246309696, 246897280, 247485056, 248073008, 248661152,
- 249249488, 249838016, 250426720, 251015616, 251604704, 252193968, 252783424, 253373056,
- 253962880, 254552896, 255143088, 255733472, 256324032, 256914768, 257505696, 258096800,
- 258688096, 259279568, 259871216, 260463056, 261055056, 261647264, 262239632, 262832192,
- 263424928, 264017840, 264610928, 265204192, 265797632, 266391264, 266985072, 267579040,
- 268173200, 268767520, 269362048, 269956736, 270551584, 271146624, 271741824, 272337216,
- 272932768, 273528480, 274124384, 274720480, 275316704, 275913120, 276509728, 277106496,
- 277703424, 278300544, 278897824, 279495264, 280092896, 280690688, 281288640, 281886752,
- 282485056, 283083520
-};
-const Word32 pow_getbitsfrompulses_fx[16] = /*Q21 */
-{
- 2097152, 2190001, 2286961, 2388214, 2493948, 2604365, 2719671, 2840081,
- 2965822, 3097129, 3234251, 3377442, 3526976, 3683128, 3846194, 4016480
-};
-const Word16 DDP_fx[4] = { 3, 0, 1, 2 };//Q0
-
-const Word16 step_tcq[8][STATES] = { {0,4}, {0,4}, {1,5}, {1,5}, {2,6}, {2,6}, {3,7}, {3,7} }; // Q0
-const Word16 denc[8][STATES] = { {0,2}, {2,0}, {1,3}, {3,1}, {2,0}, {0,2}, {3,1}, {1,3} }; /* enc trellis Q0*/
-const Word16 ddec[8][STATES] = { {0,2}, {1,3}, {2,0}, {3,1}, {2,0}, {3,1}, {0,2}, {1,3} }; /* dec trellis Q0*/
-
-
-const Word16 step_LSB[STATES_LSB][2] = { {0,1}, {2,3}, {0,1}, {2,3} }; // Q0
-const Word16 denc_LSB[STATES_LSB][2] = { {0,3}, {2,1}, {3,0}, {1,2} }; // Q0
-const Word16 dqnt_LSB[STATES_LSB][4] = { {0,8,1,8}, {0,8,1,8}, {8,0,8,1}, {8,0,8,1} }; // Q0
-
-const Word16 dstep_LSB[4][2] = { {0,2}, {0,2}, {1,3}, {1,3} }; // Q0
-const Word16 ddec_LSB[4][2] = { {0,3}, {3,0}, {2,1}, {1,2} }; // Q0
-
-
-const Word16 nextstate[STATES][2] = {{0, 1}, {2, 3}, {4, 5}, {6, 7}, {0, 1}, {2, 3}, {4, 5}, {6, 7}};/*current state points to next two states Q0*/
-
-/*------------------------------------------------------------------------------*
- * PVQ tables
- *------------------------------------------------------------------------------*/
-
-const Word16 fine_gain_bits[8] = {0, 0, 0, 1, 2, 2, 4, 5}; // Q0
-const Word16 finegain_1_fx[2] = { -12204, 12647 }; /* Q14 */
-const Word16 finegain_2_fx[4] = { -17773, -5925, 6010, 18769 }; /* Q14 */
-const Word16 finegain_3_fx[8] = { -16384, -11703, -7022, -2341, 2341, 7022, 11703, 16384 }; /* Q14 */
-const Word16 finegain_4_fx[16] = /* Q14 */
-{
- -21683, -18292, -14998, -11876, -8936, -6239, -3702, -1371,
- 945, 3275, 6088, 9079, 12450, 15999, 19796, 23868
-};
-const Word16 finegain_5_fx[32] = /* Q14 */
-{
- -21462, -18895, -16284, -14135, -12605, -11307, -10139, -8910,
- -8028, -6792, -5638, -4812, -3672, -2681, -1725, -479,
- 449, 1390, 2364, 3433, 4579, 5516, 6769, 7767,
- 9085, 10152, 11009, 12535, 14765, 17093, 20094, 24716
-};
-const Word16* finegain_fx[5] = { finegain_1_fx, finegain_2_fx, finegain_3_fx, finegain_4_fx, finegain_5_fx };/* Q14 */
-
-
-const UWord8 hBitsMinus1_N01[2] = {1, 7}; // Q0
-
-const UWord8 hBitsMinus1_N02[65]=
-{
- 64, 15, 23, 28, 31, 34, 36, 38, 39, 41, 42, 43, 44, 45, 46, 47,
- 47, 48, 49, 49, 50, 51, 52, 53, 54, 54, 55, 56, 57, 57, 58, 59,
- 60, 61, 62, 63, 63, 64, 65, 65, 67, 68, 69, 69, 70, 71, 72, 72,
- 73, 74, 75, 76, 77, 78, 79, 80, 80, 81, 82, 83, 84, 85, 86, 87,
- 87
-}; // Q0
-
-const UWord8 hBitsMinus1_N03[65]=
-{
- 64, 20, 33, 41, 48, 53, 57, 61, 64, 66, 69, 71, 73, 75, 76, 78,
- 80, 81, 82, 83, 85, 86, 88, 90, 92, 93, 95, 96, 98, 99, 100, 102,
- 104, 106, 108, 110, 111, 113, 114, 115, 118, 120, 122, 123, 125, 127, 128, 129,
- 131, 133, 135, 137, 139, 141, 142, 144, 145, 146, 149, 151, 153, 155, 157, 158,
- 160
-}; // Q0
-
-const UWord8 hBitsMinus1_N04[65]=
-{
- 64, 23, 39, 51, 60, 67, 73, 79, 83, 87, 91, 94, 97, 100, 102, 105,
- 107, 109, 111, 113, 115, 116, 119, 122, 125, 127, 130, 132, 134, 136, 138, 141,
- 144, 147, 150, 152, 154, 156, 158, 160, 164, 167, 170, 173, 175, 177, 180, 182,
- 184, 187, 190, 193, 196, 199, 201, 203, 205, 207, 211, 214, 217, 220, 222, 225,
- 227
-}; // Q0
-
-const UWord8 hBitsMinus1_N05[54]=
-{
- 53, 26, 45, 59, 70, 79, 87, 94, 100, 105, 110, 114, 118, 122, 125, 128,
- 131, 134, 136, 139, 141, 144, 148, 152, 155, 158, 161, 164, 167, 170, 172, 176,
- 181, 184, 188, 191, 194, 197, 200, 202, 207, 211, 215, 219, 222, 225, 228, 231,
- 233, 238, 242, 246, 250, 253
-}; // Q0
-
-const UWord8 hBitsMinus1_N06[42]=
-{
- 41, 28, 49, 65, 78, 89, 99, 107, 114, 120, 126, 132, 136, 141, 145, 149,
- 153, 156, 159, 162, 165, 168, 173, 178, 183, 187, 191, 194, 198, 201, 204, 209,
- 214, 219, 224, 228, 231, 235, 238, 241, 247, 253
-}; // Q0
-
-const UWord8 hBitsMinus1_N07[34]=
-{
- 33, 30, 52, 70, 85, 98, 109, 118, 126, 134, 141, 147, 153, 158, 163, 168,
- 172, 176, 180, 184, 188, 191, 197, 203, 208, 213, 218, 222, 226, 230, 233, 240,
- 246, 252
-}; // Q0
-
-const UWord8 hBitsMinus1_N08[29]=
-{
- 28, 31, 55, 75, 91, 105, 117, 128, 138, 146, 154, 161, 168, 174, 180, 185,
- 190, 195, 200, 204, 208, 212, 219, 226, 232, 238, 243, 248, 253
-}; // Q0
-
-const UWord8 hBitsMinus1_N09[25]=
-{
- 24, 33, 58, 79, 97, 112, 125, 137, 148, 157, 166, 174, 182, 189, 195, 201,
- 207, 212, 217, 222, 227, 231, 240, 247, 254
-}; // Q0
-
-const UWord8 hBitsMinus1_N10[22]=
-{
- 21, 34, 61, 83, 101, 118, 132, 145, 157, 167, 177, 186, 194, 202, 209, 216,
- 222, 228, 234, 239, 245, 250
-}; // Q0
-
-const UWord8 hBitsMinus1_N11[19]=
-{
- 18, 35, 63, 86, 106, 123, 139, 152, 165, 176, 187, 197, 206, 214, 222, 230,
- 237, 243, 250
-}; // Q0
-
-const UWord8 hBitsMinus1_N12[17]=
-{
- 16, 36, 65, 89, 110, 128, 144, 159, 173, 185, 196, 207, 217, 226, 234, 242,
- 250
-}; // Q0
-
-const UWord8 hBitsMinus1_N13[16]=
-{
- 15, 37, 67, 92, 113, 133, 150, 165, 180, 193, 205, 216, 227, 237, 246, 254,
-}; // Q0
-
-const UWord8 hBitsMinus1_N14[14]=
-{
- 13, 38, 68, 94, 117, 137, 155, 171, 186, 200, 213, 225, 236, 247
-}; // Q0
-
-const UWord8 hBitsMinus1_N15[13]=
-{
- 12, 39, 70, 97, 120, 141, 160, 177, 193, 207, 221, 233, 245
-}; // Q0
-
-const UWord8 hBitsMinus1_N16[13]=
-{
- 12, 39, 71, 99, 123, 144, 164, 182, 198, 214, 228, 241, 253
-}; // Q0
-
-const UWord8 hBitsMinus1_N17[12]=
-{
- 11, 40, 73, 101, 126, 148, 168, 187, 204, 220, 234, 248
-}; // Q0
-
-const UWord8 hBitsMinus1_N18[12]=
-{
- 11, 41, 74, 103, 128, 151, 172, 191, 209, 225, 241, 255
-}; // Q0
-
-const UWord8 hBitsMinus1_N19[11]=
-{
- 10, 41, 75, 105, 131, 154, 176, 196, 214, 231, 247
-}; // Q0
-
-const UWord8 hBitsMinus1_N20[11]=
-{
- 10, 42, 77, 107, 133, 157, 179, 200, 219, 236, 253
-}; // Q0
-
-const UWord8 hBitsMinus1_N21[10]=
-{
- 9, 43, 78, 108, 135, 160, 183, 204, 223, 241
-}; // Q0
-
-const UWord8 hBitsMinus1_N22[10]=
-{
- 9, 43, 79, 110, 138, 163, 186, 207, 227, 246
-}; // Q0
-
-const UWord8 hBitsMinus1_N23[10]=
-{
- 9, 44, 80, 111, 140, 165, 189, 211, 231, 250
-}; // Q0
-
-const UWord8 hBitsMinus1_N24[10]=
-{
- 9, 44, 81, 113, 142, 168, 192, 214, 235, 255
-}; // Q0
-
-const UWord8 hBitsMinus1_N25[9]=
-{
- 8, 45, 82, 114, 143, 170, 195, 217, 239
-}; // Q0
-
-const UWord8 hBitsMinus1_N26[9]=
-{
- 8, 45, 83, 116, 145, 172, 197, 221, 242
-}; // Q0
-
-const UWord8 hBitsMinus1_N27[9]=
-{
- 8, 46, 84, 117, 147, 175, 200, 224, 246
-}; // Q0
-
-const UWord8 hBitsMinus1_N28[9]=
-{
- 8, 46, 84, 118, 149, 177, 202, 227, 249
-}; // Q0
-const UWord8 hBitsMinus1_N29[9]=
-{
- 8, 46, 85, 119, 150, 179, 205, 229, 252
-}; // Q0
-const UWord8 hBitsMinus1_N30[8]=
-{
- 7, 47, 86, 121, 152, 181, 207, 232
-}; // Q0
-const UWord8 hBitsMinus1_N31[8]=
-{
- 7, 47, 87, 122, 153, 182, 209, 235
-}; // Q0
-const UWord8 hBitsMinus1_N32[8]=
-{
- 7, 47, 87, 123, 155, 184, 212, 237
-}; // Q0
-const UWord8 hBitsMinus1_N33[8]=
-{
- 7, 48, 88, 124, 156, 186, 214, 240
-}; // Q0
-const UWord8 hBitsMinus1_N34[8]=
-{
- 7, 48, 89, 125, 158, 188, 216, 242
-}; // Q0
-const UWord8 hBitsMinus1_N35[8]=
-{
- 7, 49, 90, 126, 159, 189, 218, 245
-}; // Q0
-const UWord8 hBitsMinus1_N36[8]=
-{
- 7, 49, 90, 127, 160, 191, 220, 247
-}; // Q0
-const UWord8 hBitsMinus1_N37[8]=
-{
- 7, 49, 91, 128, 162, 193, 222, 249
-}; // Q0
-const UWord8 hBitsMinus1_N38[8]=
-{
- 7, 49, 91, 129, 163, 194, 224, 251
-}; // Q0
-const UWord8 hBitsMinus1_N39[8]=
-{
- 7, 50, 92, 130, 164, 196, 225, 253
-}; // Q0
-const UWord8 hBitsMinus1_N40[8]=
-{
- 7, 50, 93, 131, 165, 197, 227, 255
-}; // Q0
-const UWord8 hBitsMinus1_N41[7]=
-{
- 6, 50, 93, 131, 166, 199, 229
-}; // Q0
-const UWord8 hBitsMinus1_N42[7]=
-{
- 6, 51, 94, 132, 167, 200, 230
-}; // Q0
-const UWord8 hBitsMinus1_N43[7]=
-{
- 6, 51, 94, 133, 168, 201, 232
-}; // Q0
-const UWord8 hBitsMinus1_N44[7]=
-{
- 6, 51, 95, 134, 170, 203, 234
-}; // Q0
-const UWord8 hBitsMinus1_N45[7]=
-{
- 6, 51, 95, 135, 171, 204, 235
-}; // Q0
-const UWord8 hBitsMinus1_N46[7]=
-{
- 6, 52, 96, 135, 172, 205, 237
-}; // Q0
-const UWord8 hBitsMinus1_N47[7]=
-{
- 6, 52, 96, 136, 173, 206, 238
-}; // Q0
-const UWord8 hBitsMinus1_N48[7]=
-{
- 6, 52, 97, 137, 174, 208, 240
-}; // Q0
-const UWord8 hBitsMinus1_N49[7]=
-{
- 6, 52, 97, 138, 175, 209, 241
-}; // Q0
-const UWord8 hBitsMinus1_N50[7]=
-{
- 6, 53, 98, 138, 175, 210, 243
-}; // Q0
-const UWord8 hBitsMinus1_N51[7]=
-{
- 6, 53, 98, 139, 176, 211, 244
-}; // Q0
-const UWord8 hBitsMinus1_N52[7]=
-{
- 6, 53, 99, 140, 177, 212, 245
-}; // Q0
-const UWord8 hBitsMinus1_N53[7]=
-{
- 6, 53, 99, 140, 178, 213, 247
-}; // Q0
-const UWord8 hBitsMinus1_N54[7]=
-{
- 6, 54, 100, 141, 179, 214, 248
-}; // Q0
-const UWord8 hBitsMinus1_N55[7]=
-{
- 6, 54, 100, 142, 180, 216, 249
-}; // Q0
-const UWord8 hBitsMinus1_N56[7]=
-{
- 6, 54, 100, 142, 181, 217, 250
-}; // Q0
-const UWord8 hBitsMinus1_N57[7]=
-{
- 6, 54, 101, 143, 181, 218, 252
-};
-const UWord8 hBitsMinus1_N58[7]=
-{
- 6, 54, 101, 143, 182, 219, 253
-}; // Q0
-const UWord8 hBitsMinus1_N59[7]=
-{
- 6, 55, 102, 144, 183, 220, 254
-}; // Q0
-const UWord8 hBitsMinus1_N60[7]=
-{
- 6, 55, 102, 145, 184, 221, 255
-}; // Q0
-const UWord8 hBitsMinus1_N61[6]=
-{
- 5, 55, 102, 145, 185, 221
-}; // Q0
-const UWord8 hBitsMinus1_N62[6]=
-{
- 5, 55, 103, 146, 185, 222
-}; // Q0
-const UWord8 hBitsMinus1_N63[6]=
-{
- 5, 55, 103, 146, 186, 223
-}; // Q0
-const UWord8 hBitsMinus1_N64[6]=
-{
- 5, 55, 103, 147, 187, 224
-}; // Q0
-const Word16 dsHighDiracsTab[PVQ_MAX_BAND_SIZE - DS_INDEX_LINEAR_END ] =
-{
- 23, 25, 27, 29, 31, 33, 35, 37, 39,
- 43, 47, 51, 55, 59, 63, 67, 71, 75,
- 83, 91, 99, 107, 115, 123, 131, 139, 147,
- 163, 179, 195, 211, 227, 243, 259, 275, 291,
- 323, 355, 387, 419, 451, 483, 512
-}; // Q0
-
-const UWord32 intLimCDivInvDQ31[67+1] =
-{
- 0x00000000, 0x80000000, 0x40000000, 0x2aaaaaab, 0x20000000, 0x1999999a, 0x15555556, 0x12492493,
- 0x10000000, 0x0e38e38f, 0x0ccccccd, 0x0ba2e8bb, 0x0aaaaaab, 0x09d89d8a, 0x0924924a, 0x08888889,
- 0x08000000, 0x07878788, 0x071c71c8, 0x06bca1b0, 0x06666667, 0x06186187, 0x05d1745e, 0x0590b217,
- 0x05555556, 0x051eb852, 0x04ec4ec5, 0x04bda130, 0x04924925, 0x0469ee59, 0x04444445, 0x04210843,
- 0x04000000, 0x03e0f83f, 0x03c3c3c4, 0x03a83a84, 0x038e38e4, 0x03759f23, 0x035e50d8, 0x03483484,
- 0x03333334, 0x031f3832, 0x030c30c4, 0x02fa0be9, 0x02e8ba2f, 0x02d82d83, 0x02c8590c, 0x02b93106,
- 0x02aaaaab, 0x029cbc15, 0x028f5c29, 0x02828283, 0x02762763, 0x026a43a0, 0x025ed098, 0x0253c826,
- 0x02492493, 0x023ee090, 0x0234f72d, 0x022b63cc, 0x02222223, 0x02192e2a, 0x02108422, 0x02082083,
- 0x02000000, 0x01f81f82, 0x01f07c20, 0x01e9131b
-}; // Q0
-
-const UWord8 obtainEnergyQuantizerDensity_f[57] =
- {
- 1, 1, 1, 1, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 4, 4, 4,
- 4, 4, 4, 6, 6, 6, 6, 8,
- 8, 8, 10,10,12,12,14,14,
- 16,18,20,20,22,24,26,30,
- 32,34,38,42,46,50,54,58,
- 64,70,76,82,90,98,108,118, 128
-}; // Q0
-
-
-/* (char)ceil(log2(hBitsN[N][0])) - 2) */
-const UWord8 f_log2_n[ PVQ_MAX_BAND_SIZE + 1] =
-{
- 0xff, 0xff, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
- 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01}; // Q0
-
-const UWord8 * const hBitsN[ PVQ_MAX_BAND_SIZE + 1 ]=
-{
-f_log2_n/*N=0*/, hBitsMinus1_N01, hBitsMinus1_N02, hBitsMinus1_N03, hBitsMinus1_N04,
-hBitsMinus1_N05, hBitsMinus1_N06, hBitsMinus1_N07, hBitsMinus1_N08, hBitsMinus1_N09,
-hBitsMinus1_N10, hBitsMinus1_N11, hBitsMinus1_N12, hBitsMinus1_N13, hBitsMinus1_N14,
-hBitsMinus1_N15, hBitsMinus1_N16, hBitsMinus1_N17, hBitsMinus1_N18, hBitsMinus1_N19,
-hBitsMinus1_N20, hBitsMinus1_N21, hBitsMinus1_N22, hBitsMinus1_N23, hBitsMinus1_N24,
-hBitsMinus1_N25, hBitsMinus1_N26, hBitsMinus1_N27, hBitsMinus1_N28, hBitsMinus1_N29,
-hBitsMinus1_N30, hBitsMinus1_N31, hBitsMinus1_N32, hBitsMinus1_N33, hBitsMinus1_N34,
-hBitsMinus1_N35, hBitsMinus1_N36, hBitsMinus1_N37, hBitsMinus1_N38, hBitsMinus1_N39,
-hBitsMinus1_N40, hBitsMinus1_N41, hBitsMinus1_N42, hBitsMinus1_N43, hBitsMinus1_N44,
-hBitsMinus1_N45, hBitsMinus1_N46, hBitsMinus1_N47, hBitsMinus1_N48, hBitsMinus1_N49,
-hBitsMinus1_N50, hBitsMinus1_N51, hBitsMinus1_N52, hBitsMinus1_N53, hBitsMinus1_N54,
-hBitsMinus1_N55, hBitsMinus1_N56, hBitsMinus1_N57, hBitsMinus1_N58, hBitsMinus1_N59,
-hBitsMinus1_N60, hBitsMinus1_N61, hBitsMinus1_N62, hBitsMinus1_N63, hBitsMinus1_N64,
-}; // Q0
-
-const Word16 lim_neg_inv_tbl_fx[MAX_SPLITS + 1 ] =
-{ /* 1 = optimized inv_tbl_fx constant for div by 1, Q15 */
- /* 2-10 = negated inv_tbl_fx Q15*/
- 0,
- -32768, -16384, -10923, -8192, -6554,
- -5462, -4681, -4096, -3641, -3277
-};
-
-const Word16 Idx2Freq_Tbl[] = { 6554/*12.8*512*/, 48 * 512, 13108/*25.6*512*/, 32 * 512, 16 * 512, 8 * 512 }; /* in Q9 */
-
-const Word16 fg_inv_tbl_fx [HQ_MAX_BAND_LEN/8 + 1 ] =
-{ /* i/8 , slice of inv_tbl_fx , Q15 */
- 0,
- 4096, 2048, 1366, 1024, 820, 683,
- 586, 512, 456, 410, 373, 342
-};
-
-
-const UWord32 exactdivodd[ODD_DIV_SIZE] =
-{
- /* exactdivodd[0]=1/1, exactdivodd[1]=1/3, exactdivodd[n]=1/(2*n+1), exactdivodd[47]=1/95 ) */
- 1U, 2863311531U, 3435973837U, 3067833783U, 954437177U, 3123612579U, 3303820997U, 4008636143U,
- 4042322161U, 678152731U, 1022611261U, 3921491879U, 3264175145U, 1749801491U, 1332920885U, 3186588639U,
- 1041204193U, 2331553675U, 2437684141U, 2532929431U, 3247414297U, 799063683U, 2767867813U, 1736263375U,
- 438261969U, 4210752251U, 2350076445U, 1483715975U, 3089362441U, 2693454067U, 3238827797U, 3204181951U,
- 3237744577U, 128207979U, 2738819725U, 3811027319U, 3353604601U, 2519714147U, 1059797125U, 1631000239U,
- 2014922929U, 724452315U, 4244438269U, 1875962727U, 4198451177U, 3539808211U, 1062196213U, 3571604383U
-}; // Q0
-
-const Word16 gain_cb_size[MAX_GAIN_BITS] = {2, 4, 8, 16, 32}; // Q0
-
-const Word16 inner_frame_tbl[4] = {L_FRAME8k, L_FRAME16k, L_FRAME32k, L_FRAME48k}; /* corresponds to NB, WB, SWB, FB Q0*/
-const Word16 hq_nominal_scaling_inv[7] = { 0, 8192, 11585, 0, 16384, 0, 20066 }; /*Q13 */
-const Word16 hq_nominal_scaling[7] = { 0, 32767, 23170, 0, 16384, 0, 13377 }; /*Q15 */
-
-const Word16 l_spec_tbl[4] = {L_SPEC8k, L_SPEC16k, L_SPEC32k, L_SPEC48k}; /* corresponds to NB, WB, SWB, FB Q0*/
-const Word16 l_spec_ext_tbl[4] = {0, L_SPEC16k_EXT, L_SPEC32k_EXT, L_SPEC48k_EXT}; /* corresponds to NB, WB, SWB, FB Q0*/
-const Word16 sinq_16k[3 * L_FRAME16k / 20] =/*Q15 */
-{
- 536, 1608, 2678, 3745, 4808, 5866, 6918, 7962,
- 8998, 10024, 11039, 12043, 13033, 14010, 14972, 15917,
- 16846, 17757, 18648, 19520, 20371, 21199, 22006, 22788,
- 23546, 24279, 24986, 25667, 26319, 26944, 27540, 28106,
- 28642, 29147, 29622, 30064, 30475, 30852, 31197, 31508,
- 31786, 32029, 32238, 32413, 32553, 32658, 32728, 32763
-};
-const Word16 sinq_32k[3 * L_FRAME32k / 20] =/*Q15 */
-{
- 268, 804, 1340, 1876, 2411, 2945, 3479, 4011, 4543, 5073, 5602, 6130,
- 6655, 7180, 7702, 8222, 8740, 9255, 9768, 10279, 10786, 11291, 11793, 12292,
- 12787, 13279, 13767, 14252, 14733, 15210, 15683, 16151, 16616, 17075, 17531, 17981,
- 18427, 18868, 19304, 19734, 20160, 20580, 20994, 21403, 21806, 22203, 22595, 22980,
- 23359, 23732, 24098, 24459, 24812, 25159, 25499, 25832, 26159, 26478, 26790, 27095,
- 27393, 27684, 27967, 28243, 28511, 28771, 29024, 29269, 29506, 29735, 29956, 30170,
- 30375, 30572, 30761, 30941, 31114, 31278, 31433, 31580, 31719, 31849, 31971, 32084,
- 32189, 32285, 32372, 32451, 32521, 32582, 32634, 32678, 32713, 32740, 32757, 32766
-};
-const Word16 sinq_48k[3 * L_FRAME48k / 20] =/*Q15 */
-{
- 179, 536, 893, 1251, 1608, 1965, 2321, 2678, 3034, 3390, 3745, 4100,
- 4454, 4808, 5161, 5514, 5866, 6217, 6568, 6918, 7267, 7615, 7962, 8308,
- 8654, 8998, 9341, 9683, 10024, 10364, 10702, 11039, 11375, 11710, 12043, 12375,
- 12705, 13033, 13361, 13686, 14010, 14332, 14653, 14972, 15289, 15604, 15918, 16229,
- 16539, 16846, 17152, 17455, 17757, 18056, 18353, 18648, 18941, 19232, 19520, 19806,
- 20090, 20371, 20650, 20926, 21200, 21471, 21740, 22006, 22269, 22530, 22789, 23044,
- 23297, 23547, 23794, 24038, 24280, 24519, 24754, 24987, 25217, 25444, 25667, 25888,
- 26106, 26320, 26531, 26740, 26945, 27147, 27345, 27541, 27733, 27921, 28107, 28289,
- 28468, 28643, 28815, 28984, 29149, 29310, 29468, 29623, 29774, 29922, 30066, 30206,
- 30343, 30476, 30606, 30732, 30854, 30973, 31087, 31199, 31306, 31410, 31510, 31606,
- 31699, 31788, 31873, 31954, 32031, 32105, 32175, 32241, 32303, 32361, 32415, 32466,
- 32513, 32556, 32595, 32630, 32661, 32688, 32712, 32731, 32747, 32759, 32766, 32767
-};
-/*------------------------------------------------------------------------------*
- * LR-MDCT tables
- *------------------------------------------------------------------------------*/
-
-/* subband width tables */
-
-/* NB short win: 7200/8000/9600, 13200/16400/24400 */
-const Word16 band_width_40_4_6_0_0_0[4] = { 6, 8, 11, 15 }; // Q0
-const Word16 band_width_40_5_6_0_0_0[5] = { 6, 7, 7, 9, 11 }; // Q0
-
-/* NB long win: 7200, 8000, 9600, 13200, 16400 */
-const Word16 band_width_160_13_6_2_0_0[13] = { 6, 6, 6, 6, 7, 8, 9, 10, 13, 15, 19, 24, 31 }; // Q0
-const Word16 band_width_160_14_6_3_0_0[14] = { 6, 6, 6, 6, 6, 7, 8, 9, 10, 12, 15, 18, 22, 29 }; // Q0
-const Word16 band_width_160_17_6_3_0_0[17] = { 6, 6, 6, 6, 6, 6, 7, 7, 8, 8, 9, 10, 11, 13, 15, 17, 19 }; // Q0
-const Word16 band_width_160_18_6_4_0_0[18] = { 6, 6, 6, 6, 6, 6, 6, 7, 7, 8, 8, 9, 10, 11, 12, 14, 15, 17 }; // Q0
-
-/* WB short win: 13200/16400/24400 */
-const Word16 band_width_80_7_6_0_0_0[7] = { 6, 7, 8, 10, 12, 16, 21 }; // Q0
-
-/* WB long win: 13200, 16400 */
-const Word16 band_width_320_18_6_3_0_0[18] = { 6, 6, 6, 6, 6, 7, 7, 8, 10, 11, 13, 16, 19, 24, 30, 37, 47, 61 }; // Q0
-const Word16 band_width_320_20_6_3_0_0[20] = { 6, 6, 6, 6, 6, 6, 7, 8, 8, 9, 11, 12, 14, 17, 20, 23, 28, 34, 42, 51 }; // Q0
-
-/* SWB short win: 13200, 16400 */
-const Word16 band_width_142_8_8_0_0_0[8] = {7,8,10,11,15,21,29,41}; // Q0
-const Word16 band_width_160_8_8_0_0_0[8] = { 8, 9, 11,13,17,23,32,47}; // Q0
-
-/* SWB long win: 13200, 16400 */
-const Word16 band_width_568_22_6_2_0_0[22] = { 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 13, 16, 19, 23, 28, 34, 42, 55, 68, 84, 105}; // Q0
-const Word16 band_width_640_24_6_4_0_0[24] = { 6, 6, 6, 6, 6, 6, 7,7,8,9,10,11,13,15,18,21,26,32,39,48,59, 74,92,115}; // Q0
-
-/* LR-MDCT: NB configuration tables */
-const Xcore_Config xcore_config_8kHz_007200bps_long = { 13, L_FRAME8k, band_width_160_13_6_2_0_0, 536870912L, 24576, 24576/*eref*/, 13107, 13107/*bit_alloc_weight*/, 2, 2, 0, 0 /*p2a_th*/, 13107/*pd_thresh*/, 4260/*ld_slope*/, 19661/*ni_coef*/ };
-const Xcore_Config xcore_config_8kHz_008000bps_long = { 14, L_FRAME8k, band_width_160_14_6_3_0_0, 536870912L, 24576, 24576/*eref*/, 13107, 13107/*bit_alloc_weight*/, 2, 2, 0, 0 /*p2a_th*/, 13107/*pd_thresh*/, 4260/*ld_slope*/, 19661/*ni_coef*/ };
-const Xcore_Config xcore_config_8kHz_013200bps_long = { 17, L_FRAME8k, band_width_160_17_6_3_0_0, 429496730L, 24576, 24576/*eref*/, 13107, 13107/*bit_alloc_weight*/, 2, 4, 2, 24576/*p2a_th*/, 13107/*pd_thresh*/, 4260/*ld_slope*/, 19661/*ni_coef*/ };
-const Xcore_Config xcore_config_8kHz_016400bps_long = { 18, L_FRAME8k, band_width_160_18_6_4_0_0, 322122547L, 24576, 24576/*eref*/, 13107, 13107/*bit_alloc_weight*/, 2, 2, 0, 0 /*p2a_th*/, 13107/*pd_thresh*/, 4260/*ld_slope*/, 19661/*ni_coef*/ };
-
-const Xcore_Config xcore_config_8kHz_007200bps_short = { 4, L_FRAME8k / NUM_TIME_SWITCHING_BLOCKS, band_width_40_4_6_0_0_0, 966367642L, 24576, 24576/*eref*/, 13107, 13107/*bit_alloc_weight*/, 2, 2, 0, 0/*p2a_th*/,9830 /*pd_thresh*/, 2949/*ld_slope*/, 19661/*ni_coef*/ };
-const Xcore_Config xcore_config_8kHz_008000bps_short = { 4, L_FRAME8k / NUM_TIME_SWITCHING_BLOCKS, band_width_40_4_6_0_0_0, 1181116006L, 24576, 24576/*eref*/, 13107, 13107/*bit_alloc_weight*/, 2, 4, 0, 0/*p2a_th*/,9830 /*pd_thresh*/, 2949/*ld_slope*/, 19661/*ni_coef*/ };
-const Xcore_Config xcore_config_8kHz_013200bps_short = { 5, L_FRAME8k / NUM_TIME_SWITCHING_BLOCKS, band_width_40_5_6_0_0_0, 751619276L, 24576, 24576/*eref*/, 11469, 11469/*bit_alloc_weight*/, 2, 4, 0, 0/*p2a_th*/,22938/*pd_thresh*/, 3604/*ld_slope*/, 19661/*ni_coef*/ };
-const Xcore_Config xcore_config_8kHz_016400bps_short = { 5, L_FRAME8k / NUM_TIME_SWITCHING_BLOCKS, band_width_40_5_6_0_0_0, 536870912L, 24576, 24576/*eref*/, 11469, 11469/*bit_alloc_weight*/, 2, 6, 0, 0/*p2a_th*/,22491/*pd_thresh*/, 3604/*ld_slope*/, 19661/*ni_coef*/ };
-
-/* LR-MDCT: WB configuration tables */
-const Xcore_Config xcore_config_16kHz_013200bps_long = { 18, L_FRAME16k, band_width_320_18_6_3_0_0, 429496730L, 24576, 24576/*eref*/, 13106, 13106/*bit_alloc_weight*/, 2, 6, 3, 24576/*p2a_th*/, 13107/*pd_thresh*/, 3932/*ld_slope*/, 18022/*ni_coef*/ };
-const Xcore_Config xcore_config_16kHz_016400bps_long = { 20, L_FRAME16k, band_width_320_20_6_3_0_0, 429496730L, 24576, 24576/*eref*/, 13106, 13106/*bit_alloc_weight*/, 2, 6, 3, 24576/*p2a_th*/, 13107/*pd_thresh*/, 3932/*ld_slope*/, 19660/*ni_coef*/ };
-
-const Xcore_Config xcore_config_16kHz_013200bps_short = { 7, L_FRAME16k / NUM_TIME_SWITCHING_BLOCKS, band_width_80_7_6_0_0_0, 966367642L, 24576, 24576/*eref*/, 9830, 9830/*bit_alloc_weight*/, 2, 4, 0, 0 /*p2a_th*/, 9830 /*pd_thresh*/, 4258/*ld_slope*/, 18022/*ni_coef*/ };
-const Xcore_Config xcore_config_16kHz_016400bps_short = { 7, L_FRAME16k / NUM_TIME_SWITCHING_BLOCKS, band_width_80_7_6_0_0_0, 966367642L, 24576, 24576/*eref*/, 11468, 11468/*bit_alloc_weight*/, 2, 8, 0, 0 /*p2a_th*/, 9830 /*pd_thresh*/, 4258/*ld_slope*/, 19660/*ni_coef*/ };
-
-/* LR-MDCT: SWB configuration tables */
-const Xcore_Config xcore_config_32kHz_013200bps_long = { 22, 568, band_width_568_22_6_2_0_0, 322122547L, 24576, 24576/*eref*/, 6554, 6554/*bit_alloc_weight*/, 2, 4, 5, 28672/*p2a_th*/, 13107 /*pd_thresh*/, 4260/*ld_slope*/, 19661/*ni_coef*/ };
-const Xcore_Config xcore_config_32kHz_016400bps_long = { 24, 640, band_width_640_24_6_4_0_0, 322122547L, 24576, 24576/*eref*/, 8192, 8192/*bit_alloc_weight*/, 2, 4, 5, 28672/*p2a_th*/, 13107 /*pd_thresh*/, 4260/*ld_slope*/, 19661/*ni_coef*/ };
-const Xcore_Config xcore_config_32kHz_013200bps_short = { 8, 568 / NUM_TIME_SWITCHING_BLOCKS, band_width_142_8_8_0_0_0, 1610612736L, 24576, 24576/*eref*/, 13107, 13107/*bit_alloc_weight*/, 2, 4, 0, 0 /*p2a_th*/, 16384 /*pd_thresh*/, 3604/*ld_slope*/, 19661/*ni_coef*/ };
-const Xcore_Config xcore_config_32kHz_016400bps_short = { 8, 640 / NUM_TIME_SWITCHING_BLOCKS, band_width_160_8_8_0_0_0, 644245094L, 24576, 24576/*eref*/, 8192, 8192/*bit_alloc_weight*/, 2, 4, 0, 0 /*p2a_th*/, 9830 /*pd_thresh*/, 4260/*ld_slope*/, 19661/*ni_coef*/ };
-
-/* bandwidths */
-const Word16 Nb[ NB_SFM] =
-{
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16,
- 16, 16, 16, 16, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
- 32, 32, 32, 32, 32, 32, 32, 32
-}; // Q0
-
-/* log2(Nb) to calculate minimum bits for one pulse in PVQ */
-const Word16 LNb[ NB_SFM] =
-{
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4,
- 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5
-}; // Q0
-
-
-/*------------------------------------------------------------------------------*
- * GSC tables
- *------------------------------------------------------------------------------*/
-
-const Word16 gsc_sfm_start[MBANDS_GN] = {0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240}; // Q0
-
-const Word16 gsc_sfm_end[MBANDS_GN] = {16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256}; // Q0
-
-const Word16 gsc_sfm_size[MBANDS_GN] = {16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16}; // Q0
-
-const Word16 sm_table_fx[] =
-{
- 32767, 32126, 31480, 30838, 30196, 29557, 28918, 28279, 27643, 27007,
- 26375, 25746, 25120, 24494, 23875, 23255, 22643, 22033, 21427, 20824,
- 20228, 19638, 19048, 18468, 17891, 17321, 16758, 16197, 15647, 15103,
- 14562, 14031, 13507, 12989, 12481, 11980, 11488, 11000, 10525, 10056,
- 9598, 9146, 8706, 8274, 7851, 7438, 7035, 6642, 6259, 5885,
- 5521, 5171, 4830, 4499, 4178, 3870, 3572, 3287, 3011, 2746,
- 2494, 2254, 2025, 1809, 1602, 1412, 1229, 1062, 904, 760,
- 629, 511, 403, 308, 226, 157, 102, 56, 26, 7,
-}; // Q15
-
-const Word16 GSC_freq_bits[] =
-{
- 21, 66, -6, 25, 15, 11, 10, 5, 0, 0, 5, 4, 0, 0, 4, 0, 0, /* ACELP_5k00*/
- 21, 66, -6, 25, 15, 11, 10, 5, 0, 0, 5, 4, 0, 0, 4, 0, 0, /* ACELP_6k15*/
- 21, 66, -6, 25, 15, 11, 10, 5, 0, 0, 5, 4, 0, 0, 4, 0, 0, /* ACELP_7k20*/
- 21, 74, -4, 26, 16, 12, 11, 9, 0, 0, 4, 4, 1, 1, 3, 0, 0, /* ACELP_8k00*/
- 26, 80, -3, 28, 18, 13, 12, 9, 0, 0, 4, 4, 1, 1, 3, 0, 0, /* ACELP_9k60*/
- 26, 96, -4, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_11k60*/
- 26, 96, -4, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_12k15*/
- 26, 96, -4, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_12k85*/
- 26, 96, -4, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_13k20*/
- 26, 96, -1, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_14k80*/
- 26, 96, -1, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_16k40*/
- 26, 96, 0, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_22k60*/
- 26, 96, 0, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4 /* ACELP_24k40*/
-}; // Q0
-const Word32 GSC_freq_bits_fx[] =/*Q18*/
-{
- 5505024, 17563648, -1572864, 6553600, 3932160, 2883584, 2621440, 1310720, 0, 0, 1310720, 1048576, 0, 0, 1048576, 0, 0, /* ACELP_5k00*/
- 5505024, 17563648, -1572864, 6553600, 3932160, 2883584, 2621440, 1310720, 0, 0, 1310720, 1048576, 0, 0, 1048576, 0, 0, /* ACELP_6k15*/
- 5505024, 17563648, -1572864, 6553600, 3932160, 2883584, 2621440, 1310720, 0, 0, 1310720, 1048576, 0, 0, 1048576, 0, 0, /* ACELP_7k20*/
- 5505024, 19660800, -1048576, 6815744, 4194304, 3145728, 2883584, 2359296, 0, 0, 1048576, 1048576, 262144, 262144, 786432, 0, 0, /* ACELP_8k00*/
- 6815744, 20971520, -786432, 7340032, 4718592, 3407872, 3145728, 2359296, 0, 0, 1048576, 1048576, 262144, 262144, 786432, 0, 0, /* ACELP_8k00*/
- 6815744, 25165824, -1048576, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576, /* ACELP_11k60*/
- 6815744, 25165824, -1048576, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576, /* ACELP_12k15*/
- 6815744, 25165824, -1048576, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576, /* ACELP_12k85*/
- 8126464, 25165824, -1048576, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576, /* ACELP_13k20*/ 26, 96, -1, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_14k80*/
- 8126464, 25165824, -262144, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576, /* ACELP_13k20*/ 26, 96, -1, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_16k40*/
- 8126464, 25165824, 0, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576, /* ACELP_22k60*/ 26, 96, -1, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_16k40*/
- 8126464, 25165824, 0, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576, /* ACELP_22k60*/ 26, 96, -1, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_16k40*/
-};
-
-const Word32 GSC_freq_bits_fx_Q18[] =/*Q18*/
-{
- 5505024, 17301504, -1572864, 6553600, 3932160, 2883584, 2621440, 1310720, 0, 0, 1310720, 1048576, 0, 0, 1048576, 0, 0,
- 5505024, 17301504, -1572864, 6553600, 3932160, 2883584, 2621440, 1310720, 0, 0, 1310720, 1048576, 0, 0, 1048576, 0, 0,
- 5505024, 17301504, -1572864, 6553600, 3932160, 2883584, 2621440, 1310720, 0, 0, 1310720, 1048576, 0, 0, 1048576, 0, 0,
- 5505024, 19398656, -1048576, 6815744, 4194304, 3145728, 2883584, 2359296, 0, 0, 1048576, 1048576, 262144, 262144, 786432, 0, 0,
- 6815744, 20971520, -786432, 7340032, 4718592, 3407872, 3145728, 2359296, 0, 0, 1048576, 1048576, 262144, 262144, 786432, 0, 0,
- 6815744, 25165824, -1048576, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576,
- 6815744, 25165824, -1048576, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576,
- 6815744, 25165824, -1048576, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576,
- 6815744, 25165824, -1048576, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576,
- 6815744, 25165824, -262144, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576,
- 6815744, 25165824, -262144, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576,
- 6815744, 25165824, 0, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576,
- 6815744, 25165824, 0, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576,
-};
-const Word16 Compl_GSC_freq_bits[] =
-{
- 5, 10, 10, 10 /* bitrate > ACELP_16k40 && FS = 16kHz */
-}; // Q0
-
-const Word16 mfreq_bindiv_loc[] = { 8, 8, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 32, 32, 32 }; // Q0
-
-const Word16 mean_gp_fx[] = { 9590 }; /*Q14*/
-
-const Word16 dic_gp_fx[] = /*Q14*/
-{
- -9580, -7692, -6385, -4474, -3254, -2038, -806, -82,
- 1034, 2259, 3457, 4684, 5290, 6544, 8548, 10052,
- -8964, -8338, -7021, -5754, -5118, -3850, -2654, -1429,
- 408, 1660, 2852, 4071, 5915, 7170, 7825, 9249
-};
-const Word16 Gain_meanNB_fx[] =
-{
- 9852,
-};/* Q12 */
-
-const Word16 Gain_mean_dicNB_fx[1 * 64] = /*Q12 */
-{
- -1309, -931, -568, -396, -54, 807, 1174, 1533,
- 1901, 2092, 2286, 2493, 2698, 3130, 2909, 286,
- -748, 990, 631, -1119, -1697, -2114, -2788, -5399,
- -9841, -1902, -3270, -7975, -7438, -6926, -7192, -2325,
- -1504, -2549, -3022, -3532, -3818, -4136, -4751, -5071,
- -5756, -6093, -8998, -6389, -8765, -9438, 3369, 3917,
- 3619, 4684, -8264, 4255, -4433, -6662, -9230, -7678,
- 5859, 118, 457, -227, 1717, 1353, -8499, -9649
-};
-
-const Word16 Mean_dic_NB_fx[1 * 10] = /*Q12 */
-{
- -444, -100, -120, -37, 25,
- 70, 148, 63, 170, 229
-};
-
-const Word16 Gain_dic1_NB_fx[3 * 64] = /*Q12 */
-{
- -606, -92, 5,
- -1965, 294, 666,
- -440, 119, 661,
- -106, 267, 108,
- -1213, 345, -136,
- -1251, 618, 566,
- -1905, -750, 648,
- -1043, -360, -498,
- -18, -322, 96,
- 334, 116, -247,
- -1929, 660, 23,
- -1845, 1178, 485,
- -180, 836, 167,
- -1892, -922, -321,
- 416, -437, -344,
- 595, -548, 158,
- -265, -807, -338,
- -1065, -1015, -20,
- -626, 595, -333,
- -569, 1090, 651,
- 27, 587, -331,
- -184, -85, -503,
- -1902, -1807, 326,
- -1861, -159, -989,
- -666, 143, -1163,
- -1718, 1031, -744,
- 847, 301, -59,
- 720, -1001, -216,
- 1380, -866, -969,
- 803, -4, -608,
- 233, 408, -998,
- 1459, 87, 263,
- 345, -615, -1026,
- 877, -148, -7,
- 68, -1075, 270,
- 802, 329, 475,
- -1923, -126, -38,
- 1275, -419, -349,
- 401, 926, 575,
- 846, -233, 547,
- 693, -1880, 356,
- -362, -1683, -219,
- 231, -339, 598,
- 1227, -616, 267,
- 1116, 91, -1316,
- -551, -650, 530,
- 444, 32, 181,
- -384, 1207, -775,
- -993, 1163, 41,
- 784, -1018, 538,
- 635, 636, -424,
- 1373, -1367, 149,
- 1442, 401, -444,
- 1094, 888, 123,
- 874, 1113, -1082,
- -646, -1112, -1103,
- 539, -1632, -683,
- 402, 571, 99,
- -1778, -1809, -849,
- -732, -1691, 700,
- -678, 526, 274,
- 320, 1227, -118,
- -1222, -180, 454,
- 173, 349, 530
-};
-
-const Word16 Gain_dic2_NB_fx[3 * 32] = /*Q12 */
-{
- 28, 0, -66,
- -557, 4, 206,
- 281, -642, 36,
- -417, 81, -494,
- -380, 684, 450,
- 521, -1544, 258,
- -1119, 613, -1151,
- 514, 24, 797,
- 292, -84, -526,
- 296, 418, -231,
- -419, -68, 976,
- 2, -308, 398,
- -456, -1007, 263,
- -1221, -371, 446,
- -221, -390, -181,
- -1210, 588, 751,
- -1093, 528, -174,
- 590, 372, -1271,
- -79, -251, -1241,
- -1016, -487, -512,
- 542, 581, 338,
- -265, 456, -105,
- 490, -71, 89,
- 42, 235, 379,
- 31, 1194, -202,
- 173, -839, 850,
- -46, 500, -802,
- 152, 933, 1073,
- 980, 345, -263,
- 807, -580, -521,
- -23, -992, -585,
- 876, -576, 411
-};
-
-const Word16 Gain_dic3_NB_fx[4 * 16] = /*Q12 */
-{
- -16, 65, -227, 11,
- -214, 553, 366, 185,
- 137, -338, -300, -625,
- -122, 82, 538, -797,
- 160, 285, -1103, 35,
- -594, 312, -379, -423,
- 169, -642, -395, 363,
- 351, -1166, 630, -261,
- -1190, 217, 416, 187,
- -577, 244, -636, 858,
- 580, 482, -220, 635,
- 475, -188, 372, 27,
- -65, -369, 504, 910,
- -423, -442, 124, -40,
- 480, 575, -41, -651,
- 682, 680, 910, 489
-};
-
-const Word16 Gain_dic2_NBHR_fx[3 * 64] = /*Q12 */
-{
- 29, 0, -94,
- -605, -202, -174,
- 324, -380, -163,
- -126, -301, -306,
- -288, 124, 112,
- -86, 524, -115,
- 234, 18, -464,
- -55, -281, 179,
- 161, 446, 632,
- 366, -82, 97,
- 228, -1149, 270,
- 293, 286, -143,
- -123, -35, -896,
- -540, -675, 175,
- 331, -483, -687,
- -779, 204, -668,
- -492, 768, -510,
- -1215, -620, -483,
- 681, -76, -296,
- -671, 396, -45,
- -759, 298, 564,
- -284, 589, 321,
- -1366, -592, 496,
- -448, -585, -712,
- 12, -756, -90,
- 513, 167, -927,
- -1172, 1060, -1198,
- -477, 748, 1006,
- 42, 103, 1277,
- -940, 1049, 138,
- -924, -14, -1469,
- 684, 679, -1580,
- 417, -374, -1572,
- 607, 270, 256,
- 567, 778, 843,
- 1414, -223, -542,
- 97, 200, 251,
- 222, 1074, -547,
- -714, -285, 1046,
- 386, -684, 984,
- 338, 674, 116,
- -274, 171, -368,
- 581, -1871, 342,
- 94, 442, -597,
- -293, -1205, 851,
- -127, 501, -1247,
- 175, 1700, 1357,
- -24, 1224, 285,
- 707, -952, -293,
- 668, 492, -407,
- 1164, 751, 201,
- 381, -595, 288,
- -1570, 481, -531,
- -597, -160, 326,
- -578, -1311, -40,
- -118, -523, 576,
- -1513, 527, 757,
- -184, 40, 609,
- -1215, 98, 68,
- -65, -1324, -836,
- 821, -299, 204,
- 796, 21, 840,
- 310, -133, 542,
- 1042, -974, 537
-};
-
-const Word16 Gain_dic3_NBHR_fx[4 * 128] = /*Q12 */
-{
- 293, 7, -202, -95,
- 535, 110, 542, -512,
- -578, 65, -560, -345,
- 206, 332, 10, -533,
- -76, 356, -14, 83,
- 149, -372, -195, -490,
- -478, -241, -55, 113,
- -293, -470, -606, 62,
- 797, -1448, 625, -1128,
- 173, 464, -1686, -49,
- -392, -295, -159, -464,
- -715, 420, -146, -984,
- -36, 28, -484, 119,
- 472, 272, -729, -116,
- 68, -87, -628, -429,
- 429, -918, -158, -191,
- -545, 230, -435, 261,
- -128, 15, -791, 612,
- 268, -387, -1258, 102,
- 378, 238, 301, 3,
- -494, 149, 131, -124,
- 634, -308, 99, 24,
- 572, 711, 754, -1137,
- -1109, 400, 1093, 369,
- -831, -423, 1583, 1089,
- -83, 156, -105, 1078,
- -930, 476, 152, 380,
- 776, 1162, 788, -43,
- 279, 50, 408, 597,
- 476, 483, 73, 749,
- 903, 686, 80, -411,
- 195, -768, 280, 344,
- -263, -999, -46, -284,
- -66, 263, 315, -1239,
- 435, 578, -234, -1169,
- 199, -1669, 188, 114,
- -57, 419, -509, -633,
- 98, -119, 129, -816,
- -157, -365, -249, 537,
- 67, -624, 121, 1153,
- 1444, 142, -584, 38,
- 1086, -84, 162, 994,
- 392, -384, -124, 533,
- 252, 183, -1161, -885,
- -431, -829, 102, 432,
- -708, 987, -1021, -644,
- -64, 120, -1684, 985,
- 210, -494, -906, 1302,
- 50, -186, 177, 185,
- -256, 872, -1004, 387,
- 564, -80, -679, 515,
- -763, -40, -1174, 228,
- -1029, 199, -59, -297,
- 30, -47, 198, -264,
- -396, -1435, 913, -1018,
- -141, 962, 36, 458,
- 36, -388, 776, -1000,
- -74, 489, 1137, 140,
- -970, -766, 666, -117,
- 90, 599, 1665, 1405,
- -313, -685, -764, -615,
- 563, -462, -627, -768,
- 792, 560, -1445, 556,
- -581, 721, -559, 1137,
- -699, -273, 274, -846,
- 940, -690, 747, -253,
- -177, -541, 1355, -217,
- -586, 427, 1196, -868,
- 147, 532, -550, 405,
- 258, 677, -245, -166,
- 772, 1062, -331, 482,
- 388, 1870, -576, 1585,
- 462, 865, 454, 1212,
- 570, 528, -681, 1229,
- -386, 607, 599, 865,
- -154, -20, -211, -231,
- 96, 736, 408, -259,
- 763, -1533, 1094, 249,
- 705, -1132, 1757, -1082,
- 310, -481, 329, -395,
- 194, -781, 59, -954,
- -933, -957, -25, 1866,
- -852, -224, -482, 822,
- -1438, 490, 221, 1281,
- 392, 677, 539, 347,
- 884, -614, 1844, 678,
- -773, 484, -928, 2477,
- -274, -461, 378, -263,
- -283, -312, 583, 342,
- 453, -1541, 378, 1266,
- 778, 1095, 1290, 824,
- -958, -443, -208, -71,
- 985, -1001, -123, 473,
- 56, -1003, -513, 474,
- -259, 1435, 975, 315,
- -59, -169, 724, 961,
- -210, 1030, 341, -977,
- 1054, 2917, -7, -877,
- -852, -228, 330, 625,
- 9, -524, -97, -14,
- 16, -50, 476, 2406,
- 264, -238, 768, 56,
- 187, 108, -169, 446,
- 673, 238, 992, 671,
- -218, 285, 485, 181,
- 669, -526, 639, 571,
- 650, 20, -188, -516,
- 1031, 165, 526, 136,
- -333, 307, 102, -569,
- -157, 309, -934, -121,
- -336, 141, 39, 536,
- 662, 364, -133, 222,
- -1284, 637, -636, 77,
- 1241, 846, 467, 638,
- 842, 328, 1330, -320,
- 152, -1009, 550, -215,
- -772, 13, 594, -122,
- 336, -410, -547, -2,
- 869, -106, 321, -1180,
- 516, 1247, -828, -577,
- -670, 873, 367, -132,
- -415, 630, -287, -164,
- -105, 138, 657, -441,
- -160, -1085, 940, 704,
- -128, -68, -369, -1052,
- -1434, 594, 546, -665,
- -1849, 75, 175, 174,
- -1283, 729, -1590, 1032
-};
-
-const Word16 YG_mean16_fx[1 * 16] = /*Q12 */
-{
- -396, -192, -168, -136, -60, -17, 45, 39,
- 120, 81, 90, 67, 147, 34, 163, 184
-};
-
-const Word16 YG_dicMR_1_fx[4 * 64] = /*Q12 */
-{
- -1879, 826, 539, -210,
- -120, 267, -137, -142,
- -798, -473, 434, 243,
- 297, -896, 369, 307,
- -1883, -1333, 416, 510,
- -1955, -660, -471, 224,
- -905, -804, -517, 433,
- -961, 20, -258, -224,
- 209, 977, -213, -17,
- 536, -244, 159, 97,
- -265, 775, 412, -327,
- 337, -391, -237, -472,
- -1962, -1836, -692, 471,
- 625, 173, -463, -15,
- -965, 263, 62, 600,
- -782, 889, -433, 211,
- -1791, 852, -453, -776,
- -182, -177, -1078, 80,
- -364, 350, 280, 293,
- -902, 1119, 295, -1194,
- 16, 440, -342, 459,
- -1825, -1584, -1382, -798,
- 723, 57, -1235, -661,
- 888, -1638, 277, 234,
- 340, 345, 141, -610,
- 1280, -23, 17, 144,
- -639, -852, -520, -553,
- 1032, 843, 149, 435,
- 581, 783, 519, -196,
- 457, 945, 498, -1289,
- -1897, -41, 425, 514,
- 787, 161, 506, 385,
- -559, 1079, 319, 515,
- 500, 340, 60, 106,
- 251, -997, -1163, -960,
- 261, -1288, -631, 335,
- 1241, -620, -387, -662,
- 167, 194, 476, 67,
- 830, -261, 430, -1201,
- -479, -123, 71, -1162,
- 225, -1482, 132, -802,
- 680, 763, -1010, 429,
- 200, -125, 261, 590,
- 771, -740, -183, 229,
- -1860, -348, 278, -549,
- -1768, 967, 281, 594,
- -1727, -1697, 87, -764,
- 1169, 631, -114, -471,
- -1636, -101, -1324, -91,
- 821, -745, 458, -264,
- 1014, -576, 390, 470,
- 1041, -517, -1018, 367,
- 826, 17, 426, -326,
- -467, -1641, 201, 325,
- -1906, 428, -338, 222,
- -1021, 630, 419, -75,
- -86, -379, -203, 234,
- 659, 527, -491, -1507,
- -564, -1745, -979, -173,
- -1764, -433, -743, -1090,
- 242, 709, 269, 497,
- 716, 74, -208, 618,
- -297, 645, -864, -805,
- -46, -326, 412, -296
-};
-const Word16 YG_dicMR_2_fx[4 * 32] = /*Q12 */
-{
- 93, 217, -122, 37,
- -13, -83, 105, -491,
- -398, -592, 399, -160,
- 543, -81, -470, 408,
- 394, -630, -94, -258,
- -665, 133, -136, -125,
- 397, -351, 630, -148,
- -1166, 406, -865, 554,
- -136, -302, -263, 81,
- -674, -657, -571, -691,
- -206, 381, -699, 122,
- 272, -1506, 356, 15,
- 451, -961, 638, -1133,
- 316, -787, 165, 585,
- 312, -144, 185, 274,
- 39, -706, -997, 250,
- -915, -871, -114, 458,
- -834, 348, 364, -1188,
- 450, 723, -256, 412,
- 369, 468, -1371, 416,
- 344, 164, 290, -1094,
- 664, 122, 34, -218,
- 555, 254, 559, 825,
- 312, 492, 496, -27,
- -399, 315, 690, -330,
- -458, 710, 206, 415,
- 290, 89, -662, -467,
- -72, 593, -108, -460,
- -217, 46, 319, 189,
- -1366, 199, 365, 62,
- -552, -166, 772, 861,
- -159, 120, -215, 775
-};
-const Word16 YG_dicMR_3_fx[4 * 32] = /*Q12 */
-{
- -103, -143, -85, -19,
- -404, 182, -795, 84,
- 398, -594, -55, -256,
- 283, 128, -472, 279,
- -246, -628, 281, 297,
- -853, 468, 358, -915,
- 272, 149, 209, -443,
- -168, -504, 452, -525,
- 624, -427, 779, 117,
- 1079, 404, -98, 80,
- 136, 165, 142, -1394,
- 513, -566, -150, 822,
- 124, 646, 199, 272,
- -165, -702, -615, 165,
- 333, 810, -457, 1038,
- -360, 105, -110, 537,
- -224, 125, 562, -26,
- 699, -1105, 809, -1323,
- -1229, 841, -767, 571,
- -310, 437, -114, -230,
- -1045, 630, 564, 322,
- 282, 1170, -723, -306,
- -328, -247, -251, -598,
- 354, 332, -1593, 499,
- 332, -23, 219, 304,
- 325, -1511, 378, 299,
- -94, -54, 679, 956,
- 507, 830, 861, -739,
- -895, -135, 16, -34,
- 677, 650, 961, 714,
- 816, -665, -1741, -671,
- 274, 93, -617, -433
-};
-const Word16 YG_dicMR_4_fx[4 * 16] = /*Q12 */
-{
- -163, -44, -108, 32,
- 556, 153, 115, 120,
- 617, 818, 802, 719,
- -639, -665, 122, 664,
- 353, -555, -352, -86,
- -1162, 833, -1034, 326,
- -511, -406, -478, -523,
- 491, -1473, 404, -21,
- 148, 288, -45, -544,
- -61, 172, -791, -44,
- 715, -449, 861, 504,
- -108, 263, 610, 118,
- 962, 826, -1013, -37,
- -32, -495, 362, -214,
- -37, 661, -75, 289,
- -835, 243, 85, -105
-};
-
-
-const Word16 mean_m_fx[1 * 1] = /*Q12 */
-{
- 11762
-};
-
-const Word16 mean_gain_dic_fx[1 * 64] =
-{
- -739, -519, -76, 147, 574, 779, 983, 1185,
- 1384, 1580, 1784, 1989, 2204, 2643, 2864, 2422,
- 362, -295, -1197, -1936, -2757, -11755, -8216, 3083,
- 3311, -1434, -1682, -3341, -9284, -9057, -8616, -7783,
- -7359, -6964, -6592, -6233, -5470, -5050, -4651, -3954,
- -2470, -963, -2199, -3042, -3643, -4292, -5854, -10199,
- 4103, 3548, 4390, 4717, 3817, -10525, -11521, -9570,
- -9899, -9171, -10841, -11165, 5500, 5079, 6139, 6993
-}; /* Q12 */
-
-const Word16 YGain_mean_LR_fx[1 * 12] =/* Q12 */
-{
- -385, -178, -143, -116, -46, -12,
- 64, 50, 118, 68, 133, 151
-};
-
-const Word16 YGain_dic1_LR_fx[3 * 32] = /*Q12 */
-{
- -1909, 159, -90,
- -155, 416, -15,
- -99, -84, 396,
- -1832, -848, -320,
- -779, 1024, 45,
- -1860, -1761, 273,
- 81, -341, -309,
- -819, -3, -315,
- 483, 215, -194,
- 242, 937, -76,
- -1830, -1753, -1102,
- -1589, 868, -657,
- -911, 389, 421,
- -1834, 915, 390,
- -144, 564, -869,
- 878, -1544, 301,
- 446, 332, 376,
- -540, -822, -1001,
- 548, -192, 232,
- 920, -589, -175,
- 869, 717, -564,
- 797, -103, -1047,
- -335, -1732, -186,
- -1840, -345, 566,
- 1205, 109, 43,
- 985, -456, 570,
- 650, -1223, -874,
- 928, 752, 390,
- -124, 833, 575,
- -1811, -249, -1142,
- -711, -767, 185,
- 344, -876, 267,
-};
-
-const Word16 YGain_dic2_LR_fx[4 * 32] = /*Q12 */
-{
- -294, -73, -41, 11,
- 276, 330, -1316, 173,
- 26, -712, 86, 1,
- -841, -539, 246, -479,
- 43, -207, 709, 116,
- 104, -197, 227, -548,
- 261, -228, 165, 606,
- 613, 403, -122, -420,
- 14, 182, -544, -669,
- -734, 392, -492, -131,
- -1316, 274, 116, 331,
- -1339, 535, -1261, 608,
- -346, 277, -426, 729,
- -1067, -836, -571, 388,
- 643, 503, 484, 532,
- -148, 447, 120, -392,
- -600, 263, 519, -75,
- 686, -346, 379, 23,
- 130, 239, 376, -1366,
- 68, 656, -361, 92,
- 608, 286, -405, 487,
- -1031, 507, 523, -971,
- 51, -44, -521, 172,
- -573, -500, 398, 632,
- 240, 147, 104, 51,
- -319, -680, -890, -398,
- -195, 503, 306, 459,
- 335, 368, 662, -389,
- 378, -788, -537, 680,
- 433, -1129, 472, -883,
- 472, -312, -301, -207,
- 378, -1346, 433, 408,
-};
-
-const Word16 YGain_dic3_LR_fx[5 * 32] = /*Q12 */
-{
- -332, -191, -122, -455, -210,
- 364, -48, -664, 408, 225,
- -576, -342, 367, 52, 270,
- -392, -157, -77, 625, -224,
- -183, -652, -406, 99, 266,
- 24, 65, 74, 525, 613,
- -805, 306, -383, -21, 247,
- 16, 133, -416, -4, -567,
- 294, -750, 443, -367, 228,
- 536, 816, 767, 562, 594,
- -54, 200, -1108, -582, 227,
- 123, -43, 414, -376, -649,
- 592, -652, -674, -386, -356,
- 100, -58, -45, -108, 103,
- -727, -194, -1170, 931, 1096,
- 512, 758, -440, -769, -1051,
- 362, 787, -276, -139, 149,
- -218, 387, 457, -414, 265,
- -202, 663, -1104, 882, -338,
- -57, 405, 269, 257, -221,
- 335, 864, 1164, -611, -618,
- 1275, 494, -1783, 119, 1222,
- 752, 76, 270, 73, -57,
- 376, -1255, 145, 724, 603,
- -989, 618, 659, 675, 560,
- 128, -147, -138, -368, 963,
- 140, -170, 866, 538, 127,
- 122, -616, 166, 236, -396,
- 374, 279, 407, 650, -1269,
- -861, 613, -755, -1334, -972,
- -922, 314, 416, -114, -648,
- 265, 85, 61, -1110, 45
-};
-
-const Word16 YG_mean16HR_fx[] =
-{
- //Q12
- -396, -191, -167, -135,
- -60, -17, 45, 39,
- 120, 81, 89, 67,
- 146, 33, 163, 183,
-};
-
-const Word16 YG_dicHR_1_fx[] =
-{
- //Q12
- -1955, 412, 133, 32,
- -340, 88, -42, 20,
- -999, 314, -144, 456,
- -429, -190, 186, 547,
- -1057, 160, 243, -197,
- -46, -81, -491, -223,
- 143, 986, -113, 15,
- 286, -313, 77, 3,
- 249, -1251, 380, 305,
- -1909, -258, 481, 86,
- 902, 59, 42, -186,
- -1969, -992, -335, 223,
- -1913, -163, -465, -167,
- -806, 1201, 24, 481,
- -564, -1943, 212, 380,
- -120, -691, -162, 138,
- -966, 1009, 437, -464,
- 434, 147, 185, 158,
- -1944, -133, -313, 602,
- -1029, 236, -612, -373,
- -749, -571, -1008, -399,
- 666, -954, -111, 88,
- 186, -16, -174, 338,
- -235, -314, 403, -244,
- 285, 133, 85, -349,
- -1981, -1506, -1290, 338,
- -1977, -1925, -368, 876,
- -1930, 256, 453, 667,
- -1884, 259, -123, -779,
- -813, 1087, -595, -1014,
- 396, 66, -876, 412,
- -543, 907, -657, 301,
- -485, 612, 515, 777,
- -362, 420, 417, -518,
- -1754, 1307, 65, -1202,
- -618, 705, -56, -56,
- -1938, 1005, 561, 59,
- 62, 521, -440, 319,
- -1776, 1011, -279, -165,
- 558, 357, -444, -47,
- 801, -1998, 313, 319,
- -1873, -826, -1691, -978,
- -588, -294, -328, -1021,
- -91, 513, -288, -530,
- -1945, -1964, -350, -293,
- -307, -1057, 203, -631,
- 94, -1713, -548, -62,
- 616, -11, -510, -780,
- 682, -1574, 260, -441,
- 507, -778, 522, -88,
- 1321, -635, -432, -619,
- 369, -615, -335, -1646,
- 1026, -572, 265, -256,
- 779, 127, -155, 356,
- -462, -180, -637, 405,
- 1329, 1071, 543, 784,
- 434, -468, 120, -581,
- 1293, -532, 60, 377,
- 63, -1290, -336, 708,
- 756, 42, 412, 607,
- 731, 1003, 598, -1388,
- -1818, -1666, 547, 185,
- -1915, -802, 485, 789,
- 907, 437, 455, 108,
- 507, -102, 573, -109,
- 1037, -1292, -691, 512,
- 1428, 159, 20, 271,
- 111, -826, -607, -563,
- -622, -1328, -1391, -1000,
- -15, 1094, 339, -684,
- 448, 790, -439, -1617,
- -1765, -943, -657, -675,
- 107, -835, -1140, 241,
- 33, 122, 520, 242,
- 194, 204, 313, -1080,
- 1308, 548, -711, -850,
- 1520, 474, 334, -516,
- 1091, -42, 347, -1543,
- 1098, -219, 680, 139,
- 855, -895, 613, -985,
- -1631, -1550, 539, -1277,
- 672, 905, -1057, 430,
- 555, 659, -38, 450,
- -1118, -53, 536, 487,
- 563, -485, -204, 650,
- -678, -930, 470, 425,
- 1180, -259, -990, 319,
- 993, 319, -362, 926,
- 782, -254, -1447, -534,
- -1946, 964, 86, 617,
- -1651, 727, -813, 514,
- -552, 395, 522, 124,
- -1710, 579, 831, -542,
- 34, 463, 143, 2,
- -1742, -207, -642, -1517,
- -1967, -740, 272, -606,
- 663, 670, 58, -620,
- 229, 274, 122, 677,
- 65, 1144, 24, 693,
- -1383, 1061, 630, 894,
- 536, 539, 106, -31,
- 1080, 774, -267, 67,
- 355, 518, 609, -336,
- 777, -735, 412, 551,
- 219, -424, 392, 451,
- -543, -1909, -189, -933,
- -938, -178, 489, -1008,
- -749, -1216, -440, -157,
- 681, -355, -423, -19,
- 299, 1053, -913, -506,
- -258, 360, -1457, -38,
- -264, 967, 519, 58,
- -718, -1676, -1184, 185,
- 741, -314, 184, 210,
- -1780, -305, -1299, 167,
- -1912, -1932, -1292, -970,
- -1017, -520, -96, -136,
- -1829, 500, -1244, -625,
- -1041, -791, -461, 591,
- 708, -1386, -1078, -956,
- 339, 636, 509, 408,
- -131, 106, -1202, -1118,
- 818, 18, 477, -676,
- 668, 1176, 422, -36,
- 1074, -1259, 425, 267,
- -281, 539, 31, 430,
- -1196, 756, 338, 236,
- -568, 1030, 421, -1589,
-};
-
-const Word16 YG_dicHR_2_fx[] =
-{
- //Q12
- 146, -73, -67, -101,
- -11, 330, -176, -609,
- -283, -31, -381, -191,
- -208, -81, 142, 234,
- 141, -376, -66, -646,
- 568, -38, -429, 160,
- 166, 831, 89, -103,
- 280, -881, -296, -82,
- -117, -4, 340, -956,
- 286, -136, -679, -410,
- 141, 181, -197, 511,
- -685, 648, 246, -365,
- 625, -670, 591, 190,
- -7, -296, -454, 235,
- 840, 126, 652, 1064,
- -428, -570, -18, -77,
- -298, -973, 637, 380,
- -774, -31, -333, -902,
- -1509, 167, 471, -369,
- 431, -1437, 124, 610,
- -917, 511, 518, -1488,
- -97, 262, -872, 247,
- 549, -166, 602, -590,
- 644, -1030, 796, -1279,
- 525, -37, 212, 197,
- 141, 345, 195, 211,
- 91, -71, 674, 223,
- -1343, -902, -27, 234,
- -467, -981, -427, 725,
- 176, -527, 85, 275,
- -654, -859, 473, -873,
- 671, -457, -326, 742,
- 699, 613, -78, 457,
- -487, 505, 231, 578,
- -194, 927, -493, 529,
- 635, 554, -917, 532,
- -554, -12, -314, 611,
- 172, 667, 532, -874,
- 594, 270, -27, -378,
- 388, -530, -1307, 274,
- 647, 451, 670, 24,
- 745, -470, 8, -260,
- -725, -292, -1018, -32,
- 95, 184, 330, -280,
- -761, -135, 552, 250,
- -415, -3, 197, -307,
- 142, 702, 584, 755,
- 450, 595, -1010, -525,
- -455, -1143, -775, -639,
- 228, 496, -1676, 399,
- 82, 242, -532, 1222,
- 125, -214, 319, 804,
- -292, 380, -126, 70,
- 96, -480, 407, -259,
- -636, -148, 890, 1241,
- 213, 404, -382, -7,
- -315, 509, 660, 61,
- 505, 18, 33, -1385,
- -568, 716, -623, -338,
- -440, 38, 972, -455,
- -1420, 576, -1125, 668,
- -1391, 481, 229, 593,
- 335, -1464, 430, -375,
- -918, 124, -155, 34,
-};
-
-const Word16 YG_dicHR_3_fx[] =
-{
- //Q12
- -174, -82, -158, -12,
- 155, -403, 114, -132,
- 188, 2, -231, -470,
- 448, -222, -598, -103,
- -353, 304, -1173, 420,
- -43, -77, -533, 386,
- 526, -57, 360, -247,
- -837, -219, -344, 42,
- -236, 88, -664, -226,
- -1218, 66, 362, -529,
- -398, 496, -300, 299,
- 212, 508, -521, 80,
- -267, -522, 45, 286,
- -65, -1143, 154, -169,
- 725, -1483, 883, -1459,
- 9, -109, 334, -752,
- -38, 860, -22, -333,
- -487, 340, 202, -1529,
- -349, 387, 645, -464,
- -106, 73, 170, 427,
- 180, 384, -292, 989,
- 178, -505, 618, 375,
- 481, 539, -1777, 1050,
- 680, -792, 65, 136,
- -1388, 798, -1090, 670,
- -377, -507, -139, -580,
- 301, 614, 194, 392,
- -218, -1155, 341, 834,
- 338, -1071, -1177, 673,
- -406, 188, -92, -546,
- -58, -656, 773, -540,
- 461, 649, 840, -108,
- -775, -352, 620, 233,
- -390, 666, 601, 438,
- -394, 1594, -299, 1009,
- 367, 448, 291, -886,
- 788, 76, 479, 531,
- -77, -655, -500, -14,
- 514, -1745, 497, 217,
- 904, -963, 630, 1261,
- 775, 224, -795, 520,
- 291, -435, -112, 679,
- 494, 1380, -1018, -186,
- -75, 86, 731, 1048,
- 65, 74, 617, 99,
- 512, -46, 709, -1636,
- -926, 1237, 1090, -812,
- 40, 297, 97, -131,
- 656, 770, 1176, 920,
- 1313, -582, -1832, -912,
- 490, -648, -43, -805,
- -449, -882, -1473, -698,
- 1028, 421, -151, -289,
- 1089, 1107, -144, 760,
- 188, 357, -638, -1027,
- -337, -210, 300, -194,
- 319, 223, -1587, -64,
- 972, 1384, 786, -1026,
- 928, -468, 1116, -198,
- -1489, 642, 269, 385,
- -627, 250, 153, 50,
- -906, 613, -518, -436,
- 379, 18, -68, 218,
- -648, -85, -110, 765,
-};
-
-const Word16 YG_mean16HR_16kHz_fx[] =
-{
- //Q12
- 342, 152, 373, 359
-};
-
-const Word16 YG_dicHR_4_16kHz_fx[] =
-{
- //Q12
- 137, 109, 215, 21,
- 328, -26, 537, -270,
- -137, -851, -385, -703,
- -537, -81, -244, -23,
- -174, -425, -175, -351,
- 861, 1100, 696, 574,
- -150, -14, -390, -241,
- -828, 166, 164, -151,
- -226, 541, 204, -110,
- 184, 820, -89, 264,
- -26, 889, 709, 520,
- 83, -176, -713, -276,
- -149, -1318, 731, -193,
- -324, -55, 118, 182,
- 474, -493, -411, 52,
- 156, -1459, -370, -71,
- 513, 451, 973, 283,
- 903, -296, 309, 121,
- 1261, 296, 886, 702,
- 984, -1204, 915, 15,
- -401, 456, -316, 136,
- 458, -1779, 335, -788,
- 471, -796, 239, -331,
- -390, -2265, 493, -305,
- 469, -1946, 389, 280,
- 150, 463, -725, 114,
- -411, 99, -906, -128,
- 628, 888, 1299, 1039,
- 1454, 1377, 1415, 1350,
- -1, 242, -164, -11,
- 632, 621, 416, 695,
- 396, -1030, 356, 492,
- 48, -279, -98, -30,
- -568, -212, -376, -571,
- 275, 570, 382, 152,
- 443, 75, 521, 418,
- -1366, -1566, -2460, -2925,
- -1059, 64, -585, -231,
- 134, 489, -296, -380,
- -1453, -890, -1200, -1157,
- -27, 240, -1694, 47,
- 464, 86, -204, -79,
- 746, 462, 234, 57,
- 1087, -738, 1095, 1050,
- 922, 619, -412, 409,
- -261, 35, 124, -313,
- -794, 842, -992, 314,
- 280, -465, 1028, 196,
- 233, -346, 257, 183,
- -1640, 244, -110, 28,
- 377, 171, -57, 392,
- -89, 368, 195, 456,
- 501, 1327, 119, 980,
- -64, -84, -417, 262,
- -414, -558, -638, -102,
- -1785, 392, -1756, -430,
- -705, -299, -1189, -730,
- -477, 347, -400, -367,
- -93, -825, -20, -13,
- -710, -540, 45, -265,
- -151, -487, 380, -243,
- -269, 32, 702, 143,
- 206, -145, -27, -474,
- -694, 777, 287, 357,
-};
-
-const Word16 YG_meanL2G_16kHz_fx[] =
-{
- //Q12
- 424, 651,
-};
-
-const Word16 YG_dicL2G_16kHz_fx[] =//Q12
-{
- -255, 122,
- 296, 314,
- -226, -333,
- 668, 668,
- 101, -53,
- -579, -647,
- -1202, -1244,
- 1213, 1254,
-};
-
-const Word16 Odx_fft64[64] =
-{
- 0,59,54,49,44,39,34,29,24,19,14,9,4,63,58,53,48,43,38,33,28,23,18,13,8,3,62,57,52,47,42,37,
- 32,27,22,17,12,7,2,61,56,51,46,41,36,31,26,21,16,11,6,1,60,55,50,45,40,35,30,25,20,15,10,5
-}; // Q0
-
-const Word16 Ip_fft64[6] = { 32,1,0,64,32,96 }; // Q0
-
-const Word16 Odx_fft32_15[32] = { 0,17,2,19,4,21,6,23,8,25,10,27,12,29,14,31,16,1,18,3,20,5,22,7,24,9,26,11,28,13,30,15 }; // Q0
-
-const Word32 w_fft32_16fx[16] =//Q30
-{
- 1073741824, 0, 759250113, 759250113, 992008059, 410903236, 410903236, 992008059,
- 1053110143, 209476636, 596539003, 892783685, 892783685, 596539003, 209476636, 1053110143
-};
-const Word16 Ip_fft32[6] = { 16,1,0,32,16,48 }; // Q0
-
-const Word16 Odx_fft32_5[32] = { 0,27,22,17,12,7,2,29,24,19,14,9,4,31,26,21,16,11,6,1,28,23,18,13,8,3,30,25,20,15,10,5 }; // Q0
-
-const Word16 Odx_fft16[16] = {0,11,6,1,12,7,2,13,8,3,14,9,4,15,10,5}; // Q0
-
-const Word16 Ip_fft16[6] = {8,1,0,16,8,24}; // Q0
-
-const Word16 Ip_fft8[6] = {4,1,0,8,4,12}; // Q0
-
-const Word16 Idx_dortft80[80] =
-{
- 0,65,50,35,20,5,70,55,40,25,10,75,60,45,30,15,16,1,66,51,36,21,6,71,56,41,26,11,76,61,
- 46,31,32,17,2,67,52,37,22,7,72,57,42,27,12,77,62,47,48,33,18,3,68,53,38,23,8,73,58,43,
- 28,13,78,63,64,49,34,19,4,69,54,39,24,9,74,59,44,29,14,79
-}; // Q0
-
-const Word16 Idx_dortft120[120] =
-{
- 0,105,90,75,60,45,30,15,16,1,106,91,76,61,46,31,32,17,2,107,92,77,62,47,
- 48,33,18,3,108,93,78,63,64,49,34,19,4,109,94,79,80,65,50,35,20,5,110,95,
- 96,81,66,51,36,21,6,111,112,97,82,67,52,37,22,7,8,113,98,83,68,53,38,23,
- 24,9,114,99,84,69,54,39,40,25,10,115,100,85,70,55,56,41,26,11,116,101,86,
- 71,72,57,42,27,12,117,102,87,88,73,58,43,28,13,118,103,104,89,74,59,44,29,14,119
-}; // Q0
-
-const Word16 Idx_dortft160[160] =
-{
- 0,65,130,35,100,5,70,135,40,105,10,75,140,45,110,15,80,145,
- 50,115,20,85,150,55,120,25,90,155,60,125,30,95,96,1,66,131,
- 36,101,6,71,136,41,106,11,76,141,46,111,16,81,146,51,116,21,
- 86,151,56,121,26,91,156,61,126,31,32,97,2,67,132,37,102,7,
- 72,137,42,107,12,77,142,47,112,17,82,147,52,117,22,87,152,57,
- 122,27,92,157,62,127,128,33,98,3,68,133,38,103,8,73,138,43,
- 108,13,78,143,48,113,18,83,148,53,118,23,88,153,58,123,28,93,
- 158,63,64,129,34,99,4,69,134,39,104,9,74,139,44,109,14,79,
- 144,49,114,19,84,149,54,119,24,89,154,59,124,29,94,159
-}; // Q0
-
-const Word16 Idx_dortft320[320] =
-{
- 0,65,130,195,260,5,70,135,200,265,10,75,140,205,270,15,80,145,210,275,20,85,150,215,280,25,90,155,220,285,30,95,
- 160,225,290,35,100,165,230,295,40,105,170,235,300,45,110,175,240,305,50,115,180,245,310,55,120,185,250,315,60,125,
- 190,255,256,1,66,131,196,261,6,71,136,201,266,11,76,141,206,271,16,81,146,211,276,21,86,151,216,281,26,91,156,221,
- 286,31,96,161,226,291,36,101,166,231,296,41,106,171,236,301,46,111,176,241,306,51,116,181,246,311,56,121,186,251,
- 316,61,126,191,192,257,2,67,132,197,262,7,72,137,202,267,12,77,142,207,272,17,82,147,212,277,22,87,152,217,282,27,
- 92,157,222,287,32,97,162,227,292,37,102,167,232,297,42,107,172,237,302,47,112,177,242,307,52,117,182,247,312,57,122,
- 187,252,317,62,127,128,193,258,3,68,133,198,263,8,73,138,203,268,13,78,143,208,273,18,83,148,213,278,23,88,153,218,
- 283,28,93,158,223,288,33,98,163,228,293,38,103,168,233,298,43,108,173,238,303,48,113,178,243,308,53,118,183,248,313,
- 58,123,188,253,318,63,64,129,194,259,4,69,134,199,264,9,74,139,204,269,14,79,144,209,274,19,84,149,214,279,24,89,154,
- 219,284,29,94,159,224,289,34,99,164,229,294,39,104,169,234,299,44,109,174,239,304,49,114,179,244,309,54,119,184,249,
- 314,59,124,189,254,319
-}; // Q0
-
-const Word16 Idx_dortft480[480] =
-{
- 0,225,450,195,420,165,390,135,360,105,330,75,300,45,270,15,240,465,210,435,180,405,150,375,120,345,
- 90,315,60,285,30,255,256,1,226,451,196,421,166,391,136,361,106,331,76,301,46,271,16,241,466,211,436,
- 181,406,151,376,121,346,91,316,61,286,31,32,257,2,227,452,197,422,167,392,137,362,107,332,77,302,47,
- 272,17,242,467,212,437,182,407,152,377,122,347,92,317,62,287,288,33,258,3,228,453,198,423,168,393,138,
- 363,108,333,78,303,48,273,18,243,468,213,438,183,408,153,378,123,348,93,318,63,64,289,34,259,4,229,454,
- 199,424,169,394,139,364,109,334,79,304,49,274,19,244,469,214,439,184,409,154,379,124,349,94,319,320,
- 65,290,35,260,5,230,455,200,425,170,395,140,365,110,335,80,305,50,275,20,245,470,215,440,185,410,155,
- 380,125,350,95,96,321,66,291,36,261,6,231,456,201,426,171,396,141,366,111,336,81,306,51,276,21,246,471,
- 216,441,186,411,156,381,126,351,352,97,322,67,292,37,262,7,232,457,202,427,172,397,142,367,112,337,82,
- 307,52,277,22,247,472,217,442,187,412,157,382,127,128,353,98,323,68,293,38,263,8,233,458,203,428,173,
- 398,143,368,113,338,83,308,53,278,23,248,473,218,443,188,413,158,383,384,129,354,99,324,69,294,39,264,
- 9,234,459,204,429,174,399,144,369,114,339,84,309,54,279,24,249,474,219,444,189,414,159,160,385,130,355,
- 100,325,70,295,40,265,10,235,460,205,430,175,400,145,370,115,340,85,310,55,280,25,250,475,220,445,190,
- 415,416,161,386,131,356,101,326,71,296,41,266,11,236,461,206,431,176,401,146,371,116,341,86,311,56,281,
- 26,251,476,221,446,191,192,417,162,387,132,357,102,327,72,297,42,267,12,237,462,207,432,177,402,147,372,
- 117,342,87,312,57,282,27,252,477,222,447,448,193,418,163,388,133,358,103,328,73,298,43,268,13,238,463,
- 208,433,178,403,148,373,118,343,88,313,58,283,28,253,478,223,224,449,194,419,164,389,134,359,104,329,74,
- 299,44,269,14,239,464,209,434,179,404,149,374,119,344,89,314,59,284,29,254,479
-}; // Q0
-
-const Word16 Ip_fft128[10] = { 64, 1, 0, 128, 64, 192, 32, 160, 96, 224 }; // Q0
-
-const Word32 w_fft128_16fx[64] =
-{
- 1073741824, 0, 759250112, 759250112, 992008064, 410903232, 410903232, 992008064,
- 1053110144, 209476640, 596539008, 892783680, 892783680, 596539008, 209476640, 1053110144,
- 1068571456, 105245104, 681174592, 830013632, 946955712, 506158400, 311690816, 1027506880,
- 1027506880, 311690816, 506158400, 946955712, 830013632, 681174592, 105245104, 1068571456,
- 1072448448, 52686008, 721080960, 795590208, 970651136, 459083776, 361732736, 1010975232,
- 1041563136, 260897968, 552013632, 920979072, 862437504, 639627264, 157550640, 1062120192,
- 1062120192, 157550640, 639627264, 862437504, 920979072, 552013632, 260897968, 1041563136,
- 1010975232, 361732736, 459083776, 970651136, 795590208, 721080960, 52686008, 1072448448,
-}; // Q30
-
-const Word16 Ip_fft256[10] = {128, 1, 0, 256, 128, 384, 64, 320,192, 448}; // Q0
-
-const Word16 Ip_fft512[18] = {256, 1, 0, 512, 256, 768, 128, 640,384, 896, 64, 576, 320, 832, 192, 704,448, 960}; // Q0
-
-const Word16 w_fft512_fx_evs[256] =//Q14
-{
- 16384, 0, 11585, 11585, 15137, 6270, 6270, 15137,
- 16069, 3196, 9102, 13623, 13623, 9102, 3196, 16069,
- 16305, 1606, 10394, 12665, 14449, 7723, 4756, 15679,
- 15679, 4756, 7723, 14449, 12665, 10394, 1606, 16305,
- 16364, 804, 11003, 12140, 14811, 7005, 5520, 15426,
- 15893, 3981, 8423, 14053, 13160, 9760, 2404, 16207,
- 16207, 2404, 9760, 13160, 14053, 8423, 3981, 15893,
- 15426, 5520, 7005, 14811, 12140, 11003, 804, 16364,
- 16379, 402, 11297, 11866, 14978, 6639, 5897, 15286,
- 15986, 3590, 8765, 13842, 13395, 9434, 2801, 16143,
- 16261, 2006, 10080, 12916, 14256, 8076, 4370, 15791,
- 15557, 5139, 7366, 14635, 12406, 10702, 1205, 16340,
- 16340, 1205, 10702, 12406, 14635, 7366, 5139, 15557,
- 15791, 4370, 8076, 14256, 12916, 10080, 2006, 16261,
- 16143, 2801, 9434, 13395, 13842, 8765, 3590, 15986,
- 15286, 5897, 6639, 14978, 11866, 11297, 402, 16379,
- 16383, 201, 11442, 11727, 15059, 6455, 6084, 15213,
- 16029, 3393, 8935, 13733, 13510, 9269, 2999, 16107,
- 16284, 1806, 10238, 12792, 14354, 7900, 4563, 15736,
- 15619, 4948, 7545, 14543, 12537, 10549, 1406, 16324,
- 16353, 1005, 10853, 12274, 14724, 7186, 5330, 15493,
- 15843, 4176, 8250, 14155, 13039, 9921, 2205, 16235,
- 16176, 2603, 9598, 13279, 13949, 8595, 3786, 15941,
- 15357, 5708, 6823, 14896, 12004, 11151, 603, 16373,
- 16373, 603, 11151, 12004, 14896, 6823, 5708, 15357,
- 15941, 3786, 8595, 13949, 13279, 9598, 2603, 16176,
- 16235, 2205, 9921, 13039, 14155, 8250, 4176, 15843,
- 15493, 5330, 7186, 14724, 12274, 10853, 1005, 16353,
- 16324, 1406, 10549, 12537, 14543, 7545, 4948, 15619,
- 15736, 4563, 7900, 14354, 12792, 10238, 1806, 16284,
- 16107, 2999, 9269, 13510, 13733, 8935, 3393, 16029,
- 15213, 6084, 6455, 15059, 11727, 11442, 201, 16383
-};
-const Word16 Idx_dortft40[40] =
-{
- 0, 25, 10, 35, 20, 5, 30, 15, 16, 1, 26, 11, 36, 21, 6, 31, 32, 17, 2, 27,
- 12, 37, 22, 7, 8, 33, 18, 3, 28, 13, 38, 23, 24, 9, 34, 19, 4, 29, 14, 39
-}; // Q0
-
-const Word16 Odx_fft8_5[8] = {0, 3, 6, 1, 4, 7, 2, 5}; // Q0
-const Word16 Idx_dortft20[20] = {0, 5, 10, 15, 16, 1, 6, 11, 12, 17, 2, 7, 8, 13, 18, 3, 4, 9, 14, 19}; // Q0
-const Word16 Odx_fft4_5[4] = {0, 3, 2, 1}; // Q0
-const Word16 Ip_fft4[6] = {2,1,0,4,2,6}; // Q0
-const Word16 ip_edct2_64[6] = {16, 64, 0, 32, 16, 48}; // Q0
-
-const Word16 w_edct2_64_fx[80] = /*Q14 */
-{
- 16384, 0, 11585, 11585, 15137, 6270, 6270, 15137,
- 16069, 3196, 9102, 13623, 13623, 9102, 3196, 16069,
- 11585, 8190, 8182, 8170, 8153, 8130, 8103, 8071,
- 8035, 7993, 7946, 7895, 7839, 7779, 7713, 7643,
- 7568, 7489, 7405, 7317, 7225, 7128, 7027, 6921,
- 6811, 6698, 6580, 6458, 6333, 6203, 6070, 5933,
- 5793, 5649, 5501, 5351, 5197, 5040, 4880, 4717,
- 4551, 4383, 4212, 4038, 3862, 3683, 3503, 3320,
- 3135, 2948, 2760, 2570, 2378, 2185, 1990, 1795,
- 1598, 1401, 1202, 1003, 803, 603, 402, 201
-};
-
-/* HVQ */
-const Word16 hvq_thr_adj_fx[5] = { 23170, 16384, 8192, 16384, 23170 }; /* Q15 */
-
-const Word16 hvq_index_mapping_fx[4] = { 0, 1, 3, 4 };
-
-const Word16 hvq_class_c_fx[16] = /* Q15 */
-{
- -7617, -14387, 2136, 6914,
- 4821, -4428, 14131, -4538,
- -4538, 14131, -4428, 4821,
- 6914, 2136, -14387, -7617
-};
-
-const Word16 hvq_cb_search_overlap24k[17] =
-{
- 0, 8, 17, 27,
- 39, 53, 69, 89,
- 113, 128, 128, 128,
- 128, 128, 128, 128,
- 128
-}; // Q0
-
-const Word16 hvq_cb_search_overlap32k[21] =
-{
- 0, 6, 13, 21,
- 30, 40, 51, 64,
- 78, 96, 116, 128,
- 128, 128, 128, 128,
- 128, 128, 128, 128,
- 128
-}; // Q0
-
-const Word16 hvq_peak_cb_fx[1024] = /* Q15 */
-{
- -22652,-20549,-23019, 13968,-25496,-27493, -6957, 5753,-19678,-20274,
- -6119, 18297, -5329,-22843,-21254, 13929,-27525,-29034, 563, 7265,
- -26138,-13138, -9678, 7972, -517,-20830,-10703, 26832,-27818,-21449,
- 208, 6297,-14803,-28396, -7655, 5118, 15134,-24005,-21776, 25330,
- -11282,-23669,-20340, -2006,-16212,-24127, 9075, 22581,-20047,-25695,
- -254, 6509,-17174,-29714, 1589, 7104,-17683, -4117, -4049, 22347,
- -28338,-13898, 671, 6777,-18368,-17925, -7409, 5169,-22093,-19561,
- 702, 5969, -6610,-27398, -4875, 8773,-29634, -5552, 272, 6992,
- -9167,-19887, -9136, 6447,-23125,-25612, 9760, 5749,-10410,-29816,
- 1606, 7019,-13758,-24849, 2084, 7129,-17795,-16160, 596, 7287,
- -22276,-11145, 521, 6474,-13471,-20705, -74, 6740, 1891,-16245,
- -12763, 13602, -1617,-27384, -9648, 2511,-21802,-11734, -4836, -1602,
- -9670,-27913, 6456, 6338,-23227, -4603, 754, 5830, -7699,-24416,
- 2204, 6518,-27591, 2763, 1885, 6839,-15248,-10500, 344, 6942,
- -13247, -9761, -4486, 4294,-12097,-15164, 637, 6142,-25994,-16384,
- 17277, 6511,-10346,-26179, 923, -2374,-13316,-18125, 6841, 7100,
- -21083,-24251, 4207, -9464,-22914, -7057, 8647, 8026, 2488,-20731,
- -799, 13754, -3451,-12872, 2545, 17315, 2576,-19594,-10340, 4361,
- -7007,-19401, 1937, 6751, 17502,-24923,-16948, 8534, -3436,-29004,
- 6315, 6467,-16936, -4957, 591, 6604, 1099,-26790, -708, 5543,
- -5949,-14167, -4750, 4068,-10682,-14990, -7489, -5197, 169, -6472,
- -5143, 16200,-20331, 1722, 395, 6233,-15661,-22913, 24689, 14221,
- -3892,-22862, 5154, 6301, -8786,-10120, 216, 6831,-12390,-11062,
- 4824, 6473, -7705, -4195, -5326, 6572, -560,-20773, -2777, 1822,
- -6703,-14413, 2409, 6083,-10595,-25038, 14291, 4825, 2064,-25736,
- 16863, 20463, -2752,-29103, 12609, 7539, -7638,-18024, 1948, 689,
- -10961, -5839, 683, 6170,-26004, 12209, 10742, 15580, -2105, -8625,
- -4932, 6977, -9940,-15129, 12160, 9806,-13921, -55, 440, 6315,
- -305, -6080, 11303, 25730,-12423, -3161, 6875, 9836, -2780,-16434,
- 4128, 5778, 17790,-10991, -6633, 21111, 12367,-26550,-10581, -2530,
- -6713,-10210, 4804, 6280, -5932, 2832, 4978, 18330, 2696,-23822,
- -11870,-13313, 5266,-10870, -7933, 4455, -3155,-10994, 2225, 5803,
- 820,-11966, -1397, 5344, -5027, -7230, 1236, 5812, -1649,-21007,
- 8948, 5539,-16246, -801, -533, -3132, -8272, -1302, 367, 5958,
- -26574, -3470, 7126, -8876, -4819, -5380, -3923, 1466, 1929,-20655,
- 4419, 3663, 2437,-26758, 10897, 5616, -6601,-10394, 2148, 137,
- 15007,-22909, -3948, 6197, -9059,-27702, 23041, 4088, 8312, -267,
- 2973, 25579, -3795, -3612, -489, 5401, 7711,-25887, 3443, 2623,
- -24306, 3091, 13248, 3273, -3113, -1410, 3541, 12047, 306,-11933,
- -4493, -1997,-18725, 8257, 7593, 7218,-13588, -8411, 8715, -1137,
- -12028, 5907, 17904, 21327, -2223,-22989, 9863, -1633, -723, -5944,
- 714, 5170, 2128,-15199, 2081, 1626, -482, -8521, 8131, 10765,
- 53,-12020, 5152, 5033, 2361,-13747, 24714, 26357, 1074,-28538,
- 18087, 4333, 1067,-22148, 14277, 5540, 729,-15049, 7936, 4648,
- -16646, -6350, 23646, 9628, -91, -8477, 3298, 4297, 3499, -7417,
- -2214, 2931, -4795, -4424, 6487, 4264, -9333, 3377, 6570, 5734,
- 1733,-17598, 11163, 4167, -2713,-16183, 14693, 4188,-23780, 9825,
- 25701, 15331, 586,-19288, 21576, 12040, 11328,-15656, 2944, 7335,
- 9203,-16906, -5723, -5371, -7906, -4632, 12470, 5724, -123,-16520,
- 976, -8288, 1262, -3966, -3014, -148, 230, -2169, 505, 3954,
- -2256,-11474, 9990, 2644, 4841, -8017, -4617, -2959, 24226,-22733,
- 7475, 17722, 6747, -5782, 4877, 8664, -6893,-24218, 12181,-14683,
- 2839, -7574, 4815, 2376, 2680, -3986, 1749, 2061, -563, 3232,
- 3039, 5761, 343, -4150, 6600, 3792, 6356, 7199, 10702, 24266,
- -25636,-12157, 22874,-14633, 2438, -8680, 8312, 3091, 7135, -3110,
- 268, 4547, 4272, 4886, 5861, 14177, 11382,-10386, -767, 1448,
- 1770,-28758, 27658, 4643, -3008,-10314, 18024, 5252, 6999,-17854,
- 9789, 909, 1556,-21532, 20929, 3182, 26836,-23774, -2868, 3509,
- -9884,-14471, 24685, 193, -3300, -5891, 5237, -5722, -9043,-14338,
- 17448, -7167, -683, 26, 4002, -235, 3072,-12689, 13537, 2670,
- 3577,-10477, 10097, 1435, 17713,-24555, 7486, 1713, 6633, -6645,
- 1863, -783, 3185, -8349, 3975, -3967, 8090,-23915, 7470, -8732,
- 2793,-16733, 17412, 1948, -5975,-14195, 1741,-22095, 3376, -782,
- 18258, 16642, 3845, -3536, 5136, 335, 3267, -719, 10538, 7756,
- -10993, 5165, 17885, 4767, 4733, -7751, 15643, 8215, 3678, 1686,
- 3571, 2189,-11186, 1470, 6152,-11489, 4353, -2197, 1357, -3164,
- 4258, -6029, 8420, -230, 6220, -1478, 2105, -787, -4229, -4632,
- 15095, -1672, 1986,-16134, 14035, -6088, 7849,-14512, 2875,-10127,
- 4796,-14269, -8761,-25428, 1192,-24490, 22001, -6216, 258,-10418,
- 27459, 10524, -754, 7182, 7574, 3444, 5995, 3253, 25190, 25483,
- 6379, -6363, 409, -8435, -3319, 3253, 12035, 1358, 3184, -6482,
- 12864, -216, 25363, -7652, -2971, 5718, 4969, -3415, 7040, -2605,
- 2616,-21129, 28211, 1289, 2553,-15075, 23833, 1871, 14598, -6793,
- 7189, 4535, 5581, -1997, 4257, -4337, 6027,-10630, 9913, -5633,
- 3695,-11614, 19091, 585, 4415, -8798, 15569, -1099, -879, 752,
- 19480, 5412, 5743, 448, 9863, 1342, 20634,-16941, -7404,-16938,
- -11946, 17852, 19422, 5918, 12538,-20829, 22707, 1113, 4715, -4341,
- 12573, -3709, 4015, -8219, 3349,-17549, 6395, -1551, 4414, -8302,
- 24598,-24474, 21909, 9778, 5346, 1386, 6942, -4708, -1507, 2077,
- 8224,-10420, 6088, -3411, 8824, -6355, 7219, 17353, 22325, 25889,
- 6666, -1811, 1964,-13461, 8123, -4454, 26614, 11418, 4582, -7133,
- 18420, -3918, -264, 10545, 24810, 12821, 6936,-22880, 10241,-24118,
- 3108, -7220, 11991,-12963, 4237,-10392, 23417, -2591, 4624,-14780,
- 29121, -1235, 7543, -1157, 17358, 1244, 20161, -6319, 2575, -5204,
- 4384, 5974, 10993, -2909, 1619, -4017, 26017, 722, 4659, 11545,
- 14463, 4774, -2892, 10593, 15058, -4543, 1972,-15782, 26652,-10199,
- 6046, -562, 11992, -8022, 6197, -349, 7928,-12070, 21399,-13670,
- 15116, 99, 5829, -4061, 16713, -7200, -8904, 4170, 24814, -7599,
- 12177, 6080, 19388, 11094, 4262, 1544, 17090, -4775, -6957, -5908,
- 19576,-23176, 7126,-23499, 24889,-17683, 5514, -5416, 23284, -5830,
- 6388, -1788, 14378,-11597, 5099, -8771, 28791, -4573, 6029, -4164,
- 3217,-26929, 6427, 145, 9306,-17874, 5544, 3835, 25432, -15,
- 8297,-10673, 21003,-15084, 6019, -7628, 13891,-22535, 27144, 1685,
- 10077, 4230, 5211, -1543, 22179,-10638, 6385, 5710, 13476,-12976,
- 5272, 17571, 23747, 5084, -2100, 9127, 13746,-20852,-16310, 15716,
- 21422,-23074, 6532, -31, 17127,-16620, 5397, -3362, 28477, -9453,
- 6238, 1258, 13189,-22475, 12895, -4568, 8062,-26648, 2873, 5975,
- 22151,-15208, 6319, -507, 23117,-17415, 24129,-14207, 12908,-21101,
- 7262, 8470, 25405, -9450, 5424, -1162, 29494,-16114, 21373, 22875,
- 24554, 16783, 6684, 2453, 15785,-28885, 6504, 1085, 21619,-24241,
- 21468, 620, 23222, -7235, 10917, 8863, 18570,-21606, 6710, -2091,
- 28961,-25837, 6884, 20869, 27603, -8999, 6798, 5617, 28706,-21501,
- 6066, 4720, 25084,-28951
-};
-
-const Word16 hvq_pg_huff_offset[NUM_PG_HUFFLEN] = {0,2,3,8,9,11,13,15,19}; // Q0
-const Word16 hvq_pg_huff_thres[NUM_PG_HUFFLEN] = {0,0x2,0x4,0x18,0x20,0x40,0x80,0x100,0x300}; // Q0
-
-const Word16 hvq_pg_huff_tab[32] =
-{
- 30, 31, 1, 0, 2, 3, 28, 29, 4, 5, 27, 25, 26, 6, 24, 7, 8, 22, 23, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21
-}; // Q0
-
-const Word16 hvq_cp_huff_len[52] =
-{
- 3, 4, 5, 6, 6, 6, 6, 6, 4, 4, 5, 5, 5, 5, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 8,
- 8, 8, 8, 8, 9, 10, 10, 11, 11, 11, 10, 10, 10, 10, 11, 12, 12, 13, 13, 12, 12, 11, 12
-}; // Q0
-
-const Word16 hvq_cp_huff_val[52] =
-{
- 7, 8, 6, 3, 4, 5, 6, 7, 9, 10, 7, 8, 9, 10, 11, 12, 13, 11, 12, 13, 14, 15, 8, 9, 10,
- 11, 4, 5, 3, 4, 5, 6, 7, 5, 4, 5, 3, 4, 5, 6, 7, 8, 9, 6, 1, 2, 0, 1, 3, 4, 7, 5
-}; // Q0
-
-const Word16 hvq_cp_layer1_map5[HVQ_CP_MAP_LEN] = { 16, 8, 4, 2, 1, 18, 17, 9 }; // Q0
-
-const Word16 hvq_cp_huff_thres[HVQ_CP_HUFF_NUM_LEN] = { 0x0, 0x2, 0xC, 0x20, 0x50, 0x60, 0x100, 0x180, 0x600, 0x1000, 0x1C00 }; // Q0
-const Word16 hvq_cp_huff_offset[HVQ_CP_HUFF_NUM_LEN] = { 0, 2, 7, 12, 18, 19, 24, 26, 35, 45, 51 }; // Q0
-
-const Word16 hvq_cp_huff_tab[52] =
-{
- 46, 47, 44, 45, 48, 49, 51, 36, 37, 38, 43, 50, 34, 35, 39, 40, 41, 42, 33, 28, 29, 30, 31, 32, 26, 27,
- 3, 4, 5, 6, 7, 22, 23, 24, 25, 2, 10, 11, 12, 13, 17, 18, 19, 20, 21, 1, 8, 9, 14, 15, 16, 0
-}; // Q0
-
-/*----------------------------------------------------------------------------------*
- * FEC for HQ core
- *----------------------------------------------------------------------------------*/
-
-const Word16 Num_bands_NB[MAX_SB_NB] = {8,8,2}; // Q0
-
-const Word16 SmoothingWin_NB875_fx[70] = /*Q15*/
-{
- 0, 16, 66, 148, 263, 411, 590, 802, 1045, 1318,
- 1623, 1956, 2319, 2710, 3129, 3574, 4046, 4542, 5062, 5604,
- 6169, 6754, 7358, 7981, 8620, 9275, 9945, 10627, 11321, 12025,
- 12738, 13459, 14185, 14915, 15649, 16384, 17119, 17853, 18583, 19309,
- 20030, 20743, 21447, 22141, 22823, 23493, 24148, 24787, 25410, 26014,
- 26599, 27164, 27706, 28226, 28722, 29194, 29639, 30058, 30449, 30812,
- 31145, 31450, 31723, 31966, 32178, 32357, 32505, 32620, 32702, 32752
-};
-
-const Word16 SmoothingWin_NB2_fx[16] =
-{/* Q15 */
- 0, 315, 1247, 2761, 4799, 7282, 10114, 13188, 16384, 19580, 22654, 25486, 27969, 30007, 31521, 32453
-};
-/*----------------------------------------------------------------------------------*
- * SC-VBR
- *----------------------------------------------------------------------------------*/
-
-const Word16 bp1_num_coef_wb_fx[5] = { 15286, 0, -30572, 0, 15286, }; /* Q14 */
-const Word16 bp1_den_coef_wb_fx[5] = { 16384, 0, -30498, 0, 14262, }; /* Q14 */
-
-const Word16 shape1_num_coef_fx[11] = /* Q15 */
-{
- 31437, -2443, -13636, 4316,
- -10188, 48, 2639, -3575,
- -776, 1046, 399
-};
-
-const Word16 shape1_den_coef_fx[11] = { 32767, /* Q15 */
- 2940, -12237, 4032, -9609,
- -1998, 2335, -3900, -1595,
- 857, 253
-};
-
-const Word16 shape2_num_coef_fx[11] = /* Q15 */
-{
- 30760, 31, -9699, 9516,
- -5878, -7249, -10468, 442,
- 3278, -63, 1115
-};
-
-const Word16 shape2_den_coef_fx[11] = { 32767, /* Q15 */
- 16019, -890, 12799, 2346,
- -6985, -13192, -5795, -949,
- -1492, -304
-};
-
-const Word16 shape3_num_coef_fx[11] = /* Q15 */
-{
- 30685, -383, -9937, -9605,
- -5997, 7611, -10393, -355,
- 3239, 12, 1196
-};
-
-const Word16 shape3_den_coef_fx[11] = { 32767, /* Q15 */
- -16498, -911, -12947, 2286,
- 7430, -13385, 6066, -1182,
- 1580, -273
-};
-
-const Word16 txlpf1_num_coef_fx[11] = /* Q13 */
-{
- 138, 198, 514, 681, 921,
- 964, 921, 681, 514, 198,
- 138,
-};
-
-
-const Word16 txlpf1_den_coef_fx[11] = /* Q13 */
-{
- 8192,-18945, 31613,-31149, 24494,
- -12753, 5528, -1436, 347, -25,
- 4,
-};
-
-
-const Word16 txhpf1_num_coef_fx[11] = /* Q13 */
-{
- 138, -198, 514, -681, 921,
- -964, 921, -681, 514, -198,
- 138,
-};
-
-const Word16 txhpf1_den_coef_fx[11] = /* Q13 */
-{
- 8192, 18945, 31613, 31149, 24494,
- 12753, 5528, 1436, 347, 25,
- 4,
-};
-
-/* NELP filter coefficients */
-const Word16 bp1_num_coef_nb_fx_order7[8] =
-{
- /* Q = BP1_COEF_NB_QF_ORDER7 = 13 */
- 1481, 6730, 15579, 22923, 22923, 15579, 6730, 1481,
-
-};
-
-const Word16 bp1_den_coef_nb_fx_order7[8] =
-{
- /* Q = BP1_COEF_NB_QF_ORDER7 = 13 */
- 8192, 16156, 23814, 21855, 14620, 6614, 1907, 268,
-};
-
-/* NELP gain tables */
-const Word16 UVG1CB_WB_FX[UVG1_CBSIZE][2] = /* Q13 */
-{
- { -2224, -2114, },
- { 12666, 12314, },
- { 3723, 9690, },
- { 17880, 17978, },
- { 4136, 3946, },
- { 11605, 21280, },
- { 9777, 9340, },
- { 21701, 21627, },
- { 1088, 1679, },
- { 13993, 13697, },
- { 10443, 5214, },
- { 19702, 19692, },
- { 5458, 5317, },
- { 17051, 16918, },
- { 14206, 8503, },
- { 24330, 24271, },
- { -118, -279, },
- { 11615, 14863, },
- { 6898, 6544, },
- { 18913, 18637, },
- { 1142, 6811, },
- { 15995, 16070, },
- { 6921, 13182, },
- { 22857, 22741, },
- { 3017, 2260, },
- { 14952, 14992, },
- { 8176, 8093, },
- { 20721, 20549, },
- { 7441, 2370, },
- { 17897, 13988, },
- { 10986, 10966, },
- { 26098, 25992, },
-};
-
-const Word16 UVG1CB_NB_FX[UVG1_CBSIZE][2] = /* Q13 */
-{
- { -4791, -5157, },
- { 4824, 4937, },
- { -3443, 3610, },
- { 5539, 15293, },
- { -469, -3986, },
- { 7977, 8157, },
- { 2748, 2492, },
- { 14070, 14014, },
- { -2486, -2863, },
- { 6033, 5892, },
- { 2678, -441, },
- { 11741, 11804, },
- { -256, -847, },
- { 9153, 8922, },
- { -106, 5979, },
- { 16876, 16741, },
- { -3584, -3873, },
- { 3511, 9538, },
- { 401, 416, },
- { 11082, 10550, },
- { -1418, -1725, },
- { 8988, 5255, },
- { 6275, 1137, },
- { 15372, 15247, },
- { -3899, 301, },
- { 6976, 7095, },
- { 1581, 1453, },
- { 12988, 12824, },
- { 2692, -3093, },
- { 9778, 10153, },
- { 3938, 3628, },
- { 18823, 18695, },
-};
-
-const Word16 UVG2CB1_WB_FX[UVG2_CBSIZE][5] = /* Q12 */
-{
- { 914, 990, 1490, 5954, 2618, },
- { 5599, 4621, 4078, 3493, 3057, },
- { 4930, 4031, 2999, 2150, 1706, },
- { 7722, 3021, 1804, 1478, 1452, },
- { 1171, 1390, 6895, 2592, 1486, },
- { 4155, 4287, 4409, 4515, 4577, },
- { 3633, 3661, 3694, 3711, 3736, },
- { 13212, 5009, 2611, 2175, 2048, },
- { 3716, 2887, 2253, 1965, 1723, },
- { 7141, 4567, 3434, 2970, 2396, },
- { 2856, 3038, 3259, 3481, 3709, },
- { 5929, 5459, 4923, 4448, 4084, },
- { 980, 1024, 1550, 5686, 8038, },
- { 3516, 7354, 10392, 3619, 2856, },
- { 2598, 3093, 3582, 4780, 5965, },
- { 1962, 10993, 5020, 2861, 2587, },
- { 796, 916, 1010, 1175, 7720, },
- { 4445, 4406, 4344, 4249, 4175, },
- { 1454, 6493, 2611, 1758, 1765, },
- { 6296, 7686, 4763, 2945, 2203, },
- { 1502, 1573, 1895, 2981, 5464, },
- { 4750, 4829, 4909, 4929, 4895, },
- { 3644, 3774, 3922, 4037, 4116, },
- { 9051, 7403, 6003, 4746, 4081, },
- { 1558, 1869, 2331, 3000, 3595, },
- { 4671, 4646, 4614, 4553, 4482, },
- { 2262, 2608, 3158, 3890, 4468, },
- { 5556, 5441, 6824, 7146, 5724, },
- { 1470, 1550, 2016, 11169, 3828, },
- { 5488, 6270, 6771, 8202, 9281, },
- { 3477, 3693, 4113, 4460, 4705, },
- { 10877, 17984, 10194, 7291, 2824, },
- { 1327, 1498, 1476, 1667, 2138, },
- { 4463, 4299, 4094, 3880, 3731, },
- { 3188, 3164, 3156, 3104, 3140, },
- { 9757, 5690, 3366, 2296, 1792, },
- { 1731, 1753, 12406, 4082, 2247, },
- { 3866, 4060, 5007, 5274, 5225, },
- { 3998, 3957, 3900, 3839, 3789, },
- { 18040, 9417, 5567, 3465, 2504, },
- { 2160, 2532, 2895, 2577, 2321, },
- { 5052, 4789, 4490, 4203, 3953, },
- { 3381, 3415, 3458, 3496, 3536, },
- { 6166, 5811, 5440, 5035, 4650, },
- { 2839, 3389, 5057, 7558, 10414, },
- { 3875, 4431, 5183, 6310, 7166, },
- { 4311, 4130, 3571, 3070, 8555, },
- { 8791, 8260, 7299, 6243, 5421, },
- { 1191, 1237, 1368, 1814, 11819, },
- { 2486, 5729, 6150, 4222, 3667, },
- { 4018, 3825, 3600, 3388, 3256, },
- { 7504, 5817, 4989, 4065, 3322, },
- { 1430, 1962, 5546, 4096, 4681, },
- { 5393, 5378, 5324, 5230, 5052, },
- { 4041, 4090, 4132, 4159, 4181, },
- { 12469, 9221, 5735, 3617, 2501, },
- { 2482, 2565, 2768, 3088, 3461, },
- { 5209, 5080, 4905, 4706, 4522, },
- { 3139, 3362, 3647, 3910, 4156, },
- { 7139, 6588, 5941, 5251, 4674, },
- { 1719, 1866, 7993, 7634, 3987, },
- { 3587, 5289, 7882, 13519, 16095, },
- { 2409, 2515, 2749, 7316, 4636, },
- { 30391, 18493, 13798, 4799, 2283, },
-};
-
-const Word16 UVG2CB2_WB_FX[UVG2_CBSIZE][5] = /* Q12 */
-{
- { 1565, 1391, 1635, 5228, 2681, },
- { 2156, 2558, 6205, 5561, 3944, },
- { 2039, 2406, 3094, 3409, 3968, },
- { 5090, 5065, 4989, 4858, 4764, },
- { 1436, 1736, 2816, 2362, 2400, },
- { 4375, 4425, 4465, 4478, 4493, },
- { 4648, 4081, 3550, 2981, 2667, },
- { 1705, 1950, 3679, 7828, 9895, },
- { 2839, 1826, 1443, 1210, 1245, },
- { 1387, 1410, 1768, 8873, 4383, },
- { 4022, 3784, 3565, 3316, 3096, },
- { 9983, 7147, 5225, 3742, 3027, },
- { 6769, 2357, 1531, 1448, 1556, },
- { 4591, 4671, 4735, 4765, 4789, },
- { 4308, 4198, 4052, 3896, 3769, },
- { 2288, 2550, 4922, 8294, 14878, },
- { 1361, 1480, 1511, 1991, 10450, },
- { 2933, 3131, 3694, 4687, 5201, },
- { 3984, 3048, 2479, 2644, 5514, },
- { 5353, 5480, 5488, 5434, 5437, },
- { 3319, 2881, 2528, 2152, 1927, },
- { 4873, 4748, 4578, 4407, 4257, },
- { 6185, 4396, 3751, 3400, 2899, },
- { 2159, 8067, 7534, 5121, 3640, },
- { 2265, 10177, 3803, 2588, 2441, },
- { 2188, 2206, 4293, 12691, 5893, },
- { 3587, 3651, 3760, 3864, 3960, },
- { 13158, 9752, 7171, 5431, 5364, },
- { 5710, 4173, 2928, 2090, 1774, },
- { 3531, 3831, 4641, 5787, 6622, },
- { 4395, 4356, 4281, 4194, 4111, },
- { 2243, 2476, 5814, 3965, 27176, },
- { 1575, 1667, 7544, 3005, 1984, },
- { 2583, 2511, 11684, 5765, 4807, },
- { 3632, 3458, 3277, 3114, 2971, },
- { 8569, 6778, 5866, 5515, 5141, },
- { 3267, 3035, 2940, 2782, 2691, },
- { 3929, 4249, 4577, 4877, 5162, },
- { 4443, 4173, 3864, 3590, 3337, },
- { 3998, 4725, 5728, 6873, 7885, },
- { 4369, 2824, 2237, 1648, 1404, },
- { 1000, 1022, 1477, 2682, 15276, },
- { 3916, 3851, 3766, 3664, 3591, },
- { 13206, 4485, 3230, 3897, 3648, },
- { 10002, 3515, 2393, 2233, 2211, },
- { 4603, 4836, 5071, 5259, 5411, },
- { 3919, 4035, 4177, 4304, 4419, },
- { 3046, 8332, 16475, 11172, 10858, },
- { 1027, 1007, 1196, 1578, 5937, },
- { 1892, 2422, 3227, 3920, 7400, },
- { 3584, 3532, 3508, 3470, 3437, },
- { 5363, 6155, 6805, 6854, 6811, },
- { 4038, 3512, 3030, 2636, 2332, },
- { 6760, 6124, 5235, 4299, 3687, },
- { 4125, 6528, 4068, 3238, 3483, },
- { 5020, 5905, 7082, 8554, 9623, },
- { 1399, 5868, 3069, 1726, 1655, },
- { 4691, 4234, 3974, 3757, 9616, },
- { 3978, 4003, 4003, 3983, 3960, },
- { 2103, 16858, 9252, 4860, 4727, },
- { 8043, 5294, 3970, 3098, 2583, },
- { 4680, 5109, 5576, 5965, 6275, },
- { 4867, 4584, 4276, 3958, 3682, },
- { 1213, 3115, 6552, 22778, 20977, },
-};
-
-const Word16 UVG2CB1_NB_FX[UVG2_CBSIZE][5] = /* Q12 */
-{
- { 773, 785, 785, 785, 860, },
- { 3560, 3521, 3410, 3265, 3167, },
- { 1766, 2982, 10273, 3790, 2248, },
- { 4986, 4753, 4496, 4172, 3922, },
- { 2036, 2030, 2009, 1973, 1897, },
- { 3291, 3554, 3868, 4126, 4345, },
- { 3207, 3122, 3026, 2913, 2797, },
- { 13220, 6844, 3967, 2746, 2466, },
- { 1553, 1627, 1392, 1766, 3679, },
- { 5379, 4640, 3844, 3254, 2635, },
- { 1600, 1622, 2430, 9446, 4214, },
- { 5115, 5200, 5311, 5365, 5343, },
- { 6229, 3008, 1989, 1622, 1597, },
- { 1726, 2114, 7046, 6162, 4301, },
- { 1004, 1056, 1841, 6006, 7101, },
- { 6388, 9659, 4510, 2774, 2113, },
- { 1060, 1153, 1400, 1733, 2121, },
- { 3448, 3523, 3612, 3683, 3770, },
- { 1496, 2045, 2910, 3563, 4058, },
- { 4419, 4592, 4795, 4921, 4978, },
- { 1407, 5314, 2788, 1675, 1350, },
- { 4210, 4225, 4227, 4186, 4169, },
- { 2247, 8245, 4392, 2522, 1709, },
- { 7211, 6741, 6110, 5397, 4680, },
- { 3602, 2286, 1577, 1229, 1148, },
- { 6674, 5227, 3576, 2448, 1901, },
- { 954, 1035, 1079, 1683, 9558, },
- { 4011, 5853, 8979, 7138, 4484, },
- { 2784, 2702, 2637, 2546, 2471, },
- { 4414, 4065, 4627, 4208, 9275, },
- { 2771, 3012, 3357, 3735, 4066, },
- { 19742, 8603, 3943, 2546, 2085, },
- { 1132, 1123, 1107, 1093, 1114, },
- { 3913, 3838, 3733, 3630, 3548, },
- { 948, 1565, 6063, 2654, 1667, },
- { 6159, 5567, 4884, 4241, 3770, },
- { 925, 1164, 1585, 6062, 3090, },
- { 3818, 4037, 4322, 4536, 4726, },
- { 4291, 3894, 3441, 3006, 2733, },
- { 8544, 6487, 4962, 3812, 2970, },
- { 1744, 1758, 1704, 1633, 1576, },
- { 4416, 4259, 4044, 3810, 3628, },
- { 1919, 2159, 3323, 13977, 7898, },
- { 5952, 5731, 5419, 5061, 4732, },
- { 2775, 2812, 2507, 2540, 6585, },
- { 3436, 3960, 4661, 5975, 6274, },
- { 3082, 3150, 3246, 3337, 3404, },
- { 4089, 16018, 8285, 4116, 2704, },
- { 1419, 1425, 1400, 1371, 1363, },
- { 3825, 3890, 3953, 3993, 4015, },
- { 2498, 2689, 2846, 3011, 3213, },
- { 5122, 5024, 4881, 4691, 4524, },
- { 2285, 2325, 2317, 2313, 2271, },
- { 4493, 4529, 4517, 4478, 4443, },
- { 9138, 3969, 2522, 2222, 2415, },
- { 10009, 8719, 7292, 5837, 4532, },
- { 831, 908, 1039, 1656, 6813, },
- { 2070, 5478, 5174, 3911, 3694, },
- { 1577, 1565, 1635, 2583, 13154, },
- { 5590, 5788, 5922, 6752, 7063, },
- { 4061, 3497, 2710, 2099, 1716, },
- { 2750, 3118, 16574, 7891, 3651, },
- { 2598, 3072, 3809, 4906, 5172, },
- { 15348, 10948, 7740, 4979, 3446, },
-};
-
-const Word16 UVG2CB2_NB_FX[UVG2_CBSIZE][5] = /* Q12 */
-{
- { 961, 867, 812, 771, 775, },
- { 2544, 2686, 3010, 3605, 5048, },
- { 1524, 1818, 2889, 3029, 3046, },
- { 4195, 4301, 4421, 4497, 4580, },
- { 2026, 1990, 1965, 1943, 1939, },
- { 4338, 4156, 3963, 3750, 3590, },
- { 7732, 2904, 1804, 1407, 1513, },
- { 1613, 2353, 11315, 5764, 4291, },
- { 1519, 1462, 1434, 1341, 1294, },
- { 1627, 1710, 2163, 9654, 5615, },
- { 2322, 7293, 3251, 2020, 2066, },
- { 4967, 5112, 5174, 5203, 5230, },
- { 1590, 1449, 1943, 5947, 3563, },
- { 7747, 5170, 3268, 2392, 2082, },
- { 3970, 3559, 3164, 2774, 2493, },
- { 1993, 2210, 3204, 3717, 23534, },
- { 1185, 1236, 1423, 2115, 4772, },
- { 3935, 3840, 3714, 3583, 3477, },
- { 1640, 1550, 1800, 2609, 10880, },
- { 4067, 4437, 4811, 5108, 5536, },
- { 1472, 1367, 1533, 2132, 7352, },
- { 4310, 4284, 4216, 4117, 4057, },
- { 10817, 4587, 2611, 2066, 2037, },
- { 2089, 2427, 4698, 14635, 7517, },
- { 2529, 1561, 1209, 976, 945, },
- { 2908, 3070, 4055, 5862, 6448, },
- { 2676, 2861, 3115, 3295, 3408, },
- { 2932, 14330, 6533, 3739, 3462, },
- { 3681, 3079, 2559, 2151, 1903, },
- { 5636, 5316, 4978, 4690, 4425, },
- { 2298, 7228, 6976, 4251, 3347, },
- { 2504, 3421, 6784, 8483, 15064, },
- { 1253, 1180, 1136, 1094, 1076, },
- { 3451, 3524, 3600, 3646, 3707, },
- { 1701, 2030, 6574, 4746, 4451, },
- { 4688, 4751, 4762, 4727, 4722, },
- { 2977, 2363, 1883, 1563, 1399, },
- { 5080, 4685, 4275, 3835, 3513, },
- { 5445, 3828, 2851, 2242, 1948, },
- { 1929, 5037, 17760, 8346, 6300, },
- { 1839, 1782, 1680, 1586, 1534, },
- { 3086, 3472, 4031, 4950, 9695, },
- { 3199, 3052, 2896, 2751, 2622, },
- { 5822, 5782, 5727, 5566, 5478, },
- { 1548, 2234, 6748, 2562, 1722, },
- { 6699, 5216, 4475, 3531, 3028, },
- { 3773, 3628, 3460, 3279, 3155, },
- { 1581, 1672, 2929, 20221, 16432, },
- { 1210, 1215, 1389, 1678, 2177, },
- { 3863, 3886, 3937, 3961, 3989, },
- { 1541, 1745, 1829, 3479, 15563, },
- { 4444, 4952, 5573, 6056, 6545, },
- { 2460, 2397, 2284, 2133, 2041, },
- { 4808, 4676, 4493, 4322, 4213, },
- { 15031, 6644, 3315, 2900, 2885, },
- { 4003, 4760, 6946, 8274, 8401, },
- { 5001, 2495, 1594, 1337, 1365, },
- { 3428, 3706, 4073, 4457, 4670, },
- { 3326, 3277, 3222, 3142, 3088, },
- { 6162, 6317, 6494, 6459, 6530, },
- { 2659, 2599, 2537, 2482, 2546, },
- { 8554, 6902, 5233, 4116, 3650, },
- { 4643, 4099, 3616, 3201, 2895, },
- { 9589, 26630, 15412, 12532, 8715, },
-};
-
-const Word16 frac_4sf_fx[NB_SUBFR + 2] = { 4,8,12,16,16,16 }; /* Q4 */
-
-/* ERB table for PPP-ampl-quant */
-const Word16 erb_WB_fx[NUM_ERB_WB + 1] = { 0, 238, 475, 713, 950, 1188, 1426, 1663, 1911, 2185, 2490, 2826, 3205, 3624, 4094, 4620, 5210, 5875, 6626, 7478, 8448, 9558, 11264, 13568, 16387 };//Q(log2(2.56)
-
-
-/* ERB table for PPP-ampl-quant */
-const Word16 erb_NB_fx[NUM_ERB_NB + 1] = { 0, 238, 475, 713, 950, 1188, 1426, 1663, 1911, 2185, 2490, 2826, 3205, 3624, 4094, 4620, 5210, 5875, 6626, 7478, 8448, 9558, 10243 };//Q(log2(2.56)
-
-
-
-/*Amplitude and power tables for PPP*/
-
-const Word16 AmpCB1_WB_fx[640] =
-{//Q13
- 5655, 1589, -653, 3568, -3173, -1852, -3204, -4623, -2100, -5103,
- -923, -67, -7152, -4958, -2019, -1810, -8532, -648, 6581, 8043,
- 160, 778, -1535, 863, 5482, 1674, -3576, 123, -3163, -3595,
- -852, -53, -1080, -2683, -3199, -950, -1353, 6258, -1431, 1249,
- 2059, 677, 146, 1011, 956, -2022, -25, 300, 421, -5859,
- 1027, -452, -7343, -1052, 3818, 1099, -1005, 659, -511, -658,
- 2091, 720, -600, 145, -1504, -1716, -442, -2172, -1505, 2702,
- 731, 1473, -213, -4120, -2976, 688, 3205, 1213, 679, 232,
- 3672, 4770, -1198, -298, -1714, -3669, -2833, -664, -1859, -2380,
- -1169, -1593, -453, 295, -1225, -3110, -1776, 2112, 2710, 3333,
- 1022, 1248, 1091, 1164, 1200, 1782, -809, -2306, -3124, -2194,
- -1567, 465, 2223, -1301, -463, -2157, 729, 2279, -1938, 610,
- 437, -803, -1025, 775, -171, -637, 163, 2251, 316, -1663,
- -4123, -20, -2827, -1529, -1436, 3447, 79, -274, 1650, 4097,
- 2369, 927, 448, -449, 293, -239, -1028, -4805, 1354, 431,
- -2219, -490, -3849, 1639, -2925, 817, 1485, 2527, 5444, -1994,
- 1476, 506, -1643, 2003, -1676, -788, -1681, -2011, 1389, 452,
- 593, 3, -1200, -3987, -1634, -4310, -686, 882, 6235, 2420,
- -196, -1257, -2038, -498, 1394, 671, -2302, -809, -446, 3644,
- -1643, -2304, -828, 105, -323, -3906, -960, 7324, 3095, -786,
- 95, 633, 1266, 750, 1509, -2033, -3134, 432, 1028, -1825,
- 1258, 256, -3249, -6868, -523, -325, -1779, 4313, 2524, 3433,
- -600, -410, -88, 410, -1182, -1140, -1448, -1344, -5074, 6054,
- 2194, 1505, -681, -2408, 1376, 1389, 1209, 1048, -4199, -2939,
- 1855, 1744, -1344, -1431, -1955, -1805, -4992, 512, 624, 2749,
- -3446, -1215, -3764, -2169, -3601, -1321, 67, 4326, 6624, 5816,
- -334, -1746, -441, -754, 1853, 3889, -595, -493, 441, -811,
- -48, -764, -1473, -683, 603, -1754, 780, 698, 1084, 1713,
- 560, -808, -754, -2890, -1205, -318, -1021, 3195, 5693, -4603,
- 1343, -1061, -2441, -1784, 721, 267, 227, -622, 3013, -768,
- -472, 90, 13, 290, 1055, 948, 1617, -2368, -1087, 1103,
- -4784, -3872, 5125, -2518, -215, 6962, 1095, -1521, 2091, -2962,
- 2285, 1117, 1174, 2635, -1907, -1012, 814, -417, -2162, -2805,
- -1188, -707, -808, -1757, 260, -1093, -3957, -3266, 4132, 5980,
- 177, -1478, 960, 2029, 3989, 597, -3062, -3940, -1688, 236,
- -1559, 150, 2432, 348, -242, -2014, -1027, 6298, -2957, -3960,
- 1090, 1014, -1261, -744, -954, -938, -3713, -3272, 5356, -2356,
- -1439, 3808, -2330, -4437, 5177, -3606, -1382, 1824, 407, 325,
- 649, 330, 85, 206, -415, 183, -646, 602, -2656, 808,
- 1039, 29, -3202, -6168, -3640, 3736, 4183, 3959, 330, 339,
- 2701, 343, 1501, 1879, -3194, -4648, -1630, 1656, -1578, -84,
- -3065, -4126, 24, -260, 263, -1705, -1289, 2432, 1229, 7481,
- 2586, 1696, 646, -1773, -792, 1932, -1908, -1897, -1129, 112,
- -5667, -1592, 2253, -980, 1581, 211, 5277, 4846, -288, -159,
- 956, 1196, 771, -973, -1785, -516, -1015, 847, 614, -791,
- -442, -1594, -4632, -4392, -416, 1398, 2570, 752, 264, 6570,
- 1655, 546, 1238, -1362, -1330, -2005, 3590, -2155, -184, -1224,
- -1452, -1533, -534, 1010, -1707, 801, 3628, -289, 2414, 132,
- 2643, -2813, -4524, 5092, -7362, 740, 428, -510, 81, -1209,
- 616, 1454, 1861, -3958, -4084, 189, -1219, -875, 3764, 2086,
- -1554, -2071, 1515, 3392, 12, -686, -2414, -1382, 176, 1685,
- 2055, -5698, 1582, 4117, -4846, -2922, 610, 2082, 4682, -2487,
- 348, 2258, -338, -1379, 1472, 618, -202, -1122, -76, -2468,
- -1216, -986, -327, -1441, 102, 403, -2105, 2411, 1510, 1288,
- -715, -577, 1074, 2533, -3521, -3449, 2140, -751, -307, 3805,
- 158, -1385, -404, -1378, -1948, 3785, 4216, 2667, -1894, -1559,
- 1037, 1371, 989, -205, -333, -4784, -3429, -1283, 3299, 859,
- -4922, -5481, -1196, -1748, -720, 516, 113, 4590, 7071, 4345,
- -5729, -3862, 3590, 1463, 7094, 4991, 854, -66, -1630, -686,
- -923, -3266, -1988, 2345, 785, -1420, 3004, 2934, -1245, -65,
- -2696, -3088, -1438, 614, 1584, -239, -1552, 580, 6285, -1673,
- -1598, -4018, -1909, 747, 3191, 366, 1467, -1933, 2759, 2804,
- 518, 193, -1149, -3108, 441, 1458, 2791, -4131, 2694, 3372,
- -5023, -6491, 1794, 2739, 1463, 5843, 2869, 1993, -1409, 4832
-};
-
-const Word16 AmpCB2_WB_fx[64 * (NUM_ERB_WB - 13)] =
-{//Q13
- -5276, -7711, -3518, -2416, -382, 319, -1900, -900, 1725, 884,
- 4071, -4052, -2430, -336, 2136, 3006, 591, -3893, -2731, 2625,
- 2390, -1047, -883, -3368, -4235, -3726, 189, -1803, 784, 2336,
- 206, -2140, 3001, -730, -2279, 85, -3395, 4367, 2214, -254,
- -3114, -2348, 2763, 686, -7495, -6618, 3164, -3957, -2681, -2049,
- 1659, 3634, 2962, 1574, 379, -2478, 2861, 616, 1124, 205,
- -3075, -348, -2006, -90, 761, 1157, -114, -9460, -2786, -3254,
- -1120, -1500, -446, 2835, -314, 3205, 2115, -837, -261, 36,
- 80, -485, 1133, 2124, -1031, -401, -3166, 1145, -1616, -3425,
- -3071, -6891, -4198, 2292, 5160, -46, 1430, 280, 1378, 1700,
- -1673, -1126, 5270, 5096, -975, -1070, 1314, -2389, -2982, 20,
- -3218, -892, -636, -876, -302, -2923, -3240, 4121, 1625, -557,
- 994, 544, 2657, 7133, -273, -3530, -1419, 1431, -936, -2622,
- 303, 75, -5444, -5549, 4183, 1248, 3474, -789, 2375, -1778,
- 1660, 1520, -1433, -4047, 531, 7001, 695, 1889, 4261, -2791,
- -1557, -2980, -316, 415, 1134, 1501, -6923, 521, -3134, -1812,
- 1848, 676, -1733, 734, 2207, 2029, -476, -1976, -161, 29,
- 7147, -1774, 720, -1070, -372, -1626, -6473, -2448, -5235, -2651,
- -1800, -1477, -767, 1335, 471, 4857, 888, 593, -370, 196,
- 907, 174, 557, -720, -1339, 1590, 37, -1247, -1307, 276,
- -1739, -6032, -3088, -2499, -497, -393, -569, 3003, 2694, 3751,
- 4652, -258, -1305, 175, 189, -344, -2381, -1992, 463, 529,
- -6375, 3966, -3558, -3001, -640, 3117, 1120, 966, 1316, -561,
- 27, 2794, 2831, 3512, 3453, -418, -2319, -6741, -3443, 80,
- 1281, 1691, 1500, -591, -739, 2385, -4676, -5822, -1437, 730,
- 3593, -437, 1090, 3497, -1932, 2854, 4858, 2654, 947, 1879,
- -4115, 2700, -3092, -1524, 225, -8272, -6736, -1277, 2991, 2983,
- 1129, -1661, 2817, 468, 491, -744, 390, 677, 8129, -3130,
- -687, -433, 1488, -3763, -177, -581, -764, 39, 1537, -2203,
- -1678, 263, -1214, 2175, -1857, 3097, -894, 4207, -1943, -834,
- 1513, -4123, 3981, 6041, 653, -757, -313, -3024, -4614, -3139,
- -2966, 178, 4956, -427, -41, 2376, 1008, -1351, -92, 978,
- 1998, 5146, 2069, 117, -1754, -2756, 4425, 168, -1807, -1761,
- -1215, 178, -1562, -3369, -919, -2576, 3614, 4968, -30, -396,
- -1151, -1146, 868, 1073, -359, 2732, 546, 4431, -321, -1081,
- 1410, -3214, -2316, -4889, -2460, -3844, -7323, -1438, -1488, 1849,
- 4037, 2421, 2697, -2372, -1877, 670, 3674, -907, 888, -3703,
- 375, -1278, -1477, 2501, -936, -1682, -1353, -335, -4440, 383,
- -2730, -2130, -1105, 1588, 3340, 4816, -4023, 502, -4146, 236,
- 4481, 589, -3696, 826, -97, 222, -8037, -2244, 142, 810,
- -2195, 1315, 656, 1901, -485, 317, 1512, 1465, -2026, 1853,
- 929, 1670, -2736, -463, -836, -4946, -134, 2769, 2972, -5148,
- -3147, 913, -1483, 267, -1560, 3903, 1507, 1105, -1496, 210,
- -1196, 3764, 601, 1630, 3842, 6374, -1293, -4555, -3087, 199,
- -1917, -3331, -2317, -1774, 479, 3712, 2729, 1309, -3047, -514,
- 861, -213, 1317, -2035, 4369, 5228, 942, -3052, -2316, -3377,
- 1123, -65, 2507, 2711, -2096, -2164, -2634, -5215, -3919, 1551,
- -47, 1990, 2370, 2025, -2401, 4833, -3879, -162, -3081, 501,
- -510, 2744, -907, 253, -1746, -2520, 3418, -1461, 2140, 2507,
- 135, 1457, 3195, -1277, -2558, -66, 10850, -1633, -1051, -3436,
- -1617, 1438, -1231, -1744, 696, -348, 3434, 2121, -1629, -2460,
- -4065, 1159, -1288, 2843, 697, -862, 4, 966, -444, -1860,
- 1450, 6426, 5544, 1456, -2826, -1303, -2778, -1278, -6656, -3241,
- -7083, 2234, 204, 1753, 803, 499, 1641, 87, 1471, -1325,
- 398, 2983, 4340, -1382, 735, -600, -4671, -254, 2327, -1008,
- -144, -1453, -1806, -1669, 395, -3285, -1803, -2119, 1232, 2914,
- 1480, 8610, 1788, 2644, 1359, 3783, -110, -1339, -1337, -3427,
- -630, -1189, -2560, 976, 483, -2744, -3653, -1289, 2910, -2437,
- 3171, 1479, 157, 823, 4631, -1910, 3736, -424, -155, -5470,
- -741, 3829, -2794, -55, -1447, -3469, -1947, 2914, -61, -3430,
- 3544, -1867, 2986, 1009, -1051, 725, 2933, 2926, 5849, 257,
- -2666, 6286, -2282, -2998, -2576, -975, -3655, -1867, -5040, -1440,
- 3542, -603, 4806, -2808, -1633, 1388, 1149, -1616, -1851, 2122,
- 4477, 2485, 1376, 721, 2174, -3072, 1378, -2574, -37, 1322,
- -1646, -3612, 4443, 1612, -3403, 711, 132, 119, -227, 5059,
- 2892, 840, 5462, -3471, -1340, 2097, 143, 1750, -3052, -1932,
- -6352, -4166, -645, 4317, 633, 3681, 2811, 2346, 2374, -2999,
- -1265, -210, 5115, 4652, 1305, 3704, -1456, -307, -457, -1455,
- -3580, 674, 2215, 2458, -3021, -66, 2535, -652, 1226, 685,
- 875, -1753, -1164, -609, 3444, 563, 3826, 1607, 3798, 1385,
- 3902, -1990, -4078, -2509
-};
-
-const Word16 AmpCB1_NB_fx[640] =
-{//Q13
- -1355, 185, -222, -221, 1976, 3119, 540, 1333, -3646, -2511,
- -979, 1664, 2087, 951, 787, -1687, -855, 1594, 1264, -4990,
- -1957, -215, -850, 1369, -113, 2541, -2904, 743, 634, -657,
- -3438, -2047, 706, 85, -596, -50, 212, 944, 118, 1380,
- -1203, -78, -213, -1811, -781, -1970, 6607, -2971, 147, -1483,
- 38, 5607, 5222, -4567, -4040, -2259, -3110, -2120, 932, -236,
- -1052, 1039, -872, 334, -919, 2761, 3320, -5828, 53, 1063,
- -1064, -75, -1015, -2137, -722, 565, 629, 1961, -454, 866,
- -888, 2652, 1996, -2170, -885, 3325, -645, -1898, -984, -643,
- -1008, 2472, 2400, -3708, -2408, -1051, 2029, 1357, -636, -470,
- -1307, 655, 663, 29, 892, -95, -91, -2966, -1610, 2657,
- -2175, -3170, -3799, -3065, 1130, 1351, 3814, 2791, 1478, 1520,
- -1326, -520, -692, 899, 1979, -397, -407, 450, -569, -611,
- -1228, 864, 2549, 3067, -2511, -4737, -2701, -304, 680, 1426,
- -1070, -19, -1582, -2813, -1832, 3010, 250, -613, 3390, -171,
- -1450, -417, -773, -651, -405, -2304, -780, 6656, -3270, -1322,
- 70, 5105, 3202, -83, -925, -458, 1203, -1582, -4158, -3630,
- -1702, -849, -55, -986, -1963, -1140, -1942, 3347, 3526, -435,
- -1429, -2089, -1620, -1271, 2851, 2184, -2472, 3216, 2885, -2922,
- -1217, 86, -186, -279, -746, 1288, 3016, -651, -2719, 317,
- -1307, -127, -1110, 1389, 212, 1783, 2619, -1718, 1795, -4086,
- -1295, 743, 301, -1823, -223, -651, -1774, -405, 1687, 2031,
- -865, 1059, -391, 505, -2739, -2773, 16, -2960, 3071, 3325,
- -791, 2301, 435, 107, -4039, 801, -1224, 1854, -1039, 507,
- -518, 997, 837, 3311, 506, 1026, -232, -1920, -3904, 406,
- -1857, -529, -776, -700, -663, -1520, 1699, 814, 2084, -477,
- -1341, -1123, -2564, -2784, 2457, 3223, -959, 385, -1864, 3754,
- -1351, -1347, -2229, -2882, -1061, -1499, -3028, 3302, 2250, 5539,
- -957, -340, 27, 1508, 167, -3513, 1689, 2577, -1810, -516,
- -1061, 2171, 1774, 2031, 923, -1933, -1640, -2881, 859, -834,
- 408, 2462, 2073, 2107, -2671, 1140, -3497, -2497, 2984, -2707,
- -1762, -2524, -2196, 279, -2580, 477, 2306, 4645, 693, -909,
- -1089, 1952, 3034, -1790, 786, -1149, -3117, 3605, -1933, -1886,
- -959, 934, 246, -2177, -2440, 1356, 871, 3472, 2558, -4512,
- -782, 1262, 893, 1979, 2386, -1809, -4357, -392, -1928, 1576,
- -1751, -327, -1018, -617, -2370, -2910, 4230, -90, -1361, 3596,
- -1069, -315, -162, -339, -313, 33, 4684, 2811, -2717, -3684,
- 695, 4567, -745, -2311, -776, -2600, -827, -1040, -997, 2480,
- -1549, -748, -622, -260, 1460, 1116, -302, -2529, 2156, -42,
- -1318, -568, -266, -446, -2212, 2690, -4669, 5325, -2022, 1358,
- -1312, 2293, 1528, 706, 970, -291, 383, -683, -1532, -1843,
- -1379, 845, 1218, 395, -1884, 14, 676, -1711, 795, 290,
- -742, 386, -435, 411, 1311, 549, -4181, -4922, 1497, 4465,
- -1722, -699, -1958, -4126, -3727, -655, 1553, 1793, 4933, 3055,
- -1260, -618, 535, -2008, 3802, -3784, 2527, -833, 193, -1062,
- -866, 823, 1562, 147, -623, -1808, -1099, 694, -577, 745,
- -2282, -4139, -3171, 76, 25, -1077, 477, 545, 6081, 3244,
- -1332, -785, 98, -1681, -3603, -3937, 524, 4648, 1114, 2547,
- -1145, 407, 2030, 3120, -1739, -513, -518, 1325, -1700, -2860,
- -1427, 520, -1040, -792, -366, -2174, -522, -240, 5660, -3163,
- -1449, -1653, -1507, 581, 1338, -2627, -1863, 1831, 1301, 2106,
- -1252, 974, 199, 68, -69, -869, 864, 2373, -5818, 2873,
- 26, 972, 359, -561, -390, 376, 225, 517, 649, -1767,
- -653, 2167, 882, -698, 214, -4084, -4134, 2092, 2798, -523,
- -1002, 486, 648, -1082, 404, -1490, 1560, -4984, 5614, -1441,
- -1024, -311, 427, 356, -2342, 215, -2312, 445, -2378, 5111,
- -568, 85, 1328, 1847, 3506, 1183, -2521, -2070, -794, -1881,
- -485, 1121, 1242, 1301, -4365, -2222, 2602, -387, 1498, -1344,
- -1272, -1365, -2207, -213, -1877, 2858, 849, -915, 333, 2488,
- -2019, -2048, -1461, -1930, -1409, -400, 490, -2222, 1276, 7305,
- -1530, -1741, -2663, 3159, 1162, -1490, 1516, -1498, 1222, 838,
- 1325, 5387, 3888, 1944, -1706, -2890, -1905, -3901, -3207, 206,
- -1411, -959, -292, -396, -1547, -84, -4405, -1073, 5532, 1796,
- 3160, 48, -2339, -5884, -184, -52, 129, 5398, 378, -321
-};
-
-const Word16 AmpCB2_NB_fx[64 * (NUM_ERB_NB - 13)] =
-{//Q13
- -2681, -4389, -4270, -4727, -239, 1938, 1748, 2311, 4300, -3957,
- -1299, 3487, 1595, -377, 295, -1193, -1588, 2112, -1573, -6362,
- -504, 1796, -2521, -68, 1322, 1223, 2263, -503, -3906, 3686,
- -3899, -139, 2086, 48, 349, 547, -6387, 1340, -1467, -1062,
- -193, 1325, -1190, 2394, 1671, -1982, -2597, -390, -1504, 2271,
- -379, -2350, 4071, 70, -955, -883, -1770, -1065, -2443, -1779,
- -1101, -661, 6325, 1871, -2673, 3596, 3773, -681, 3340, -1418,
- 701, -4253, -3931, -1840, -2388, -2677, -3545, -41, 3675, 3843,
- 2198, -1713, -324, 599, 1323, 1827, -4909, -1668, 616, 2608,
- 360, -1769, -5263, -1278, 3490, 1935, 1355, -1298, 952, 1801,
- 449, 251, -1021, -3666, 479, 3497, 1542, -2234, -3414, -4483,
- -5785, 1406, 1207, 2984, 1767, 3262, -799, -3124, 5237, 460,
- 2007, -1525, -2106, -770, 546, 137, 401, -1308, 969, 204,
- -1626, -589, -4257, 1744, 2836, 2383, 2740, -423, 3166, 1920,
- -690, -3000, -4489, 2523, -6693, -5135, -739, -1919, 1228, 2354,
- 3340, 1902, 1069, -3185, -2614, 2764, -212, -2061, -1377, 698,
- 3694, -125, -954, -4132, -404, 4297, 1294, 1765, 2446, -2287,
- -1387, -14, 508, 1149, 9, -437, 519, -420, 450, -751,
- -1632, -1391, -2208, -1955, -1170, 4818, 1112, 1086, -782, 1337,
- 846, -3434, 569, 1721, -776, -2723, 1207, 982, -1432, -887,
- 315, -3031, 3452, 765, -1263, -2146, 2959, -2619, 1507, 1312,
- 4087, 3125, 1637, -1402, -45, -3193, 1397, -2611, -3641, -2478,
- -1706, 588, 199, 3721, 1217, -1249, -1196, 7228, 996, 879,
- -1339, 11, -971, -1680, 716, -39, 233, 1945, 1548, -1476,
- 550, -2277, 307, 7413, 2094, -1631, -569, -1351, -198, -483,
- -515, -1347, -212, -2649, -519, 195, 2944, -795, 1470, 654,
- -1448, 3156, 1369, 3966, 3382, -2782, -4255, -1157, -212, 392,
- 861, 5064, 4740, -2513, -3413, -552, -2298, -575, 1130, 1178,
- 1568, 4591, 1238, 367, 1626, 600, -5889, 163, -3742, -3650,
- -3911, 716, 919, -1501, 55, 1807, 3801, -5571, -4635, 1225,
- 3211, 3804, 1491, -906, 100, 404, -1742, -1878, -2140, 1651,
- 1640, 3976, -3432, -1149, 1365, 2042, 392, 768, -1534, 1096,
- 3811, -211, -2067, -1315, -4167, 1145, -2747, -149, 5296, -735,
- 438, 56, -404, -159, -2164, -959, 3492, -690, -688, -1081,
- 2762, -1191, 654, 2051, -2144, -3210, -1823, 743, 686, -751,
- 2483, 160, 1279, 3246, 1874, 2488, 1192, -5977, -478, 120,
- -349, -65, -2350, -222, -1678, -3584, 1114, 3269, 1462, -1114,
- -138, 2360, -2762, 720, -3822, 2523, 216, 1170, 4398, -4229,
- -1850, 1272, 383, 1736, -383, -1295, 85, -132, 1133, 1505,
- 1467, -2389, -2175, 4028, -2752, 241, -4353, -2103, -562, 817,
- 3959, 5471, 1941, -1598, -2349, 201, 1412, -796, 2791, -4226,
- 3227, -1992, -159, -159, 4085, -1549, 1020, -2179, -776, -2088,
- -147, -42, 1880, -1029, 4982, -2056, 111, 1420, 2141, 302,
- -2574, -986, -477, -3697, -2349, -2064, -335, -220, 5857, 57,
- -7, -5407, -546, -353, 2866, 137, -136, 3508, 992, -2059,
- -2034, -1127, -189, -300, -2153, 3606, 2523, -3727, 1526, -3797,
- 2134, 4352, -920, -459, 2722, 1784, -71, -3030, -877, 1967,
- -1645, -4432, 512, 39, 1757, 2875, -947, 1842, 1365, 1500,
- 851, 594, -2892, -404, 3327, -3078, -1575, -1258, -973, -191,
- -390, 45, 627, -227, 1624, -143, 215, 2157, 4846, 5335,
- 3397, -199, -4443, -3091, -283, -216, 1237, -1478, -5639, -775,
- 525, 2107, 2469, 2934, -255, 2438, 824, 5973, -1820, -1330,
- -1202, -2433, 900, 650, -5654, 2891, -1539, -453, 1662, 231,
- -145, 1661, 741, -332, 1221, 1809, 943, 4831, -1588, -4619,
- 65, -790, -985, -893, 3374, 3148, 289, 2947, -4980, -661,
- -427, 1441, 7696, 158, -1914, -2069, -1717, -418, 2657, 4219,
- 1505, -1096, 601, -1466, -1754, -479, -159, 3378, 5252, 5060,
- 4001, 1301, 420, -1268, -2813, -4196
-};
-
-const Word16 PowerCB_WB_fx[128] = /* Q11 */
-{
- -3371, -1712,
- -170, 350,
- -638, -939,
- 56, 1074,
- -1559, -626,
- 200, 344,
- -397, 238,
- 284, 1415,
- -1323, -1880,
- -544, 1170,
- -619, -255,
- 587, 974,
- -1262, -98,
- 327, 151,
- 41, -302,
- 941, 1876,
- -2257, -1233,
- 28, 202,
- -520, -561,
- 338, 1048,
- -1080, -495,
- 190, 582,
- -284, -24,
- 578, 1585,
- -1324, -1089,
- -71, 568,
- -471, -26,
- 1140, 909,
- -856, -128,
- 425, 740,
- 140, 12,
- 1595, 1891,
- -2176, -2310,
- -308, 541,
- -315, -859,
- -80, 1314,
- -1782, 510,
- 403, 450,
- -607, 582,
- 145, 1837,
- -920, -1386,
- -225, 872,
- -395, -258,
- 829, 981,
- -945, 345,
- 643, 241,
- -56, -23,
- 1211, 1482,
- -1793, -1459,
- 40, 400,
- -239, -471,
- 532, 1238,
- -774, -516,
- 244, 831,
- -157, 152,
- 576, 2287,
- -928, -844,
- 41, 759,
- -161, -198,
- 873, 1353,
- -640, 105,
- 695, 623,
- 364, -184,
- 1238, 2446
-};
-
-const Word16 PowerCB_NB_fx[128] = /* Q11 */
-{
- -3349, -2784,
- -784, 385,
- -891, -562,
- 126, 915,
- -1518, -1438,
- 304, 53,
- -314, -447,
- 687, 1219,
- -2585, -1807,
- -65, 153,
- -1219, -337,
- 497, 700,
- -894, -1051,
- 161, 451,
- -46, -516,
- 987, 1519,
- -2277, -2303,
- -354, 445,
- -532, -540,
- 5, 1271,
- -1047, -1433,
- 672, -225,
- -335, -75,
- 1007, 1056,
- -1362, -1879,
- -93, 367,
- -468, -259,
- 1800, -290,
- -1118, -793,
- 412, 472,
- -9, -197,
- 1471, 1634,
- -2627, -2847,
- -269, 164,
- -689, -373,
- 432, 940,
- -1601, -839,
- 311, 271,
- -212, -251,
- 543, 1714,
- -2014, -1336,
- 109, 241,
- -789, -110,
- 729, 888,
- -418, -1277,
- 256, 674,
- 218, -217,
- 1027, 2065,
- -1769, -2293,
- -276, 853,
- -360, -764,
- 376, 1247,
- -1274, -1122,
- 602, 272,
- -133, -32,
- 1374, 1118,
- -1860, -1795,
- -23, 620,
- -525, 60,
- 1070, 548,
- -691, -799,
- 701, 572,
- 81, 18,
- 1949, 2120
-};
-
-
-const Word16 sinc_fx[8][12] = /* sinc for warp/extrapolate, in Q14 */
-{
- {0,0,0,0,0,16384,0,0,0,0,0,0,},
- {-388,484,-638,939,-1773,15966,2281,-1063,694,-514,409,-339,},
- {-701,868,-1134,1639,-2949,14751,4917,-2106,1341,-982,776,-640,},
- {-895,1101,-1427,2029,-3503,12849,7709,-2964,1835,-1328,1042,-856,},
- {-947,1159,-1489,2086,-3476,10430,10430,-3476,2086,-1489,1159,-947,},
- {-856,1042,-1328,1835,-2964,7709,12849,-3503,2029,-1427,1101,-895,},
- {-640,776,-982,1341,-2106,4917,14751,-2949,1639,-1134,868,-701,},
- {-339,409,-514,694,-1063,2281,15966,-1773,939,-638,484,-388,},
-};
-/*----------------------------------------------------------------------------------*
- * Highrate SWB BWE tables
- *----------------------------------------------------------------------------------*/
-const Word16 overlap_coefs_48kHz_fx[NSV_OVERLAP*WIDTH_BAND] = /* in Q15 */
-{
- 9830, 11141, 11796, 12780, 13763, 14418, 15073, 15565, 16056, 16712, 17695, 18678, 20316, 23593, 27197, 31130
-};
-
-const Word16 overlap_coefs_fx[NSV_OVERLAP*WIDTH_BAND] = /* in Q15 */
-{
- 8847, 10027, 10617, 11502, 12386, 12976, 13566, 14008, 14451, 15041, 15925, 16810, 18285, 21234, 24478, 28017
-};
-
-
-const Word16 swb_hr_env_code1_fx[NUM_ENVLOPE_CODE_HR1 * 2] = /* in Q9 */
-{
- 23, 21, 268, 240, 344, 310, 504, 438,
- 629, 580, 856, 734, 1305, 1209, 1637, 1693,
- 1321, 2671, 2154, 3709, 1801, 890, 2243, 1410,
- 2436, 2404, 3496, 3127, 2279, 5187, 3715, 6394,
- 3435, 1000, 3381, 1894, 5434, 1299, 4806, 2171,
- 3645, 4240, 4640, 3628, 4567, 4999, 5785, 6023,
- 6032, 3010, 7194, 4949, 5735, 4609, 7391, 6777,
- 7341, 1999, 10276, 2220, 9270, 4210, 11444, 4917,
- 3708, 8481, 6030, 9814, 5694, 7913, 7457, 8888,
- 9124, 6090, 8943, 7832, 10925, 6889, 10519, 8768,
- 4637, 11437, 5754, 14762, 6791, 12873, 8317, 14468,
- 7818, 11028, 8696, 12646, 10031, 11617, 10315, 13255,
- 9112, 9960, 10901, 10336, 12338, 9772, 12090, 11543,
- 12125, 8360, 13766, 9934, 13317, 8004, 14817, 8315,
- 12848, 6332, 14189, 6791, 14505, 5289, 15684, 6580,
- 12940, 3143, 14948, 3698, 16472, 2570, 16373, 4851
-};
-
-const Word16 swb_hr_env_code2_fx[NUM_ENVLOPE_CODE_HR2 * 2] = /* in Q9 */
-{
- 262, 242, 686, 568, 1303, 901, 1600, 1559,
- 2505, 1905, 2053, 2944, 2617, 1108, 3414, 1993,
- 4329, 1409, 5695, 1801, 3391, 3052, 4384, 2562,
- 4567, 3985, 5509, 3051, 6374, 4280, 7003, 5750,
- 7000, 2794, 8434, 2006, 10706, 3294, 13034, 4412,
- 8402, 3878, 9510, 5269, 11309, 6406, 10839, 8811,
- 2701, 4927, 4656, 5773, 6116, 7956, 8474, 7704,
- 3255, 8984, 6818, 11144, 3915, 13367, 1255, 16350
-};
-
-const Word16 swb_hr_env_code3_fx[NUM_ENVLOPE_CODE_HR_TR*N_BANDS_TRANS_BWE_HR] = /* in Q9 */
-{
- 409, 347, 898, 622, 1457, 1033, 2242, 1012,
- 3039, 1508, 2017, 2161, 4137, 1348, 3881, 2553,
- 2538, 5306, 3962, 4430, 4730, 3610, 5225, 2877,
- 5450, 2240, 5970, 1779, 5553, 1364, 6003, 838
-};
-const Word32 thren_HQ_fx[39] =
-{//Q14
- 1805811328,
- 1276901376,
- 902905664,
- 638450688,
- 451452832,
- 319225344,
- 225726416,
- 159612672,
- 112863208,
- 79806336,
- 56431604,
- 39903168,
- 28215802,
- 19951584,
- 14107901,
- 9975792,
- 7053950,
- 4987896,
- 3526975,
- 2493948,
- 1763487,
- 1246974,
- 881743,
- 623487,
- 440871,
- 311743,
- 220435,
- 155871,
- 110217,
- 77935,
- 55108,
- 38967,
- 27554,
- 19483,
- 13777,
- 9741,
- 6888,
- 4870,
- 3444,
-};
-
-/*----------------------------------------------------------------------------------*
- * ACELP/HQ core switching
- *----------------------------------------------------------------------------------*/
-
-/* short filters for BWE of ACELP->HQ switching frame */
-const Word16 hp12800_16000_fx[21] =
-{//Q15
- -0, 70, -207, 380, -405, 0, 1041, -2668, 4505,
- -5968, 6526, -5968, 4505, -2668, 1041, 0, -405, 380,
- -207, 70, -0
-};
-
-const Word16 hp12800_32000_fx[41] =
-{//Q15
- -0, 45, 35, -47, -104, 0, 191, 156,
- -203, -422, -0, 675, 523, -656, -1341, 0,
- 2264, 1943, -2999, -9872, 19678, -9872, -2999, 1943,
- 2264, 0, -1341, -656, 523, 675, -0, -422,
- -203, 156, 191, 0, -104, -47, 35, 45, -0
-};
-
-const Word16 hp12800_48000_fx[61] =//Q15
-{
- -0, 22, 33, 23, -10, -51, -69, -37, 45, 127,
- 140, 40, -136, -271, -238, 0, 326, 507, 349, -143,
- -696, -894, -450, 535, 1509, 1696, 521, -1998, -5136, -7735,
- 24039, -7735, -5136, -1998, 521, 1696, 1509, 535, -450, -894,
- -696, -143, 349, 507, 326, 0, -238, -271, -136, 40,
- 140, 127, 45, -37, -69, -51, -10, 23, 33, 22, -0,
-};
-
-const Word16 hp16000_32000_fx[33] =//Q15
-{
- -0, 62, -0, -127, -0, 270, -0, -523, -0, 940,
- -0, -1662, -0, 3212, -0, -10353, 16407, -10353, -0, 3212,
- -0, -1662, -0, 940, -0, -523, -0, 270, -0, -127,
- -0, 62, -0
-};
-
-const Word16 hp16000_48000_fx[49] =//Q15
-{
- -0, 33, 39, -0, -64, -83, -0, 138, 175, 0,
- -272, -334, -0, 493, 596, 0, -870, -1059, -0, 1636,
- 2120, 0, -4448, -9003, 21858, -9003, -4448, 0, 2120, 1636,
- -0, -1059, -870, 0, 596, 493, -0, -334, -272, 0,
- 175, 138, -0, -83, -64, -0, 39, 33, -0
-};
-
-const Word16 ct2[7][13] =
-{
- /* accepted configurations */
- /*input 12.8, output :*/
- /*8*/ {30, 22, 30, 16, 25, 30, 19, 30, 30, 0, 8, 4, 15},
- /*16*/ {25, 22, 19, 16, 16, 0, 0, 0, 12, 1, 4, 4, 15},
- /*32*/ {19, 16, 19, 16, 16, 0, 0, 0, 6, 2, 2, 4, 15},
- /*48*/ {17, 14, 15, 16, 16, 0, 0, 0, 4, 3, 4, 4, 15},
-
- /*input 16, output :*/
- /*12*/ { 9, 3, 4, 5, 9, 0, 0, 0, 5, 0, 5, 5, 4},
- /*32*/ { 4, 4, 4, 4, 4, 0, 0, 0, 2, 1, 1, 4, 4},
- /*48*/ {18, 18, 18, 18, 18, 0, 0, 0, 5, 2, 1, 4, 15},
-}; // Q0
-const Word16 ct2_fx[7][14] =
-{
- /* accepted configurations */
- /*input 12.8, output : fout/fin Q13*/
- /*8*/ {30, 22, 30, 16, 25, 30, 19, 30, 30, 0, 8, 4, 15, 5120},
- /*16*/ {25, 22, 19, 16, 16, 0, 0, 0, 12, 1, 4, 4, 15, 10240},
- /*32*/ {19, 16, 19, 16, 16, 0, 0, 0, 6, 2, 2, 4, 15, 20480},
- /*48*/ {17, 14, 15, 16, 16, 0, 0, 0, 4, 3, 4, 4, 15, 30720},
-
- /*input 16, output :*/
- /*12*/ { 9, 3, 4, 5, 9, 0, 0, 0, 5, 0, 5, 5, 4, 6554},
- /*32*/ { 4, 4, 4, 4, 4, 0, 0, 0, 2, 1, 1, 4, 4, 16384},
- /*48*/ {18, 18, 18, 18, 18, 0, 0, 0, 5, 2, 1, 4, 15, 24576},
-};
-
-const Word16 cu15_fx[28][3] = /*Q13*/
-{
- /* xx/3, xx*xx/3, xx*xx*xx/3 xx v */
- /* 0:*/ { 182, 12, 1 }, /* 1/15 */
- /* 1:*/ { 364, 49, 6 }, /* 2/15 */
- /* 2:*/ { 546, 109, 22 }, /* 3/15 */
- /* 3:*/ { 728, 194, 52 }, /* 4/15 */
- /* 4:*/ { 910, 303, 101 }, /* 5/15 */
- /* 5:*/ { 1092, 437, 175 }, /* 6/15 */
- /* 6:*/ { 1274, 595, 278 }, /* 7/15 */
- /* 7:*/ { 1456, 777, 414 }, /* 8/15 */
- /* 8:*/ { 1638, 983, 590 }, /* 9/15 */
- /* 9:*/ { 1820, 1214, 809 }, /* 10/15 */
- /*10:*/ { 2002, 1468, 1077 }, /* 11/15 */
- /*11:*/ { 2185, 1748, 1398 }, /* 12/15 */
- /*12:*/ { 2367, 2051, 1778 }, /* 13/15 */
- /*13:*/ { 2549, 2379, 2220 }, /* 14/15 */
- /*14:*/ { 2913, 3107, 3314 }, /* 16/15 */
- /*15:*/ { 3095, 3507, 3975 }, /* 17/15 */
- /*16:*/ { 3277, 3932, 4719 }, /* 18/15 */
- /*17:*/ { 3459, 4381, 5550 }, /* 19/15 */
- /*18:*/ { 3641, 4855, 6473 }, /* 20/15 */
- /*19:*/ { 3823, 5352, 7493 }, /* 21/15 */
- /*20:*/ { 4005, 5874, 8615 }, /* 22/15 */
- /*21:*/ { 4187, 6420, 9844 }, /* 23/15 */
- /*22:*/ { 4369, 6991, 11185 }, /* 24/15 */
- /*23:*/ { 4551, 7585, 12642 }, /* 25/15 */
- /*24:*/ { 4733, 8204, 14221 }, /* 26/15 */
- /*25:*/ { 4915, 8847, 15925 }, /* 27/15 */
- /*26:*/ { 5097, 9515, 17761 }, /* 28/15 */
- /*27:*/ { 5279, 10207, 19733 }, /* 29/15 */
-};
-
-const Word16 cu4_fx[6][3] = /*Q13*/
-{
- /* xx/3, xx*xx/3, xx*xx*xx/3 xx v */
- /* 0:*/ { 683, 171, 43 }, /* 1/4 */
- /* 1:*/ { 1365, 683, 341 }, /* 2/4 */
- /* 2:*/ { 2048, 1536, 1152 }, /* 3/4 */
- /* 3:*/ { 3413, 4267, 5333 }, /* 5/4 */
- /* 4:*/ { 4096, 6144, 9216 }, /* 6/4 */
- /* 5:*/ { 4779, 8363, 14635 }, /* 7/4 */
-};
-
-
-/*----------------------------------------------------------------------------------*
- * hp filter for filtering random part of excitation in frame error concealment
- * Used in lib_dec\syn_bfi.c
- *----------------------------------------------------------------------------------*/
-
-const Word16 h_high_fx[5] = { -410, -3572, 25602, -3572, -410 };//Q15
-
-const Word16 sincos_t_rad3_fx[T_SIN_PI_2 + 1] =
-{//Q15
- 0, 134, 268, 402, 536, 670, 804, 938,
- 1072, 1206, 1340, 1474, 1608, 1742, 1876, 2009,
- 2143, 2277, 2411, 2544, 2678, 2811, 2945, 3078,
- 3212, 3345, 3479, 3612, 3745, 3878, 4011, 4144,
- 4277, 4410, 4543, 4675, 4808, 4941, 5073, 5205,
- 5338, 5470, 5602, 5734, 5866, 5998, 6130, 6261,
- 6393, 6524, 6655, 6787, 6918, 7049, 7180, 7310,
- 7441, 7571, 7702, 7832, 7962, 8092, 8222, 8351,
- 8481, 8610, 8740, 8869, 8998, 9127, 9255, 9384,
- 9512, 9640, 9768, 9896, 10024, 10151, 10279, 10406,
- 10533, 10660, 10786, 10913, 11039, 11165, 11291, 11417,
- 11543, 11668, 11793, 11918, 12043, 12167, 12292, 12416,
- 12540, 12664, 12787, 12910, 13033, 13156, 13279, 13401,
- 13524, 13646, 13767, 13889, 14010, 14131, 14252, 14373,
- 14493, 14613, 14733, 14852, 14972, 15091, 15210, 15328,
- 15447, 15565, 15683, 15800, 15917, 16035, 16151, 16268,
- 16384, 16500, 16616, 16731, 16846, 16961, 17075, 17190,
- 17304, 17417, 17531, 17644, 17757, 17869, 17981, 18093,
- 18205, 18316, 18427, 18538, 18648, 18758, 18868, 18978,
- 19087, 19195, 19304, 19412, 19520, 19627, 19735, 19841,
- 19948, 20054, 20160, 20265, 20371, 20475, 20580, 20684,
- 20788, 20891, 20994, 21097, 21199, 21301, 21403, 21504,
- 21605, 21706, 21806, 21906, 22006, 22105, 22204, 22302,
- 22400, 22498, 22595, 22692, 22788, 22884, 22980, 23076,
- 23170, 23265, 23359, 23453, 23546, 23640, 23732, 23824,
- 23916, 24008, 24099, 24189, 24279, 24369, 24459, 24548,
- 24636, 24724, 24812, 24900, 24986, 25073, 25159, 25245,
- 25330, 25415, 25499, 25583, 25667, 25750, 25833, 25915,
- 25997, 26078, 26159, 26239, 26320, 26399, 26478, 26557,
- 26635, 26713, 26791, 26868, 26944, 27020, 27096, 27171,
- 27246, 27320, 27394, 27467, 27540, 27612, 27684, 27756,
- 27827, 27897, 27967, 28037, 28106, 28175, 28243, 28311,
- 28378, 28445, 28511, 28577, 28642, 28707, 28771, 28835,
- 28899, 28962, 29024, 29086, 29148, 29209, 29269, 29329,
- 29389, 29448, 29506, 29564, 29622, 29679, 29736, 29792,
- 29847, 29902, 29957, 30011, 30064, 30118, 30170, 30222,
- 30274, 30325, 30375, 30425, 30475, 30524, 30572, 30620,
- 30668, 30715, 30761, 30807, 30853, 30897, 30942, 30986,
- 31029, 31072, 31114, 31156, 31197, 31238, 31278, 31318,
- 31357, 31396, 31434, 31471, 31508, 31545, 31581, 31617,
- 31651, 31686, 31720, 31753, 31786, 31818, 31850, 31881,
- 31912, 31942, 31972, 32001, 32029, 32058, 32085, 32112,
- 32138, 32164, 32190, 32214, 32239, 32262, 32286, 32308,
- 32330, 32352, 32373, 32393, 32413, 32433, 32452, 32470,
- 32488, 32505, 32522, 32538, 32553, 32568, 32583, 32597,
- 32610, 32623, 32635, 32647, 32658, 32669, 32679, 32689,
- 32698, 32706, 32714, 32722, 32729, 32735, 32741, 32746,
- 32750, 32755, 32758, 32761, 32764, 32766, 32767, 32767,
- 32767
-};
-
-/*----------------------------------------------------------------------------------*
- * TCX
- *----------------------------------------------------------------------------------*/
-
-const Word16 gain_corr_fac[3] = { 0x4155, 0x40A9, 0x4055 }; /* pow(10, 2^(-n-2)/28) (1Q14) */
-const Word16 gain_corr_inv_fac[3] = { 0x7D67, 0x7EB2, 0x7F59 }; /* pow(10,-2^(-n-2)/28) (0Q15) */
-
-const Word16 inter4_2tcx2[4][4] =
-{
- { 7620/*0.2325402f Q15*/, 17528/*0.5349195f Q15*/, 7620/*0.2325402f Q15*/, 0/*0.0000000f Q15*/ },
- { 4434/*0.1353017f Q15*/, 16694/*0.5094465f Q15*/, 11141/*0.3400065f Q15*/, 500/*0.0152453f Q15*/ },
- { 1995/*0.0608774f Q15*/, 14389/*0.4391226f Q15*/, 14389/*0.4391226f Q15*/, 1995/*0.0608774f Q15*/ },
- { 500/*0.0152453f Q15*/, 11141/*0.3400065f Q15*/, 16694/*0.5094465f Q15*/, 4434/*0.1353017f Q15*/ }
-};
-const Word16 inter6_2tcx2[6][4] =
-{
- { 7345/*0.2241379f Q15*/, 18079/*0.5517241f Q15*/, 7345/*0.2241379f Q15*/, 0/*0.0000000f Q15*/ },
- { 5119/*0.1562044f Q15*/, 17657/*0.5388595f Q15*/, 9798/*0.2990011f Q15*/, 194/*0.0059349f Q15*/ },
- { 3249/*0.0991379f Q15*/, 16444/*0.5018346f Q15*/, 12288/*0.3750000f Q15*/, 787/*0.0240275f Q15*/ },
- { 1800/*0.0549361f Q15*/, 14584/*0.4450639f Q15*/, 14584/*0.4450639f Q15*/, 1800/*0.0549361f Q15*/ },
- { 787/*0.0240275f Q15*/, 12288/*0.3750000f Q15*/, 16444/*0.5018346f Q15*/, 3249/*0.0991379f Q15*/ },
- { 194/*0.0059349f Q15*/, 9798/*0.2990011f Q15*/, 17657/*0.5388595f Q15*/, 5119/*0.1562044f Q15*/ }
-};
-
-const Word16 inter_core_12_8kHz_output_8kHz[] =
-{
- 17528/*0.5349196f Q15*/, 16694/*0.5094466f Q15*/, 14389/*0.4391227f Q15*/, 11141/*0.3400065f Q15*/,
- 7620/*0.2325402f Q15*/, 4434/*0.1353016f Q15*/, 1995/*0.0608773f Q15*/, 500/*0.0152453f Q15*/,
- 0/*0.0000000f Q15*/
-};
-const Word16 inter_core_12_8kHz_output_16kHz[] =
-{
- 14023/*0.4279357f Q15*/, 13592/*0.4147958f Q15*/, 12367/*0.3774199f Q15*/, 10533/*0.3214508f Q15*/,
- 8350/*0.2548195f Q15*/, 6096/*0.1860321f Q15*/, 4017/*0.1225801f Q15*/, 2291/*0.0699165f Q15*/,
- 1023/*0.0312127f Q15*/, 256/*0.0078047f Q15*/, 0/*0.0000000f Q15*/, 0/*0.0000000f Q15*/,
- 0/*0.0000000f Q15*/
-};
-const Word16 inter_core_12_8kHz_output_32kHz[] =
-{
- 7011/*0.2139679f Q15*/, 6957/*0.2123089f Q15*/, 6796/*0.2073979f Q15*/, 6535/*0.1994284f Q15*/,
- 6184/*0.1887100f Q15*/, 5756/*0.1756491f Q15*/, 5267/*0.1607254f Q15*/, 4734/*0.1444646f Q15*/,
- 4175/*0.1274097f Q15*/, 3608/*0.1100939f Q15*/, 3048/*0.0930161f Q15*/, 2511/*0.0766219f Q15*/,
- 2008/*0.0612900f Q15*/, 1551/*0.0473253f Q15*/, 1146/*0.0349583f Q15*/, 798/*0.0243509f Q15*/,
- 511/*0.0156063f Q15*/, 288/*0.0087817f Q15*/, 128/*0.0039024f Q15*/, 32/*0.0009753f Q15*/,
- 0/*0.0000000f Q15*/
-};
-const Word16 inter_core_12_8kHz_output_48kHz[] =
-{
- 4674/*0.1426452f Q15*/, 4658/*0.1421528f Q15*/, 4610/*0.1406841f Q15*/, 4531/*0.1382653f Q15*/,
- 4422/*0.1349386f Q15*/, 4285/*0.1307618f Q15*/, 4122/*0.1258066f Q15*/, 3937/*0.1201564f Q15*/,
- 3732/*0.1139041f Q15*/, 3511/*0.1071503f Q15*/, 3277/*0.1000000f Q15*/, 3033/*0.0925607f Q15*/,
- 2783/*0.0849398f Q15*/, 2531/*0.0772420f Q15*/, 2280/*0.0695677f Q15*/, 2032/*0.0620107f Q15*/,
- 1791/*0.0546572f Q15*/, 1559/*0.0475844f Q15*/, 1339/*0.0408600f Q15*/, 1132/*0.0345417f Q15*/,
- 940/*0.0286774f Q15*/, 764/*0.0233055f Q15*/, 605/*0.0184558f Q15*/, 464/*0.0141503f Q15*/,
- 341/*0.0104042f Q15*/, 237/*0.0072274f Q15*/, 152/*0.0046257f Q15*/, 85/*0.0026016f Q15*/,
- 38/*0.0011560f Q15*/, 9/*0.0002890f Q15*/, 0/*0.0000000f Q15*/, 0/*0.0000000f Q15*/,
- 0/*0.0000000f Q15*/
-};
-const Word16 inter_core_16kHz_output_8kHz[] =
-{
- 18079/*0.5517241f Q15*/, 17657/*0.5388595f Q15*/, 16444/*0.5018346f Q15*/, 14584/*0.4450639f Q15*/, 12288/*0.3750000f Q15*/, 9798/*0.2990011f Q15*/,
- 7345/*0.2241379f Q15*/, 5119/*0.1562044f Q15*/, 3249/*0.0991379f Q15*/, 1800/*0.0549361f Q15*/, 787/*0.0240275f Q15*/, 194/*0.0059349f Q15*/,
- 0/*0.0000000f Q15*/
-};
-const Word16 inter_core_16kHz_output_16kHz[] =
-{
- 18079/*0.5517241f Q15*/, 17657/*0.5388595f Q15*/, 16444/*0.5018346f Q15*/, 14584/*0.4450639f Q15*/, 12288/*0.3750000f Q15*/, 9798/*0.2990011f Q15*/,
- 7345/*0.2241379f Q15*/, 5119/*0.1562044f Q15*/, 3249/*0.0991379f Q15*/, 1800/*0.0549361f Q15*/, 787/*0.0240275f Q15*/, 194/*0.0059349f Q15*/,
- 0/*0.0000000f Q15*/
-};
-const Word16 inter_core_16kHz_output_32kHz[] =
-{
- 9039/*0.2758621f Q15*/, 8986/*0.2742414f Q15*/, 8829/*0.2694298f Q15*/, 8571/*0.2615753f Q15*/, 8222/*0.2509173f Q15*/, 7791/*0.2377748f Q15*/,
- 7292/*0.2225320f Q15*/, 6738/*0.2056203f Q15*/, 6144/*0.1875000f Q15*/, 5526/*0.1686403f Q15*/, 4899/*0.1495006f Q15*/, 4277/*0.1305132f Q15*/,
- 3672/*0.1120690f Q15*/, 3097/*0.0945060f Q15*/, 2559/*0.0781022f Q15*/, 2067/*0.0630725f Q15*/, 1624/*0.0495690f Q15*/, 1235/*0.0376861f Q15*/,
- 900/*0.0274680f Q15*/, 620/*0.0189188f Q15*/, 394/*0.0120137f Q15*/, 220/*0.0067120f Q15*/, 97/*0.0029675f Q15*/, 24/*0.0007394f Q15*/,
- 0/*0.0000000f Q15*/
-};
-const Word16 inter_core_16kHz_output_48kHz[] =
-{
- 6026/*0.1839080f Q15*/, 6011/*0.1834272f Q15*/, 5963/*0.1819912f Q15*/, 5886/*0.1796198f Q15*/, 5778/*0.1763457f Q15*/, 5643/*0.1722133f Q15*/,
- 5481/*0.1672782f Q15*/, 5296/*0.1616061f Q15*/, 5088/*0.1552712f Q15*/, 4861/*0.1483546f Q15*/, 4618/*0.1409433f Q15*/, 4362/*0.1331275f Q15*/,
- 4096/*0.1250000f Q15*/, 3823/*0.1166535f Q15*/, 3545/*0.1081796f Q15*/, 3266/*0.0996670f Q15*/, 2988/*0.0912002f Q15*/, 2715/*0.0828579f Q15*/,
- 2448/*0.0747126f Q15*/, 2190/*0.0668293f Q15*/, 1942/*0.0592649f Q15*/, 1706/*0.0520681f Q15*/, 1484/*0.0452794f Q15*/, 1276/*0.0389306f Q15*/,
- 1083/*0.0330460f Q15*/, 906/*0.0276422f Q15*/, 745/*0.0227295f Q15*/, 600/*0.0183120f Q15*/, 472/*0.0143894f Q15*/, 359/*0.0109575f Q15*/,
- 262/*0.0080092f Q15*/, 181/*0.0055360f Q15*/, 116/*0.0035286f Q15*/, 65/*0.0019783f Q15*/, 29/*0.0008771f Q15*/, 7/*0.0002189f Q15*/,
- 0/*0.0000000f Q15*/
-};
-const Word16 inter_core_25_6kHz_output_8kHz[] =
-{
- 17528/*0.5349196f Q15*/, 16694/*0.5094466f Q15*/, 14389/*0.4391227f Q15*/, 11141/*0.3400065f Q15*/,
- 7620/*0.2325402f Q15*/, 4434/*0.1353016f Q15*/, 1995/*0.0608773f Q15*/, 500/*0.0152453f Q15*/,
- 0/*0.0000000f Q15*/
-};
-const Word16 inter_core_25_6kHz_output_16kHz[] =
-{
- 17528/*0.5349196f Q15*/, 16694/*0.5094466f Q15*/, 14389/*0.4391227f Q15*/, 11141/*0.3400065f Q15*/,
- 7620/*0.2325402f Q15*/, 4434/*0.1353016f Q15*/, 1995/*0.0608773f Q15*/, 500/*0.0152453f Q15*/,
- 0/*0.0000000f Q15*/
-};
-const Word16 inter_core_25_6kHz_output_32kHz[] =
-{
- 14023/*0.4279357f Q15*/, 13592/*0.4147958f Q15*/, 12367/*0.3774199f Q15*/, 10533/*0.3214508f Q15*/,
- 8350/*0.2548195f Q15*/, 6096/*0.1860321f Q15*/, 4017/*0.1225801f Q15*/, 2291/*0.0699165f Q15*/,
- 1023/*0.0312127f Q15*/, 256/*0.0078047f Q15*/, 0/*0.0000000f Q15*/, 0/*0.0000000f Q15*/,
- 0/*0.0000000f Q15*/
-};
-const Word16 inter_core_25_6kHz_output_48kHz[] =
-{
- 9349/*0.2852965f Q15*/, 9220/*0.2813740f Q15*/, 8843/*0.2698819f Q15*/, 8245/*0.2516166f Q15*/,
- 7465/*0.2278099f Q15*/, 6554/*0.2000000f Q15*/, 5567/*0.1698781f Q15*/, 4559/*0.1391327f Q15*/,
- 3582/*0.1093111f Q15*/, 2678/*0.0817166f Q15*/, 1879/*0.0573517f Q15*/, 1209/*0.0369093f Q15*/,
- 682/*0.0208069f Q15*/, 303/*0.0092505f Q15*/, 76/*0.0023118f Q15*/, 0/*0.0000000f Q15*/,
- 0/*0.0000000f Q15*/
-};
-
-const TCX_LTP_FILTER tcxLtpFilters[12] =
-{
- { inter_core_12_8kHz_output_8kHz, 2 },
- { inter_core_12_8kHz_output_16kHz, 3 },
- { inter_core_12_8kHz_output_32kHz, 5 },
- { inter_core_12_8kHz_output_48kHz, 8 },
- { inter_core_16kHz_output_8kHz, 2 },
- { inter_core_16kHz_output_16kHz, 2 },
- { inter_core_16kHz_output_32kHz, 4 },
- { inter_core_16kHz_output_48kHz, 6 },
- { inter_core_25_6kHz_output_8kHz, 2 },
- { inter_core_25_6kHz_output_16kHz, 2 },
- { inter_core_25_6kHz_output_32kHz, 3 },
- { inter_core_25_6kHz_output_48kHz, 4 },
-};
-
-
-
-const SCALE_TCX_SETUP scaleTcxTable[SIZE_SCALE_TABLE_TCX] =
-{
- { 0, 0, 8000, /* 0.67f ,*/ 21955/*0.67f Q15*/ },
- { 0, 8000, 9600, /* 0.70f ,*/ 22938/*0.70f Q15*/ },
- { 0, 9600, 13200, /* 0.76f ,*/ 24904/*0.76f Q15*/ },
- { 0, 13200, 16400, /* 0.86f ,*/ 28180/*0.86f Q15*/ },
- { 0, 16400, 24400, /* 0.90f ,*/ 29491/*0.90f Q15*/ },
- { 0, 24400, 64000, /* 0.96f ,*/ 31457/*0.96f Q15*/ },
- { 1, 0, 8000, /* 1.f ,*/ 32767/*1.f Q15*/ },
- { 1, 8000, 9600, /* 1.f ,*/ 32767/*1.f Q15*/ },
- { 1, 9600, 13200, /* 1.f ,*/ 32767/*1.f Q15*/ },
- { 1, 13200, 16400, /* 0.85f ,*/ 27853/*0.85f Q15*/ },
- { 1, 16400, 24400, /* 0.88f ,*/ 28836/*0.88f Q15*/ },
- { 1, 24400, 32000, /* 0.90f ,*/ 29491/*0.90f Q15*/ },
- { 1, 32000, 32400, /* 0.95f ,*/ 31130/*0.95f Q15*/ },
-};
-
-
-/*----------------------------------------------------------------------------------*
- * Arithmetic coder
- *----------------------------------------------------------------------------------*/
-
-const UWord8 ari_lookup_s17_LC[4096] = // Q0
-{
- 0x01,0x04,0x29,0x13,0x0A,0x0D,0x05,0x10,
- 0x10,0x0D,0x00,0x0D,0x2A,0x2A,0x22,0x25,
- 0x25,0x28,0x2B,0x2E,0x31,0x34,0x34,0x0E,
- 0x21,0x21,0x21,0x36,0x38,0x38,0x36,0x10,
- 0x10,0x08,0x09,0x0B,0x0C,0x0E,0x0E,0x21,
- 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x10,
- 0x10,0x1A,0x09,0x1D,0x0C,0x20,0x20,0x21,
- 0x36,0x36,0x36,0x36,0x36,0x0A,0x36,0x16,
- 0x1A,0x1A,0x2D,0x0C,0x20,0x20,0x21,0x21,
- 0x21,0x36,0x38,0x38,0x38,0x38,0x36,0x16,
- 0x16,0x1A,0x3F,0x1F,0x20,0x21,0x24,0x06,
- 0x36,0x36,0x36,0x38,0x00,0x0A,0x36,0x22,
- 0x3E,0x3E,0x3F,0x30,0x20,0x21,0x06,0x06,
- 0x06,0x38,0x36,0x36,0x36,0x26,0x36,0x1C,
- 0x1C,0x3E,0x3F,0x02,0x20,0x21,0x06,0x36,
- 0x36,0x38,0x0A,0x0A,0x0A,0x0A,0x05,0x16,
- 0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
- 0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
- 0x16,0x3F,0x3F,0x0E,0x35,0x14,0x38,0x38,
- 0x05,0x05,0x05,0x0D,0x13,0x13,0x1C,0x16,
- 0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
- 0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
- 0x3F,0x3F,0x3F,0x20,0x35,0x14,0x27,0x38,
- 0x38,0x0A,0x2A,0x2A,0x2A,0x16,0x05,0x10,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x3F,0x02,0x0E,0x02,0x14,0x13,0x0A,
- 0x0D,0x0D,0x0D,0x13,0x00,0x00,0x16,0x19,
- 0x19,0x3F,0x3F,0x02,0x02,0x14,0x38,0x36,
- 0x0A,0x0A,0x0A,0x0D,0x0D,0x0D,0x1C,0x22,
- 0x22,0x3F,0x3F,0x02,0x17,0x26,0x26,0x1C,
- 0x1C,0x10,0x16,0x16,0x16,0x19,0x22,0x25,
- 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
- 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
- 0x39,0x39,0x15,0x2C,0x2E,0x2E,0x2E,0x31,
- 0x31,0x31,0x31,0x31,0x31,0x31,0x34,0x39,
- 0x39,0x39,0x15,0x2C,0x2E,0x2E,0x0C,0x34,
- 0x34,0x34,0x36,0x36,0x36,0x36,0x36,0x36,
- 0x36,0x39,0x15,0x3C,0x2E,0x31,0x34,0x34,
- 0x31,0x31,0x31,0x1F,0x1E,0x1E,0x1E,0x1E,
- 0x1E,0x39,0x28,0x2C,0x2E,0x31,0x37,0x34,
- 0x01,0x01,0x01,0x01,0x01,0x00,0x39,0x39,
- 0x39,0x39,0x39,0x2C,0x2E,0x31,0x1E,0x34,
- 0x34,0x35,0x01,0x01,0x01,0x01,0x01,0x01,
- 0x01,0x39,0x39,0x3C,0x2E,0x03,0x07,0x34,
- 0x34,0x0F,0x39,0x39,0x39,0x39,0x39,0x39,
- 0x39,0x39,0x39,0x15,0x2B,0x31,0x1E,0x34,
- 0x34,0x01,0x39,0x39,0x39,0x39,0x39,0x39,
- 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
- 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
- 0x39,0x39,0x39,0x2C,0x39,0x2F,0x2E,0x2E,
- 0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
- 0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
- 0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
- 0x2E,0x39,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
- 0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
- 0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
- 0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
- 0x1E,0x1E,0x1E,0x1E,0x1E,0x0F,0x2E,0x2E,
- 0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
- 0x2E,0x2E,0x39,0x15,0x39,0x39,0x39,0x39,
- 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
- 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
- 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
- 0x19,0x1C,0x16,0x22,0x22,0x25,0x25,0x25,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x3E,0x3E,0x2F,0x3D,0x21,0x36,0x38,0x05,
- 0x0D,0x0D,0x0D,0x10,0x16,0x16,0x16,0x25,
- 0x2D,0x2D,0x37,0x3D,0x33,0x38,0x05,0x0D,
- 0x0D,0x10,0x16,0x16,0x16,0x16,0x16,0x25,
- 0x2F,0x2F,0x30,0x12,0x06,0x05,0x0A,0x0D,
- 0x0D,0x10,0x16,0x16,0x16,0x22,0x22,0x25,
- 0x1F,0x1F,0x32,0x3B,0x29,0x0A,0x0A,0x10,
- 0x16,0x16,0x16,0x16,0x22,0x22,0x22,0x25,
- 0x02,0x02,0x14,0x29,0x05,0x0D,0x2A,0x10,
- 0x16,0x16,0x16,0x22,0x22,0x22,0x22,0x25,
- 0x35,0x35,0x14,0x29,0x0A,0x2A,0x2A,0x10,
- 0x16,0x16,0x16,0x22,0x22,0x22,0x22,0x25,
- 0x17,0x17,0x26,0x05,0x0D,0x10,0x10,0x16,
- 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x25,
- 0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
- 0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
- 0x26,0x26,0x26,0x1C,0x0D,0x16,0x16,0x16,
- 0x22,0x22,0x22,0x22,0x22,0x22,0x25,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x26,0x1C,0x1C,0x10,0x16,0x16,0x22,
- 0x22,0x22,0x22,0x22,0x22,0x25,0x25,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x1C,0x1C,0x1C,0x16,0x16,0x16,0x22,
- 0x22,0x22,0x22,0x25,0x25,0x25,0x25,0x00,
- 0x00,0x26,0x1C,0x1C,0x16,0x16,0x16,0x22,
- 0x22,0x22,0x22,0x25,0x25,0x25,0x25,0x00,
- 0x16,0x16,0x16,0x16,0x16,0x22,0x22,0x22,
- 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,
- 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
- 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
- 0x15,0x15,0x3C,0x1E,0x0F,0x06,0x27,0x2A,
- 0x2A,0x10,0x16,0x16,0x16,0x16,0x16,0x22,
- 0x2C,0x2C,0x0B,0x37,0x23,0x27,0x13,0x2A,
- 0x10,0x10,0x10,0x16,0x16,0x16,0x16,0x22,
- 0x1B,0x1B,0x1D,0x0F,0x24,0x13,0x13,0x2A,
- 0x00,0x10,0x16,0x16,0x16,0x16,0x16,0x22,
- 0x1F,0x1F,0x03,0x24,0x07,0x0A,0x0A,0x10,
- 0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x22,
- 0x22,0x35,0x06,0x27,0x13,0x2A,0x2A,0x10,
- 0x16,0x16,0x16,0x16,0x16,0x22,0x22,0x22,
- 0x22,0x06,0x27,0x27,0x13,0x2A,0x2A,0x10,
- 0x16,0x16,0x16,0x16,0x16,0x16,0x22,0x22,
- 0x22,0x05,0x0A,0x2A,0x2A,0x10,0x10,0x16,
- 0x16,0x16,0x16,0x16,0x16,0x22,0x22,0x22,
- 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
- 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
- 0x22,0x0D,0x2A,0x10,0x10,0x10,0x10,0x16,
- 0x16,0x16,0x16,0x16,0x16,0x22,0x22,0x25,
- 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
- 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
- 0x10,0x10,0x10,0x10,0x10,0x16,0x16,0x16,
- 0x16,0x16,0x16,0x22,0x22,0x22,0x22,0x25,
- 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
- 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
- 0x10,0x10,0x10,0x10,0x16,0x16,0x16,0x16,
- 0x16,0x22,0x22,0x22,0x22,0x22,0x22,0x25,
- 0x0D,0x0D,0x10,0x10,0x10,0x16,0x16,0x16,
- 0x16,0x22,0x22,0x22,0x22,0x22,0x22,0x25,
- 0x0D,0x0D,0x0D,0x0D,0x0D,0x10,0x10,0x16,
- 0x16,0x16,0x16,0x22,0x22,0x22,0x22,0x25,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x11,0x11,0x3A,0x11,0x11,0x11,0x18,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x3A,0x11,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x18,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x18,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x18,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x11,0x3A,0x3A,0x3A,0x11,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x11,0x18,
- 0x00,0x11,0x3A,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x11,0x11,0x11,0x18,0x18,0x18,0x18,
- 0x18,0x25,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x3A,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x3A,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x18,0x18,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x18,0x18,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x18,0x18,0x18,0x18,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x11,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x11,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x3A,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x3A,0x11,
- 0x11,0x3A,0x3A,0x3A,0x11,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x11,0x11,0x11,0x3A,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x18,0x3A,0x3A,0x11,0x11,0x11,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x11,0x11,0x11,0x3A,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
- 0x18,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x18,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x11,0x11,0x11,0x11,0x11,0x18,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x11,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x2A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
- 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A
-};
-
-const UWord16 ari_pk_s17_LC_ext[64][18] = // Q0
-{
- {
- 16384, 16368,16337,16231,16143,16115,16059,15916,15793,15710,15586,15472,15367,15302,15201,15107,15020,
- 0
- },
- {
- 16384, 8983, 8540, 8498, 8485, 4319, 3666, 3594, 3579, 2285, 1908, 1851, 1835, 1326, 1120, 1085, 1074,
- 0
- },
- {
- 16384, 12022,10039, 9520, 9346, 7347, 5335, 4648, 4382, 3815, 3083, 2728, 2562, 2363, 2050, 1869, 1777,
- 0
- },
- {
- 16384, 13429,11201,10562,10371, 8231, 5713, 4770, 4441, 3798, 2844, 2359, 2152, 1947, 1614, 1406, 1304,
- 0
- },
- {
- 16384, 13229,11403,10769,10529, 8415, 6431, 5645, 5311, 4448, 3547, 3176, 3001, 2617, 2181, 1984, 1886,
- 0
- },
- {
- 16384, 15168,13754,13120,12826,11553, 9705, 8723, 8227, 7675, 6762, 6180, 5842, 5585, 5141, 4816, 4607,
- 0
- },
- {
- 16384, 14625,12743,12034,11772,10059, 7706, 6652, 6223, 5594, 4594, 4023, 3742, 3501, 3089, 2818, 2664,
- 0
- },
- {
- 16384, 15275,13679,12951,12652,11158, 8852, 7652, 7121, 6406, 5242, 4542, 4196, 3894, 3398, 3063, 2864,
- 0
- },
- {
- 16384, 4860, 3338, 3214, 3193, 1428, 676, 571, 547, 356, 222, 189, 180, 139, 102, 89, 84,
- 0
- },
- {
- 16384, 8357, 5798, 5475, 5410, 3093, 1523, 1227, 1152, 849, 560, 470, 441, 370, 294, 261, 248,
- 0
- },
- {
- 16384, 15550,14350,13710,13387,12297,10541, 9493, 8929, 8354, 7371, 6696, 6299, 6008, 5491, 5107, 4856,
- 0
- },
- {
- 16384, 10346, 7298, 6933, 6865, 4052, 1863, 1471, 1381, 1055, 673, 536, 491, 429, 339, 293, 273,
- 0
- },
- {
- 16384, 11652, 8699, 8030, 7839, 5667, 3460, 2766, 2532, 2093, 1542, 1301, 1203, 1070, 893, 802, 759,
- 0
- },
- {
- 16384, 15639,14601,14037,13729,12847,11421,10520, 9978, 9521, 8720, 8136, 7750, 7493, 7033, 6676, 6426,
- 0
- },
- {
- 16384, 12427, 9590, 8715, 8386, 6641, 4708, 3886, 3515, 3071, 2490, 2198, 2052, 1886, 1670, 1549, 1478,
- 0
- },
- {
- 16384, 13605,10996,10363,10183, 7802, 5032, 4124, 3840, 3267, 2403, 1976, 1804, 1633, 1345, 1171, 1086,
- 0
- },
- {
- 16384, 15936,15224,14759,14464,13808,12678,11866,11331,10910,10150, 9549, 9122, 8853, 8352, 7938, 7626,
- 0
- },
- {
- 16384, 16383,16382,14829,14138,14137,14136,12895,12272,10935, 9788, 9082, 8674, 8073, 7508, 7118, 6867,
- 0
- },
- {
- 16384, 13888,11474,10840,10662, 8335, 5585, 4695, 4411, 3801, 2917, 2506, 2337, 2150, 1847, 1672, 1581,
- 0
- },
- {
- 16384, 15463,14162,13504,13196,11977,10063, 8978, 8429, 7811, 6768, 6088, 5705, 5406, 4882, 4504, 4266,
- 0
- },
- {
- 16384, 13764,11941,11367,11151, 9312, 7171, 6301, 5943, 5335, 4430, 3942, 3708, 3466, 3074, 2819, 2679,
- 0
- },
- {
- 16384, 5179, 3300, 3206, 3197, 1220, 374, 303, 293, 171, 81, 63, 59, 44, 29, 24, 22,
- 0
- },
- {
- 16384, 16026,15468,15096,14842,14329,13447,12790,12322,11985,11367,10860,10477,10248, 9811, 9443, 9148,
- 0
- },
- {
- 16384, 12809,11291,10848,10649, 8976, 7199, 6506, 6196, 5657, 4887, 4451, 4219, 3974, 3590, 3365, 3218,
- 0
- },
- {
- 16384, 16383,16382,15744,15348,15347,15346,14714,14288,13688,13097,12652,12328,11967,11584,11278,11045,
- 0
- },
- {
- 16384, 15415,14987,14866,14806,13751,13046,12818,12709,12187,11720,11527,11427,11096,10759,10601,10510,
- 0
- },
- {
- 16384, 5926, 4280, 4090, 4053, 2138, 1120, 947, 903, 632, 413, 353, 334, 264, 198, 174, 166,
- 0
- },
- {
- 16384, 9206, 6640, 6345, 6291, 3683, 1772, 1423, 1342, 1024, 652, 515, 467, 406, 314, 267, 245,
- 0
- },
- {
- 16384, 15086,13966,13505,13271,12238,10875,10157, 9763, 9331, 8629, 8155, 7845, 7608, 7198, 6892, 6670,
- 0
- },
- {
- 16384, 11427, 8599, 8132, 8027, 5406, 3012, 2429, 2270, 1823, 1244, 1006, 920, 814, 654, 564, 524,
- 0
- },
- {
- 16384, 11561, 8220, 7814, 7737, 4780, 2215, 1731, 1621, 1279, 830, 657, 599, 532, 424, 366, 339,
- 0
- },
- {
- 16384, 11649, 9374, 8867, 8724, 6398, 4154, 3470, 3253, 2718, 2010, 1695, 1570, 1412, 1172, 1042, 980,
- 0
- },
- {
- 16384, 13021,10503, 9726, 9443, 7520, 5271, 4369, 4016, 3495, 2741, 2365, 2181, 1990, 1719, 1561, 1478,
- 0
- },
- {
- 16384, 13815,11388,10605,10316, 8467, 6133, 5175, 4782, 4255, 3466, 3063, 2864, 2688, 2408, 2229, 2125,
- 0
- },
- {
- 16384, 16175,15807,15536,15338,15006,14402,13919,13549,13312,12871,12491,12182,12010,11681,11390,11143,
- 0
- },
- {
- 16384, 14310,12047,11336,11110, 9065, 6381, 5318, 4938, 4279, 3272, 2732, 2499, 2284, 1920, 1693, 1574,
- 0
- },
- {
- 16384, 14765,12824,12096,11834,10003, 7429, 6282, 5841, 5145, 4022, 3402, 3123, 2868, 2426, 2150, 2003,
- 0
- },
- {
- 16384, 16295,16127,15943,15802,15650,15360,15059,14816,14668,14401,14162,13954,13839,13634,13443,13275,
- 0
- },
- {
- 16384, 14182,12821,12340,12120,10698, 9040, 8284, 7908, 7378, 6549, 6053, 5772, 5520, 5080, 4785, 4597,
- 0
- },
- {
- 16384, 15164,13583,12892,12600,11161, 8997, 7888, 7386, 6744, 5673, 5015, 4673, 4391, 3898, 3555, 3349,
- 0
- },
- {
- 16384, 3758, 2571, 2481, 2467, 988, 478, 412, 397, 245, 154, 133, 127, 95, 69, 61, 58,
- 0
- },
- {
- 16384, 14805,13193,12553,12285,10706, 8596, 7623, 7178, 6542, 5563, 4996, 4703, 4426, 3967, 3662, 3482,
- 0
- },
- {
- 16384, 15787,14870,14320,14005,13147,11705,10747,10171, 9651, 8735, 8068, 7629, 7332, 6785, 6361, 6061,
- 0
- },
- {
- 16384, 7111, 4622, 4304, 4233, 2346, 1174, 938, 870, 659, 455, 389, 365, 316, 260, 236, 226,
- 0
- },
- {
- 16384, 7146, 4703, 4532, 4512, 2078, 740, 583, 556, 371, 201, 153, 141, 118, 87, 72, 66,
- 0
- },
- {
- 16384, 9593, 7184, 6853, 6790, 4144, 2206, 1832, 1745, 1320, 878, 741, 697, 599, 476, 424, 401,
- 0
- },
- {
- 16384, 9209, 5969, 5479, 5351, 3346, 1763, 1382, 1261, 1017, 733, 622, 578, 520, 446, 410, 392,
- 0
- },
- {
- 16384, 11324, 8681, 8252, 8159, 5450, 3114, 2606, 2473, 1987, 1412, 1211, 1142, 1017, 847, 765, 730,
- 0
- },
- {
- 16384, 12663,10073, 9527, 9392, 6827, 4204, 3489, 3286, 2713, 1966, 1666, 1554, 1400, 1172, 1051, 994,
- 0
- },
- {
- 16384, 10413, 7096, 6340, 6115, 4393, 2704, 2156, 1947, 1634, 1254, 1091, 1010, 925, 805, 742, 707,
- 0
- },
- {
- 16384, 13337,11073,10477,10306, 8045, 5534, 4705, 4438, 3804, 2942, 2530, 2360, 2164, 1850, 1668, 1574,
- 0
- },
- {
- 16384, 14323,12104,11391,11156, 9183, 6649, 5649, 5287, 4676, 3778, 3302, 3089, 2886, 2548, 2341, 2223,
- 0
- },
- {
- 16384, 11646, 8435, 7504, 7150, 5603, 3882, 3170, 2853, 2487, 2029, 1791, 1666, 1549, 1386, 1288, 1231,
- 0
- },
- {
- 16384, 13147,11339,10752,10524, 8775, 6682, 5776, 5398, 4813, 3908, 3406, 3154, 2933, 2554, 2310, 2176,
- 0
- },
- {
- 16384, 14551,12495,11707,11356, 9962, 8005, 7006, 6500, 6034, 5298, 4839, 4575, 4381, 4057, 3825, 3673,
- 0
- },
- {
- 16384, 12395, 9526, 9032, 8925, 6130, 3448, 2813, 2649, 2144, 1489, 1231, 1142, 1020, 836, 738, 694,
- 0
- },
- {
- 16384, 14921,13187,12475,12164,10758, 8775, 7752, 7257, 6727, 5864, 5306, 5004, 4777, 4393, 4119, 3942,
- 0
- },
- {
- 16384, 2151, 1301, 1276, 1274, 315, 84, 70, 68, 32, 14, 11, 10, 7, 4, 3, 2,
- 0
- },
- {
- 16384, 16383,16382,13774,13091,13090,13089,11287,10713, 7917, 6052, 5265, 4947, 4161, 3534, 3199, 3039,
- 0
- },
- {
- 16384, 14374,12331,11688,11474, 9505, 6993, 5998, 5634, 4991, 4008, 3498, 3265, 3036, 2658, 2417, 2285,
- 0
- },
- {
- 16384, 8798, 5867, 5626, 5593, 2841, 1038, 807, 765, 538, 302, 234, 215, 182, 139, 119, 111,
- 0
- },
- {
- 16384, 13325,10612,10015, 9860, 7343, 4583, 3802, 3571, 3023, 2269, 1945, 1817, 1670, 1440, 1309, 1243,
- 0
- },
- {
- 16384, 7741, 5790, 5571, 5528, 3110, 1698, 1464, 1409, 1034, 704, 613, 585, 487, 381, 342, 327,
- 0
- },
- {
- 16384, 9664, 7506, 7059, 6917, 4820, 3136, 2640, 2455, 2000, 1504, 1297, 1217, 1073, 896, 815, 777,
- 0
- }
-};
-
-const Word16 NumRatioBits[2][17] =
-{
- /* NB */
- {
- 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2
- },
-
- /* WB */
- {
- 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2
- }
-}; // Q0
-
-/* 7Q8 */
-const Word16 Ratios_WB_2_fx[32] =
-/* 2 */{ 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, 4096, 4352, 4608, 4864, 5120, 5376, 5632, 6144, 6656, 7168, 7680, 8192, 8704, 9216, 9728, 10240, 15360, 16384, 18432 };
-const Word16 Ratios_WB_3_fx[32] =/* 7Q8 */
-/* 3 */{ 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 3584, 4096, 4608, 5120, 5632, 6144, 6656, 7168, 7680, 8192, 8704, 9216, 9728, 10240, 11264, 12288, 13824, 15360, 17408, 19968, 20480 };
-const Word16 Ratios_WB_4_fx[32] =/* 7Q8 */
-/* 4 */{ 384, 512, 640, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 3584, 4096, 4608, 5120, 5632, 6144, 6656, 7168, 7680, 8192, 8704, 9216, 9728, 10240, 10752, 11264, 12288, 13312, 13824, 17408 };
-const Word16 Ratios_WB_5_fx[32] =/* 7Q8 */
-/* 5 */{ 256, 384, 512, 640, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, 4096, 4608, 5120, 5632, 6144, 6656, 7168, 7680, 8192, 8704, 9216, 10240, 11264, 12288, 13824 };
-const Word16 Ratios_WB_6_fx[32] =/* 7Q8 */
-/* 6 */{ 256, 384, 512, 640, 768, 896, 1024, 1152, 1280, 1408, 1536, 1664, 1792, 1920, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, 4096, 4608, 5120, 5632, 6144, 6656, 7168, 8704, 10240, 10496 };
-const Word16 Ratios_WB_7_fx[32] =/* 7Q8 */
-/* 7 */{ 256, 384, 512, 640, 768, 896, 1024, 1152, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, 4096, 4352, 4608, 4864, 5120, 5376, 5760, 6144, 6400, 6912, 7168, 7680, 8960 };
-const Word16 Ratios_WB_8_fx[16] =/* 7Q8 */
-/* 8 */{ 128, 256, 384, 512, 640, 768, 896, 1024, 1152, 1280, 1408, 1536, 1792, 2048, 2304, 2560 };
-const Word16 Ratios_WB_9_fx[16] =/* 7Q8 */
-/* 9 */{ 256, 512, 640, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 3840, 4096, 4608, 6912 };
-const Word16 Ratios_WB_10_fx[16] =/* 7Q8 */
-/* 10 */{ 256, 384, 512, 640, 768, 896, 1024, 1280, 1536, 2048, 2560, 3840, 4608, 5632, 6144, 6656 };
-const Word16 Ratios_WB_11_fx[16] =/* 7Q8 */
-/* 11 */{ 256, 384, 512, 640, 768, 896, 1024, 1280, 1536, 2048, 2560, 3072, 3328, 3584, 4608, 5376 };
-const Word16 Ratios_WB_12_fx[16] =/* 7Q8 */
-/* 12 */{ 128, 256, 384, 512, 640, 768, 1024, 1280, 1536, 2048, 2304, 2816, 3072, 3456, 4096, 5120 };
-const Word16 Ratios_WB_13_fx[16] =/* 7Q8 */
-/* 13 */{ 128, 256, 384, 512, 640, 768, 1024, 1280, 1536, 1792, 2048, 2560, 2816, 3072, 3584, 5120 };
-const Word16 Ratios_WB_14_fx[16] =/* 7Q8 */
-/* 14 */{ 128, 256, 384, 512, 640, 768, 1024, 1152, 1536, 1920, 2304, 2560, 3072, 3584, 3840, 4608 };
-const Word16 Ratios_WB_15_fx[16] =/* 7Q8 */
-/* 15 */{ 128, 256, 320, 384, 448, 512, 640, 768, 896, 1024, 1152, 1280, 1536, 2048, 2304, 3584 };
-const Word16 Ratios_WB_16_fx[4] =/* 7Q8 */
-/* 16 */{ 128, 256, 512, 1024 };
-const Word16 Ratios_WB_17_fx[4] =/* 7Q8 */
-/* 17 */{ 256, 384, 512, 1024 };
-const Word16 Ratios_WB_18_fx[4] =/* 7Q8 */
-/* 18 */{ 256, 512, 768, 1024 };
-
-/******************************************************************************/
-
-/* 7Q8 */
-const Word16 Ratios_NB_2_fx[32] =
-/* 2 */{ 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, 4096, 4352, 4608, 4864, 5120, 5376, 5632, 5888, 6144, 6400, 6656, 6912, 7168, 7680, 8192, 8704, 9216, 9728, 10240 };
-const Word16 Ratios_NB_3_fx[16] =/* 7Q8 */
-/* 3 */{ 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 4096, 5120, 6144, 7680 };
-const Word16 Ratios_NB_4_fx[16] =/* 7Q8 */
-/* 4 */{ 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 3584, 4096, 4608, 5120, 6144, 7680 };
-const Word16 Ratios_NB_5_fx[16] =/* 7Q8 */
-/* 5 */{ 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 3584, 4096, 4608, 5120, 6144, 7680 };
-const Word16 Ratios_NB_6_fx[16] =/* 7Q8 */
-/* 6 */{ 512, 640, 768, 896, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 3584, 4096, 4608, 5120 };
-const Word16 Ratios_NB_7_fx[16] =/* 7Q8 */
-/* 7 */{ 256, 512, 640, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 3584, 4096, 4608, 5120 };
-const Word16 Ratios_NB_8_fx[16] =/* 7Q8 */
-/* 8 */{ 256, 384, 512, 640, 768, 896, 1024, 1152, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 4096 };
-const Word16 Ratios_NB_9_fx[8] =/* 7Q8 */
-/* 9 */{ 256, 512, 768, 1024, 1280, 1536, 2048, 2560 };
-const Word16 Ratios_NB_10_fx[8] =/* 7Q8 */
-/* 10 */{ 256, 512, 768, 1024, 1280, 1536, 2048, 2560 };
-const Word16 Ratios_NB_11_fx[8] =/* 7Q8 */
-/* 11 */{ 256, 384, 512, 768, 1024, 1280, 1536, 2048 };
-const Word16 Ratios_NB_12_fx[8] =/* 7Q8 */
-/* 12 */{ 256, 512, 640, 768, 1024, 1280, 1536, 2048 };
-const Word16 Ratios_NB_13_fx[4] =/* 7Q8 */
-/* 13 */{ 256, 512, 768, 1024 };
-const Word16 Ratios_NB_14_fx[4] =/* 7Q8 */
-/* 14 */{ 256, 512, 1024, 1536 };
-const Word16 Ratios_NB_15_fx[4] =/* 7Q8 */
-/* 15 */{ 256, 512, 768, 1024 };
-const Word16 Ratios_NB_16_fx[4] =/* 7Q8 */
-/* 16 */{ 256, 384, 512, 1024 };
-const Word16 Ratios_NB_17_fx[4] =/* 7Q8 */
-/* 17 */{ 256, 384, 512, 768 };
-const Word16 Ratios_NB_18_fx[4] =/* 7Q8 */
-/* 18 */{ 128, 256, 512, 768 };
-
-/******************************************************************************/
-
-const Word16 *const Ratios_fx[2][17] =/* 7Q8 */
-{
- /* NB */
- {
- Ratios_NB_2_fx,
- Ratios_NB_3_fx,
- Ratios_NB_4_fx,
- Ratios_NB_5_fx,
- Ratios_NB_6_fx,
- Ratios_NB_7_fx,
- Ratios_NB_8_fx,
- Ratios_NB_9_fx,
- Ratios_NB_10_fx,
- Ratios_NB_11_fx,
- Ratios_NB_12_fx,
- Ratios_NB_13_fx,
- Ratios_NB_14_fx,
- Ratios_NB_15_fx
- , Ratios_NB_16_fx
- , Ratios_NB_17_fx
- , Ratios_NB_18_fx
- },
-
- /* WB */
- {
- Ratios_WB_2_fx,
- Ratios_WB_3_fx,
- Ratios_WB_4_fx,
- Ratios_WB_5_fx,
- Ratios_WB_6_fx,
- Ratios_WB_7_fx,
- Ratios_WB_8_fx,
- Ratios_WB_9_fx,
- Ratios_WB_10_fx,
- Ratios_WB_11_fx,
- Ratios_WB_12_fx,
- Ratios_WB_13_fx,
- Ratios_WB_14_fx,
- Ratios_WB_15_fx
- , Ratios_WB_16_fx
- , Ratios_WB_17_fx
- , Ratios_WB_18_fx
- }
-};
-#define QGC(x) FL2WORD16_SCALE(x, 4)
-const Word16 qGains[2][1 << kTcxHmNumGainBits] =
-{
- /* GC */ { QGC(0.75f) },
- /* VC */ { QGC(0.6f), QGC(1.4f), QGC(4.5f), QGC(10.0f) }
-};
-
-
-/*----------------------------------------------------------------------------------*
- * TNS
- *----------------------------------------------------------------------------------*/
-
-const struct TnsParameters tnsParametersIGF32kHz_LowBR[1] =
-{
- { 600, 3, /*1.85f, 0.075f, 4.4f,*/ 237/*1.85f Q7*/, 15518925/*1.85f Q23*/, 2458/*0.075f Q15*/,563 /*4.4f Q7*/ }
-};
-
-const struct TnsParameters tnsParameters32kHz[2] =
-{
- { 4500, 3, /*1.35f, 0.0300f, 1.0f ,*/ 173/*1.35f Q7*/,11324621/*1.35f Q23*/, 983/*0.0300f Q15*/, 128/*1.0f Q7*/},
- { 600, 1, /*1.75f, 0.0625f, 4.4f ,*/ 224/*1.75f Q7*/,14680064/*1.75f Q23*/, 2048/*0.0625f Q15*/, 563 /*4.4f Q7*/ }
-};
-
-const struct TnsParameters tnsParameters32kHz_grouped[2] =
-{
- { 8400, 3, /*1.375f, 0.03125f, 1.0f ,*/ 176/*1.375f Q7*/,11534336/*1.375f Q23*/, 1024/*0.03125f Q15*/ , 128/*1.0f Q7*/ },
- { 800, 3, /*1.375f, 0.03125f, 1.0f ,*/ 176/*1.375f Q7*/,11534336/*1.375f Q23*/, 1024/*0.03125f Q15*/ , 128/*1.0f Q7*/}
-};
-
-const struct TnsParameters tnsParameters16kHz[1] =
-{
- { 600, 3, /*1.5f, 0.05f, 4.4f,*/ 192/*1.5f Q7*/, 12582912/*1.5f Q23*/, 1638/*0.05f Q15*/ ,563 /*4.4f Q7*/ }
-};
-
-const struct TnsParameters tnsParameters16kHz_grouped[2] =
-{
- { 4400, 3, /*1.5f, 0.05f, 1.0f,*/ 192/*1.5f Q7*/, 12582912/*1.5f Q23*/, 1638/*0.05f Q15*/ , 128/*1.0f Q7*/},
- { 800, 3, /*1.5f, 0.05f, 1.0f,*/ 192/*1.5f Q7*/, 12582912/*1.5f Q23*/, 1638/*0.05f Q15*/ , 128/*1.0f Q7*/}
-};
-
-const struct TnsParameters tnsParameters48kHz_grouped[2] =
-{
- { 10400, 3, /*1.375f, 0.03125f, 1.0f,*/ 176/*1.375f Q7*/,11534336/*1.375f Q23*/, 1024/*0.03125f Q15*/ , 128/*1.0f Q7*/},
- { 800, 3, /*1.375f, 0.03125f, 1.0f,*/ 176/*1.375f Q7*/,11534336/*1.375f Q23*/, 1024/*0.03125f Q15*/ , 128/*1.0f Q7*/ }
-};
-
-const struct TnsParameters tnsParameters32kHz_Stereo[2]=
-{
- { 4500, 3, /*1.35f, 0.0300f, 1.0f ,*/ 173/*1.35f Q7*/, 11324621/*1.35f Q23*/, 983/*0.0300f Q15*/ , 128/*1.0f Q7*/},
- { 600, 3, /*1.75f, 0.0625f, 4.4f ,*/ 224/*1.75f Q7*/,14680064/*1.75f Q23*/, 2048/*0.0625f Q15*/ ,563 /*4.4f Q7*/ }
-};
-
-const Word16 tnsAcfWindow_fx[TNS_MAX_FILTER_ORDER] =
-{
- 32696/*0.997803f Q15*/, 32480/*0.991211f Q15*/, 32120/*0.980225f Q15*/, 31616/*0.964844f Q15*/, 30968/*0.945068f Q15*/, 30176/*0.920898f Q15*/, 29240/*0.892334f Q15*/, 28160/*0.859375f Q15*/
-};
-
-
-/* Definition of the mapping between TNS parameters and a bitstream */
-/* Helper structures for hufmann table coding */
-
-const Coding codesTnsCoeff0TCX20[] =
-{
- { -8+INDEX_SHIFT, 609, 11 }, /* 01001100001 */
- { -7+INDEX_SHIFT, 305, 10 }, /* 0100110001 */
- { -6+INDEX_SHIFT, 77, 8 }, /* 01001101 */
- { -5+INDEX_SHIFT, 39, 7 }, /* 0100111 */
- { -4+INDEX_SHIFT, 8, 5 }, /* 01000 */
- { -3+INDEX_SHIFT, 21, 5 }, /* 10101 */
- { -2+INDEX_SHIFT, 11, 4 }, /* 1011 */
- { -1+INDEX_SHIFT, 3, 3 }, /* 011 */
- { 0+INDEX_SHIFT, 3, 2 }, /* 11 */
- { 1+INDEX_SHIFT, 0, 2 }, /* 00 */
- { 2+INDEX_SHIFT, 4, 3 }, /* 100 */
- { 3+INDEX_SHIFT, 5, 4 }, /* 0101 */
- { 4+INDEX_SHIFT, 20, 5 }, /* 10100 */
- { 5+INDEX_SHIFT, 18, 6 }, /* 010010 */
- { 6+INDEX_SHIFT, 153, 9 }, /* 010011001 */
- { 7+INDEX_SHIFT, 608, 11 } /* 01001100000 */
-};
-
-const Coding codesTnsCoeff0TCX10[] =
-{
- { -8+INDEX_SHIFT, 441, 9 }, /* 110111001 */
- { -7+INDEX_SHIFT, 111, 7 }, /* 1101111 */
- { -6+INDEX_SHIFT, 8, 4 }, /* 1000 */
- { -5+INDEX_SHIFT, 9, 4 }, /* 1001 */
- { -4+INDEX_SHIFT, 14, 4 }, /* 1110 */
- { -3+INDEX_SHIFT, 15, 4 }, /* 1111 */
- { -2+INDEX_SHIFT, 3, 3 }, /* 011 */
- { -1+INDEX_SHIFT, 5, 3 }, /* 101 */
- { 0+INDEX_SHIFT, 0, 2 }, /* 00 */
- { 1+INDEX_SHIFT, 2, 3 }, /* 010 */
- { 2+INDEX_SHIFT, 12, 4 }, /* 1100 */
- { 3+INDEX_SHIFT, 26, 5 }, /* 11010 */
- { 4+INDEX_SHIFT, 54, 6 }, /* 110110 */
- { 5+INDEX_SHIFT, 221, 8 }, /* 11011101 */
- { 6+INDEX_SHIFT, 881, 10 }, /* 1101110001 */
- { 7+INDEX_SHIFT, 880, 10 } /* 1101110000 */
-};
-
-const Coding codesTnsCoeff1TCX20[] =
-{
- { -8+INDEX_SHIFT, 30018, 15 }, /* 111010101000010 */
- { -7+INDEX_SHIFT, 30019, 15 }, /* 111010101000011 */
- { -6+INDEX_SHIFT, 7505, 13 }, /* 1110101010001 */
- { -5+INDEX_SHIFT, 3753, 12 }, /* 111010101001 */
- { -4+INDEX_SHIFT, 939, 10 }, /* 1110101011 */
- { -3+INDEX_SHIFT, 235, 8 }, /* 11101011 */
- { -2+INDEX_SHIFT, 28, 5 }, /* 11100 */
- { -1+INDEX_SHIFT, 6, 3 }, /* 110 */
- { 0+INDEX_SHIFT, 0, 1 }, /* 0 */
- { 1+INDEX_SHIFT, 2, 2 }, /* 10 */
- { 2+INDEX_SHIFT, 15, 4 }, /* 1111 */
- { 3+INDEX_SHIFT, 59, 6 }, /* 111011 */
- { 4+INDEX_SHIFT, 116, 7 }, /* 1110100 */
- { 5+INDEX_SHIFT, 468, 9 }, /* 111010100 */
- { 6+INDEX_SHIFT, 1877, 11 }, /* 11101010101 */
- { 7+INDEX_SHIFT, 15008, 14 } /* 11101010100000 */
-};
-
-const Coding codesTnsCoeff1TCX10[] =
-{
- { -8+INDEX_SHIFT, 2818, 12 }, /* 101100000010 */
- { -7+INDEX_SHIFT, 2819, 12 }, /* 101100000011 */
- { -6+INDEX_SHIFT, 705, 10 }, /* 1011000001 */
- { -5+INDEX_SHIFT, 353, 9 }, /* 101100001 */
- { -4+INDEX_SHIFT, 177, 8 }, /* 10110001 */
- { -3+INDEX_SHIFT, 45, 6 }, /* 101101 */
- { -2+INDEX_SHIFT, 10, 4 }, /* 1010 */
- { -1+INDEX_SHIFT, 3, 3 }, /* 011 */
- { 0+INDEX_SHIFT, 6, 3 }, /* 110 */
- { 1+INDEX_SHIFT, 0, 2 }, /* 00 */
- { 2+INDEX_SHIFT, 7, 3 }, /* 111 */
- { 3+INDEX_SHIFT, 4, 3 }, /* 100 */
- { 4+INDEX_SHIFT, 2, 3 }, /* 010 */
- { 5+INDEX_SHIFT, 23, 5 }, /* 10111 */
- { 6+INDEX_SHIFT, 89, 7 }, /* 1011001 */
- { 7+INDEX_SHIFT, 1408, 11 } /* 10110000000 */
-};
-
-const Coding codesTnsCoeff2TCX20[] =
-{
- { -8+INDEX_SHIFT, 13312, 14 }, /* 11010000000000 */
- { -7+INDEX_SHIFT, 13313, 14 }, /* 11010000000001 */
- { -6+INDEX_SHIFT, 3329, 12 }, /* 110100000001 */
- { -5+INDEX_SHIFT, 833, 10 }, /* 1101000001 */
- { -4+INDEX_SHIFT, 209, 8 }, /* 11010001 */
- { -3+INDEX_SHIFT, 53, 6 }, /* 110101 */
- { -2+INDEX_SHIFT, 12, 4 }, /* 1100 */
- { -1+INDEX_SHIFT, 2, 2 }, /* 10 */
- { 0+INDEX_SHIFT, 0, 1 }, /* 0 */
- { 1+INDEX_SHIFT, 7, 3 }, /* 111 */
- { 2+INDEX_SHIFT, 27, 5 }, /* 11011 */
- { 3+INDEX_SHIFT, 105, 7 }, /* 1101001 */
- { 4+INDEX_SHIFT, 417, 9 }, /* 110100001 */
- { 5+INDEX_SHIFT, 1665, 11 }, /* 11010000001 */
- { 6+INDEX_SHIFT, 13314, 14 }, /* 11010000000010 */
- { 7+INDEX_SHIFT, 13315, 14 } /* 11010000000011 */
-};
-
-const Coding codesTnsCoeff2TCX10[] =
-{
- { -8+INDEX_SHIFT, 512, 12 }, /* 001000000000 */
- { -7+INDEX_SHIFT, 513, 12 }, /* 001000000001 */
- { -6+INDEX_SHIFT, 65, 9 }, /* 001000001 */
- { -5+INDEX_SHIFT, 17, 7 }, /* 0010001 */
- { -4+INDEX_SHIFT, 5, 5 }, /* 00101 */
- { -3+INDEX_SHIFT, 0, 3 }, /* 000 */
- { -2+INDEX_SHIFT, 6, 3 }, /* 110 */
- { -1+INDEX_SHIFT, 1, 2 }, /* 01 */
- { 0+INDEX_SHIFT, 2, 2 }, /* 10 */
- { 1+INDEX_SHIFT, 7, 3 }, /* 111 */
- { 2+INDEX_SHIFT, 3, 4 }, /* 0011 */
- { 3+INDEX_SHIFT, 9, 6 }, /* 001001 */
- { 4+INDEX_SHIFT, 33, 8 }, /* 00100001 */
- { 5+INDEX_SHIFT, 129, 10 }, /* 0010000001 */
- { 6+INDEX_SHIFT, 514, 12 }, /* 001000000010 */
- { 7+INDEX_SHIFT, 515, 12 } /* 001000000011 */
-};
-
-const Coding codesTnsCoeff3TCX20[] =
-{
- { -8+INDEX_SHIFT, 13318, 14 }, /* 11010000000110 */
- { -7+INDEX_SHIFT, 13319, 14 }, /* 11010000000111 */
- { -6+INDEX_SHIFT, 6656, 13 }, /* 1101000000000 */
- { -5+INDEX_SHIFT, 1665, 11 }, /* 11010000001 */
- { -4+INDEX_SHIFT, 417, 9 }, /* 110100001 */
- { -3+INDEX_SHIFT, 105, 7 }, /* 1101001 */
- { -2+INDEX_SHIFT, 27, 5 }, /* 11011 */
- { -1+INDEX_SHIFT, 7, 3 }, /* 111 */
- { 0+INDEX_SHIFT, 0, 1 }, /* 0 */
- { 1+INDEX_SHIFT, 2, 2 }, /* 10 */
- { 2+INDEX_SHIFT, 12, 4 }, /* 1100 */
- { 3+INDEX_SHIFT, 53, 6 }, /* 110101 */
- { 4+INDEX_SHIFT, 209, 8 }, /* 11010001 */
- { 5+INDEX_SHIFT, 833, 10 }, /* 1101000001 */
- { 6+INDEX_SHIFT, 6657, 13 }, /* 1101000000001 */
- { 7+INDEX_SHIFT, 6658, 13 } /* 1101000000010 */
-};
-
-const Coding codesTnsCoeff3TCX10[] =
-{
- { -8+INDEX_SHIFT, 1284, 12 }, /* 010100000100 */
- { -7+INDEX_SHIFT, 1285, 12 }, /* 010100000101 */
- { -6+INDEX_SHIFT, 1286, 12 }, /* 010100000110 */
- { -5+INDEX_SHIFT, 1287, 12 }, /* 010100000111 */
- { -4+INDEX_SHIFT, 161, 9 }, /* 010100001 */
- { -3+INDEX_SHIFT, 41, 7 }, /* 0101001 */
- { -2+INDEX_SHIFT, 11, 5 }, /* 01011 */
- { -1+INDEX_SHIFT, 0, 2 }, /* 00 */
- { 0+INDEX_SHIFT, 2, 2 }, /* 10 */
- { 1+INDEX_SHIFT, 3, 2 }, /* 11 */
- { 2+INDEX_SHIFT, 3, 3 }, /* 011 */
- { 3+INDEX_SHIFT, 4, 4 }, /* 0100 */
- { 4+INDEX_SHIFT, 21, 6 }, /* 010101 */
- { 5+INDEX_SHIFT, 81, 8 }, /* 01010001 */
- { 6+INDEX_SHIFT, 640, 11 }, /* 01010000000 */
- { 7+INDEX_SHIFT, 641, 11 } /* 01010000001 */
-};
-
-const Coding codesTnsCoeff4TCX20[] =
-{
- { -8+INDEX_SHIFT, 13318, 14 }, /* 11010000000110 */
- { -7+INDEX_SHIFT, 13319, 14 }, /* 11010000000111 */
- { -6+INDEX_SHIFT, 6656, 13 }, /* 1101000000000 */
- { -5+INDEX_SHIFT, 833, 10 }, /* 1101000001 */
- { -4+INDEX_SHIFT, 209, 8 }, /* 11010001 */
- { -3+INDEX_SHIFT, 53, 6 }, /* 110101 */
- { -2+INDEX_SHIFT, 12, 4 }, /* 1100 */
- { -1+INDEX_SHIFT, 2, 2 }, /* 10 */
- { 0+INDEX_SHIFT, 0, 1 }, /* 0 */
- { 1+INDEX_SHIFT, 7, 3 }, /* 111 */
- { 2+INDEX_SHIFT, 27, 5 }, /* 11011 */
- { 3+INDEX_SHIFT, 105, 7 }, /* 1101001 */
- { 4+INDEX_SHIFT, 417, 9 }, /* 110100001 */
- { 5+INDEX_SHIFT, 1665, 11 }, /* 11010000001 */
- { 6+INDEX_SHIFT, 6657, 13 }, /* 1101000000001 */
- { 7+INDEX_SHIFT, 6658, 13 } /* 1101000000010 */
-};
-
-const Coding codesTnsCoeff4TCX10[] =
-{
- { -8+INDEX_SHIFT, 20, 12 }, /* 000000010100 */
- { -7+INDEX_SHIFT, 21, 12 }, /* 000000010101 */
- { -6+INDEX_SHIFT, 22, 12 }, /* 000000010110 */
- { -5+INDEX_SHIFT, 3, 9 }, /* 000000011 */
- { -4+INDEX_SHIFT, 1, 7 }, /* 0000001 */
- { -3+INDEX_SHIFT, 1, 5 }, /* 00001 */
- { -2+INDEX_SHIFT, 1, 3 }, /* 001 */
- { -1+INDEX_SHIFT, 2, 2 }, /* 10 */
- { 0+INDEX_SHIFT, 3, 2 }, /* 11 */
- { 1+INDEX_SHIFT, 1, 2 }, /* 01 */
- { 2+INDEX_SHIFT, 1, 4 }, /* 0001 */
- { 3+INDEX_SHIFT, 1, 6 }, /* 000001 */
- { 4+INDEX_SHIFT, 0, 8 }, /* 00000000 */
- { 5+INDEX_SHIFT, 23, 12 }, /* 000000010111 */
- { 6+INDEX_SHIFT, 8, 11 }, /* 00000001000 */
- { 7+INDEX_SHIFT, 9, 11 } /* 00000001001 */
-};
-
-const Coding codesTnsCoeff5[] =
-{
- { -8+INDEX_SHIFT, 6788, 13 }, /* 1101010000100 */
- { -7+INDEX_SHIFT, 6789, 13 }, /* 1101010000101 */
- { -6+INDEX_SHIFT, 6790, 13 }, /* 1101010000110 */
- { -5+INDEX_SHIFT, 849, 10 }, /* 1101010001 */
- { -4+INDEX_SHIFT, 213, 8 }, /* 11010101 */
- { -3+INDEX_SHIFT, 107, 7 }, /* 1101011 */
- { -2+INDEX_SHIFT, 27, 5 }, /* 11011 */
- { -1+INDEX_SHIFT, 7, 3 }, /* 111 */
- { 0+INDEX_SHIFT, 0, 1 }, /* 0 */
- { 1+INDEX_SHIFT, 2, 2 }, /* 10 */
- { 2+INDEX_SHIFT, 12, 4 }, /* 1100 */
- { 3+INDEX_SHIFT, 52, 6 }, /* 110100 */
- { 4+INDEX_SHIFT, 425, 9 }, /* 110101001 */
- { 5+INDEX_SHIFT, 6791, 13 }, /* 1101010000111 */
- { 6+INDEX_SHIFT, 3392, 12 }, /* 110101000000 */
- { 7+INDEX_SHIFT, 3393, 12 } /* 110101000001 */
-};
-
-const Coding codesTnsCoeff6[] =
-{
- { -8+INDEX_SHIFT, 4, 12 }, /* 000000000100 */
- { -7+INDEX_SHIFT, 5, 12 }, /* 000000000101 */
- { -6+INDEX_SHIFT, 6, 12 }, /* 000000000110 */
- { -5+INDEX_SHIFT, 1, 9 }, /* 000000001 */
- { -4+INDEX_SHIFT, 1, 7 }, /* 0000001 */
- { -3+INDEX_SHIFT, 1, 5 }, /* 00001 */
- { -2+INDEX_SHIFT, 1, 3 }, /* 001 */
- { -1+INDEX_SHIFT, 2, 2 }, /* 10 */
- { 0+INDEX_SHIFT, 3, 2 }, /* 11 */
- { 1+INDEX_SHIFT, 1, 2 }, /* 01 */
- { 2+INDEX_SHIFT, 1, 4 }, /* 0001 */
- { 3+INDEX_SHIFT, 1, 6 }, /* 000001 */
- { 4+INDEX_SHIFT, 1, 8 }, /* 00000001 */
- { 5+INDEX_SHIFT, 7, 12 }, /* 000000000111 */
- { 6+INDEX_SHIFT, 0, 11 }, /* 00000000000 */
- { 7+INDEX_SHIFT, 1, 11 } /* 00000000001 */
-};
-
-const Coding codesTnsCoeff7[] =
-{
- { -8+INDEX_SHIFT, 14, 11 }, /* 00000001110 */
- { -7+INDEX_SHIFT, 15, 11 }, /* 00000001111 */
- { -6+INDEX_SHIFT, 0, 10 }, /* 0000000000 */
- { -5+INDEX_SHIFT, 1, 10 }, /* 0000000001 */
- { -4+INDEX_SHIFT, 1, 7 }, /* 0000001 */
- { -3+INDEX_SHIFT, 1, 5 }, /* 00001 */
- { -2+INDEX_SHIFT, 1, 4 }, /* 0001 */
- { -1+INDEX_SHIFT, 1, 2 }, /* 01 */
- { 0+INDEX_SHIFT, 2, 10 }, /* 0000000010 */
- { 1+INDEX_SHIFT, 1, 1 }, /* 1 */
- { 2+INDEX_SHIFT, 1, 3 }, /* 001 */
- { 3+INDEX_SHIFT, 1, 6 }, /* 000001 */
- { 4+INDEX_SHIFT, 3, 10 }, /* 0000000011 */
- { 5+INDEX_SHIFT, 4, 10 }, /* 0000000100 */
- { 6+INDEX_SHIFT, 5, 10 }, /* 0000000101 */
- { 7+INDEX_SHIFT, 6, 10 } /* 0000000110 */
-};
-
-const Coding codesTnsCoeff456[] =
-{
- { -8+INDEX_SHIFT, 516, 12 }, /* 001000000100 */
- { -7+INDEX_SHIFT, 517, 12 }, /* 001000000101 */
- { -6+INDEX_SHIFT, 518, 12 }, /* 001000000110 */
- { -5+INDEX_SHIFT, 65, 9 }, /* 001000001 */
- { -4+INDEX_SHIFT, 17, 7 }, /* 0010001 */
- { -3+INDEX_SHIFT, 5, 5 }, /* 00101 */
- { -2+INDEX_SHIFT, 3, 4 }, /* 0011 */
- { -1+INDEX_SHIFT, 1, 2 }, /* 01 */
- { 0+INDEX_SHIFT, 3, 2 }, /* 11 */
- { 1+INDEX_SHIFT, 2, 2 }, /* 10 */
- { 2+INDEX_SHIFT, 0, 3 }, /* 000 */
- { 3+INDEX_SHIFT, 9, 6 }, /* 001001 */
- { 4+INDEX_SHIFT, 33, 8 }, /* 00100001 */
- { 5+INDEX_SHIFT, 519, 12 }, /* 001000000111 */
- { 6+INDEX_SHIFT, 256, 11 }, /* 00100000000 */
- { 7+INDEX_SHIFT, 257, 11 } /* 00100000001 */
-};
-
-const Coding codesTnsCoeff0WBTCX20[] =
-{
- { -8+INDEX_SHIFT, 225, 10 }, /* 0011100001 */
- { -7+INDEX_SHIFT, 113, 9 }, /* 001110001 */
- { -6+INDEX_SHIFT, 29, 7 }, /* 0011101 */
- { -5+INDEX_SHIFT, 15, 6 }, /* 001111 */
- { -4+INDEX_SHIFT, 2, 4 }, /* 0010 */
- { -3+INDEX_SHIFT, 0, 3 }, /* 000 */
- { -2+INDEX_SHIFT, 13, 4 }, /* 1101 */
- { -1+INDEX_SHIFT, 2, 3 }, /* 010 */
- { 0+INDEX_SHIFT, 5, 3 }, /* 101 */
- { 1+INDEX_SHIFT, 3, 3 }, /* 011 */
- { 2+INDEX_SHIFT, 4, 3 }, /* 100 */
- { 3+INDEX_SHIFT, 7, 3 }, /* 111 */
- { 4+INDEX_SHIFT, 12, 4 }, /* 1100 */
- { 5+INDEX_SHIFT, 6, 5 }, /* 00110 */
- { 6+INDEX_SHIFT, 57, 8 }, /* 00111001 */
- { 7+INDEX_SHIFT, 224, 10 } /* 0011100000 */
-};
-
-
-const Coding codesTnsCoeff1WBTCX20[] =
-{
- { -8+INDEX_SHIFT, 512, 12 }, /* 001000000000 */
- { -7+INDEX_SHIFT, 513, 12 }, /* 001000000001 */
- { -6+INDEX_SHIFT, 514, 12 }, /* 001000000010 */
- { -5+INDEX_SHIFT, 65, 9 }, /* 001000001 */
- { -4+INDEX_SHIFT, 17, 7 }, /* 0010001 */
- { -3+INDEX_SHIFT, 5, 5 }, /* 00101 */
- { -2+INDEX_SHIFT, 0, 3 }, /* 000 */
- { -1+INDEX_SHIFT, 2, 3 }, /* 010 */
- { 0+INDEX_SHIFT, 3, 2 }, /* 11 */
- { 1+INDEX_SHIFT, 2, 2 }, /* 10 */
- { 2+INDEX_SHIFT, 3, 3 }, /* 011 */
- { 3+INDEX_SHIFT, 3, 4 }, /* 0011 */
- { 4+INDEX_SHIFT, 9, 6 }, /* 001001 */
- { 5+INDEX_SHIFT, 33, 8 }, /* 00100001 */
- { 6+INDEX_SHIFT, 129, 10 }, /* 0010000001 */
- { 7+INDEX_SHIFT, 515, 12 } /* 001000000011 */
-};
-
-
-const Coding codesTnsCoeff2WB[] =
-{
- { -8+INDEX_SHIFT, 5632, 13 }, /* 1011000000000 */
- { -7+INDEX_SHIFT, 5633, 13 }, /* 1011000000001 */
- { -6+INDEX_SHIFT, 1409, 11 }, /* 10110000001 */
- { -5+INDEX_SHIFT, 353, 9 }, /* 101100001 */
- { -4+INDEX_SHIFT, 89, 7 }, /* 1011001 */
- { -3+INDEX_SHIFT, 23, 5 }, /* 10111 */
- { -2+INDEX_SHIFT, 4, 3 }, /* 100 */
- { -1+INDEX_SHIFT, 0, 2 }, /* 00 */
- { 0+INDEX_SHIFT, 3, 2 }, /* 11 */
- { 1+INDEX_SHIFT, 1, 2 }, /* 01 */
- { 2+INDEX_SHIFT, 10, 4 }, /* 1010 */
- { 3+INDEX_SHIFT, 45, 6 }, /* 101101 */
- { 4+INDEX_SHIFT, 177, 8 }, /* 10110001 */
- { 5+INDEX_SHIFT, 705, 10 }, /* 1011000001 */
- { 6+INDEX_SHIFT, 5634, 13 }, /* 1011000000010 */
- { 7+INDEX_SHIFT, 5635, 13 } /* 1011000000011 */
-};
-
-const Coding codesTnsCoeff3WB[] =
-{
- { -8+INDEX_SHIFT, 5638, 13 }, /* 1011000000110 */
- { -7+INDEX_SHIFT, 5639, 13 }, /* 1011000000111 */
- { -6+INDEX_SHIFT, 2816, 12 }, /* 101100000000 */
- { -5+INDEX_SHIFT, 353, 9 }, /* 101100001 */
- { -4+INDEX_SHIFT, 177, 8 }, /* 10110001 */
- { -3+INDEX_SHIFT, 45, 6 }, /* 101101 */
- { -2+INDEX_SHIFT, 10, 4 }, /* 1010 */
- { -1+INDEX_SHIFT, 0, 2 }, /* 00 */
- { 0+INDEX_SHIFT, 3, 2 }, /* 11 */
- { 1+INDEX_SHIFT, 1, 2 }, /* 01 */
- { 2+INDEX_SHIFT, 4, 3 }, /* 100 */
- { 3+INDEX_SHIFT, 23, 5 }, /* 10111 */
- { 4+INDEX_SHIFT, 89, 7 }, /* 1011001 */
- { 5+INDEX_SHIFT, 705, 10 }, /* 1011000001 */
- { 6+INDEX_SHIFT, 2817, 12 }, /* 101100000001 */
- { 7+INDEX_SHIFT, 2818, 12 } /* 101100000010 */
-};
-
-const Word16 nTnsCoeffCodes = sizeof(codesTnsCoeff0TCX20)/sizeof(codesTnsCoeff0TCX20[0]);
-
-const Coding * const codesTnsCoeffSWBTCX20[] = { codesTnsCoeff0TCX20, codesTnsCoeff1TCX20, codesTnsCoeff2TCX20, codesTnsCoeff3TCX20, codesTnsCoeff4TCX20, codesTnsCoeff5, codesTnsCoeff6, codesTnsCoeff7 };
-const Coding * const codesTnsCoeffSWBTCX10[] = { codesTnsCoeff0TCX10, codesTnsCoeff1TCX10, codesTnsCoeff2TCX10, codesTnsCoeff3TCX10, codesTnsCoeff4TCX10, codesTnsCoeff5, codesTnsCoeff6, codesTnsCoeff7 };
-const Coding * const codesTnsCoeffWBTCX20[] = { codesTnsCoeff0WBTCX20, codesTnsCoeff1WBTCX20, codesTnsCoeff2WB, codesTnsCoeff3WB, codesTnsCoeff456, codesTnsCoeff456, codesTnsCoeff456, codesTnsCoeff7 };
-
-const Word16 nTnsCoeffTables = sizeof(codesTnsCoeffSWBTCX20)/sizeof(codesTnsCoeffSWBTCX20[0]); // Q0
-
-const Coding codesTnsOrderTCX20[] =
-{
- { 1, 0, 2 }, /* 00 */
- { 2, 40, 6 }, /* 101000 */
- { 3, 41, 6 }, /* 101001 */
- { 4, 21, 5 }, /* 10101 */
- { 5, 11, 4 }, /* 1011 */
- { 6, 4, 3 }, /* 100 */
- { 7, 1, 2 }, /* 01 */
- { 8, 3, 2 } /* 11 */
-};
-const Coding codesTnsOrderTCX10[] =
-{
- { 1, 0, 3 }, /* 000 */
- { 2, 16, 5 }, /* 10000 */
- { 3, 17, 5 }, /* 10001 */
- { 4, 9, 4 }, /* 1001 */
- { 5, 1, 3 }, /* 001 */
- { 6, 5, 3 }, /* 101 */
- { 7, 1, 2 }, /* 01 */
- { 8, 3, 2 } /* 11 */
-};
-const Coding codesTnsOrder[] =
-{
- { 1, 96, 7 }, /* 1100000 */
- { 2, 97, 7 }, /* 1100001 */
- { 3, 49, 6 }, /* 110001 */
- { 4, 25, 5 }, /* 11001 */
- { 5, 13, 4 }, /* 1101 */
- { 6, 7, 3 }, /* 111 */
- { 7, 2, 2 }, /* 10 */
- { 8, 0, 1 } /* 0 */
-};
-
-const Word16 nTnsOrderCodes = sizeof(codesTnsOrder)/sizeof(codesTnsOrder[0]); // Q0
-
-const ParamsBitMap tnsSWBTCX20FilterCoeffBitMap =
-{
- 1,
- {
- { 0, GetSWBTCX20TnsFilterCoeffBits, TRUE, GetTnsFilterCoeff, SetTnsFilterCoeff, EncodeSWBTCX20TnsFilterCoeff, DecodeSWBTCX20TnsFilterCoeff_flt, NULL } /* TNS filter coefficients */
- }
-};
-
-const ParamsBitMap tnsSWBTCX10FilterCoeffBitMap =
-{
- 1,
- {
- { 0, GetSWBTCX10TnsFilterCoeffBits, TRUE, GetTnsFilterCoeff, SetTnsFilterCoeff, EncodeSWBTCX10TnsFilterCoeff, DecodeSWBTCX10TnsFilterCoeff_flt, NULL } /* TNS filter coefficients */
- }
-};
-
-const ParamsBitMap tnsSWBTCX20FilterBitMap =
-{
- 1,
- {
- { 0, GetTnsFilterOrderBitsSWBTCX20, FALSE, GetTnsFilterOrder, SetTnsFilterOrder, EncodeTnsFilterOrderSWBTCX20, DecodeTnsFilterOrderSWBTCX20_flt, &tnsSWBTCX20FilterCoeffBitMap } /* TNS filter order */
- }
-};
-
-const ParamsBitMap tnsSWBTCX10FilterBitMap =
-{
- 1,
- {
- { 0, GetTnsFilterOrderBitsSWBTCX10, FALSE, GetTnsFilterOrder, SetTnsFilterOrder, EncodeTnsFilterOrderSWBTCX10, DecodeTnsFilterOrderSWBTCX10_flt, &tnsSWBTCX10FilterCoeffBitMap } /* TNS filter order */
- }
-};
-
-const ParamsBitMap tnsSWBTCX20BitMap =
-{
- 1,
- {
- { 1, NULL, FALSE, GetNumOfTnsFilters_flt, SetNumOfTnsFilters_flt, NULL, NULL, &tnsSWBTCX20FilterBitMap } /* Number of TNS filters */
- }
-};
-
-/* For storing/reading bits in SWB/FB mode */
-const ParamsBitMap tnsEnabledSWBTCX20BitMap =
-{
- 1,
- {
- { 1, NULL, TRUE, GetTnsEnabled, SetTnsEnabled, NULL, NULL, &tnsSWBTCX20BitMap } /* TNS Enabled/Disable */
- }
-};
-
-const ParamsBitMap tnsSWBTCX10BitMap =
-{
- 1,
- {
- { 1, NULL, FALSE, GetNumOfTnsFilters_flt, SetNumOfTnsFilters_flt, NULL, NULL, &tnsSWBTCX10FilterBitMap } /* Number of TNS filters */
- }
-};
-
-/* For storing/reading bits in SWB/FB mode */
-const ParamsBitMap tnsEnabledSWBTCX10BitMap =
-{
- 1,
- {
- { 1, NULL, TRUE, GetTnsEnabled, SetTnsEnabled, NULL, NULL, &tnsSWBTCX10BitMap } /* TNS Enabled/Disable */
- }
-};
-
-const ParamsBitMap tnsWBTCX20FilterCoeffBitMap =
-{
- 1,
- {
- { 0, GetWBTCX20TnsFilterCoeffBits, TRUE, GetTnsFilterCoeff, SetTnsFilterCoeff, EncodeWBTCX20TnsFilterCoeff, DecodeWBTCX20TnsFilterCoeff_flt, NULL } /* TNS filter coefficients */
- }
-};
-
-
-const ParamsBitMap tnsWBTCX20FilterBitMap =
-{
- 1,
- {
- { 0, GetTnsFilterOrderBits, FALSE, GetTnsFilterOrder, SetTnsFilterOrder, EncodeTnsFilterOrder, DecodeTnsFilterOrder_flt, &tnsWBTCX20FilterCoeffBitMap } /* TNS filter order */
- }
-};
-
-
-/* For storing/reading bits in WB mode */
-const ParamsBitMap tnsEnabledWBTCX20BitMap =
-{
- 1,
- {
- { 1, NULL, TRUE, GetTnsEnabledSingleFilter, SetTnsEnabledSingleFilter, NULL, NULL, &tnsWBTCX20FilterBitMap } /* TNS Enabled/Disable */
- }
-};
-
-/* For storing/reading bits in SWB/FB mode */
-const ParamsBitMap tnsOnWhiteSWBTCX20BitMap =
-{
- 2,
- {
- { 1, NULL, TRUE, GetTnsOnWhite, SetTnsOnWhite, NULL, NULL, NULL }, /* TNS Enabled/Disable */
- { 1, NULL, FALSE, GetNumOfTnsFilters_flt, SetNumOfTnsFilters_flt, NULL, NULL, &tnsSWBTCX20FilterBitMap }
- }
-};
-
-const ParamsBitMap tnsEnabledOnWhiteSWBTCX20BitMap =
-{
- 1,
- {
- { 1, NULL, TRUE, GetTnsEnabled, SetTnsEnabled, NULL, NULL, &tnsOnWhiteSWBTCX20BitMap } /* TNS Enabled/Disable */
- }
-};
-/* For storing/reading bits in SWB/FB mode */
-const ParamsBitMap tnsOnWhiteSWBTCX10BitMap =
-{
- 2,
- {
- { 1, NULL, TRUE, GetTnsOnWhite, SetTnsOnWhite, NULL, NULL, NULL }, /* TNS on whitened spectra */
- { 1, NULL, FALSE, GetNumOfTnsFilters_flt, SetNumOfTnsFilters_flt, NULL, NULL, &tnsSWBTCX10FilterBitMap }
- }
-};
-
-/* For storing/reading bits in SWB/FB mode */
-const ParamsBitMap tnsEnabledOnWhiteSWBTCX10BitMap =
-{
- 1,
- {
- { 1, NULL, TRUE, GetTnsEnabled, SetTnsEnabled, NULL, NULL, &tnsOnWhiteSWBTCX10BitMap } /* TNS Enabled/Disable */
- }
-};
-
-
-/**
- * 4 bit resolution TNS coefficients.
- */
-const Word16 tnsCoeff4[16] =
-{
- -32628/*-0.99573418F Q15*/, /* = sin(-8*(PI/2.0)/(8 + 0.5)) */
- -31517/*-0.96182564F Q15*/, /* = sin(-7*(PI/2.0)/(8 + 0.5)) */
- -29333/*-0.89516329F Q15*/,
- -26149/*-0.79801723F Q15*/,
- -22076/*-0.67369564F Q15*/,
- -17250/*-0.52643216F Q15*/,
- -11837/*-0.36124167F Q15*/,
- -6021/*-0.18374952F Q15*/, /* = sin(-1*(PI/2.0)/(8 + 0.5)) */
- 0/* 0.00000000F Q15*/, /* = sin(0*(PI/2.0)/(8 + 0.5)) */
- 6813/* 0.20791169F Q15*/, /* = sin(1*(PI/2.0)/(8 - 0.5)) */
- 13328/* 0.40673664F Q15*/,
- 19261/* 0.58778525F Q15*/,
- 24351/* 0.74314483F Q15*/,
- 28378/* 0.86602540F Q15*/,
- 31164/* 0.95105652F Q15*/, /* = sin(6*(PI/2.0)/(8 - 0.5)) */
- 32588/* 0.99452190F Q15*/ /* = sin(7*(PI/2.0)/(8 - 0.5)) */
-};
-
-
-/*----------------------------------------------------------------------------------*
- * IGF settings for each bitrate
- *----------------------------------------------------------------------------------*/
-
-const Word16 swb_offset_LB_new[IGF_BITRATE_UNKNOWN][IGF_MAX_SFB] = // Q0
-{
- /* 0: for 9600 kbs WB */
- {
- 4, 164, 186, 242, 320
- },
- /* 1: for 13200 kbs WB RF */
- {
- 4, 164, 186, 242, 320
- },
- /* 2: for 9600 kbs SWB */
- {
- 4, 200, 322, 444, 566
- },
- /* 3: for 13200 kbs SWB */
- {
- 7, 256, 288, 328, 376, 432, 496, 566
- },
- /* 4: for 13200 kbs SWB RF */
- {
- 4, 200, 322, 444, 566
- },
- /* 5: for 16400 kbs SWB */
- {
- 8, 256, 288, 328, 376, 432, 496, 576, 640
- },
- /* 6: for 24400 kbs SWB */
- {
- 9, 256, 284, 318, 358, 402, 450, 508, 576, 640
- },
- /* 7: for 32000 kbs SWB */
- {
- 9, 256, 284, 318, 358, 402, 450, 508, 576, 640
- },
- /* 8: for 48000 kbs SWB */
- {
- 4, 512, 534, 576, 640
- },
- /* 9: for 64000 kbs SWB */
- {
- 4, 512, 534, 576, 640
- },
- /* 10: for 16400 kbs FB */
- {
- 10, 256, 288, 328, 376, 432, 496, 576, 640, 720, 800
- },
- /* 11: for 24400 kbs FB */
- {
- 11, 256, 284, 318, 358, 402, 450, 508, 576, 640, 720, 800
- },
- /* 12: for 32000 kbs FB */
- {
- 11, 256, 284, 318, 358, 402, 450, 508, 576, 640, 720, 800
- },
- /* 13: for 48000 kbs FB */
- {
- 5, 512, 584, 656, 728, 800
- },
- /* 14: for 64000 kbs FB */
- {
- 5, 512, 584, 656, 728, 800
- },
- /* 15: for 96000 kbs FB */
- {
- 3, 640, 720, 800 /* old: 640, 760, 880 */
- },
- /* 16: for 128000 kbs FB */
- {
- 3, 640, 720, 800 /* old: 640, 760, 880 */
- },
- /* 17: for 13200 kbs WB (stereo) */
- {
- 3, 196, 248, 320
- },
- /* 18: for 16400 kbs WB (stereo) */
- {
- 3, 228, 268, 320
- },
- /* 19: for 13200 kbs SWB (stereo) */
- {
- 5, 200, 264, 344, 440, 566
- },
- /* 20: for 16400 kbs SWB (stereo) */
- {
- 7, 228, 264, 308, 360, 420, 488, 566
- },
- /* 21: for 24400 kbs SWB (stereo) */
- {
- 8, 256, 288, 328, 376, 432, 496, 576, 640
- },
- /* 22: for 32000 kbs SWB (stereo) */
- {
- 9, 256, 284, 320, 360, 404, 452, 508, 576, 640
- },
- /* 23: for 48000 kbs SWB (stereo) */
- {
- 7, 360, 392, 424, 464, 508, 560, 640
- },
- /* 24: for 48000 kbs SWB (stereo TCX10) */
- {
- 4, 360, 424, 508, 640
- },
- /* 25: for 64000 kbs SWB (stereo) */
- {
- 8, 400, 424, 448, 476, 508, 540, 576, 640
- },
- /* 26: for 80000 kbs SWB (stereo) */
- {
- 5, 464, 496, 532, 576, 640
- },
- /* 27: for 96000 kbs SWB (stereo) */
- {
- 4, 512, 536, 576, 640
- },
- /* 28: for 24400 kbs FB (stereo) */
- {
- 10, 256, 288, 328, 376, 432, 496, 576, 640, 720, 800
- },
- /* 29: for 32000 kbs FB (stereo) */
- {
- 11, 256, 284, 320, 360, 404, 452, 508, 576, 640, 720, 800
- },
- /* 30: for 48000 kbs FB (stereo) */
- {
- 9, 360, 392, 424, 464, 508, 560, 640, 720, 800
- },
- /* 31: for 48000 kbs FB (stereo TCX10) */
- {
- 5, 360, 424, 508, 640, 800
- },
- /* 32: for 64000 kbs FB (stereo) */
- {
- 10, 400, 424, 448, 476, 508, 540, 576, 640, 720, 800
- },
- /* 33: for 80000 kbs FB (stereo) */
- {
- 7, 464, 496, 532, 576, 640, 720, 800
- },
- /* 34: for 96000 kbs FB (stereo) */
- {
- 6, 512, 536, 576, 640, 720, 800
- },
- /* 35: for 128000 kbs FB (stereo) */
- {
- 3, 640, 720, 800
- }
-};/*Q0*/
-
-const Word16 igf_tile_offset_table[IGF_BITRATE_UNKNOWN][2*IGF_MAX_TILES+1] = { // Q0
- { 2, 2, 0, 3, 0}, /* 9600 WB*/
- { 2, 2, 0, 3, 0}, /* 13200 WB RF */
- { 3, 1, 0, 2, 32, 3, 46}, /* 9600 SWB */
- { 2, 4, 0, 6, 32}, /* 13200 SWB RF */
- { 3, 1, 0, 2, 32, 3, 46}, /* 13200 SWB */
- { 3, 4, 0, 6, 48, 7, 64}, /* 16400 SWB */
- { 3, 4, 0, 7, 32, 8, 64}, /* 24400 SWB */
- { 3, 4, 0, 7, 32, 8, 64}, /* 32000 SWB */
- { 1, 3, 320}, /* 48000 SWB */
- { 1, 3, 320}, /* 64000 SWB */
- { 3, 4, 0, 7, 0, 9, 0}, /* 16400 FB */
- { 4, 4, 0, 6, 32, 9, 0, 10, 80}, /* 24400 FB */
- { 4, 4, 0, 6, 32, 9, 0, 10, 80}, /* 32000 FB */
- { 1, 4, 160}, /* 48000 FB */
- { 1, 4, 160}, /* 64000 FB */
- { 1, 2, 416}, /* 96000 FB */
- { 1, 2, 416}, /*128000 FB */
- { 2, 1, 40, 2, 92}, /* 13200 WB (stereo) */
- { 2, 1, 80, 2, 120}, /* 16400 WB (stereo) */
- { 4, 1, 0, 2, 32, 3, 46, 4, 40}, /* 13200 SWB (stereo) */
- { 6, 1, 0, 2, 36, 3, 80, 4, 132, 5, 32, 6, 100 }, /* 16400 SWB (stereo) */
- { 7, 1, 0, 2, 32, 3, 72, 4, 120, 5, 48, 6, 112, 7, 64 }, /* 24400 SWB (stereo) */
- { 8, 1, 0, 2, 28, 3, 64, 4, 104, 5, 32, 6, 80, 7, 136, 8, 64 }, /* 32000 SWB (stereo) */
- { 6, 1, 120, 2, 152, 3, 184, 4, 224, 5, 140, 6, 192}, /* 48000 SWB (stereo) */
- { 3, 1, 0, 2, 40, 3, 80 }, /* 48000 SWB (stereo TCX10) */
- { 4, 2, 80, 4, 128, 6, 144, 7, 212 }, /* 64000 SWB (stereo) */
- { 2, 2, 212, 4, 280 }, /* 80000 SWB (stereo) */
- { 1, 3, 200}, /* 96000 SWB (stereo) */
- { 9, 1, 0, 2, 32, 3, 72, 4, 120, 5, 48, 6, 112, 7, 64, 8, 0, 9, 80 }, /* 24400 FB (stereo) */
- {10, 1, 0, 2, 28, 3, 64, 4, 104, 5, 32, 6, 80, 7, 136, 8, 64, 9, 0, 10, 80 }, /* 32000 FB (stereo) */
- { 7, 1, 120, 2, 152, 3, 184, 4, 224, 5, 140, 6, 192, 8, 140}, /* 48000 FB (stereo) */
- { 4, 1, 0, 2, 40, 3, 80, 4, 140 }, /* 48000 FB (stereo TCX10) */
- { 5, 2, 80, 4, 128, 6, 144, 7, 212, 9, 160 }, /* 64000 FB (stereo) */
- { 3, 2, 212, 4, 280, 6, 200 }, /* 80000 FB (stereo) */
- { 2, 3, 200, 5, 240}, /* 96000 FB (stereo) */
- { 1, 2, 416} /*128000 FB (stereo) */
-};
-
-const Word16 igf_whitening_TH_ivas_fx[][2][IGF_MAX_TILES] =
-{
- /* 0: for 9600 kbs WB */
- {
- /* medium */ { 2949/*0.36f Q13*/, 2949/*0.36f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 11551/*1.41f Q13*/, 11551/*1.41f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
- },
- /* 1: for 13200 kbs WB RF */
- {
- /* medium */ { 2949/*0.36f Q13*/, 2949/*0.36f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 11551/*1.41f Q13*/, 11551/*1.41f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
- },
- /* 2: for 9600 kbs SWB */
- {
- /* medium */ { 6881/*0.84f Q13*/, 7291/*0.89f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 10650/*1.30f Q13*/, 10240/*1.25f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
- },
- /* 3: for 13200 kbs SWB */
- {
- /* medium */ { 6881/*0.84f Q13*/, 7291/*0.89f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 10650/*1.30f Q13*/, 10240/*1.25f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
- },
- /* 4: for 13200 kbs SWB RF */
- {
- /* medium */ { 6881/*0.84f Q13*/, 7291/*0.89f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 10650/*1.30f Q13*/, 10240/*1.25f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
- },
- /* 5: for 16400 kbs SWB */
- {
- /* medium */ { 6799/*0.83f Q13*/, 7291/*0.89f Q13*/, 7291/*0.89f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 10732/*1.31f Q13*/, 9748/*1.19f Q13*/, 9748/*1.19f Q13*/, 0/*0.f Q13*/}
- },
- /* 6: for 24400 kbs SWB*/
- {
- /* medium */ { 6636/*0.81f Q13*/, 6963/*0.85f Q13*/, 6963/*0.85f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 11059/*1.35f Q13*/, 10076/*1.23f Q13*/, 10076/*1.23f Q13*/, 0/*0.f Q13*/}
- },
- /* 7: for 32000 kbs SWB */
- {
- /* medium */ { 7455/*0.91f Q13*/, 6963/*0.85f Q13*/, 6963/*0.85f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 10977/*1.34f Q13*/, 11059/*1.35f Q13*/, 11059/*1.35f Q13*/, 0/*0.f Q13*/}
- },
- /* 8: for 48000 kbs SWB */
- {
- /* medium */ { 9421/*1.15f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 9748/*1.19f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
- },
- /* 9: for 64000 kbs SWB */
- {
- /* medium */ { 9421/*1.15f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 9748/*1.19f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
- },
- /* 10: for 16400 kbs FB */
- {
- /* medium */ { 5161/*0.63f Q13*/, 2212/*0.27f Q13*/, 2949/*0.36f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 12534/*1.53f Q13*/, 10813/*1.32f Q13*/, 5489/*0.67f Q13*/, 0/*0.f Q13*/}
- },
- /* 11: for 24400 kbs FB */
- {
- /* medium */ { 6390/*0.78f Q13*/, 2540/*0.31f Q13*/, 2785/*0.34f Q13*/, 2785/*0.34f Q13*/},
- /* strong */ { 12206/*1.49f Q13*/, 11305/*1.38f Q13*/, 5325/*0.65f Q13*/, 5325/*0.65f Q13*/}
- },
- /* 12: for 32000 kbs FB */
- {
- /* medium */ { 6390/*0.78f Q13*/, 2540/*0.31f Q13*/, 2785/*0.34f Q13*/, 2785/*0.34f Q13*/},
- /* strong */ { 12206/*1.49f Q13*/, 11305/*1.38f Q13*/, 5325/*0.65f Q13*/, 5325/*0.65f Q13*/}
- },
- /* 13: for 48000 kbs FB */
- {
- /* medium */ { 6554/*0.80f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 8192/*1.00f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
- },
- /* 14: for 64000 kbs FB */
- {
- /* medium */ { 6554/*0.80f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 8192/*1.00f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
- },
- /* 15: for 96000 kbs FB */
- {
- /* medium */ { 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 23101/*2.82f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
- },
- /* 16: for 128000 kbs FB */
- {
- /* medium */ { 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 23101/*2.82f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
- },
- /* 17: for 13200 kbs WB (stereo) */
- {
- /* medium */ {6554/*0.800000 Q13*/, 6144/*0.750000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/ },
- /* strong */ {12288/*1.500000 Q13*/, 11878/*1.450000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/ }
- },
- /* 18: for 16400 kbs WB (stereo) */
- {
-
- /* medium */ {7373/*0.900000 Q13*/, 6963/*0.850000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/ },
- /* strong */ {13107/*1.600000 Q13*/, 12288/*1.500000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/ }
- },
- /* 19: for 13200 kbs SWB (stereo) */
- {
- /* medium */ {7291/*0.890000 Q13*/, 7291/*0.890000 Q13*/, 6554/*0.800000 Q13*/, 6554/*0.800000 Q13*/, },
- /* strong */ {10240/*1.250000 Q13*/, 10240/*1.250000 Q13*/, 9748/*1.190000 Q13*/, 9748/*1.190000 Q13*/, }
- },
- /* 20: for 16400 kbs SWB (stereo) */
- {
- /* medium */ {8602/*1.050000 Q13*/, 8602/*1.050000 Q13*/, 9011/*1.100000 Q13*/, 9011/*1.100000 Q13*/, 8602/*1.050000 Q13*/, 8602/*1.050000 Q13*/, },
- /* strong */ {13926/*1.700000 Q13*/, 13926/*1.700000 Q13*/, 13517/*1.650000 Q13*/, 13517/*1.650000 Q13*/, 13107/*1.600000 Q13*/, 12288/*1.500000 Q13*/, }
- },
- /* 21: for 24400 kbs SWB (stereo) */
- {
- /* medium */ {9830/*1.200000 Q13*/, 9830/*1.200000 Q13*/, 9421/*1.150000 Q13*/, 9011/*1.100000 Q13*/, 8602/*1.050000 Q13*/, 8192/*1.000000 Q13*/, 7373/*0.900000 Q13*/, },
- /* strong */ {13926/*1.700000 Q13*/, 13926/*1.700000 Q13*/, 13926/*1.700000 Q13*/, 13926/*1.700000 Q13*/, 12698/*1.550000 Q13*/, 11878/*1.450000 Q13*/, 9830/*1.200000 Q13*/, }
- },
- /* 22: for 32000 kbs SWB (stereo) */
- {
- /* medium */ {9830/*1.200000 Q13*/, 9830/*1.200000 Q13*/, 9421/*1.150000 Q13*/, 9421/*1.150000 Q13*/, 9011/*1.100000 Q13*/, 8602/*1.050000 Q13*/, 8192/*1.000000 Q13*/, 7373/*0.900000 Q13*/, },
- /* strong */ {14746/*1.800000 Q13*/, 14746/*1.800000 Q13*/, 14746/*1.800000 Q13*/, 14746/*1.800000 Q13*/, 13517/*1.650000 Q13*/, 12698/*1.550000 Q13*/, 11878/*1.450000 Q13*/, 9830/*1.200000 Q13*/, }
- },
- /* 23: for 48000 kbs SWB (stereo) */ /* currently not used due to adaptive calculation of thresholds at 48 kbps */
- {
- /* medium */ {6144/*0.750000 Q13*/, 5734/*0.700000 Q13*/, 4096/*0.500000 Q13*/, 0/*0.000000 Q13*/ },
- /* strong */ {10240/*1.250000 Q13*/, 9011/*1.100000 Q13*/, 8192/*1.000000 Q13*/, 0/*0.000000 Q13*/ }
- },
- /* 24: for 48000 kbs SWB (stereo TCX10) */ /* currently not used due to adaptive calculation of thresholds at 48 kbps */
- {
- /* medium */ {6144/*0.750000 Q13*/, 5734/*0.700000 Q13*/, 4096/*0.500000 Q13*/, 0/*0.000000 Q13*/ },
- /* strong */ {10240/*1.250000 Q13*/, 9011/*1.100000 Q13*/, 8192/*1.000000 Q13*/, 0/*0.000000 Q13*/ }
- },
- /* 25: for 64000 kbs SWB (stereo) */
- {
- /* medium */ {8192/*1.000000 Q13*/, 8192/*1.000000 Q13*/, 9830/*1.200000 Q13*/, 10240/*1.250000 Q13*/ },
- /* strong */ {12288/*1.500000 Q13*/, 12288/*1.500000 Q13*/, 13107/*1.600000 Q13*/, 13107/*1.600000 Q13*/ }
- },
- /* 26: for 80000 kbs SWB (stereo) */
- {
- /* medium */ {9830/*1.200000 Q13*/, 10240/*1.250000 Q13*/, 0/*0.000000 Q13*/ },
- /* strong */ {13107/*1.600000 Q13*/, 13107/*1.600000 Q13*/, 0/*0.000000 Q13*/ }
- },
- /* 27: for 96000 kbs SWB (stereo) */
- {
- /* medium */ {9421/*1.150000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/ },
- /* strong */ {9748/*1.190000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/ }
- },
- /* 28: for 24400 kbs FB (stereo) */
- {
- /* medium */ {9830/*1.200000 Q13*/, 9830/*1.200000 Q13*/, 9421/*1.150000 Q13*/, 9011/*1.100000 Q13*/, 8602/*1.050000 Q13*/, 8192/*1.000000 Q13*/, 7373/*0.900000 Q13*/, 2785/*0.340000 Q13*/, 2785/*0.340000 Q13*/ },
- /* strong */ {13926/*1.700000 Q13*/, 13926/*1.700000 Q13*/, 13926/*1.700000 Q13*/, 13926/*1.700000 Q13*/, 12698/*1.550000 Q13*/, 11878/*1.450000 Q13*/, 9830/*1.200000 Q13*/, 5325/*0.650000 Q13*/, 5325/*0.650000 Q13*/ }
- },
- /* 29: for 32000 kbs FB (stereo) */
- {
- /* medium */ {9830/*1.200000 Q13*/, 9830/*1.200000 Q13*/, 9421/*1.150000 Q13*/, 9421/*1.150000 Q13*/, 9011/*1.100000 Q13*/, 8602/*1.050000 Q13*/, 8192/*1.000000 Q13*/, 7373/*0.900000 Q13*/, 2785/*0.340000 Q13*/, 2785/*0.340000 Q13*/ },
- /* strong */ {14746/*1.800000 Q13*/, 14746/*1.800000 Q13*/, 14746/*1.800000 Q13*/, 14746/*1.800000 Q13*/, 13517/*1.650000 Q13*/, 12698/*1.550000 Q13*/, 11878/*1.450000 Q13*/, 9830/*1.200000 Q13*/, 5325/*0.650000 Q13*/, 5325/*0.650000 Q13*/ }
- },
- /* 30: for 48000 kbs FB (stereo) */ /* currently not used due to adaptive calculation of thresholds at 48 kbps */
- {
- /* medium */ {6390/*0.780000 Q13*/, 2540/*0.310000 Q13*/, 2785/*0.340000 Q13*/, 2785/*0.340000 Q13*/ },
- /* strong */ {12206/*1.490000 Q13*/, 11305/*1.380000 Q13*/, 5325/*0.650000 Q13*/, 5325/*0.650000 Q13*/ }
- },
- /* 31: for 48000 kbs FB (stereo TCX10) */ /* currently not used due to adaptive calculation of thresholds at 48 kbps */
- {
- /* medium */ {6144/*0.750000 Q13*/, 5734/*0.700000 Q13*/, 4096/*0.500000 Q13*/, 4096/*0.500000 Q13*/ },
- /* strong */ {10240/*1.250000 Q13*/, 9011/*1.100000 Q13*/, 8192/*1.000000 Q13*/, 8192/*1.000000 Q13*/ }
- },
- /* 32: for 64000 kbs FB (stereo) */
- {
- /* medium */ {8192/*1.000000 Q13*/, 8192/*1.000000 Q13*/, 9830/*1.200000 Q13*/, 10240/*1.250000 Q13*/, 6144/*0.750000 Q13*/ },
- /* strong */ {12288/*1.500000 Q13*/, 12288/*1.500000 Q13*/, 13107/*1.600000 Q13*/, 13107/*1.600000 Q13*/, 8192/*1.000000 Q13*/ }
- },
- /* 33: for 80000 kbs FB (stereo) */
- {
- /* medium */ {9830/*1.200000 Q13*/, 10240/*1.250000 Q13*/, 6144/*0.750000 Q13*/, 0/*0.000000 Q13*/ },
- /* strong */ {13107/*1.600000 Q13*/, 13107/*1.600000 Q13*/, 8192/*1.000000 Q13*/, 0/*0.000000 Q13*/ }
- },
- /* 34: for 96000 kbs FB (stereo) */
- {
- /* medium */ {7455/*0.910000 Q13*/, 6963/*0.850000 Q13*/ , 0/*0.000000 Q13*/ },
- /* strong */ {10977/*1.340000 Q13*/, 11059/*1.350000 Q13*/, 0/*0.000000 Q13*/ }
- },
- /* 35: for 128000 kbs FB (stereo) */
- {
- /* medium */ { 0/*0.000000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/},
- /* strong */ {23101/*2.820000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/}
- }
-};
-const Word16 igf_whitening_TH[][2][IGF_MAX_TILES] =
-{
- /* 0: for 9600 kbs WB */
- {
- /* medium */ { 2949/*0.36f Q13*/, 2949/*0.36f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 11551/*1.41f Q13*/, 11551/*1.41f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
-},
-/* 1: for 13200 kbs WB RF */
-{
- /* medium */ { 2949/*0.36f Q13*/, 2949/*0.36f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 11551/*1.41f Q13*/, 11551/*1.41f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
-},
-/* 2: for 9600 kbs SWB */
-{
- /* medium */ { 6881/*0.84f Q13*/, 7291/*0.89f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 10650/*1.30f Q13*/, 10240/*1.25f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
-},
-/* 3: for 13200 kbs SWB */
-{
- /* medium */ { 6881/*0.84f Q13*/, 7291/*0.89f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 10650/*1.30f Q13*/, 10240/*1.25f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
-},
-/* 4: for 13200 kbs SWB RF */
-{
- /* medium */ { 6881/*0.84f Q13*/, 7291/*0.89f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 10650/*1.30f Q13*/, 10240/*1.25f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
-},
-/* 5: for 16400 kbs SWB */
-{
- /* medium */ { 6799/*0.83f Q13*/, 7291/*0.89f Q13*/, 7291/*0.89f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 10732/*1.31f Q13*/, 9748/*1.19f Q13*/, 9748/*1.19f Q13*/, 0/*0.f Q13*/}
-},
-/* 6: for 24400 kbs SWB*/
-{
- /* medium */ { 6636/*0.81f Q13*/, 6963/*0.85f Q13*/, 6963/*0.85f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 11059/*1.35f Q13*/, 10076/*1.23f Q13*/, 10076/*1.23f Q13*/, 0/*0.f Q13*/}
-},
-/* 7: for 32000 kbs SWB */
-{
- /* medium */ { 7455/*0.91f Q13*/, 6963/*0.85f Q13*/, 6963/*0.85f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 10977/*1.34f Q13*/, 11059/*1.35f Q13*/, 11059/*1.35f Q13*/, 0/*0.f Q13*/}
-},
-/* 8: for 48000 kbs SWB */
-{
- /* medium */ { 9421/*1.15f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 9748/*1.19f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
-},
-/* 9: for 64000 kbs SWB */
-{
- /* medium */ { 9421/*1.15f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 9748/*1.19f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
-},
-/* 10: for 16400 kbs FB */
-{
- /* medium */ { 5161/*0.63f Q13*/, 2212/*0.27f Q13*/, 2949/*0.36f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 12534/*1.53f Q13*/, 10813/*1.32f Q13*/, 5489/*0.67f Q13*/, 0/*0.f Q13*/}
-},
-/* 11: for 24400 kbs FB */
-{
- /* medium */ { 6390/*0.78f Q13*/, 2540/*0.31f Q13*/, 2785/*0.34f Q13*/, 2785/*0.34f Q13*/},
- /* strong */ { 12206/*1.49f Q13*/, 11305/*1.38f Q13*/, 5325/*0.65f Q13*/, 5325/*0.65f Q13*/}
-},
-/* 12: for 32000 kbs FB */
-{
- /* medium */ { 6390/*0.78f Q13*/, 2540/*0.31f Q13*/, 2785/*0.34f Q13*/, 2785/*0.34f Q13*/},
- /* strong */ { 12206/*1.49f Q13*/, 11305/*1.38f Q13*/, 5325/*0.65f Q13*/, 5325/*0.65f Q13*/}
-},
-/* 13: for 48000 kbs FB */
-{
- /* medium */ { 6554/*0.80f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 8192/*1.00f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
-},
-/* 14: for 64000 kbs FB */
-{
- /* medium */ { 6554/*0.80f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 8192/*1.00f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
-},
-/* 15: for 96000 kbs FB */
-{
- /* medium */ { 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 23101/*2.82f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
-},
-/* 16: for 128000 kbs FB */
-{
- /* medium */ { 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
- /* strong */ { 23101/*2.82f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
-}
-};
-
-/* IGF SCF arithmetic coder cumulative frequency tables and offsets */
-
-const Word16 cf_off_se01_tab[10] = { // Q0
- +1, /* 9.6 kbs B*/
- +1, /* 13.2 kbs WB RF B*/
- +1, /* 9.6 kbs SWB B*/
- +1, /* 13.2 kbs A*/
- +1, /* 13.2 kbs SWB RF B*/
- +1, /* 16.4 kbs B*/
- +1, /* 24.4 kbs B*/
- +1, /* 32.0 kbs A*/
- -1, /* 48.0 kbs B*/
- -1 /* 64.0 kbs B*/
-};
-
-const Word16 cf_off_se02_tab[10][IGF_CTX_COUNT] = { // Q0
- { +1, +2, +2, +2, +3, +3, +4}, /* 9.6 kbs B*/
- { +1, +2, +2, +2, +3, +3, +4}, /* 13.2 kbs WB RF B*/
- { +0, +2, +3, +3, +2, +2, +4}, /* 9.6 kbs SWB B*/
- { +0, +2, +3, +3, +2, +2, +4}, /* 13.2 kbs A*/
- { +0, +2, +3, +3, +2, +2, +4}, /* 13.2 kbs SWB RF B*/
- { +0, +2, +3, +3, +2, +2, +4}, /* 16.4 kbs B*/
- { -1, +2, +2, +2, +2, +3, +5}, /* 24.4 kbs B*/
- { -1, +2, +2, +2, +2, +3, +5}, /* 32.0 kbs A*/
- { +3, +2, +3, +2, +3, +3, +6}, /* 48.0 kbs B*/
- { +3, +2, +3, +2, +3, +3, +6} /* 64.0 kbs B*/
-};
-
-const Word16 cf_off_se10_tab = -7; // Q0
-
-const Word16 cf_off_se11_tab[IGF_CTX_COUNT][IGF_CTX_COUNT] = // Q0
-{
- { -5, +0, +0, +0, +0, +0, +0},
- { +0, +0, +0, +0, +0, +0, +0},
- { +0, +0, +0, +0, +0, +0, +0},
- { +0, +0, +0, +0, +0, +0, +0},
- { +0, +0, +0, +0, +0, +0, +0},
- { +0, +0, +0, +0, +0, +0, +1},
- { +0, +1, +0, +0, +3, +0, +3}
-};
-
-const UWord16 cf_se00_tab[IGF_SYMBOLS_IN_TABLE + 1] = // Q0
-{
- 16384, 16356, 16299, 16185, 15904, 15282, 14669, 13598, 11886, 9541, 6613, 3845, 1799, 606, 153, 32, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
-};
-
-const UWord16 cf_se01_tab[10][IGF_SYMBOLS_IN_TABLE + 1] = // Q0
-{
- {16384, 16320, 16285, 16237, 16163, 16049, 15864, 15604, 15187, 14557, 13612, 12308, 10590, 8535, 6346, 4396, 2900, 1917, 1289, 870, 593, 408, 279, 181, 122, 78, 52, 0}, /* 9.6 kbs B*/
- {16384, 16320, 16285, 16237, 16163, 16049, 15864, 15604, 15187, 14557, 13612, 12308, 10590, 8535, 6346, 4396, 2900, 1917, 1289, 870, 593, 408, 279, 181, 122, 78, 52, 0}, /* 13.2 kbs WB RF B*/
- {16384, 16375, 16362, 16339, 16307, 16258, 16180, 16061, 15845, 15463, 14795, 13680, 11828, 9252, 6358, 3769, 2079, 1186, 687, 415, 242, 150, 100, 67, 44, 30, 19, 0}, /* 9.6 kbs SWB B*/
- {16384, 16375, 16362, 16339, 16307, 16258, 16180, 16061, 15845, 15463, 14795, 13680, 11828, 9252, 6358, 3769, 2079, 1186, 687, 415, 242, 150, 100, 67, 44, 30, 19, 0}, /* 13.2 kbs A*/
- {16384, 16375, 16362, 16339, 16307, 16258, 16180, 16061, 15845, 15463, 14795, 13680, 11828, 9252, 6358, 3769, 2079, 1186, 687, 415, 242, 150, 100, 67, 44, 30, 19, 0}, /* 13.2 kbs SWB RF B*/
- {16384, 16375, 16362, 16339, 16307, 16258, 16180, 16061, 15845, 15463, 14795, 13680, 11828, 9252, 6358, 3769, 2079, 1186, 687, 415, 242, 150, 100, 67, 44, 30, 19, 0}, /* 16.4 kbs B*/
- {16384, 16369, 16356, 16337, 16311, 16268, 16197, 16073, 15876, 15544, 14977, 13987, 12327, 9908, 7017, 4393, 2545, 1446, 840, 493, 292, 183, 111, 70, 45, 31, 20, 0 }, /* 24.4 kbs B*/
- {16384, 16369, 16356, 16337, 16311, 16268, 16197, 16073, 15876, 15544, 14977, 13987, 12327, 9908, 7017, 4393, 2545, 1446, 840, 493, 292, 183, 111, 70, 45, 31, 20, 0}, /* 32.0 kbs A*/
- {16384, 16368, 16355, 16334, 16291, 16212, 16071, 15816, 15359, 14523, 13014, 10534, 7345, 4272, 2228, 1149, 626, 357, 215, 139, 93, 67, 53, 43, 36, 28, 22, 0}, /* 48.0 kbs B*/
- {16384, 16368, 16355, 16334, 16291, 16212, 16071, 15816, 15359, 14523, 13014, 10534, 7345, 4272, 2228, 1149, 626, 357, 215, 139, 93, 67, 53, 43, 36, 28, 22, 0} /* 64.0 kbs B*/
-};
-
-const UWord16 cf_se02_tab[10][IGF_CTX_COUNT][IGF_SYMBOLS_IN_TABLE + 1] = // Q0
-{
- { /* 9.6 kbs B */
- { 16384, 16369, 16348, 16316, 16256, 16172, 16017, 15735, 15246, 14363, 13036, 11139, 8916, 6724, 4757, 3282, 2221, 1549, 1105, 771, 548, 364, 238, 151, 89, 50, 30, 0},
- { 16384, 16371, 16358, 16339, 16290, 16241, 16153, 16040, 15813, 15397, 14601, 13301, 11360, 8916, 6254, 3911, 2220, 1280, 755, 461, 278, 177, 111, 70, 35, 20, 12, 0},
- { 16384, 16375, 16359, 16333, 16286, 16243, 16154, 16024, 15771, 15380, 14712, 13537, 11742, 9425, 6872, 4378, 2327, 1197, 671, 412, 259, 145, 93, 52, 26, 13, 5, 0},
- { 16384, 16372, 16358, 16326, 16289, 16241, 16147, 16014, 15765, 15321, 14670, 13546, 11912, 9787, 7323, 4824, 2536, 1330, 731, 438, 258, 148, 86, 37, 22, 11, 2, 0},
- { 16384, 16376, 16364, 16344, 16315, 16272, 16219, 16119, 15910, 15620, 15100, 14254, 13063, 11489, 9413, 7100, 4738, 2751, 1584, 973, 597, 349, 201, 96, 47, 22, 9, 0},
- { 16384, 16364, 16340, 16312, 16288, 16237, 16166, 16026, 15756, 15390, 14833, 13870, 12627, 10998, 8985, 6893, 4720, 3048, 1860, 1131, 725, 449, 215, 111, 56, 34, 14, 0},
- { 16384, 16326, 16297, 16246, 16183, 16064, 15884, 15632, 15240, 14763, 14107, 13230, 12185, 10886, 9390, 7781, 6194, 4696, 3350, 2259, 1506, 975, 604, 356, 201, 106, 48, 0}
- },
- { /* 13.2 kbs WB RF B*/
- { 16384, 16369, 16348, 16316, 16256, 16172, 16017, 15735, 15246, 14363, 13036, 11139, 8916, 6724, 4757, 3282, 2221, 1549, 1105, 771, 548, 364, 238, 151, 89, 50, 30, 0},
- { 16384, 16371, 16358, 16339, 16290, 16241, 16153, 16040, 15813, 15397, 14601, 13301, 11360, 8916, 6254, 3911, 2220, 1280, 755, 461, 278, 177, 111, 70, 35, 20, 12, 0},
- { 16384, 16375, 16359, 16333, 16286, 16243, 16154, 16024, 15771, 15380, 14712, 13537, 11742, 9425, 6872, 4378, 2327, 1197, 671, 412, 259, 145, 93, 52, 26, 13, 5, 0},
- { 16384, 16372, 16358, 16326, 16289, 16241, 16147, 16014, 15765, 15321, 14670, 13546, 11912, 9787, 7323, 4824, 2536, 1330, 731, 438, 258, 148, 86, 37, 22, 11, 2, 0},
- { 16384, 16376, 16364, 16344, 16315, 16272, 16219, 16119, 15910, 15620, 15100, 14254, 13063, 11489, 9413, 7100, 4738, 2751, 1584, 973, 597, 349, 201, 96, 47, 22, 9, 0},
- { 16384, 16364, 16340, 16312, 16288, 16237, 16166, 16026, 15756, 15390, 14833, 13870, 12627, 10998, 8985, 6893, 4720, 3048, 1860, 1131, 725, 449, 215, 111, 56, 34, 14, 0},
- { 16384, 16326, 16297, 16246, 16183, 16064, 15884, 15632, 15240, 14763, 14107, 13230, 12185, 10886, 9390, 7781, 6194, 4696, 3350, 2259, 1506, 975, 604, 356, 201, 106, 48, 0}
- },
- { /* 9.6 kbs SWB B*/
- { 16384, 16359, 16349, 16331, 16300, 16236, 16112, 15894, 15480, 14691, 13257, 10996, 8168, 5357, 3193, 1864, 1098, 676, 426, 265, 173, 117, 81, 59, 45, 35, 26, 0},
- { 16384, 16374, 16370, 16367, 16362, 16348, 16325, 16283, 16204, 16058, 15715, 14980, 13521, 11144, 7972, 4702, 2366, 1063, 480, 241, 128, 71, 42, 22, 14, 9, 5, 0},
- { 16384, 16380, 16377, 16375, 16372, 16365, 16354, 16334, 16295, 16216, 16056, 15716, 15034, 13690, 11467, 8404, 5150, 2385, 908, 417, 199, 106, 62, 35, 21, 13, 7, 0},
- { 16384, 16378, 16376, 16373, 16368, 16360, 16346, 16318, 16267, 16173, 15991, 15644, 14932, 13623, 11575, 8688, 5224, 2309, 891, 393, 202, 103, 57, 34, 20, 11, 8, 0},
- { 16384, 16375, 16372, 16365, 16348, 16322, 16279, 16201, 16046, 15728, 15214, 14297, 12811, 10673, 7918, 4530, 2109, 978, 466, 234, 121, 72, 46, 31, 25, 17, 13, 0},
- { 16384, 16366, 16357, 16341, 16325, 16289, 16220, 16084, 15768, 15300, 14466, 13206, 11402, 9176, 6633, 4092, 2192, 1171, 592, 315, 179, 111, 74, 46, 31, 26, 18, 0},
- { 16384, 16301, 16266, 16211, 16140, 16045, 15889, 15652, 15358, 14883, 14192, 13119, 11753, 10181, 8445, 6708, 5023, 3449, 2226, 1375, 849, 516, 353, 231, 153, 107, 78, 0}
- },
- { /* 13.2 kbs A */
- { 16384, 16359, 16349, 16331, 16300, 16236, 16112, 15894, 15480, 14691, 13257, 10996, 8168, 5357, 3193, 1864, 1098, 676, 426, 265, 173, 117, 81, 59, 45, 35, 26, 0},
- { 16384, 16374, 16370, 16367, 16362, 16348, 16325, 16283, 16204, 16058, 15715, 14980, 13521, 11144, 7972, 4702, 2366, 1063, 480, 241, 128, 71, 42, 22, 14, 9, 5, 0},
- { 16384, 16380, 16377, 16375, 16372, 16365, 16354, 16334, 16295, 16216, 16056, 15716, 15034, 13690, 11467, 8404, 5150, 2385, 908, 417, 199, 106, 62, 35, 21, 13, 7, 0},
- { 16384, 16378, 16376, 16373, 16368, 16360, 16346, 16318, 16267, 16173, 15991, 15644, 14932, 13623, 11575, 8688, 5224, 2309, 891, 393, 202, 103, 57, 34, 20, 11, 8, 0},
- { 16384, 16375, 16372, 16365, 16348, 16322, 16279, 16201, 16046, 15728, 15214, 14297, 12811, 10673, 7918, 4530, 2109, 978, 466, 234, 121, 72, 46, 31, 25, 17, 13, 0},
- { 16384, 16366, 16357, 16341, 16325, 16289, 16220, 16084, 15768, 15300, 14466, 13206, 11402, 9176, 6633, 4092, 2192, 1171, 592, 315, 179, 111, 74, 46, 31, 26, 18, 0},
- { 16384, 16301, 16266, 16211, 16140, 16045, 15889, 15652, 15358, 14883, 14192, 13119, 11753, 10181, 8445, 6708, 5023, 3449, 2226, 1375, 849, 516, 353, 231, 153, 107, 78, 0}
- },
- { /* 13.2 kbs SWB RF B*/
- { 16384, 16359, 16349, 16331, 16300, 16236, 16112, 15894, 15480, 14691, 13257, 10996, 8168, 5357, 3193, 1864, 1098, 676, 426, 265, 173, 117, 81, 59, 45, 35, 26, 0},
- { 16384, 16374, 16370, 16367, 16362, 16348, 16325, 16283, 16204, 16058, 15715, 14980, 13521, 11144, 7972, 4702, 2366, 1063, 480, 241, 128, 71, 42, 22, 14, 9, 5, 0},
- { 16384, 16380, 16377, 16375, 16372, 16365, 16354, 16334, 16295, 16216, 16056, 15716, 15034, 13690, 11467, 8404, 5150, 2385, 908, 417, 199, 106, 62, 35, 21, 13, 7, 0},
- { 16384, 16378, 16376, 16373, 16368, 16360, 16346, 16318, 16267, 16173, 15991, 15644, 14932, 13623, 11575, 8688, 5224, 2309, 891, 393, 202, 103, 57, 34, 20, 11, 8, 0},
- { 16384, 16375, 16372, 16365, 16348, 16322, 16279, 16201, 16046, 15728, 15214, 14297, 12811, 10673, 7918, 4530, 2109, 978, 466, 234, 121, 72, 46, 31, 25, 17, 13, 0},
- { 16384, 16366, 16357, 16341, 16325, 16289, 16220, 16084, 15768, 15300, 14466, 13206, 11402, 9176, 6633, 4092, 2192, 1171, 592, 315, 179, 111, 74, 46, 31, 26, 18, 0},
- { 16384, 16301, 16266, 16211, 16140, 16045, 15889, 15652, 15358, 14883, 14192, 13119, 11753, 10181, 8445, 6708, 5023, 3449, 2226, 1375, 849, 516, 353, 231, 153, 107, 78, 0}
- },
- { /* 16.4 kbs B */
- { 16384, 16359, 16349, 16331, 16300, 16236, 16112, 15894, 15480, 14691, 13257, 10996, 8168, 5357, 3193, 1864, 1098, 676, 426, 265, 173, 117, 81, 59, 45, 35, 26, 0},
- { 16384, 16374, 16370, 16367, 16362, 16348, 16325, 16283, 16204, 16058, 15715, 14980, 13521, 11144, 7972, 4702, 2366, 1063, 480, 241, 128, 71, 42, 22, 14, 9, 5, 0},
- { 16384, 16380, 16377, 16375, 16372, 16365, 16354, 16334, 16295, 16216, 16056, 15716, 15034, 13690, 11467, 8404, 5150, 2385, 908, 417, 199, 106, 62, 35, 21, 13, 7, 0},
- { 16384, 16378, 16376, 16373, 16368, 16360, 16346, 16318, 16267, 16173, 15991, 15644, 14932, 13623, 11575, 8688, 5224, 2309, 891, 393, 202, 103, 57, 34, 20, 11, 8, 0},
- { 16384, 16375, 16372, 16365, 16348, 16322, 16279, 16201, 16046, 15728, 15214, 14297, 12811, 10673, 7918, 4530, 2109, 978, 466, 234, 121, 72, 46, 31, 25, 17, 13, 0},
- { 16384, 16366, 16357, 16341, 16325, 16289, 16220, 16084, 15768, 15300, 14466, 13206, 11402, 9176, 6633, 4092, 2192, 1171, 592, 315, 179, 111, 74, 46, 31, 26, 18, 0},
- { 16384, 16301, 16266, 16211, 16140, 16045, 15889, 15652, 15358, 14883, 14192, 13119, 11753, 10181, 8445, 6708, 5023, 3449, 2226, 1375, 849, 516, 353, 231, 153, 107, 78, 0}
- },
- { /* 24.4 kbs B */
- { 16384, 16351, 16333, 16303, 16254, 16163, 15993, 15681, 15080, 13987, 12109, 9465, 6588, 4160, 2488, 1480, 912, 589, 389, 266, 190, 131, 93, 68, 47, 34, 24, 0},
- { 16384, 16379, 16375, 16369, 16360, 16345, 16328, 16286, 16211, 16078, 15810, 15233, 14058, 11933, 8881, 5609, 2940, 1290, 558, 274, 150, 80, 47, 29, 17, 11, 6, 0},
- { 16384, 16382, 16380, 16377, 16370, 16358, 16337, 16300, 16224, 16088, 15811, 15233, 14112, 12019, 9061, 5723, 2780, 1121, 480, 239, 123, 69, 41, 22, 13, 8, 5, 0},
- { 16384, 16377, 16375, 16369, 16363, 16351, 16325, 16268, 16172, 16009, 15686, 15039, 13830, 11799, 8924, 5422, 2444, 960, 441, 220, 111, 63, 37, 22, 11, 6, 3, 0},
- { 16384, 16374, 16369, 16363, 16356, 16335, 16290, 16214, 16068, 15826, 15382, 14550, 13126, 10956, 8000, 4622, 2090, 973, 478, 249, 128, 75, 42, 19, 13, 7, 4, 0},
- { 16384, 16375, 16370, 16367, 16362, 16340, 16298, 16232, 16097, 15860, 15440, 14718, 13570, 11874, 9557, 6790, 4053, 2166, 1150, 622, 323, 179, 96, 53, 33, 17, 12, 0},
- { 16384, 16335, 16304, 16276, 16228, 16166, 16094, 15983, 15775, 15501, 15040, 14417, 13552, 12326, 10847, 9117, 7308, 5373, 3666, 2297, 1336, 807, 495, 313, 216, 152, 114, 0}
- },
- { /* 32.0 kbs A */
- { 16384, 16351, 16333, 16303, 16254, 16163, 15993, 15681, 15080, 13987, 12109, 9465, 6588, 4160, 2488, 1480, 912, 589, 389, 266, 190, 131, 93, 68, 47, 34, 24, 0},
- { 16384, 16379, 16375, 16369, 16360, 16345, 16328, 16286, 16211, 16078, 15810, 15233, 14058, 11933, 8881, 5609, 2940, 1290, 558, 274, 150, 80, 47, 29, 17, 11, 6, 0},
- { 16384, 16382, 16380, 16377, 16370, 16358, 16337, 16300, 16224, 16088, 15811, 15233, 14112, 12019, 9061, 5723, 2780, 1121, 480, 239, 123, 69, 41, 22, 13, 8, 5, 0},
- { 16384, 16377, 16375, 16369, 16363, 16351, 16325, 16268, 16172, 16009, 15686, 15039, 13830, 11799, 8924, 5422, 2444, 960, 441, 220, 111, 63, 37, 22, 11, 6, 3, 0},
- { 16384, 16374, 16369, 16363, 16356, 16335, 16290, 16214, 16068, 15826, 15382, 14550, 13126, 10956, 8000, 4622, 2090, 973, 478, 249, 128, 75, 42, 19, 13, 7, 4, 0},
- { 16384, 16375, 16370, 16367, 16362, 16340, 16298, 16232, 16097, 15860, 15440, 14718, 13570, 11874, 9557, 6790, 4053, 2166, 1150, 622, 323, 179, 96, 53, 33, 17, 12, 0},
- { 16384, 16335, 16304, 16276, 16228, 16166, 16094, 15983, 15775, 15501, 15040, 14417, 13552, 12326, 10847, 9117, 7308, 5373, 3666, 2297, 1336, 807, 495, 313, 216, 152, 114, 0}
- },
- { /* 48.0 kbs B */
- { 16384, 16334, 16310, 16285, 16254, 16204, 16128, 16031, 15903, 15697, 15380, 14820, 13857, 12267, 9878, 7099, 4509, 2576, 1478, 871, 531, 349, 230, 163, 111, 80, 62, 0},
- { 16384, 16337, 16327, 16307, 16278, 16239, 16178, 16092, 15947, 15719, 15286, 14428, 12833, 10246, 7123, 4088, 1896, 849, 481, 287, 190, 139, 94, 66, 52, 34, 24, 0},
- { 16384, 16352, 16341, 16329, 16312, 16295, 16265, 16223, 16151, 16026, 15825, 15437, 14645, 13089, 10612, 7364, 4077, 1783, 779, 444, 281, 192, 138, 93, 65, 43, 30, 0},
- { 16384, 16354, 16347, 16337, 16314, 16284, 16233, 16165, 16051, 15847, 15450, 14621, 13069, 10623, 7298, 3789, 1569, 727, 445, 302, 207, 143, 96, 59, 36, 18, 9, 0},
- { 16384, 16352, 16342, 16330, 16314, 16295, 16266, 16215, 16127, 15984, 15709, 15190, 14242, 12540, 9979, 6448, 3160, 1392, 752, 481, 344, 251, 169, 115, 73, 28, 8, 0},
- { 16384, 16340, 16320, 16302, 16272, 16257, 16220, 16135, 16011, 15784, 15370, 14688, 13423, 11457, 8721, 5529, 2736, 1375, 784, 525, 353, 263, 172, 113, 78, 26, 11, 0},
- { 16384, 16238, 16170, 16113, 16077, 16030, 16000, 15948, 15873, 15752, 15535, 15157, 14595, 13788, 12569, 10767, 8611, 6186, 4101, 2459, 1478, 881, 607, 385, 243, 168, 116, 0}
- },
- { /* 64.0 kbs B */
- { 16384, 16334, 16310, 16285, 16254, 16204, 16128, 16031, 15903, 15697, 15380, 14820, 13857, 12267, 9878, 7099, 4509, 2576, 1478, 871, 531, 349, 230, 163, 111, 80, 62, 0},
- { 16384, 16337, 16327, 16307, 16278, 16239, 16178, 16092, 15947, 15719, 15286, 14428, 12833, 10246, 7123, 4088, 1896, 849, 481, 287, 190, 139, 94, 66, 52, 34, 24, 0},
- { 16384, 16352, 16341, 16329, 16312, 16295, 16265, 16223, 16151, 16026, 15825, 15437, 14645, 13089, 10612, 7364, 4077, 1783, 779, 444, 281, 192, 138, 93, 65, 43, 30, 0},
- { 16384, 16354, 16347, 16337, 16314, 16284, 16233, 16165, 16051, 15847, 15450, 14621, 13069, 10623, 7298, 3789, 1569, 727, 445, 302, 207, 143, 96, 59, 36, 18, 9, 0},
- { 16384, 16352, 16342, 16330, 16314, 16295, 16266, 16215, 16127, 15984, 15709, 15190, 14242, 12540, 9979, 6448, 3160, 1392, 752, 481, 344, 251, 169, 115, 73, 28, 8, 0},
- { 16384, 16340, 16320, 16302, 16272, 16257, 16220, 16135, 16011, 15784, 15370, 14688, 13423, 11457, 8721, 5529, 2736, 1375, 784, 525, 353, 263, 172, 113, 78, 26, 11, 0},
- { 16384, 16238, 16170, 16113, 16077, 16030, 16000, 15948, 15873, 15752, 15535, 15157, 14595, 13788, 12569, 10767, 8611, 6186, 4101, 2459, 1478, 881, 607, 385, 243, 168, 116, 0}
- }
-};
-
-/* only needed for >= 48 kbps */
-
-const UWord16 cf_se10_tab[IGF_SYMBOLS_IN_TABLE + 1] = // Q0
-{
- 16384, 15493, 15154, 14810, 14331, 13701, 13086, 12403, 11585, 10923, 10293, 9631, 8943, 8385, 7760, 7182, 6593, 6009, 5540, 5082, 4571, 4133, 3711, 3299, 2887, 2460, 2043, 0
-};
-
-const UWord16 cf_se11_tab[IGF_CTX_COUNT][IGF_CTX_COUNT][IGF_SYMBOLS_IN_TABLE + 1] = // Q0
-{
- {
- { 16384, 16313, 16312, 16241, 16206, 16099, 15957, 15386, 14601, 12852, 10282, 7534, 4964, 2966, 1824, 896, 504, 255, 113, 112, 41, 40, 39, 38, 37, 36, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16207, 16206, 16205, 16120, 15949, 14663, 12777, 9947, 6860, 3773, 1972, 772, 430, 259, 174, 89, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16115, 15941, 14891, 12965, 11477, 8587, 5347, 3421, 1407, 620, 8, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16254, 16253, 16004, 15005, 13756, 12006, 9256, 5755, 3755, 1755, 756, 132, 131, 130, 129, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 15964, 15550, 14929, 12856, 9954, 6430, 2906, 1456, 1042, 628, 214, 8, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16087, 15503, 14334, 14333, 11994, 10240, 8193, 5268, 2929, 1760, 1176, 299, 298, 297, 296, 295, 294, 293, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 14922, 13467, 10919, 9464, 7280, 6189, 3641, 2914, 2187, 1824, 1823, 1096, 369, 368, 367, 4, 3, 2, 1, 0}
- },
- {
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16238, 16237, 15678, 15399, 14840, 13441, 11341, 8681, 6161, 3781, 2522, 702, 283, 144, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 16374, 15693, 14671, 12625, 7507, 4778, 2390, 1368, 1028, 347, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 16374, 15595, 13776, 9877, 6498, 3639, 3120, 1561, 1042, 523, 265, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 15709, 13704, 12702, 11032, 7355, 3010, 1340, 1007, 674, 341, 8, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 16374, 12816, 10683, 7125, 2854, 720, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 12738, 12737, 10920, 9103, 5466, 1828, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 15359, 15358, 14337, 14336, 14335, 14334, 14333, 10240, 7170, 5124, 2054, 1032, 1031, 1030, 1029, 7, 6, 5, 4, 3, 2, 1, 0}
- },
- {
- { 16384, 16383, 16382, 16107, 16106, 16105, 16104, 16103, 15966, 15965, 15690, 15140, 14315, 12939, 10324, 8122, 4956, 2479, 1654, 966, 691, 416, 141, 140, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 15320, 14265, 12945, 10568, 8984, 6343, 4230, 1853, 797, 270, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16112, 16111, 16110, 15037, 14501, 12622, 11012, 7790, 5374, 3226, 1347, 542, 275, 274, 273, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 15597, 14819, 12090, 7021, 4292, 1953, 1175, 787, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 15935, 14165, 12838, 9297, 6641, 3985, 1772, 1331, 890, 449, 8, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 14740, 13923, 9010, 6555, 4100, 2464, 828, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 13104, 13103, 8192, 4920, 1647, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}
- },
- {
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16077, 16076, 16075, 15926, 15176, 14425, 10819, 7664, 5711, 2856, 1354, 754, 454, 154, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16044, 16043, 14373, 12369, 10030, 7023, 5019, 1677, 676, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16077, 16076, 16075, 15470, 14258, 12743, 11531, 6375, 3040, 3039, 917, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 15309, 13531, 11396, 7480, 3564, 1786, 364, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 15833, 15289, 13652, 10377, 6556, 3827, 3283, 1646, 555, 554, 553, 552, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 14146, 13404, 13403, 13402, 10425, 7448, 3727, 2240, 2239, 752, 751, 750, 749, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 15562, 14745, 13928, 10653, 7378, 5742, 2467, 830, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}
- },
- {
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 16219, 15590, 14803, 13544, 11339, 9292, 6930, 4568, 2521, 1419, 790, 318, 161, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16014, 15652, 14925, 14198, 12743, 10196, 5464, 3645, 1826, 371, 8, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16050, 15396, 15395, 12447, 10810, 8518, 4915, 2950, 1313, 659, 333, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 14792, 14001, 11096, 8455, 6079, 3174, 2119, 535, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 15796, 15795, 15794, 15793, 11700, 8777, 6439, 4101, 1178, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 15473, 15472, 15471, 14563, 13655, 12746, 10017, 7288, 6379, 6378, 4559, 1830, 1829, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 15723, 15069, 13105, 9174, 7865, 3934, 3280, 1971, 1317, 663, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}
- },
- {
- { 16384, 16383, 16382, 16381, 16232, 16231, 16230, 16229, 16228, 16227, 16078, 15628, 15329, 13977, 12325, 10222, 5413, 4212, 1959, 908, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16109, 15842, 15841, 13694, 11815, 10205, 5640, 3493, 2151, 1347, 543, 542, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16168, 14699, 13650, 11761, 9452, 6093, 3784, 1685, 636, 427, 426, 425, 424, 423, 422, 421, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16122, 15611, 14332, 13053, 10238, 7423, 4608, 2561, 2050, 1027, 516, 515, 260, 259, 258, 257, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 15207, 13649, 10531, 6632, 3514, 1176, 398, 397, 396, 395, 394, 393, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 15749, 15120, 12601, 10082, 8823, 6304, 3785, 3156, 1267, 638, 637, 636, 7, 6, 5, 4, 3, 2, 1, 0},
- { 16384, 16383, 15729, 15728, 15727, 15726, 15725, 15071, 14417, 12453, 10489, 8525, 5905, 1975, 1321, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}
- },
- {
- { 16384, 16383, 16372, 16340, 16339, 16328, 16285, 16253, 16136, 15923, 15614, 14931, 13833, 12201, 10175, 7615, 5269, 3243, 2123, 1142, 673, 342, 182, 150, 86, 54, 11, 0},
- { 16384, 16383, 16366, 16349, 16332, 16331, 16314, 16245, 16244, 16141, 15813, 15451, 14105, 12672, 9910, 7113, 4472, 2590, 1071, 484, 294, 156, 53, 36, 19, 18, 1, 0},
- { 16384, 16383, 16382, 16369, 16355, 16341, 16271, 16117, 15921, 15627, 14772, 13089, 10929, 8334, 5487, 3299, 1644, 999, 424, 228, 88, 46, 18, 17, 16, 15, 14, 0},
- { 16384, 16367, 16366, 16365, 16364, 16363, 16259, 16173, 15809, 15028, 13951, 12214, 9278, 6203, 3719, 2052, 1079, 402, 194, 125, 56, 22, 21, 20, 3, 2, 1, 0},
- { 16384, 16383, 16360, 16359, 16358, 16357, 16356, 16333, 16332, 16143, 15954, 15434, 14227, 12262, 9540, 6652, 3882, 1988, 1207, 829, 427, 191, 73, 50, 49, 2, 1, 0},
- { 16384, 16383, 16382, 16381, 16380, 16296, 16254, 15748, 14862, 13427, 11189, 8487, 5278, 3252, 2028, 1099, 551, 340, 298, 214, 172, 88, 46, 45, 3, 2, 1, 0},
- { 16384, 16383, 16307, 16269, 16231, 16230, 16077, 15886, 15464, 14620, 13546, 11896, 9671, 7024, 4338, 2382, 1423, 809, 541, 311, 158, 43, 5, 4, 3, 2, 1, 0}
- }
-};
-
-const IGF_MODE igfMode[IGF_BITRATE_UNKNOWN] =
-{
- /* sampleRate, frameLength, igfMinFq, maxHopsize */
- { 16000, 320, 774, 4 }, /* 9.6kbs WB 0 */
- { 16000, 320, 774, 4 }, /* 13.2kbs WB RF 1 */
- { 32000, 640, 800, 2 }, /* 9.6kbs SWB 2 */
- { 32000, 640, 800, 4 }, /* 13.2kbs SWB 3 */
- { 32000, 640, 800, 2 }, /* 13.2kbs SWB RF 4 */
- { 32000, 640, 800, 4 }, /* 16.4kbs SWB 5 */
- { 32000, 640, 800, 4 }, /* 24.4kbs SWB 6 */
- { 32000, 640, 800, 4 }, /* 32.0kbs SWB 7 */
- { 32000, 640, 1600, 4 }, /* 48.0kbs SWB 8 */
- { 32000, 640, 1600, 4 }, /* 64.0kbs SWB 9 */
- { 48000, 960, 800, 4 }, /* 16.4kbs FB 10 */
- { 48000, 960, 800, 2 }, /* 24.4kbs FB 11 */
- { 48000, 960, 800, 2 }, /* 32.0kbs FB 12 */
- { 48000, 960, 1600, 2 }, /* 48.0kbs FB 13 */
- { 48000, 960, 1600, 2 }, /* 64.0kbs FB 14 */
- { 48000, 960, 1600, 1 }, /* 96.0kbs FB 15 */
- { 48000, 960, 1600, 1 }, /*128.0kbs FB 16 */
- { 16000, 320, 800, 2 }, /* 13.2kbs WB CPE 17 */ /* stereo mode */
- { 16000, 320, 800, 2 }, /* 16.4kbs WB CPE 18 */ /* stereo mode */
- { 32000, 640, 800, 2 }, /* 13.2kbs SWB CPE 19 */ /* stereo mode */
- { 32000, 640, 800, 2 }, /* 16.4kbs SWB CPE 20 */ /* stereo mode */
- { 32000, 640, 800, 2 }, /* 24.4kbs SWB CPE 21 */ /* stereo mode */
- { 32000, 640, 800, 2 }, /* 32.0kbs SWB CPE 22 */ /* stereo mode */
- { 32000, 640, 1200, 2 }, /* 48.0kbs SWB CPE 23 */ /* stereo mode */
- { 32000, 640, 1200, 2 }, /* 48.0kbs SWB CPE 24 */ /* stereo TCX10 mode */
- { 32000, 640, 1200, 2 }, /* 64.0kbs SWB CPE 25 */ /* stereo mode */
- { 32000, 640, 1600, 2 }, /* 80.0kbs SWB CPE 26 */ /* stereo mode */
- { 32000, 640, 1600, 4 }, /* 96.0kbs SWB CPE 27 */ /* stereo mode */
- { 48000, 960, 800, 2 }, /* 24.4kbs FB CPE 28 */ /* stereo mode */
- { 48000, 960, 800, 2 }, /* 32.0kbs FB CPE 29 */ /* stereo mode */
- { 48000, 960, 1200, 2 }, /* 48.0kbs FB CPE 30 */ /* stereo mode */
- { 48000, 960, 1200, 2 }, /* 48.0kbs FB CPE 31 */ /* stereo TCX10 mode */
- { 48000, 960, 1200, 2 }, /* 64.0kbs FB CPE 32 */ /* stereo mode */
- { 48000, 960, 1600, 2 }, /* 80.0kbs FB CPE 33 */ /* stereo mode */
- { 48000, 960, 1600, 1 }, /* 96.0kbs FB CPE 34 */ /* stereo mode */
- { 48000, 960, 1600, 1 } /*128.0kbs FB CPE 35 */ /* stereo mode */
-};
-
-#define STCP( a, b ) {{ WORD322WORD16( a ), WORD322WORD16( b ) }}
-
-const PWord16 SineTable512_fx[] =//Q15
-{
- STCP(0x7fffffff, 0x00000000), STCP(0x7fffd886, 0x006487e3), STCP(0x7fff6216, 0x00c90f88), STCP(0x7ffe9cb2, 0x012d96b1),
- STCP(0x7ffd885a, 0x01921d20), STCP(0x7ffc250f, 0x01f6a297), STCP(0x7ffa72d1, 0x025b26d7), STCP(0x7ff871a2, 0x02bfa9a4),
- STCP(0x7ff62182, 0x03242abf), STCP(0x7ff38274, 0x0388a9ea), STCP(0x7ff09478, 0x03ed26e6), STCP(0x7fed5791, 0x0451a177),
- STCP(0x7fe9cbc0, 0x04b6195d), STCP(0x7fe5f108, 0x051a8e5c), STCP(0x7fe1c76b, 0x057f0035), STCP(0x7fdd4eec, 0x05e36ea9),
- STCP(0x7fd8878e, 0x0647d97c), STCP(0x7fd37153, 0x06ac406f), STCP(0x7fce0c3e, 0x0710a345), STCP(0x7fc85854, 0x077501be),
- STCP(0x7fc25596, 0x07d95b9e), STCP(0x7fbc040a, 0x083db0a7), STCP(0x7fb563b3, 0x08a2009a), STCP(0x7fae7495, 0x09064b3a),
- STCP(0x7fa736b4, 0x096a9049), STCP(0x7f9faa15, 0x09cecf89), STCP(0x7f97cebd, 0x0a3308bd), STCP(0x7f8fa4b0, 0x0a973ba5),
- STCP(0x7f872bf3, 0x0afb6805), STCP(0x7f7e648c, 0x0b5f8d9f), STCP(0x7f754e80, 0x0bc3ac35), STCP(0x7f6be9d4, 0x0c27c389),
- STCP(0x7f62368f, 0x0c8bd35e), STCP(0x7f5834b7, 0x0cefdb76), STCP(0x7f4de451, 0x0d53db92), STCP(0x7f434563, 0x0db7d376),
- STCP(0x7f3857f6, 0x0e1bc2e4), STCP(0x7f2d1c0e, 0x0e7fa99e), STCP(0x7f2191b4, 0x0ee38766), STCP(0x7f15b8ee, 0x0f475bff),
- STCP(0x7f0991c4, 0x0fab272b), STCP(0x7efd1c3c, 0x100ee8ad), STCP(0x7ef05860, 0x1072a048), STCP(0x7ee34636, 0x10d64dbd),
- STCP(0x7ed5e5c6, 0x1139f0cf), STCP(0x7ec8371a, 0x119d8941), STCP(0x7eba3a39, 0x120116d5), STCP(0x7eabef2c, 0x1264994e),
- STCP(0x7e9d55fc, 0x12c8106f), STCP(0x7e8e6eb2, 0x132b7bf9), STCP(0x7e7f3957, 0x138edbb1), STCP(0x7e6fb5f4, 0x13f22f58),
- STCP(0x7e5fe493, 0x145576b1), STCP(0x7e4fc53e, 0x14b8b17f), STCP(0x7e3f57ff, 0x151bdf86), STCP(0x7e2e9cdf, 0x157f0086),
- STCP(0x7e1d93ea, 0x15e21445), STCP(0x7e0c3d29, 0x16451a83), STCP(0x7dfa98a8, 0x16a81305), STCP(0x7de8a670, 0x170afd8d),
- STCP(0x7dd6668f, 0x176dd9de), STCP(0x7dc3d90d, 0x17d0a7bc), STCP(0x7db0fdf8, 0x183366e9), STCP(0x7d9dd55a, 0x18961728),
- STCP(0x7d8a5f40, 0x18f8b83c), STCP(0x7d769bb5, 0x195b49ea), STCP(0x7d628ac6, 0x19bdcbf3), STCP(0x7d4e2c7f, 0x1a203e1b),
- STCP(0x7d3980ec, 0x1a82a026), STCP(0x7d24881b, 0x1ae4f1d6), STCP(0x7d0f4218, 0x1b4732ef), STCP(0x7cf9aef0, 0x1ba96335),
- STCP(0x7ce3ceb2, 0x1c0b826a), STCP(0x7ccda169, 0x1c6d9053), STCP(0x7cb72724, 0x1ccf8cb3), STCP(0x7ca05ff1, 0x1d31774d),
- STCP(0x7c894bde, 0x1d934fe5), STCP(0x7c71eaf9, 0x1df5163f), STCP(0x7c5a3d50, 0x1e56ca1e), STCP(0x7c4242f2, 0x1eb86b46),
- STCP(0x7c29fbee, 0x1f19f97b), STCP(0x7c116853, 0x1f7b7481), STCP(0x7bf88830, 0x1fdcdc1b), STCP(0x7bdf5b94, 0x203e300d),
- STCP(0x7bc5e290, 0x209f701c), STCP(0x7bac1d31, 0x21009c0c), STCP(0x7b920b89, 0x2161b3a0), STCP(0x7b77ada8, 0x21c2b69c),
- STCP(0x7b5d039e, 0x2223a4c5), STCP(0x7b420d7a, 0x22847de0), STCP(0x7b26cb4f, 0x22e541af), STCP(0x7b0b3d2c, 0x2345eff8),
- STCP(0x7aef6323, 0x23a6887f), STCP(0x7ad33d45, 0x24070b08), STCP(0x7ab6cba4, 0x24677758), STCP(0x7a9a0e50, 0x24c7cd33),
- STCP(0x7a7d055b, 0x25280c5e), STCP(0x7a5fb0d8, 0x2588349d), STCP(0x7a4210d8, 0x25e845b6), STCP(0x7a24256f, 0x26483f6c),
- STCP(0x7a05eead, 0x26a82186), STCP(0x79e76ca7, 0x2707ebc7), STCP(0x79c89f6e, 0x27679df4), STCP(0x79a98715, 0x27c737d3),
- STCP(0x798a23b1, 0x2826b928), STCP(0x796a7554, 0x288621b9), STCP(0x794a7c12, 0x28e5714b), STCP(0x792a37fe, 0x2944a7a2),
- STCP(0x7909a92d, 0x29a3c485), STCP(0x78e8cfb2, 0x2a02c7b8), STCP(0x78c7aba2, 0x2a61b101), STCP(0x78a63d11, 0x2ac08026),
- STCP(0x78848414, 0x2b1f34eb), STCP(0x786280bf, 0x2b7dcf17), STCP(0x78403329, 0x2bdc4e6f), STCP(0x781d9b65, 0x2c3ab2b9),
- STCP(0x77fab989, 0x2c98fbba), STCP(0x77d78daa, 0x2cf72939), STCP(0x77b417df, 0x2d553afc), STCP(0x7790583e, 0x2db330c7),
- STCP(0x776c4edb, 0x2e110a62), STCP(0x7747fbce, 0x2e6ec792), STCP(0x77235f2d, 0x2ecc681e), STCP(0x76fe790e, 0x2f29ebcc),
- STCP(0x76d94989, 0x2f875262), STCP(0x76b3d0b4, 0x2fe49ba7), STCP(0x768e0ea6, 0x3041c761), STCP(0x76680376, 0x309ed556),
- STCP(0x7641af3d, 0x30fbc54d), STCP(0x761b1211, 0x3158970e), STCP(0x75f42c0b, 0x31b54a5e), STCP(0x75ccfd42, 0x3211df04),
- STCP(0x75a585cf, 0x326e54c7), STCP(0x757dc5ca, 0x32caab6f), STCP(0x7555bd4c, 0x3326e2c3), STCP(0x752d6c6c, 0x3382fa88),
- STCP(0x7504d345, 0x33def287), STCP(0x74dbf1ef, 0x343aca87), STCP(0x74b2c884, 0x34968250), STCP(0x7489571c, 0x34f219a8),
- STCP(0x745f9dd1, 0x354d9057), STCP(0x74359cbd, 0x35a8e625), STCP(0x740b53fb, 0x36041ad9), STCP(0x73e0c3a3, 0x365f2e3b),
- STCP(0x73b5ebd1, 0x36ba2014), STCP(0x738acc9e, 0x3714f02a), STCP(0x735f6626, 0x376f9e46), STCP(0x7333b883, 0x37ca2a30),
- STCP(0x7307c3d0, 0x382493b0), STCP(0x72db8828, 0x387eda8e), STCP(0x72af05a7, 0x38d8fe93), STCP(0x72823c67, 0x3932ff87),
- STCP(0x72552c85, 0x398cdd32), STCP(0x7227d61c, 0x39e6975e), STCP(0x71fa3949, 0x3a402dd2), STCP(0x71cc5626, 0x3a99a057),
- STCP(0x719e2cd2, 0x3af2eeb7), STCP(0x716fbd68, 0x3b4c18ba), STCP(0x71410805, 0x3ba51e29), STCP(0x71120cc5, 0x3bfdfecd),
- STCP(0x70e2cbc6, 0x3c56ba70), STCP(0x70b34525, 0x3caf50da), STCP(0x708378ff, 0x3d07c1d6), STCP(0x70536771, 0x3d600d2c),
- STCP(0x7023109a, 0x3db832a6), STCP(0x6ff27497, 0x3e10320d), STCP(0x6fc19385, 0x3e680b2c), STCP(0x6f906d84, 0x3ebfbdcd),
- STCP(0x6f5f02b2, 0x3f1749b8), STCP(0x6f2d532c, 0x3f6eaeb8), STCP(0x6efb5f12, 0x3fc5ec98), STCP(0x6ec92683, 0x401d0321),
- STCP(0x6e96a99d, 0x4073f21d), STCP(0x6e63e87f, 0x40cab958), STCP(0x6e30e34a, 0x4121589b), STCP(0x6dfd9a1c, 0x4177cfb1),
- STCP(0x6dca0d14, 0x41ce1e65), STCP(0x6d963c54, 0x42244481), STCP(0x6d6227fa, 0x427a41d0), STCP(0x6d2dd027, 0x42d0161e),
- STCP(0x6cf934fc, 0x4325c135), STCP(0x6cc45698, 0x437b42e1), STCP(0x6c8f351c, 0x43d09aed), STCP(0x6c59d0a9, 0x4425c923),
- STCP(0x6c242960, 0x447acd50), STCP(0x6bee3f62, 0x44cfa740), STCP(0x6bb812d1, 0x452456bd), STCP(0x6b81a3cd, 0x4578db93),
- STCP(0x6b4af279, 0x45cd358f), STCP(0x6b13fef5, 0x4621647d), STCP(0x6adcc964, 0x46756828), STCP(0x6aa551e9, 0x46c9405c),
- STCP(0x6a6d98a4, 0x471cece7), STCP(0x6a359db9, 0x47706d93), STCP(0x69fd614a, 0x47c3c22f), STCP(0x69c4e37a, 0x4816ea86),
- STCP(0x698c246c, 0x4869e665), STCP(0x69532442, 0x48bcb599), STCP(0x6919e320, 0x490f57ee), STCP(0x68e06129, 0x4961cd33),
- STCP(0x68a69e81, 0x49b41533), STCP(0x686c9b4b, 0x4a062fbd), STCP(0x683257ab, 0x4a581c9e), STCP(0x67f7d3c5, 0x4aa9dba2),
- STCP(0x67bd0fbd, 0x4afb6c98), STCP(0x67820bb7, 0x4b4ccf4d), STCP(0x6746c7d8, 0x4b9e0390), STCP(0x670b4444, 0x4bef092d),
- STCP(0x66cf8120, 0x4c3fdff4), STCP(0x66937e91, 0x4c9087b1), STCP(0x66573cbb, 0x4ce10034), STCP(0x661abbc5, 0x4d31494b),
- STCP(0x65ddfbd3, 0x4d8162c4), STCP(0x65a0fd0b, 0x4dd14c6e), STCP(0x6563bf92, 0x4e210617), STCP(0x6526438f, 0x4e708f8f),
- STCP(0x64e88926, 0x4ebfe8a5), STCP(0x64aa907f, 0x4f0f1126), STCP(0x646c59bf, 0x4f5e08e3), STCP(0x642de50d, 0x4faccfab),
- STCP(0x63ef3290, 0x4ffb654d), STCP(0x63b0426d, 0x5049c999), STCP(0x637114cc, 0x5097fc5e), STCP(0x6331a9d4, 0x50e5fd6d),
- STCP(0x62f201ac, 0x5133cc94), STCP(0x62b21c7b, 0x518169a5), STCP(0x6271fa69, 0x51ced46e), STCP(0x62319b9d, 0x521c0cc2),
- STCP(0x61f1003f, 0x5269126e), STCP(0x61b02876, 0x52b5e546), STCP(0x616f146c, 0x53028518), STCP(0x612dc447, 0x534ef1b5),
- STCP(0x60ec3830, 0x539b2af0), STCP(0x60aa7050, 0x53e73097), STCP(0x60686ccf, 0x5433027d), STCP(0x60262dd6, 0x547ea073),
- STCP(0x5fe3b38d, 0x54ca0a4b), STCP(0x5fa0fe1f, 0x55153fd4), STCP(0x5f5e0db3, 0x556040e2), STCP(0x5f1ae274, 0x55ab0d46),
- STCP(0x5ed77c8a, 0x55f5a4d2), STCP(0x5e93dc1f, 0x56400758), STCP(0x5e50015d, 0x568a34a9), STCP(0x5e0bec6e, 0x56d42c99),
- STCP(0x5dc79d7c, 0x571deefa), STCP(0x5d8314b1, 0x57677b9d), STCP(0x5d3e5237, 0x57b0d256), STCP(0x5cf95638, 0x57f9f2f8),
- STCP(0x5cb420e0, 0x5842dd54), STCP(0x5c6eb258, 0x588b9140), STCP(0x5c290acc, 0x58d40e8c), STCP(0x5be32a67, 0x591c550e),
- STCP(0x5b9d1154, 0x59646498), STCP(0x5b56bfbd, 0x59ac3cfd), STCP(0x5b1035cf, 0x59f3de12), STCP(0x5ac973b5, 0x5a3b47ab),
- STCP(0x5a82799a, 0x5a82799a)
-};
-
-/* Lookup-Table for binary logarithm */
-const Word16 ldCoeff[7] =//Q15
-{
- -32768, -16384, -10923, -8192, -6554, -5461, -4681
- /* -4096, -3641, -3277 */
-};
-
-/* Lookup-Table for binary power algorithm */
-/* This table is used for lookup 2^x with x in range [0...1.0[ in steps of 1/32 */
-const UWord32 exp2_tab_long[32] =//Q31
-{
- 0x40000000,0x4166C34C,0x42D561B4,0x444C0740,
- 0x45CAE0F2,0x47521CC6,0x48E1E9BA,0x4A7A77D4,
- 0x4C1BF829,0x4DC69CDD,0x4F7A9930,0x51382182,
- 0x52FF6B55,0x54D0AD5A,0x56AC1F75,0x5891FAC1,
- 0x5A82799A,0x5C7DD7A4,0x5E8451D0,0x60962665,
- 0x62B39509,0x64DCDEC3,0x6712460B,0x69540EC9,
- 0x6BA27E65,0x6DFDDBCC,0x70666F76,0x72DC8374,
- 0x75606374,0x77F25CCE,0x7A92BE8B,0x7D41D96E
-};
-
-/* Lookup-Table for binary power algorithm */
-/* This table is used for lookup 2^x with x in range [0...1/32[ in steps of 1/1024 */
-const UWord32 exp2w_tab_long[32] =//Q31
-{
- 0x40000000,0x400B1818,0x4016321B,0x40214E0C,
- 0x402C6BE9,0x40378BB4,0x4042AD6D,0x404DD113,
- 0x4058F6A8,0x40641E2B,0x406F479E,0x407A7300,
- 0x4085A051,0x4090CF92,0x409C00C4,0x40A733E6,
- 0x40B268FA,0x40BD9FFF,0x40C8D8F5,0x40D413DD,
- 0x40DF50B8,0x40EA8F86,0x40F5D046,0x410112FA,
- 0x410C57A2,0x41179E3D,0x4122E6CD,0x412E3152,
- 0x41397DCC,0x4144CC3B,0x41501CA0,0x415B6EFB
-};
-
-/* Lookup-Table for binary power algorithm */
-/* This table is used for lookup 2^x with x in range [0...1/1024[ in steps of 1/32768 */
-const UWord32 exp2x_tab_long[32] =//Q31
-{
- 0x40000000,0x400058B9,0x4000B173,0x40010A2D,
- 0x400162E8,0x4001BBA3,0x4002145F,0x40026D1B,
- 0x4002C5D8,0x40031E95,0x40037752,0x4003D011,
- 0x400428CF,0x4004818E,0x4004DA4E,0x4005330E,
- 0x40058BCE,0x4005E48F,0x40063D51,0x40069613,
- 0x4006EED5,0x40074798,0x4007A05B,0x4007F91F,
- 0x400851E4,0x4008AAA8,0x4009036E,0x40095C33,
- 0x4009B4FA,0x400A0DC0,0x400A6688,0x400ABF4F
-};
-
-/* square root tables */
-const Word32 SqrtTable[32] = /* Q31 */
-{
- 0x5A82D429, 0x5BEA10FE, 0x5D4BE6E5, 0x5EA89270, 0x60004BE2, 0x615347A1, 0x62A1B68C, 0x63EBC651,
- 0x6531A1B5, 0x667370D4, 0x67B1595F, 0x68EB7EC8, 0x6A220277, 0x6B5503F0, 0x6C84A0F9, 0x6DB0F5BD,
- 0x6EDA1CE9, 0x70002FC7, 0x7123465A, 0x72437773, 0x7360D8C5, 0x747B7EFA, 0x75937DC4, 0x76A8E7EB,
- 0x77BBCF60, 0x78CC4545, 0x79DA5A00, 0x7AE61D3E, 0x7BEF9E07, 0x7CF6EAC2, 0x7DFC113F, 0x7EFF1EC0
-};
-
-const Word16 SqrtDiffTable[32] = /* Q15 */
-{
- 0x59CF, 0x5875, 0x572B, 0x55EE, 0x54BF, 0x539C, 0x5284, 0x5177,
- 0x5074, 0x4F7A, 0x4E89, 0x4DA1, 0x4CC0, 0x4BE7, 0x4B15, 0x4A4A,
- 0x4985, 0x48C6, 0x480C, 0x4758, 0x46AA, 0x4600, 0x455B, 0x44BA,
- 0x441D, 0x4385, 0x42F1, 0x4260, 0x41D3, 0x414A, 0x40C3, 0x4040
-};
-
-const Word32 ISqrtTable[32] = /* Q31 */
-{
- 0x7FFE7F85, 0x7E0A4E25, 0x7C2C56C7, 0x7A63002C, 0x78ACD922, 0x7708939D, 0x75750088, 0x73F10C2D,
- 0x727BBB1A, 0x71142774, 0x6FB97EA5, 0x6E6AFF54, 0x6D27F79D, 0x6BEFC388, 0x6AC1CBA4, 0x699D83DA,
- 0x68826A53, 0x6770068E, 0x6665E882, 0x6563A7DF, 0x6468E364, 0x63754043, 0x62886999, 0x61A20FEE,
- 0x60C1E8C8, 0x5FE7AE45, 0x5F131EBE, 0x5E43FC76, 0x5D7A0D4F, 0x5CB51A81, 0x5BF4F061, 0x5B395E26
-};
-
-const Word16 ISqrtDiffTable[32] = /* Q15 */
-{
- 0x7D0C, 0x777E, 0x7256, 0x6D8A, 0x6911, 0x64E5, 0x60FD, 0x5D54,
- 0x59E5, 0x56AA, 0x53A0, 0x50C2, 0x4E0D, 0x4B7E, 0x4912, 0x46C6,
- 0x4499, 0x4288, 0x4090, 0x3EB1, 0x3CE9, 0x3B36, 0x3996, 0x380A,
- 0x368F, 0x3524, 0x33C9, 0x327C, 0x313D, 0x300B, 0x2EE5, 0x2DCA
-};
-
-/* 1/x tables */
-const Word32 InvTable[32] = /* Q31 */
-{
- 0x7FFBFE40, 0x7C1B608E, 0x78752176, 0x750440BA, 0x71C44C49, 0x6EB14D0A, 0x6BC7B6B4, 0x69045A19,
- 0x6664598A, 0x63E51EE2, 0x61845308, 0x5F3FD698, 0x5D15BB8E, 0x5B043FD0, 0x5909C861, 0x5724DD3C,
- 0x555425B2, 0x53966532, 0x51EA787F, 0x504F5331, 0x4EC3FD84, 0x4D479267, 0x4BD93DBE, 0x4A783ADC,
- 0x4923D31D, 0x47DB5CAE, 0x469E3974, 0x456BD608, 0x4443A8D9, 0x43253159, 0x420FF746, 0x41038A01
-};
-
-const Word16 InvDiffTable[32] = /* Q15 */
-{
- 0x7C14, 0x74C8, 0x6E1C, 0x67FF, 0x6260, 0x5D33, 0x586C, 0x5400,
- 0x4FE7, 0x4C19, 0x4890, 0x4543, 0x422F, 0x3F4F, 0x3C9D, 0x3A17,
- 0x37B8, 0x357E, 0x3365, 0x316B, 0x2F8D, 0x2DCB, 0x2C20, 0x2A8D,
- 0x290F, 0x27A4, 0x264C, 0x2506, 0x23CF, 0x22A7, 0x218E, 0x2081
-};
-
-const Word16 tcx_mdct_window_48_fx[420] =//Q15
-{ 61, 183, 306, 428, 551, 673, 796, 919, 1041, 1163, 1286,
-1408, 1531, 1653, 1776, 1898, 2020, 2143, 2265, 2387, 2509,
-2632, 2754, 2876, 2998, 3120, 3242, 3364, 3486, 3607, 3729,
-3851, 3973, 4094, 4216, 4337, 4459, 4580, 4701, 4823, 4944,
-5065, 5186, 5307, 5428, 5549, 5669, 5790, 5911, 6031, 6152,
-6272, 6392, 6512, 6632, 6752, 6872, 6992, 7112, 7231, 7351,
-7470, 7589, 7709, 7828, 7947, 8065, 8184, 8303, 8421, 8540,
-8658, 8776, 8894, 9012, 9130, 9247, 9365, 9482, 9599, 9717,
-9834, 9950, 10067, 10184, 10300, 10416, 10532, 10648, 10764, 10880,
-10995, 11111, 11226, 11341, 11456, 11571, 11685, 11800, 11914, 12028,
-12142, 12256, 12369, 12483, 12596, 12709, 12822, 12934, 13047, 13159,
-13271, 13383, 13495, 13607, 13718, 13829, 13940, 14051, 14162, 14272,
-14382, 14492, 14602, 14712, 14821, 14930, 15039, 15148, 15257, 15365,
-15473, 15581, 15689, 15796, 15904, 16011, 16117, 16224, 16330, 16437,
-16542, 16648, 16754, 16859, 16964, 17068, 17173, 17277, 17381, 17485,
-17589, 17692, 17795, 17898, 18000, 18102, 18204, 18306, 18408, 18509,
-18610, 18711, 18811, 18911, 19011, 19111, 19210, 19310, 19408, 19507,
-19605, 19703, 19801, 19899, 19996, 20093, 20190, 20286, 20382, 20478,
-20573, 20669, 20764, 20858, 20953, 21047, 21140, 21234, 21327, 21420,
-21513, 21605, 21697, 21789, 21880, 21971, 22062, 22152, 22242, 22332,
-22422, 22511, 22600, 22688, 22777, 22865, 22952, 23040, 23127, 23213,
-23300, 23386, 23471, 23557, 23642, 23726, 23811, 23895, 23978, 24062,
-24145, 24227, 24310, 24392, 24473, 24555, 24636, 24716, 24797, 24877,
-24956, 25035, 25114, 25193, 25271, 25349, 25426, 25504, 25580, 25657,
-25733, 25808, 25884, 25959, 26033, 26108, 26181, 26255, 26328, 26401,
-26473, 26545, 26617, 26688, 26759, 26830, 26900, 26970, 27039, 27108,
-27177, 27245, 27313, 27381, 27448, 27514, 27581, 27647, 27712, 27778,
-27842, 27907, 27971, 28034, 28098, 28161, 28223, 28285, 28347, 28408,
-28469, 28529, 28589, 28649, 28708, 28767, 28826, 28884, 28942, 28999,
-29056, 29112, 29168, 29224, 29279, 29334, 29388, 29442, 29496, 29549,
-29602, 29654, 29706, 29758, 29809, 29859, 29910, 29959, 30009, 30058,
-30106, 30155, 30202, 30250, 30297, 30343, 30389, 30435, 30480, 30525,
-30569, 30613, 30656, 30700, 30742, 30784, 30826, 30867, 30908, 30949,
-30989, 31029, 31068, 31106, 31145, 31183, 31220, 31257, 31294, 31330,
-31365, 31401, 31435, 31470, 31504, 31537, 31570, 31603, 31635, 31667,
-31698, 31729, 31759, 31789, 31819, 31848, 31876, 31905, 31932, 31960,
-31986, 32013, 32039, 32064, 32089, 32114, 32138, 32162, 32185, 32208,
-32230, 32252, 32273, 32294, 32315, 32335, 32354, 32374, 32392, 32411,
-32428, 32446, 32463, 32479, 32495, 32511, 32526, 32540, 32555, 32568,
-32582, 32594, 32607, 32619, 32630, 32641, 32652, 32662, 32671, 32680,
-32689, 32697, 32705, 32712, 32719, 32726, 32732, 32737, 32742, 32747,
-32751, 32755, 32758, 32761, 32763, 32765, 32766, 32767, 32767 };
-
-const Word16 tcx_mdct_window_half_48_fx[180] =//Q15
-{
- 142, 428, 714, 1000, 1286, 1572, 1857, 2143, 2428, 2713, 2998,
-3282, 3567, 3851, 4135, 4418, 4701, 4984, 5267, 5549, 5830,
-6112, 6392, 6672, 6952, 7231, 7510, 7788, 8065, 8342, 8619,
-8894, 9169, 9443, 9717, 9989, 10261, 10532, 10803, 11072, 11341,
-11609, 11876, 12142, 12407, 12671, 12934, 13197, 13458, 13718, 13977,
-14235, 14492, 14748, 15003, 15257, 15509, 15761, 16011, 16260, 16507,
-16754, 16999, 17242, 17485, 17726, 17966, 18204, 18441, 18677, 18911,
-19144, 19376, 19605, 19834, 20061, 20286, 20510, 20732, 20953, 21172,
-21389, 21605, 21819, 22032, 22242, 22452, 22659, 22865, 23069, 23271,
-23471, 23670, 23867, 24062, 24255, 24446, 24636, 24823, 25009, 25193,
-25375, 25555, 25733, 25909, 26083, 26255, 26425, 26593, 26759, 26923,
-27085, 27245, 27403, 27559, 27712, 27864, 28013, 28161, 28306, 28449,
-28589, 28728, 28865, 28999, 29131, 29261, 29388, 29514, 29637, 29758,
-29876, 29992, 30106, 30218, 30328, 30435, 30540, 30642, 30742, 30840,
-30935, 31029, 31119, 31208, 31294, 31377, 31458, 31537, 31614, 31688,
-31759, 31828, 31895, 31960, 32021, 32081, 32138, 32192, 32245, 32294,
-32341, 32386, 32428, 32468, 32506, 32540, 32573, 32603, 32630, 32655,
-32677, 32697, 32715, 32730, 32742, 32752, 32760, 32765, 32767 };
-
-
-const Word16 tcx_mdct_window_trans_48_fx[60] =//Q15
-{ 428, 1286, 2143, 2998, 3851, 4701, 5549, 6392, 7231, 8065, 8894,
-9717, 10532, 11341, 12142, 12934, 13718, 14492, 15257, 16011, 16754,
-17485, 18204, 18911, 19605, 20286, 20953, 21605, 22242, 22865, 23471,
-24062, 24636, 25193, 25733, 26255, 26759, 27245, 27712, 28161, 28589,
-28999, 29388, 29758, 30106, 30435, 30742, 31029, 31294, 31537, 31759,
-31960, 32138, 32294, 32428, 32540, 32630, 32697, 32742, 32765
-};
-
-/*----------------------------------------------------------------------------------*
- * SWB TBE LSF tables (1.75 kbps)
- *----------------------------------------------------------------------------------*/
-
-const Word32 sigma_BWE_fx[] = {//Q31
-17011214, 16701976, 17561200,
-17474996, 19251270, 20645372, 39204284,
-40792208, 18917444, 18895726, 19477682,
-19499580, 20916386, 22705246, 39204284,
-40792208 }; /* for 3 bits first stage */
-
-
-const Word16 inv_modified_sigma_BWE_fx[] = {//x2.56
-323,
-329,
-313,
-314,
-285,
-266,
-140,
-134,
-290,
-290,
-282,
-281,
-262,
-242,
-140,
-134
-};
-
-const Word16 modified_sigma_BWE_fx[] =//Q15
-{ 259,
-254,
-267,
-266,
-293,
-315,
-598,
-622,
-288,
-288,
-297,
-297,
-319,
-346,
-598,
-622 };
-
-
-const Word16 SHB_LSF_mean_fx[10] = {//Q15
-1353, 2646, 4046,
-5428, 6896, 8339, 9863,
-11368, 12977, 14558
-};
-
-/* 4 bit VQ first stage */
-/* An 6-by-16 matrix */
-
-const Word16 SHB_LSF_VQ4_fx[96] =//Q15
-{ 150, 51, -507, -986, -1115, -944,
--184, -77, 95, 232, 440, 497, -115,
--107, -109, -242, -446, -592, 387, 799,
-1132, 1263, 1259, 1122, -128, -599, -1214,
--1389, -1319, -1016, 533, 424, 148, -125,
--378, -501, -337, -590, -587, -630, -715,
--750, 504, 849, 750, 508, 234, 68,
-176, -177, -407, 327, 206, 21, -107,
-341, 423, 264, -17, -180, -110, -381,
--716, -725, -232, -42, 170, 265, 273,
-336, 397, 450, 69, 285, 519, 686,
-656, 564, 120, 115, -123, -382, -19,
-234, -377, -629, -296, -95, 21, 63,
--206, -456, 518, 472, 179, 22 };
-/* 3 bit VQ first stage */
-const Word16 SHB_LSF_VQ3_fx[48] =//Q15
-{ 278, 403, 285, 65, -206, -337,
-386, 770, 838, 753, 599, 445, -196,
--455, -609, -524, -206, -78, 39, 199,
-393, 514, 491, 462, -91, -435, -979,
--1241, -1225, -976, -52, -98, -216, -422,
--599, -688, 127, 137, 0, 52, 301,
-412, -278, -422, 9, 199, 137, 72 };
-const Word16 *const cb_LSF_BWE_fx[] = { SHB_LSF_VQ4_fx, SHB_LSF_VQ3_fx }; // Q15
-
-const Word16 mslvq_SHB_min_bits[] = {14, 12}; /* for 4 bits and 3 bits respectively Q0*/
-
-const Word16 scales_BWE_fx[] = {//Q13
-7634, 13737,
-23027, 7299, 14499,
-24592, 6955, 14491,
-26427 };
-
-const Word16 scales_BWE_fx_new[] = {//Q11
-
-1908,
-3434,
-5756,
-1824,
-3624,
-6148,
-1738,
-3622,
-6606
-};
-const Word8 no_lead_BWE[] = { // Q0
- 8, 6, 5, /* 14 bits */
- 10,9,5, /* 15 bits*/
- 16, 11, 5}; /* 16 bits */
-
-const Word16 scales_BWE_3b_fx[] = {//Q13
-7847, 14262,
-28934, 7610, 12771,
-21544, 7249, 12689,
-23060 };
-
-const Word16 scales_BWE_3b_fx_new[] = {//Q11
- 1961,
-3565,
-7233,
-1902,
-3192,
-5386,
-1812,
-3172,
-5765
-};
-
-const Word8 no_lead_BWE_3b[] = { // Q0
- 4, 5, 2, /* 12 bits */
- 5, 5, 5, /* 13 bits */
- 8, 6, 5 /* 14 bits */
- };
-
-const Word32 LastCoefPred_0bit_fx[18] =//Q31
-{
-10930692, -29356102, -14495515,
--11918534, 3435973, 89292368, 269423296,
-1105954048, 0, 17544942, -13851270,
--20121922, -15590731, 7795365, 46127948,
-176888224, 438086656, 0 };
-
-
-const Word32 LastCoefPred_1bit_fx[36] = {//Q31
-37795712, -47094316, 24910810,
-18060338, 38268160, 87424056, 217346816,
-810181184, 9685151, 53107272, -26843546,
-11703786, -7301444, 20444044, 22655952,
-138448272, 307648512, 9234180 };
-
-const Word16 config_LSF_BWE[] = { // Q0
- 4, 16, 1, /* 21 bits */
- 4, 16, 1, /* 20 */
- 4, 16, 1, /* 19 */
- 3, 8, 1, /* 18 */
- 3, 8, 1, /* 17 */
- 3, 8, 0 /* 16 */
-};
-
-//basops
-const Word32 BASOP_util_normReciprocal[CHEAP_NORM_SIZE] =
-{
- 0l/*0.0 Q31*/, 2147483647l/*1.0000000000 Q31*/, 1073741824l/*0.5000000000 Q31*/, 715827883l/*0.3333333333 Q31*/, 536870912l/*0.2500000000 Q31*/, 429496730l/*0.2000000000 Q31*/,
- 357913941l/*0.1666666667 Q31*/, 306783378l/*0.1428571429 Q31*/, 268435456l/*0.1250000000 Q31*/, 238609294l/*0.1111111111 Q31*/, 214748365l/*0.1000000000 Q31*/, 195225786l/*0.0909090909 Q31*/,
- 178956971l/*0.0833333333 Q31*/, 165191050l/*0.0769230769 Q31*/, 153391689l/*0.0714285714 Q31*/, 143165577l/*0.0666666667 Q31*/, 134217728l/*0.0625000000 Q31*/, 126322568l/*0.0588235294 Q31*/,
- 119304647l/*0.0555555556 Q31*/, 113025455l/*0.0526315789 Q31*/, 107374182l/*0.0500000000 Q31*/, 102261126l/*0.0476190476 Q31*/, 97612893l/*0.0454545455 Q31*/, 93368854l/*0.0434782609 Q31*/,
- 89478485l/*0.0416666667 Q31*/, 85899346l/*0.0400000000 Q31*/, 82595525l/*0.0384615385 Q31*/, 79536431l/*0.0370370370 Q31*/, 76695845l/*0.0357142857 Q31*/, 74051160l/*0.0344827586 Q31*/,
- 71582788l/*0.0333333333 Q31*/, 69273666l/*0.0322580645 Q31*/, 67108864l/*0.0312500000 Q31*/, 65075262l/*0.0303030303 Q31*/, 63161284l/*0.0294117647 Q31*/, 61356676l/*0.0285714286 Q31*/,
- 59652324l/*0.0277777778 Q31*/, 58040099l/*0.0270270270 Q31*/, 56512728l/*0.0263157895 Q31*/, 55063683l/*0.0256410256 Q31*/, 53687091l/*0.0250000000 Q31*/, 52377650l/*0.0243902439 Q31*/,
- 51130563l/*0.0238095238 Q31*/, 49941480l/*0.0232558140 Q31*/, 48806446l/*0.0227272727 Q31*/, 47721859l/*0.0222222222 Q31*/, 46684427l/*0.0217391304 Q31*/, 45691141l/*0.0212765957 Q31*/,
- 44739243l/*0.0208333333 Q31*/, 43826197l/*0.0204081633 Q31*/, 42949673l/*0.0200000000 Q31*/, 42107522l/*0.0196078431 Q31*/, 41297762l/*0.0192307692 Q31*/, 40518559l/*0.0188679245 Q31*/,
- 39768216l/*0.0185185185 Q31*/, 39045157l/*0.0181818182 Q31*/, 38347922l/*0.0178571429 Q31*/, 37675152l/*0.0175438596 Q31*/, 37025580l/*0.0172413793 Q31*/, 36398028l/*0.0169491525 Q31*/,
- 35791394l/*0.0166666667 Q31*/, 35204650l/*0.0163934426 Q31*/, 34636833l/*0.0161290323 Q31*/, 34087042l/*0.0158730159 Q31*/, 33554432l/*0.0156250000 Q31*/, 33038210l/*0.0153846154 Q31*/,
- 32537631l/*0.0151515152 Q31*/, 32051995l/*0.0149253731 Q31*/, 31580642l/*0.0147058824 Q31*/, 31122951l/*0.0144927536 Q31*/, 30678338l/*0.0142857143 Q31*/, 30246248l/*0.0140845070 Q31*/,
- 29826162l/*0.0138888889 Q31*/, 29417584l/*0.0136986301 Q31*/, 29020049l/*0.0135135135 Q31*/, 28633115l/*0.0133333333 Q31*/, 28256364l/*0.0131578947 Q31*/, 27889398l/*0.0129870130 Q31*/,
- 27531842l/*0.0128205128 Q31*/, 27183337l/*0.0126582278 Q31*/, 26843546l/*0.0125000000 Q31*/, 26512144l/*0.0123456790 Q31*/, 26188825l/*0.0121951220 Q31*/, 25873297l/*0.0120481928 Q31*/,
- 25565282l/*0.0119047619 Q31*/, 25264514l/*0.0117647059 Q31*/, 24970740l/*0.0116279070 Q31*/, 24683720l/*0.0114942529 Q31*/, 24403223l/*0.0113636364 Q31*/, 24129030l/*0.0112359551 Q31*/,
- 23860929l/*0.0111111111 Q31*/, 23598721l/*0.0109890110 Q31*/, 23342214l/*0.0108695652 Q31*/, 23091222l/*0.0107526882 Q31*/, 22845571l/*0.0106382979 Q31*/, 22605091l/*0.0105263158 Q31*/,
- 22369621l/*0.0104166667 Q31*/, 22139007l/*0.0103092784 Q31*/, 21913098l/*0.0102040816 Q31*/, 21691754l/*0.0101010101 Q31*/, 21474836l/*0.0100000000 Q31*/, 21262214l/*0.0099009901 Q31*/,
- 21053761l/*0.0098039216 Q31*/, 20849356l/*0.0097087379 Q31*/, 20648881l/*0.0096153846 Q31*/, 20452225l/*0.0095238095 Q31*/, 20259280l/*0.0094339623 Q31*/, 20069941l/*0.0093457944 Q31*/,
- 19884108l/*0.0092592593 Q31*/, 19701685l/*0.0091743119 Q31*/, 19522579l/*0.0090909091 Q31*/, 19346700l/*0.0090090090 Q31*/, 19173961l/*0.0089285714 Q31*/, 19004280l/*0.0088495575 Q31*/,
- 18837576l/*0.0087719298 Q31*/, 18673771l/*0.0086956522 Q31*/, 18512790l/*0.0086206897 Q31*/, 18354561l/*0.0085470085 Q31*/, 18199014l/*0.0084745763 Q31*/, 18046081l/*0.0084033613 Q31*/,
- 17895697l/*0.0083333333 Q31*/, 17747799l/*0.0082644628 Q31*/, 17602325l/*0.0081967213 Q31*/, 17459217l/*0.0081300813 Q31*/, 17318416l/*0.0080645161 Q31*/, 17179869l/*0.0080000000 Q31*/,
- 17043521l/*0.0079365079 Q31*/, 16909320l/*0.0078740157 Q31*/, 16777216l/*0.0078125000 Q31*/, 16647160l/*0.0077519380 Q31*/, 16519105l/*0.0076923077 Q31*/, 16393005l/*0.0076335878 Q31*/,
- 16268816l/*0.0075757576 Q31*/, 16146494l/*0.0075187970 Q31*/, 16025997l/*0.0074626866 Q31*/, 15907286l/*0.0074074074 Q31*/, 15790321l/*0.0073529412 Q31*/, 15675063l/*0.0072992701 Q31*/,
- 15561476l/*0.0072463768 Q31*/, 15449523l/*0.0071942446 Q31*/, 15339169l/*0.0071428571 Q31*/, 15230381l/*0.0070921986 Q31*/, 15123124l/*0.0070422535 Q31*/, 15017368l/*0.0069930070 Q31*/,
- 14913081l/*0.0069444444 Q31*/, 14810232l/*0.0068965517 Q31*/, 14708792l/*0.0068493151 Q31*/, 14608732l/*0.0068027211 Q31*/, 14510025l/*0.0067567568 Q31*/, 14412642l/*0.0067114094 Q31*/,
- 14316558l/*0.0066666667 Q31*/, 14221746l/*0.0066225166 Q31*/, 14128182l/*0.0065789474 Q31*/, 14035841l/*0.0065359477 Q31*/, 13944699l/*0.0064935065 Q31*/, 13854733l/*0.0064516129 Q31*/,
- 13765921l/*0.0064102564 Q31*/, 13678240l/*0.0063694268 Q31*/, 13591669l/*0.0063291139 Q31*/, 13506187l/*0.0062893082 Q31*/, 13421773l/*0.0062500000 Q31*/
-};
-
-const Word16 f_atan_expand_range[MAXSFTAB - (MINSFTAB - 1)] =
-{
- /*****************************************************************************
- *
- * Table holds fixp_atan() output values which are outside of input range
- * of fixp_atan() to improve SNR of fixp_atan2().
- *
- * This Table might also be used in fixp_atan() [todo] so there a wider input
- * range can be covered, too.
- *
- * Matlab (generate table):
- * for scl = 7:25 % MINSFTAB .. MAXSFTAB
- * at=atan(0.5 *(2^scl)); % 0.5 because get in 'middle' area of current scale level 'scl'
- * at/2 % div at by ATO_SCALE
- * end
- *
- * Table divided by 2=ATO_SCALE <-- SF=ATO_SF
- *****************************************************************************/
- 25480/*7.775862990872099e-001 Q15*/, 25608/*7.814919928673978e-001 Q15*/, 25672/*7.834450483314648e-001 Q15*/,
- 25704/*7.844216021392089e-001 Q15*/, 25720/*7.849098823026687e-001 Q15*/, 25728/*7.851540227918509e-001 Q15*/,
- 25732/*7.852760930873737e-001 Q15*/, 25734/*7.853371282415015e-001 Q15*/, 25735/*7.853676458193612e-001 Q15*/,
- 25735/*7.853829046083906e-001 Q15*/, 25736/*7.853905340029177e-001 Q15*/, 25736/*7.853943487001828e-001 Q15*/,
- 25736/*7.853962560488155e-001 Q15*/, 25736/*7.853972097231319e-001 Q15*/, 25736/*7.853976865602901e-001 Q15*/,
- 25736/*7.853979249788692e-001 Q15*/, 25736/*7.853980441881587e-001 Q15*/, 25736/*7.853981037928035e-001 Q15*/,
- 25736/*7.853981335951259e-001 Q15*/
- /* pi/4 = 0.785398163397448 = pi/2/ATO_SCALE */
-};
-
-
-const Word16 Grid[GRID100_POINTS + 1] =//Q15
-{
- 32767, 32751, 32703, 32622, 32509, 32364,
- 32187, 31978, 31738, 31466, 31164, 30830,
- 30466, 30072, 29649, 29196, 28714, 28204,
- 27666, 27101, 26509, 25891, 25248, 24579,
- 23886, 23170, 22431, 21669, 20887, 20083,
- 19260, 18418, 17557, 16680, 15786, 14876,
- 13951, 13013, 12062, 11099, 10125, 9141,
- 8149, 7148, 6140, 5126, 4106, 3083,
- 2057, 1029, 0, -1029, -2057, -3083,
- -4106, -5126, -6140, -7148, -8149, -9141,
- -10125, -11099, -12062, -13013, -13951, -14876,
- -15786, -16680, -17557, -18418, -19260, -20083,
- -20887, -21669, -22431, -23170, -23886, -24579,
- -25248, -25891, -26509, -27101, -27666, -28204,
- -28714, -29196, -29649, -30072, -30466, -30830,
- -31164, -31466, -31738, -31978, -32187, -32364,
- -32509, -32622, -32703, -32751, -32760
-};
-
-const Word16 pwAlpha[10] = { 0x6666, 0x51ec, 0x4189, 0x346e, 0x29f1,//Q15
- 0x218e, 0x1ad8, 0x157a, 0x112e, 0x0dbe
-};
-
-/* Used in 'lsp2lsf_fx.c' */
-const Word8 Ind_Guess[256] =
-{
- 126, 122, 120, 119, 117, 116, 115, 114,
- 113, 112, 111, 110, 110, 109, 108, 108,
- 107, 106, 106, 105, 104, 104, 103, 103,
- 102, 102, 101, 101, 100, 100, 99, 99,
- 98, 98, 97, 97, 96, 96, 95, 95,
- 94, 94, 94, 93, 93, 92, 92, 91,
- 91, 91, 90, 90, 89, 89, 89, 88,
- 88, 87, 87, 87, 86, 86, 86, 85,
- 85, 84, 84, 84, 83, 83, 83, 82,
- 82, 82, 81, 81, 81, 80, 80, 80,
- 79, 79, 78, 78, 78, 77, 77, 77,
- 76, 76, 76, 75, 75, 75, 74, 74,
- 74, 73, 73, 73, 72, 72, 72, 72,
- 71, 71, 71, 70, 70, 70, 69, 69,
- 69, 68, 68, 68, 67, 67, 67, 66,
- 66, 66, 65, 65, 65, 64, 64, 64,
- 64, 63, 63, 63, 62, 62, 62, 61,
- 61, 61, 60, 60, 60, 59, 59, 59,
- 58, 58, 58, 57, 57, 57, 56, 56,
- 56, 55, 55, 55, 55, 54, 54, 54,
- 53, 53, 53, 52, 52, 52, 51, 51,
- 51, 50, 50, 50, 49, 49, 49, 48,
- 48, 47, 47, 47, 46, 46, 46, 45,
- 45, 45, 44, 44, 44, 43, 43, 43,
- 42, 42, 41, 41, 41, 40, 40, 40,
- 39, 39, 38, 38, 38, 37, 37, 36,
- 36, 36, 35, 35, 34, 34, 33, 33,
- 33, 32, 32, 31, 31, 30, 30, 29,
- 29, 28, 28, 27, 27, 26, 26, 25,
- 25, 24, 24, 23, 23, 22, 21, 21,
- 20, 19, 19, 18, 17, 17, 16, 15,
- 14, 13, 12, 11, 10, 8, 7, 5
-};
-
-const Word16 cos_table_129[129] =//Q15
-{
- 32767,
- 32758, 32729, 32679, 32610, 32522, 32413, 32286, 32138,
- 31972, 31786, 31581, 31357, 31114, 30853, 30572, 30274,
- 29957, 29622, 29269, 28899, 28511, 28106, 27684, 27246,
- 26791, 26320, 25833, 25330, 24812, 24279, 23732, 23170,
- 22595, 22006, 21403, 20788, 20160, 19520, 18868, 18205,
- 17531, 16846, 16151, 15447, 14733, 14010, 13279, 12540,
- 11793, 11039, 10279, 9512, 8740, 7962, 7180, 6393,
- 5602, 4808, 4011, 3212, 2411, 1608, 804, 0,
- -804, -1608, -2411, -3212, -4011, -4808, -5602, -6393,
- -7180, -7962, -8740, -9512, -10279, -11039, -11793, -12540,
- -13279, -14010, -14733, -15447, -16151, -16846, -17531, -18205,
- -18868, -19520, -20160, -20788, -21403, -22006, -22595, -23170,
- -23732, -24279, -24812, -25330, -25833, -26320, -26791, -27246,
- -27684, -28106, -28511, -28899, -29269, -29622, -29957, -30274,
- -30572, -30853, -31114, -31357, -31581, -31786, -31972, -32138,
- -32286, -32413, -32522, -32610, -32679, -32729, -32758, -32768
-};
-
-const Word16 acos_slope[128] =//Q15
-{
- -26214, -9039, -5243, -3799, -2979, -2405, -2064, -1771,
- -1579, -1409, -1279, -1170, -1079, -1004, -933, -880,
- -827, -783, -743, -708, -676, -647, -621, -599,
- -576, -557, -538, -521, -506, -492, -479, -466,
- -456, -445, -435, -426, -417, -410, -402, -395,
- -389, -383, -377, -372, -367, -363, -359, -355,
- -351, -348, -345, -342, -340, -337, -335, -333,
- -331, -330, -329, -328, -327, -326, -326, -326,
- -326, -326, -326, -327, -328, -329, -330, -331,
- -333, -335, -337, -340, -342, -345, -348, -351,
- -355, -359, -363, -367, -372, -377, -383, -389,
- -395, -402, -410, -417, -426, -435, -445, -456,
- -466, -479, -492, -506, -521, -538, -557, -576,
- -599, -621, -647, -676, -708, -743, -783, -827,
- -880, -933, -1004, -1079, -1170, -1279, -1409, -1579,
- -1771, -2064, -2405, -2979, -3799, -5243, -9039,-26214
-};
-#define SHC(x) ((Word16)x)
-
-const Word16 cos_coef_new[4] = { SHC(0x02BA), SHC(0xE60A), SHC(0xEEEF), SHC(0xAAAB) };//Q15
-
-const Word16 cos_table[512] =//Q15
-{
- SHC(0x7fff),
- SHC(0x7ffe),
- SHC(0x7ff6),
- SHC(0x7fea),
- SHC(0x7fd9),
- SHC(0x7fc2),
- SHC(0x7fa7),
- SHC(0x7f87),
- SHC(0x7f62),
- SHC(0x7f38),
- SHC(0x7f0a),
- SHC(0x7ed6),
- SHC(0x7e9d),
- SHC(0x7e60),
- SHC(0x7e1e),
- SHC(0x7dd6),
- SHC(0x7d8a),
- SHC(0x7d3a),
- SHC(0x7ce4),
- SHC(0x7c89),
- SHC(0x7c2a),
- SHC(0x7bc6),
- SHC(0x7b5d),
- SHC(0x7aef),
- SHC(0x7a7d),
- SHC(0x7a06),
- SHC(0x798a),
- SHC(0x790a),
- SHC(0x7885),
- SHC(0x77fb),
- SHC(0x776c),
- SHC(0x76d9),
- SHC(0x7642),
- SHC(0x75a6),
- SHC(0x7505),
- SHC(0x7460),
- SHC(0x73b6),
- SHC(0x7308),
- SHC(0x7255),
- SHC(0x719e),
- SHC(0x70e3),
- SHC(0x7023),
- SHC(0x6f5f),
- SHC(0x6e97),
- SHC(0x6dca),
- SHC(0x6cf9),
- SHC(0x6c24),
- SHC(0x6b4b),
- SHC(0x6a6e),
- SHC(0x698c),
- SHC(0x68a7),
- SHC(0x67bd),
- SHC(0x66d0),
- SHC(0x65de),
- SHC(0x64e9),
- SHC(0x63ef),
- SHC(0x62f2),
- SHC(0x61f1),
- SHC(0x60ec),
- SHC(0x5fe4),
- SHC(0x5ed7),
- SHC(0x5dc8),
- SHC(0x5cb4),
- SHC(0x5b9d),
- SHC(0x5a82),
- SHC(0x5964),
- SHC(0x5843),
- SHC(0x571e),
- SHC(0x55f6),
- SHC(0x54ca),
- SHC(0x539b),
- SHC(0x5269),
- SHC(0x5134),
- SHC(0x4ffb),
- SHC(0x4ec0),
- SHC(0x4d81),
- SHC(0x4c40),
- SHC(0x4afb),
- SHC(0x49b4),
- SHC(0x486a),
- SHC(0x471d),
- SHC(0x45cd),
- SHC(0x447b),
- SHC(0x4326),
- SHC(0x41ce),
- SHC(0x4074),
- SHC(0x3f17),
- SHC(0x3db8),
- SHC(0x3c57),
- SHC(0x3af3),
- SHC(0x398d),
- SHC(0x3825),
- SHC(0x36ba),
- SHC(0x354e),
- SHC(0x33df),
- SHC(0x326e),
- SHC(0x30fc),
- SHC(0x2f87),
- SHC(0x2e11),
- SHC(0x2c99),
- SHC(0x2b1f),
- SHC(0x29a4),
- SHC(0x2827),
- SHC(0x26a8),
- SHC(0x2528),
- SHC(0x23a7),
- SHC(0x2224),
- SHC(0x209f),
- SHC(0x1f1a),
- SHC(0x1d93),
- SHC(0x1c0c),
- SHC(0x1a83),
- SHC(0x18f9),
- SHC(0x176e),
- SHC(0x15e2),
- SHC(0x1455),
- SHC(0x12c8),
- SHC(0x113a),
- SHC(0xfab),
- SHC(0xe1c),
- SHC(0xc8c),
- SHC(0xafb),
- SHC(0x96b),
- SHC(0x7d9),
- SHC(0x648),
- SHC(0x4b6),
- SHC(0x324),
- SHC(0x192),
- SHC(0x0),
- SHC(0xfe6e),
- SHC(0xfcdc),
- SHC(0xfb4a),
- SHC(0xf9b8),
- SHC(0xf827),
- SHC(0xf695),
- SHC(0xf505),
- SHC(0xf374),
- SHC(0xf1e4),
- SHC(0xf055),
- SHC(0xeec6),
- SHC(0xed38),
- SHC(0xebab),
- SHC(0xea1e),
- SHC(0xe892),
- SHC(0xe707),
- SHC(0xe57d),
- SHC(0xe3f4),
- SHC(0xe26d),
- SHC(0xe0e6),
- SHC(0xdf61),
- SHC(0xdddc),
- SHC(0xdc59),
- SHC(0xdad8),
- SHC(0xd958),
- SHC(0xd7d9),
- SHC(0xd65c),
- SHC(0xd4e1),
- SHC(0xd367),
- SHC(0xd1ef),
- SHC(0xd079),
- SHC(0xcf04),
- SHC(0xcd92),
- SHC(0xcc21),
- SHC(0xcab2),
- SHC(0xc946),
- SHC(0xc7db),
- SHC(0xc673),
- SHC(0xc50d),
- SHC(0xc3a9),
- SHC(0xc248),
- SHC(0xc0e9),
- SHC(0xbf8c),
- SHC(0xbe32),
- SHC(0xbcda),
- SHC(0xbb85),
- SHC(0xba33),
- SHC(0xb8e3),
- SHC(0xb796),
- SHC(0xb64c),
- SHC(0xb505),
- SHC(0xb3c0),
- SHC(0xb27f),
- SHC(0xb140),
- SHC(0xb005),
- SHC(0xaecc),
- SHC(0xad97),
- SHC(0xac65),
- SHC(0xab36),
- SHC(0xaa0a),
- SHC(0xa8e2),
- SHC(0xa7bd),
- SHC(0xa69c),
- SHC(0xa57e),
- SHC(0xa463),
- SHC(0xa34c),
- SHC(0xa238),
- SHC(0xa129),
- SHC(0xa01c),
- SHC(0x9f14),
- SHC(0x9e0f),
- SHC(0x9d0e),
- SHC(0x9c11),
- SHC(0x9b17),
- SHC(0x9a22),
- SHC(0x9930),
- SHC(0x9843),
- SHC(0x9759),
- SHC(0x9674),
- SHC(0x9592),
- SHC(0x94b5),
- SHC(0x93dc),
- SHC(0x9307),
- SHC(0x9236),
- SHC(0x9169),
- SHC(0x90a1),
- SHC(0x8fdd),
- SHC(0x8f1d),
- SHC(0x8e62),
- SHC(0x8dab),
- SHC(0x8cf8),
- SHC(0x8c4a),
- SHC(0x8ba0),
- SHC(0x8afb),
- SHC(0x8a5a),
- SHC(0x89be),
- SHC(0x8927),
- SHC(0x8894),
- SHC(0x8805),
- SHC(0x877b),
- SHC(0x86f6),
- SHC(0x8676),
- SHC(0x85fa),
- SHC(0x8583),
- SHC(0x8511),
- SHC(0x84a3),
- SHC(0x843a),
- SHC(0x83d6),
- SHC(0x8377),
- SHC(0x831c),
- SHC(0x82c6),
- SHC(0x8276),
- SHC(0x822a),
- SHC(0x81e2),
- SHC(0x81a0),
- SHC(0x8163),
- SHC(0x812a),
- SHC(0x80f6),
- SHC(0x80c8),
- SHC(0x809e),
- SHC(0x8079),
- SHC(0x8059),
- SHC(0x803e),
- SHC(0x8027),
- SHC(0x8016),
- SHC(0x800a),
- SHC(0x8002),
- SHC(0x8001),
- SHC(0x8002),
- SHC(0x800a),
- SHC(0x8016),
- SHC(0x8027),
- SHC(0x803e),
- SHC(0x8059),
- SHC(0x8079),
- SHC(0x809e),
- SHC(0x80c8),
- SHC(0x80f6),
- SHC(0x812a),
- SHC(0x8163),
- SHC(0x81a0),
- SHC(0x81e2),
- SHC(0x822a),
- SHC(0x8276),
- SHC(0x82c6),
- SHC(0x831c),
- SHC(0x8377),
- SHC(0x83d6),
- SHC(0x843a),
- SHC(0x84a3),
- SHC(0x8511),
- SHC(0x8583),
- SHC(0x85fa),
- SHC(0x8676),
- SHC(0x86f6),
- SHC(0x877b),
- SHC(0x8805),
- SHC(0x8894),
- SHC(0x8927),
- SHC(0x89be),
- SHC(0x8a5a),
- SHC(0x8afb),
- SHC(0x8ba0),
- SHC(0x8c4a),
- SHC(0x8cf8),
- SHC(0x8dab),
- SHC(0x8e62),
- SHC(0x8f1d),
- SHC(0x8fdd),
- SHC(0x90a1),
- SHC(0x9169),
- SHC(0x9236),
- SHC(0x9307),
- SHC(0x93dc),
- SHC(0x94b5),
- SHC(0x9592),
- SHC(0x9674),
- SHC(0x9759),
- SHC(0x9843),
- SHC(0x9930),
- SHC(0x9a22),
- SHC(0x9b17),
- SHC(0x9c11),
- SHC(0x9d0e),
- SHC(0x9e0f),
- SHC(0x9f14),
- SHC(0xa01c),
- SHC(0xa129),
- SHC(0xa238),
- SHC(0xa34c),
- SHC(0xa463),
- SHC(0xa57e),
- SHC(0xa69c),
- SHC(0xa7bd),
- SHC(0xa8e2),
- SHC(0xaa0a),
- SHC(0xab36),
- SHC(0xac65),
- SHC(0xad97),
- SHC(0xaecc),
- SHC(0xb005),
- SHC(0xb140),
- SHC(0xb27f),
- SHC(0xb3c0),
- SHC(0xb505),
- SHC(0xb64c),
- SHC(0xb796),
- SHC(0xb8e3),
- SHC(0xba33),
- SHC(0xbb85),
- SHC(0xbcda),
- SHC(0xbe32),
- SHC(0xbf8c),
- SHC(0xc0e9),
- SHC(0xc248),
- SHC(0xc3a9),
- SHC(0xc50d),
- SHC(0xc673),
- SHC(0xc7db),
- SHC(0xc946),
- SHC(0xcab2),
- SHC(0xcc21),
- SHC(0xcd92),
- SHC(0xcf04),
- SHC(0xd079),
- SHC(0xd1ef),
- SHC(0xd367),
- SHC(0xd4e1),
- SHC(0xd65c),
- SHC(0xd7d9),
- SHC(0xd958),
- SHC(0xdad8),
- SHC(0xdc59),
- SHC(0xdddc),
- SHC(0xdf61),
- SHC(0xe0e6),
- SHC(0xe26d),
- SHC(0xe3f4),
- SHC(0xe57d),
- SHC(0xe707),
- SHC(0xe892),
- SHC(0xea1e),
- SHC(0xebab),
- SHC(0xed38),
- SHC(0xeec6),
- SHC(0xf055),
- SHC(0xf1e4),
- SHC(0xf374),
- SHC(0xf505),
- SHC(0xf695),
- SHC(0xf827),
- SHC(0xf9b8),
- SHC(0xfb4a),
- SHC(0xfcdc),
- SHC(0xfe6e),
- SHC(0x0),
- SHC(0x192),
- SHC(0x324),
- SHC(0x4b6),
- SHC(0x648),
- SHC(0x7d9),
- SHC(0x96b),
- SHC(0xafb),
- SHC(0xc8c),
- SHC(0xe1c),
- SHC(0xfab),
- SHC(0x113a),
- SHC(0x12c8),
- SHC(0x1455),
- SHC(0x15e2),
- SHC(0x176e),
- SHC(0x18f9),
- SHC(0x1a83),
- SHC(0x1c0c),
- SHC(0x1d93),
- SHC(0x1f1a),
- SHC(0x209f),
- SHC(0x2224),
- SHC(0x23a7),
- SHC(0x2528),
- SHC(0x26a8),
- SHC(0x2827),
- SHC(0x29a4),
- SHC(0x2b1f),
- SHC(0x2c99),
- SHC(0x2e11),
- SHC(0x2f87),
- SHC(0x30fc),
- SHC(0x326e),
- SHC(0x33df),
- SHC(0x354e),
- SHC(0x36ba),
- SHC(0x3825),
- SHC(0x398d),
- SHC(0x3af3),
- SHC(0x3c57),
- SHC(0x3db8),
- SHC(0x3f17),
- SHC(0x4074),
- SHC(0x41ce),
- SHC(0x4326),
- SHC(0x447b),
- SHC(0x45cd),
- SHC(0x471d),
- SHC(0x486a),
- SHC(0x49b4),
- SHC(0x4afb),
- SHC(0x4c40),
- SHC(0x4d81),
- SHC(0x4ec0),
- SHC(0x4ffb),
- SHC(0x5134),
- SHC(0x5269),
- SHC(0x539b),
- SHC(0x54ca),
- SHC(0x55f6),
- SHC(0x571e),
- SHC(0x5843),
- SHC(0x5964),
- SHC(0x5a82),
- SHC(0x5b9d),
- SHC(0x5cb4),
- SHC(0x5dc8),
- SHC(0x5ed7),
- SHC(0x5fe4),
- SHC(0x60ec),
- SHC(0x61f1),
- SHC(0x62f2),
- SHC(0x63ef),
- SHC(0x64e9),
- SHC(0x65de),
- SHC(0x66d0),
- SHC(0x67bd),
- SHC(0x68a7),
- SHC(0x698c),
- SHC(0x6a6e),
- SHC(0x6b4b),
- SHC(0x6c24),
- SHC(0x6cf9),
- SHC(0x6dca),
- SHC(0x6e97),
- SHC(0x6f5f),
- SHC(0x7023),
- SHC(0x70e3),
- SHC(0x719e),
- SHC(0x7255),
- SHC(0x7308),
- SHC(0x73b6),
- SHC(0x7460),
- SHC(0x7505),
- SHC(0x75a6),
- SHC(0x7642),
- SHC(0x76d9),
- SHC(0x776c),
- SHC(0x77fb),
- SHC(0x7885),
- SHC(0x790a),
- SHC(0x798a),
- SHC(0x7a06),
- SHC(0x7a7d),
- SHC(0x7aef),
- SHC(0x7b5d),
- SHC(0x7bc6),
- SHC(0x7c2a),
- SHC(0x7c89),
- SHC(0x7ce4),
- SHC(0x7d3a),
- SHC(0x7d8a),
- SHC(0x7dd6),
- SHC(0x7e1e),
- SHC(0x7e60),
- SHC(0x7e9d),
- SHC(0x7ed6),
- SHC(0x7f0a),
- SHC(0x7f38),
- SHC(0x7f62),
- SHC(0x7f87),
- SHC(0x7fa7),
- SHC(0x7fc2),
- SHC(0x7fd9),
- SHC(0x7fea),
- SHC(0x7ff6),
- SHC(0x7ffe)
-};
-
-const PWord16 w1N8[15] =
-{
- {{ 32729/*0.998795 Q15*/, -1608/*-0.049068 Q15*/}},
- {{ 32610/*0.995185 Q15*/, -3212/*-0.098017 Q15*/}},
- {{ 32413/*0.989177 Q15*/, -4808/*-0.146730 Q15*/}},
- {{ 32138/*0.980785 Q15*/, -6393/*-0.195090 Q15*/}},
- {{ 31786/*0.970031 Q15*/, -7962/*-0.242980 Q15*/}},
- {{ 31357/*0.956940 Q15*/, -9512/*-0.290285 Q15*/}},
- {{ 30853/*0.941544 Q15*/, -11039/*-0.336890 Q15*/}},
- {{ 30274/*0.923880 Q15*/, -12540/*-0.382683 Q15*/}},
- {{ 29622/*0.903989 Q15*/, -14010/*-0.427555 Q15*/}},
- {{ 28899/*0.881921 Q15*/, -15447/*-0.471397 Q15*/}},
- {{ 28106/*0.857729 Q15*/, -16846/*-0.514103 Q15*/}},
- {{ 27246/*0.831470 Q15*/, -18205/*-0.555570 Q15*/}},
- {{ 26320/*0.803208 Q15*/, -19520/*-0.595699 Q15*/}},
- {{ 25330/*0.773010 Q15*/, -20788/*-0.634393 Q15*/}},
- {{ 24279/*0.740951 Q15*/, -22006/*-0.671559 Q15*/}}
-};
-
-const PWord16 w2N8[15] =
-{
- {{ 32610/*0.995185 Q15*/, -3212/*-0.098017 Q15*/}},
- {{ 32138/*0.980785 Q15*/, -6393/*-0.195090 Q15*/}},
- {{ 31357/*0.956940 Q15*/, -9512/*-0.290285 Q15*/}},
- {{ 30274/*0.923880 Q15*/, -12540/*-0.382683 Q15*/}},
- {{ 28899/*0.881921 Q15*/, -15447/*-0.471397 Q15*/}},
- {{ 27246/*0.831470 Q15*/, -18205/*-0.555570 Q15*/}},
- {{ 25330/*0.773010 Q15*/, -20788/*-0.634393 Q15*/}},
- {{ 23170/*0.707107 Q15*/, -23170/*-0.707107 Q15*/}},
- {{ 20788/*0.634393 Q15*/, -25330/*-0.773010 Q15*/}},
- {{ 18205/*0.555570 Q15*/, -27246/*-0.831470 Q15*/}},
- {{ 15447/*0.471397 Q15*/, -28899/*-0.881921 Q15*/}},
- {{ 12540/*0.382683 Q15*/, -30274/*-0.923880 Q15*/}},
- {{ 9512/*0.290285 Q15*/, -31357/*-0.956940 Q15*/}},
- {{ 6393/*0.195090 Q15*/, -32138/*-0.980785 Q15*/}},
- {{ 3212/*0.098017 Q15*/, -32610/*-0.995185 Q15*/}}
-};
-
-const PWord16 w3N8[15] =
-{
- {{ 32413/*0.989177 Q15*/, -4808/*-0.146730 Q15*/}},
- {{ 31357/*0.956940 Q15*/, -9512/*-0.290285 Q15*/}},
- {{ 29622/*0.903989 Q15*/, -14010/*-0.427555 Q15*/}},
- {{ 27246/*0.831470 Q15*/, -18205/*-0.555570 Q15*/}},
- {{ 24279/*0.740951 Q15*/, -22006/*-0.671559 Q15*/}},
- {{ 20788/*0.634393 Q15*/, -25330/*-0.773010 Q15*/}},
- {{ 16846/*0.514103 Q15*/, -28106/*-0.857729 Q15*/}},
- {{ 12540/*0.382683 Q15*/, -30274/*-0.923880 Q15*/}},
- {{ 7962/*0.242980 Q15*/, -31786/*-0.970031 Q15*/}},
- {{ 3212/*0.098017 Q15*/, -32610/*-0.995185 Q15*/}},
- {{ -1608/*-0.049068 Q15*/, -32729/*-0.998795 Q15*/}},
- {{ -6393/*-0.195090 Q15*/, -32138/*-0.980785 Q15*/}},
- {{-11039/*-0.336890 Q15*/, -30853/*-0.941544 Q15*/}},
- {{-15447/*-0.471397 Q15*/, -28899/*-0.881921 Q15*/}},
- {{-19520/*-0.595699 Q15*/, -26320/*-0.803208 Q15*/}}
-};
-
-const PWord16 w4N8[15] =
-{
- {{ 32138/*0.980785 Q15*/, -6393/*-0.195090 Q15*/}},
- {{ 30274/*0.923880 Q15*/, -12540/*-0.382683 Q15*/}},
- {{ 27246/*0.831470 Q15*/, -18205/*-0.555570 Q15*/}},
- {{ 23170/*0.707107 Q15*/, -23170/*-0.707107 Q15*/}},
- {{ 18205/*0.555570 Q15*/, -27246/*-0.831470 Q15*/}},
- {{ 12540/*0.382683 Q15*/, -30274/*-0.923880 Q15*/}},
- {{ 6393/*0.195090 Q15*/, -32138/*-0.980785 Q15*/}},
- {{ 0/*0.000000 Q15*/, -32768/*-1.000000 Q15*/}},
- {{ -6393/*-0.195090 Q15*/, -32138/*-0.980785 Q15*/}},
- {{-12540/*-0.382683 Q15*/, -30274/*-0.923880 Q15*/}},
- {{-18205/*-0.555570 Q15*/, -27246/*-0.831470 Q15*/}},
- {{-23170/*-0.707107 Q15*/, -23170/*-0.707107 Q15*/}},
- {{-27246/*-0.831470 Q15*/, -18205/*-0.555570 Q15*/}},
- {{-30274/*-0.923880 Q15*/, -12540/*-0.382683 Q15*/}},
- {{-32138/*-0.980785 Q15*/, -6393/*-0.195090 Q15*/}}
-};
-
-const PWord16 w5N8[15] =
-{
- {{ 31786/*0.970031 Q15*/, -7962/*-0.242980 Q15*/}},
- {{ 28899/*0.881921 Q15*/, -15447/*-0.471397 Q15*/}},
- {{ 24279/*0.740951 Q15*/, -22006/*-0.671559 Q15*/}},
- {{ 18205/*0.555570 Q15*/, -27246/*-0.831470 Q15*/}},
- {{ 11039/*0.336890 Q15*/, -30853/*-0.941544 Q15*/}},
- {{ 3212/*0.098017 Q15*/, -32610/*-0.995185 Q15*/}},
- {{ -4808/*-0.146730 Q15*/, -32413/*-0.989177 Q15*/}},
- {{-12540/*-0.382683 Q15*/, -30274/*-0.923880 Q15*/}},
- {{-19520/*-0.595699 Q15*/, -26320/*-0.803208 Q15*/}},
- {{-25330/*-0.773010 Q15*/, -20788/*-0.634393 Q15*/}},
- {{-29622/*-0.903989 Q15*/, -14010/*-0.427555 Q15*/}},
- {{-32138/*-0.980785 Q15*/, -6393/*-0.195090 Q15*/}},
- {{-32729/*-0.998795 Q15*/, 1608/*0.049068 Q15*/}},
- {{-31357/*-0.956940 Q15*/, 9512/*0.290285 Q15*/}},
- {{-28106/*-0.857729 Q15*/, 16846/*0.514103 Q15*/}}
-};
-
-const PWord16 w6N8[15] =
-{
- {{ 31357/*0.956940 Q15*/, -9512/*-0.290285 Q15*/}},
- {{ 27246/*0.831470 Q15*/, -18205/*-0.555570 Q15*/}},
- {{ 20788/*0.634393 Q15*/, -25330/*-0.773010 Q15*/}},
- {{ 12540/*0.382683 Q15*/, -30274/*-0.923880 Q15*/}},
- {{ 3212/*0.098017 Q15*/, -32610/*-0.995185 Q15*/}},
- {{ -6393/*-0.195090 Q15*/, -32138/*-0.980785 Q15*/}},
- {{-15447/*-0.471397 Q15*/, -28899/*-0.881921 Q15*/}},
- {{-23170/*-0.707107 Q15*/, -23170/*-0.707107 Q15*/}},
- {{-28899/*-0.881921 Q15*/, -15447/*-0.471397 Q15*/}},
- {{-32138/*-0.980785 Q15*/, -6393/*-0.195090 Q15*/}},
- {{-32610/*-0.995185 Q15*/, 3212/*0.098017 Q15*/}},
- {{-30274/*-0.923880 Q15*/, 12540/*0.382683 Q15*/}},
- {{-25330/*-0.773010 Q15*/, 20788/*0.634393 Q15*/}},
- {{-18205/*-0.555570 Q15*/, 27246/*0.831470 Q15*/}},
- {{ -9512/*-0.290285 Q15*/, 31357/*0.956940 Q15*/}}
-};
-
-const PWord16 w7N8[15] =
-{
- {{ 30853/*0.941544 Q15*/, -11039/*-0.336890 Q15*/}},
- {{ 25330/*0.773010 Q15*/, -20788/*-0.634393 Q15*/}},
- {{ 16846/*0.514103 Q15*/, -28106/*-0.857729 Q15*/}},
- {{ 6393/*0.195090 Q15*/, -32138/*-0.980785 Q15*/}},
- {{ -4808/*-0.146730 Q15*/, -32413/*-0.989177 Q15*/}},
- {{-15447/*-0.471397 Q15*/, -28899/*-0.881921 Q15*/}},
- {{-24279/*-0.740951 Q15*/, -22006/*-0.671559 Q15*/}},
- {{-30274/*-0.923880 Q15*/, -12540/*-0.382683 Q15*/}},
- {{-32729/*-0.998795 Q15*/, -1608/*-0.049068 Q15*/}},
- {{-31357/*-0.956940 Q15*/, 9512/*0.290285 Q15*/}},
- {{-26320/*-0.803208 Q15*/, 19520/*0.595699 Q15*/}},
- {{-18205/*-0.555570 Q15*/, 27246/*0.831470 Q15*/}},
- {{ -7962/*-0.242980 Q15*/, 31786/*0.970031 Q15*/}},
- {{ 3212/*0.098017 Q15*/, 32610/*0.995185 Q15*/}},
- {{ 14010/*0.427555 Q15*/, 29622/*0.903989 Q15*/}}
-};
-
-const PWord16 *w_a[7] = { w1N8, w2N8, w3N8, w4N8, w5N8, w6N8, w7N8 };//Q15
-
-const PWord16 w19N[127] =
-{
- {{ 31881/*0.972940 Q15*/, 7571/*0.231058 Q15*/}},
- {{ 29269/*0.893224 Q15*/, 14733/*0.449611 Q15*/}},
- {{ 25073/*0.765167 Q15*/, 21097/*0.643832 Q15*/}},
- {{ 19520/*0.595699 Q15*/, 26320/*0.803208 Q15*/}},
- {{ 12910/*0.393992 Q15*/, 30118/*0.919114 Q15*/}},
- {{ 5602/*0.170962 Q15*/, 32286/*0.985278 Q15*/}},
- {{ -2009/*-0.061321 Q15*/, 32706/*0.998118 Q15*/}},
- {{ -9512/*-0.290285 Q15*/, 31357/*0.956940 Q15*/}},
- {{-16500/*-0.503538 Q15*/, 28311/*0.863973 Q15*/}},
- {{-22595/*-0.689541 Q15*/, 23732/*0.724247 Q15*/}},
- {{-27467/*-0.838225 Q15*/, 17869/*0.545325 Q15*/}},
- {{-30853/*-0.941544 Q15*/, 11039/*0.336890 Q15*/}},
- {{-32568/*-0.993907 Q15*/, 3612/*0.110222 Q15*/}},
- {{-32522/*-0.992480 Q15*/, -4011/*-0.122411 Q15*/}},
- {{-30715/*-0.937339 Q15*/, -11417/*-0.348419 Q15*/}},
- {{-27246/*-0.831470 Q15*/, -18205/*-0.555570 Q15*/}},
- {{-22302/*-0.680601 Q15*/, -24008/*-0.732654 Q15*/}},
- {{-16151/*-0.492898 Q15*/, -28511/*-0.870087 Q15*/}},
- {{ -9127/*-0.278520 Q15*/, -31471/*-0.960431 Q15*/}},
- {{ -1608/*-0.049068 Q15*/, -32729/*-0.998795 Q15*/}},
- {{ 5998/*0.183040 Q15*/, -32214/*-0.983105 Q15*/}},
- {{ 13279/*0.405241 Q15*/, -29957/*-0.914210 Q15*/}},
- {{ 19841/*0.605511 Q15*/, -26078/*-0.795837 Q15*/}},
- {{ 25330/*0.773010 Q15*/, -20788/*-0.634393 Q15*/}},
- {{ 29448/*0.898674 Q15*/, -14373/*-0.438616 Q15*/}},
- {{ 31972/*0.975702 Q15*/, -7180/*-0.219101 Q15*/}},
- {{ 32766/*0.999925 Q15*/, 402/*0.012272 Q15*/}},
- {{ 31786/*0.970031 Q15*/, 7962/*0.242980 Q15*/}},
- {{ 29086/*0.887640 Q15*/, 15091/*0.460539 Q15*/}},
- {{ 24812/*0.757209 Q15*/, 21403/*0.653173 Q15*/}},
- {{ 19195/*0.585798 Q15*/, 26557/*0.810457 Q15*/}},
- {{ 12540/*0.382683 Q15*/, 30274/*0.923880 Q15*/}},
- {{ 5205/*0.158858 Q15*/, 32352/*0.987301 Q15*/}},
- {{ -2411/*-0.073565 Q15*/, 32679/*0.997290 Q15*/}},
- {{ -9896/*-0.302006 Q15*/, 31238/*0.953306 Q15*/}},
- {{-16846/*-0.514103 Q15*/, 28106/*0.857729 Q15*/}},
- {{-22884/*-0.698376 Q15*/, 23453/*0.715731 Q15*/}},
- {{-27684/*-0.844854 Q15*/, 17531/*0.534998 Q15*/}},
- {{-30986/*-0.945607 Q15*/, 10660/*0.325310 Q15*/}},
- {{-32610/*-0.995185 Q15*/, 3212/*0.098017 Q15*/}},
- {{-32470/*-0.990903 Q15*/, -4410/*-0.134581 Q15*/}},
- {{-30572/*-0.932993 Q15*/, -11793/*-0.359895 Q15*/}},
- {{-27020/*-0.824589 Q15*/, -18538/*-0.565732 Q15*/}},
- {{-22006/*-0.671559 Q15*/, -24279/*-0.740951 Q15*/}},
- {{-15800/*-0.482184 Q15*/, -28707/*-0.876070 Q15*/}},
- {{ -8740/*-0.266713 Q15*/, -31581/*-0.963776 Q15*/}},
- {{ -1206/*-0.036807 Q15*/, -32746/*-0.999322 Q15*/}},
- {{ 6393/*0.195090 Q15*/, -32138/*-0.980785 Q15*/}},
- {{ 13646/*0.416430 Q15*/, -29792/*-0.909168 Q15*/}},
- {{ 20160/*0.615232 Q15*/, -25833/*-0.788346 Q15*/}},
- {{ 25583/*0.780737 Q15*/, -20475/*-0.624859 Q15*/}},
- {{ 29622/*0.903989 Q15*/, -14010/*-0.427555 Q15*/}},
- {{ 32057/*0.978317 Q15*/, -6787/*-0.207111 Q15*/}},
- {{ 32758/*0.999699 Q15*/, 804/*0.024541 Q15*/}},
- {{ 31686/*0.966976 Q15*/, 8351/*0.254866 Q15*/}},
- {{ 28899/*0.881921 Q15*/, 15447/*0.471397 Q15*/}},
- {{ 24548/*0.749136 Q15*/, 21706/*0.662416 Q15*/}},
- {{ 18868/*0.575808 Q15*/, 26791/*0.817585 Q15*/}},
- {{ 12167/*0.371317 Q15*/, 30425/*0.928506 Q15*/}},
- {{ 4808/*0.146730 Q15*/, 32413/*0.989177 Q15*/}},
- {{ -2811/*-0.085797 Q15*/, 32647/*0.996313 Q15*/}},
- {{-10279/*-0.313682 Q15*/, 31114/*0.949528 Q15*/}},
- {{-17190/*-0.524590 Q15*/, 27897/*0.851355 Q15*/}},
- {{-23170/*-0.707107 Q15*/, 23170/*0.707107 Q15*/}},
- {{-27897/*-0.851355 Q15*/, 17190/*0.524590 Q15*/}},
- {{-31114/*-0.949528 Q15*/, 10279/*0.313682 Q15*/}},
- {{-32647/*-0.996313 Q15*/, 2811/*0.085797 Q15*/}},
- {{-32413/*-0.989177 Q15*/, -4808/*-0.146730 Q15*/}},
- {{-30425/*-0.928506 Q15*/, -12167/*-0.371317 Q15*/}},
- {{-26791/*-0.817585 Q15*/, -18868/*-0.575808 Q15*/}},
- {{-21706/*-0.662416 Q15*/, -24548/*-0.749136 Q15*/}},
- {{-15447/*-0.471397 Q15*/, -28899/*-0.881921 Q15*/}},
- {{ -8351/*-0.254866 Q15*/, -31686/*-0.966976 Q15*/}},
- {{ -804/*-0.024541 Q15*/, -32758/*-0.999699 Q15*/}},
- {{ 6787/*0.207111 Q15*/, -32057/*-0.978317 Q15*/}},
- {{ 14010/*0.427555 Q15*/, -29622/*-0.903989 Q15*/}},
- {{ 20475/*0.624859 Q15*/, -25583/*-0.780737 Q15*/}},
- {{ 25833/*0.788346 Q15*/, -20160/*-0.615232 Q15*/}},
- {{ 29792/*0.909168 Q15*/, -13646/*-0.416430 Q15*/}},
- {{ 32138/*0.980785 Q15*/, -6393/*-0.195090 Q15*/}},
- {{ 32746/*0.999322 Q15*/, 1206/*0.036807 Q15*/}},
- {{ 31581/*0.963776 Q15*/, 8740/*0.266713 Q15*/}},
- {{ 28707/*0.876070 Q15*/, 15800/*0.482184 Q15*/}},
- {{ 24279/*0.740951 Q15*/, 22006/*0.671559 Q15*/}},
- {{ 18538/*0.565732 Q15*/, 27020/*0.824589 Q15*/}},
- {{ 11793/*0.359895 Q15*/, 30572/*0.932993 Q15*/}},
- {{ 4410/*0.134581 Q15*/, 32470/*0.990903 Q15*/}},
- {{ -3212/*-0.098017 Q15*/, 32610/*0.995185 Q15*/}},
- {{-10660/*-0.325310 Q15*/, 30986/*0.945607 Q15*/}},
- {{-17531/*-0.534998 Q15*/, 27684/*0.844854 Q15*/}},
- {{-23453/*-0.715731 Q15*/, 22884/*0.698376 Q15*/}},
- {{-28106/*-0.857729 Q15*/, 16846/*0.514103 Q15*/}},
- {{-31238/*-0.953306 Q15*/, 9896/*0.302006 Q15*/}},
- {{-32679/*-0.997290 Q15*/, 2411/*0.073565 Q15*/}},
- {{-32352/*-0.987301 Q15*/, -5205/*-0.158858 Q15*/}},
- {{-30274/*-0.923880 Q15*/, -12540/*-0.382683 Q15*/}},
- {{-26557/*-0.810457 Q15*/, -19195/*-0.585798 Q15*/}},
- {{-21403/*-0.653173 Q15*/, -24812/*-0.757209 Q15*/}},
- {{-15091/*-0.460539 Q15*/, -29086/*-0.887640 Q15*/}},
- {{ -7962/*-0.242980 Q15*/, -31786/*-0.970031 Q15*/}},
- {{ -402/*-0.012272 Q15*/, -32766/*-0.999925 Q15*/}},
- {{ 7180/*0.219101 Q15*/, -31972/*-0.975702 Q15*/}},
- {{ 14373/*0.438616 Q15*/, -29448/*-0.898674 Q15*/}},
- {{ 20788/*0.634393 Q15*/, -25330/*-0.773010 Q15*/}},
- {{ 26078/*0.795837 Q15*/, -19841/*-0.605511 Q15*/}},
- {{ 29957/*0.914210 Q15*/, -13279/*-0.405241 Q15*/}},
- {{ 32214/*0.983105 Q15*/, -5998/*-0.183040 Q15*/}},
- {{ 32729/*0.998795 Q15*/, 1608/*0.049068 Q15*/}},
- {{ 31471/*0.960431 Q15*/, 9127/*0.278520 Q15*/}},
- {{ 28511/*0.870087 Q15*/, 16151/*0.492898 Q15*/}},
- {{ 24008/*0.732654 Q15*/, 22302/*0.680601 Q15*/}},
- {{ 18205/*0.555570 Q15*/, 27246/*0.831470 Q15*/}},
- {{ 11417/*0.348419 Q15*/, 30715/*0.937339 Q15*/}},
- {{ 4011/*0.122411 Q15*/, 32522/*0.992480 Q15*/}},
- {{ -3612/*-0.110222 Q15*/, 32568/*0.993907 Q15*/}},
- {{-11039/*-0.336890 Q15*/, 30853/*0.941544 Q15*/}},
- {{-17869/*-0.545325 Q15*/, 27467/*0.838225 Q15*/}},
- {{-23732/*-0.724247 Q15*/, 22595/*0.689541 Q15*/}},
- {{-28311/*-0.863973 Q15*/, 16500/*0.503538 Q15*/}},
- {{-31357/*-0.956940 Q15*/, 9512/*0.290285 Q15*/}},
- {{-32706/*-0.998118 Q15*/, 2009/*0.061321 Q15*/}},
- {{-32286/*-0.985278 Q15*/, -5602/*-0.170962 Q15*/}},
- {{-30118/*-0.919114 Q15*/, -12910/*-0.393992 Q15*/}},
- {{-26320/*-0.803208 Q15*/, -19520/*-0.595699 Q15*/}},
- {{-21097/*-0.643832 Q15*/, -25073/*-0.765167 Q15*/}},
- {{-14733/*-0.449611 Q15*/, -29269/*-0.893224 Q15*/}},
- {{ -7571/*-0.231058 Q15*/, -31881/*-0.972940 Q15*/}}
-};
-
-const PWord16 w18N[127] =
-{
- {{ 31972/*0.975702 Q15*/, 7180/*0.219101 Q15*/}},
- {{ 29622/*0.903989 Q15*/, 14010/*0.427555 Q15*/}},
- {{ 25833/*0.788346 Q15*/, 20160/*0.615232 Q15*/}},
- {{ 20788/*0.634393 Q15*/, 25330/*0.773010 Q15*/}},
- {{ 14733/*0.449611 Q15*/, 29269/*0.893224 Q15*/}},
- {{ 7962/*0.242980 Q15*/, 31786/*0.970031 Q15*/}},
- {{ 804/*0.024541 Q15*/, 32758/*0.999699 Q15*/}},
- {{ -6393/*-0.195090 Q15*/, 32138/*0.980785 Q15*/}},
- {{-13279/*-0.405241 Q15*/, 29957/*0.914210 Q15*/}},
- {{-19520/*-0.595699 Q15*/, 26320/*0.803208 Q15*/}},
- {{-24812/*-0.757209 Q15*/, 21403/*0.653173 Q15*/}},
- {{-28899/*-0.881921 Q15*/, 15447/*0.471397 Q15*/}},
- {{-31581/*-0.963776 Q15*/, 8740/*0.266713 Q15*/}},
- {{-32729/*-0.998795 Q15*/, 1608/*0.049068 Q15*/}},
- {{-32286/*-0.985278 Q15*/, -5602/*-0.170962 Q15*/}},
- {{-30274/*-0.923880 Q15*/, -12540/*-0.382683 Q15*/}},
- {{-26791/*-0.817585 Q15*/, -18868/*-0.575808 Q15*/}},
- {{-22006/*-0.671559 Q15*/, -24279/*-0.740951 Q15*/}},
- {{-16151/*-0.492898 Q15*/, -28511/*-0.870087 Q15*/}},
- {{ -9512/*-0.290285 Q15*/, -31357/*-0.956940 Q15*/}},
- {{ -2411/*-0.073565 Q15*/, -32679/*-0.997290 Q15*/}},
- {{ 4808/*0.146730 Q15*/, -32413/*-0.989177 Q15*/}},
- {{ 11793/*0.359895 Q15*/, -30572/*-0.932993 Q15*/}},
- {{ 18205/*0.555570 Q15*/, -27246/*-0.831470 Q15*/}},
- {{ 23732/*0.724247 Q15*/, -22595/*-0.689541 Q15*/}},
- {{ 28106/*0.857729 Q15*/, -16846/*-0.514103 Q15*/}},
- {{ 31114/*0.949528 Q15*/, -10279/*-0.313682 Q15*/}},
- {{ 32610/*0.995185 Q15*/, -3212/*-0.098017 Q15*/}},
- {{ 32522/*0.992480 Q15*/, 4011/*0.122411 Q15*/}},
- {{ 30853/*0.941544 Q15*/, 11039/*0.336890 Q15*/}},
- {{ 27684/*0.844854 Q15*/, 17531/*0.534998 Q15*/}},
- {{ 23170/*0.707107 Q15*/, 23170/*0.707107 Q15*/}},
- {{ 17531/*0.534998 Q15*/, 27684/*0.844854 Q15*/}},
- {{ 11039/*0.336890 Q15*/, 30853/*0.941544 Q15*/}},
- {{ 4011/*0.122411 Q15*/, 32522/*0.992480 Q15*/}},
- {{ -3212/*-0.098017 Q15*/, 32610/*0.995185 Q15*/}},
- {{-10279/*-0.313682 Q15*/, 31114/*0.949528 Q15*/}},
- {{-16846/*-0.514103 Q15*/, 28106/*0.857729 Q15*/}},
- {{-22595/*-0.689541 Q15*/, 23732/*0.724247 Q15*/}},
- {{-27246/*-0.831470 Q15*/, 18205/*0.555570 Q15*/}},
- {{-30572/*-0.932993 Q15*/, 11793/*0.359895 Q15*/}},
- {{-32413/*-0.989177 Q15*/, 4808/*0.146730 Q15*/}},
- {{-32679/*-0.997290 Q15*/, -2411/*-0.073565 Q15*/}},
- {{-31357/*-0.956940 Q15*/, -9512/*-0.290285 Q15*/}},
- {{-28511/*-0.870087 Q15*/, -16151/*-0.492898 Q15*/}},
- {{-24279/*-0.740951 Q15*/, -22006/*-0.671559 Q15*/}},
- {{-18868/*-0.575808 Q15*/, -26791/*-0.817585 Q15*/}},
- {{-12540/*-0.382683 Q15*/, -30274/*-0.923880 Q15*/}},
- {{ -5602/*-0.170962 Q15*/, -32286/*-0.985278 Q15*/}},
- {{ 1608/*0.049068 Q15*/, -32729/*-0.998795 Q15*/}},
- {{ 8740/*0.266713 Q15*/, -31581/*-0.963776 Q15*/}},
- {{ 15447/*0.471397 Q15*/, -28899/*-0.881921 Q15*/}},
- {{ 21403/*0.653173 Q15*/, -24812/*-0.757209 Q15*/}},
- {{ 26320/*0.803208 Q15*/, -19520/*-0.595699 Q15*/}},
- {{ 29957/*0.914210 Q15*/, -13279/*-0.405241 Q15*/}},
- {{ 32138/*0.980785 Q15*/, -6393/*-0.195090 Q15*/}},
- {{ 32758/*0.999699 Q15*/, 804/*0.024541 Q15*/}},
- {{ 31786/*0.970031 Q15*/, 7962/*0.242980 Q15*/}},
- {{ 29269/*0.893224 Q15*/, 14733/*0.449611 Q15*/}},
- {{ 25330/*0.773010 Q15*/, 20788/*0.634393 Q15*/}},
- {{ 20160/*0.615232 Q15*/, 25833/*0.788346 Q15*/}},
- {{ 14010/*0.427555 Q15*/, 29622/*0.903989 Q15*/}},
- {{ 7180/*0.219101 Q15*/, 31972/*0.975702 Q15*/}},
- {{ 0/*0.000000 Q15*/, 32767/*1.000000 Q15*/}},
- {{ -7180/*-0.219101 Q15*/, 31972/*0.975702 Q15*/}},
- {{-14010/*-0.427555 Q15*/, 29622/*0.903989 Q15*/}},
- {{-20160/*-0.615232 Q15*/, 25833/*0.788346 Q15*/}},
- {{-25330/*-0.773010 Q15*/, 20788/*0.634393 Q15*/}},
- {{-29269/*-0.893224 Q15*/, 14733/*0.449611 Q15*/}},
- {{-31786/*-0.970031 Q15*/, 7962/*0.242980 Q15*/}},
- {{-32758/*-0.999699 Q15*/, 804/*0.024541 Q15*/}},
- {{-32138/*-0.980785 Q15*/, -6393/*-0.195090 Q15*/}},
- {{-29957/*-0.914210 Q15*/, -13279/*-0.405241 Q15*/}},
- {{-26320/*-0.803208 Q15*/, -19520/*-0.595699 Q15*/}},
- {{-21403/*-0.653173 Q15*/, -24812/*-0.757209 Q15*/}},
- {{-15447/*-0.471397 Q15*/, -28899/*-0.881921 Q15*/}},
- {{ -8740/*-0.266713 Q15*/, -31581/*-0.963776 Q15*/}},
- {{ -1608/*-0.049068 Q15*/, -32729/*-0.998795 Q15*/}},
- {{ 5602/*0.170962 Q15*/, -32286/*-0.985278 Q15*/}},
- {{ 12540/*0.382683 Q15*/, -30274/*-0.923880 Q15*/}},
- {{ 18868/*0.575808 Q15*/, -26791/*-0.817585 Q15*/}},
- {{ 24279/*0.740951 Q15*/, -22006/*-0.671559 Q15*/}},
- {{ 28511/*0.870087 Q15*/, -16151/*-0.492898 Q15*/}},
- {{ 31357/*0.956940 Q15*/, -9512/*-0.290285 Q15*/}},
- {{ 32679/*0.997290 Q15*/, -2411/*-0.073565 Q15*/}},
- {{ 32413/*0.989177 Q15*/, 4808/*0.146730 Q15*/}},
- {{ 30572/*0.932993 Q15*/, 11793/*0.359895 Q15*/}},
- {{ 27246/*0.831470 Q15*/, 18205/*0.555570 Q15*/}},
- {{ 22595/*0.689541 Q15*/, 23732/*0.724247 Q15*/}},
- {{ 16846/*0.514103 Q15*/, 28106/*0.857729 Q15*/}},
- {{ 10279/*0.313682 Q15*/, 31114/*0.949528 Q15*/}},
- {{ 3212/*0.098017 Q15*/, 32610/*0.995185 Q15*/}},
- {{ -4011/*-0.122411 Q15*/, 32522/*0.992480 Q15*/}},
- {{-11039/*-0.336890 Q15*/, 30853/*0.941544 Q15*/}},
- {{-17531/*-0.534998 Q15*/, 27684/*0.844854 Q15*/}},
- {{-23170/*-0.707107 Q15*/, 23170/*0.707107 Q15*/}},
- {{-27684/*-0.844854 Q15*/, 17531/*0.534998 Q15*/}},
- {{-30853/*-0.941544 Q15*/, 11039/*0.336890 Q15*/}},
- {{-32522/*-0.992480 Q15*/, 4011/*0.122411 Q15*/}},
- {{-32610/*-0.995185 Q15*/, -3212/*-0.098017 Q15*/}},
- {{-31114/*-0.949528 Q15*/, -10279/*-0.313682 Q15*/}},
- {{-28106/*-0.857729 Q15*/, -16846/*-0.514103 Q15*/}},
- {{-23732/*-0.724247 Q15*/, -22595/*-0.689541 Q15*/}},
- {{-18205/*-0.555570 Q15*/, -27246/*-0.831470 Q15*/}},
- {{-11793/*-0.359895 Q15*/, -30572/*-0.932993 Q15*/}},
- {{ -4808/*-0.146730 Q15*/, -32413/*-0.989177 Q15*/}},
- {{ 2411/*0.073565 Q15*/, -32679/*-0.997290 Q15*/}},
- {{ 9512/*0.290285 Q15*/, -31357/*-0.956940 Q15*/}},
- {{ 16151/*0.492898 Q15*/, -28511/*-0.870087 Q15*/}},
- {{ 22006/*0.671559 Q15*/, -24279/*-0.740951 Q15*/}},
- {{ 26791/*0.817585 Q15*/, -18868/*-0.575808 Q15*/}},
- {{ 30274/*0.923880 Q15*/, -12540/*-0.382683 Q15*/}},
- {{ 32286/*0.985278 Q15*/, -5602/*-0.170962 Q15*/}},
- {{ 32729/*0.998795 Q15*/, 1608/*0.049068 Q15*/}},
- {{ 31581/*0.963776 Q15*/, 8740/*0.266713 Q15*/}},
- {{ 28899/*0.881921 Q15*/, 15447/*0.471397 Q15*/}},
- {{ 24812/*0.757209 Q15*/, 21403/*0.653173 Q15*/}},
- {{ 19520/*0.595699 Q15*/, 26320/*0.803208 Q15*/}},
- {{ 13279/*0.405241 Q15*/, 29957/*0.914210 Q15*/}},
- {{ 6393/*0.195090 Q15*/, 32138/*0.980785 Q15*/}},
- {{ -804/*-0.024541 Q15*/, 32758/*0.999699 Q15*/}},
- {{ -7962/*-0.242980 Q15*/, 31786/*0.970031 Q15*/}},
- {{-14733/*-0.449611 Q15*/, 29269/*0.893224 Q15*/}},
- {{-20788/*-0.634393 Q15*/, 25330/*0.773010 Q15*/}},
- {{-25833/*-0.788346 Q15*/, 20160/*0.615232 Q15*/}},
- {{-29622/*-0.903989 Q15*/, 14010/*0.427555 Q15*/}},
- {{-31972/*-0.975702 Q15*/, 7180/*0.219101 Q15*/}}
-};
-
-/*-------------------------------------------------------------------*
- * 1/4 resolution interpolation filter (-3 dB at 0.791*fs/2)
- * for fractional pitch search
- * Used in lib_enc\pit_enc.c Q14
- *-------------------------------------------------------------------*/
-const Word16 inter4_1_fx[32] =//Q14
-{
- -12, -26, 32, 206,
- 420, 455, 73, -766,
- -1732, -2142,-1242, 1376,
- 5429, 9910,13418,14746,
- 13418, 9910, 5429, 1376,
- -1242, -2142,-1732, -766,
- 73, 455, 420, 206,
- 32, -26, -12, 0
-};
-
-const Word16 sin_switch_8[15] = { 3212, 6393, 9512, 12540, 15447, 18205, 20788, 23170,
- 25330, 27246, 28899, 30274, 31357, 32138, 32610
-};//Q15
-
-const Word16 sin_switch_16[30] = { 1660, 3315, 4962, 6596, 8213, 9810, 11380, 12922,
- 14431, 15902, 17333, 18719, 20057, 21344, 22576, 23750,
- 24863, 25912, 26895, 27808, 28651, 29419, 30112, 30728,
- 31265, 31722, 32097, 32390, 32600, 32726
-};//Q15
-
-
-const Word16 sin_switch_32[60] = { 844, 1687, 2529, 3369, 4207, 5043, 5875, 6703,
- 7526, 8345, 9158, 9965, 10766, 11559, 12345, 13122,
- 13891, 14650, 15400, 16140, 16869, 17586, 18293, 18986,
- 19668, 20336, 20991, 21632, 22258, 22870, 23467, 24048,
- 24613, 25162, 25694, 26209, 26707, 27187, 27649, 28092,
- 28518, 28924, 29311, 29678, 30026, 30354, 30662, 30949,
- 31216, 31462, 31688, 31892, 32075, 32237, 32378, 32497,
- 32594, 32670, 32725, 32757
-};//Q15
-
-
-const Word16 sin_switch_48[90] = { 566, 1131, 1696, 2261, 2825, 3388, 3950, 4511,
- 5070, 5628, 6185, 6739, 7292, 7842, 8390, 8935,
- 9478, 10018, 10555, 11089, 11620, 12147, 12670, 13190,
- 13706, 14218, 14725, 15228, 15727, 16220, 16709, 17194,
- 17672, 18146, 18614, 19077, 19534, 19985, 20431, 20870,
- 21303, 21729, 22149, 22563, 22970, 23370, 23763, 24148,
- 24527, 24899, 25263, 25619, 25968, 26309, 26642, 26968,
- 27285, 27594, 27895, 28188, 28472, 28747, 29015, 29273,
- 29523, 29764, 29996, 30219, 30433, 30639, 30835, 31021,
- 31199, 31367, 31526, 31676, 31816, 31946, 32068, 32179,
- 32281, 32373, 32456, 32529, 32592, 32646, 32690, 32724,
- 32748, 32763
-};//Q15
-
-const Word16 one_on_win_48k_fx[210] =
-{
- 16399, 16412, 16425, 16439, 16452, 16465, 16479, 16492,
- 16506, 16519, 16533, 16547, 16561, 16575, 16589, 16603,
- 16618, 16632, 16647, 16662, 16677, 16692, 16707, 16722,
- 16738, 16754, 16770, 16786, 16802, 16818, 16835, 16851,
- 16868, 16885, 16902, 16919, 16937, 16955, 16972, 16990,
- 17008, 17027, 17045, 17064, 17083, 17102, 17121, 17140,
- 17160, 17180, 17200, 17220, 17240, 17261, 17281, 17302,
- 17323, 17345, 17366, 17388, 17410, 17432, 17454, 17477,
- 17499, 17522, 17545, 17569, 17592, 17616, 17640, 17664,
- 17689, 17713, 17738, 17763, 17789, 17814, 17840, 17866,
- 17892, 17918, 17945, 17972, 17999, 18027, 18054, 18082,
- 18110, 18139, 18167, 18196, 18225, 18255, 18284, 18314,
- 18345, 18375, 18406, 18437, 18468, 18499, 18531, 18563,
- 18596, 18628, 18661, 18695, 18728, 18762, 18796, 18830,
- 18865, 18900, 18935, 18971, 19007, 19043, 19080, 19117,
- 19154, 19191, 19229, 19267, 19306, 19345, 19384, 19423,
- 19463, 19504, 19544, 19585, 19626, 19668, 19710, 19752,
- 19795, 19838, 19882, 19926, 19970, 20015, 20060, 20105,
- 20151, 20198, 20244, 20291, 20339, 20387, 20435, 20484,
- 20533, 20583, 20633, 20684, 20735, 20787, 20839, 20891,
- 20944, 20997, 21051, 21106, 21161, 21216, 21272, 21328,
- 21385, 21443, 21501, 21559, 21618, 21678, 21738, 21799,
- 21860, 21922, 21984, 22048, 22111, 22175, 22240, 22306,
- 22372, 22439, 22506, 22574, 22643, 22712, 22782, 22853,
- 22924, 22996, 23069, 23142, 23216, 23291, 23367, 23443,
- 23521, 23599, 23677, 23757, 23837, 23918, 24000, 24083,
- 24167, 24251
-};//Q14
-
-const Word16 one_on_win_8k_16k_48k_fx[70] =
-{
- 16432, 16472, 16512, 16554, 16596, 16639, 16684, 16730,
- 16778, 16826, 16876, 16928, 16981, 17036, 17092, 17150,
- 17210, 17271, 17334, 17399, 17465, 17534, 17604, 17676,
- 17751, 17827, 17905, 17986, 18068, 18153, 18240, 18329,
- 18421, 18515, 18612, 18711, 18813, 18918, 19025, 19135,
- 19248, 19364, 19483, 19606, 19731, 19860, 19992, 20128,
- 20268, 20411, 20558, 20709, 20865, 21024, 21188, 21357,
- 21530, 21708, 21891, 22079, 22273, 22472, 22677, 22888,
- 23105, 23329, 23560, 23797, 24041, 24251
-};//Q14
-
-const Word16 window_8_16_32kHz_fx[370] =
-{
- 3, 9, 19, 33, 49, 69, 93, 119,
- 149, 182, 219, 258, 301, 347, 396, 448,
- 503, 561, 623, 687, 755, 825, 898, 974,
- 1054, 1136, 1221, 1309, 1399, 1493, 1589, 1688,
- 1790, 1895, 2002, 2112, 2225, 2340, 2458, 2579,
- 2702, 2827, 2955, 3086, 3219, 3355, 3493, 3633,
- 3775, 3920, 4068, 4217, 4369, 4523, 4679, 4837,
- 4998, 5160, 5325, 5491, 5660, 5830, 6003, 6177,
- 6353, 6531, 6711, 6892, 7076, 7260, 7447, 7635,
- 7825, 8016, 8209, 8403, 8599, 8796, 8995, 9195,
- 9396, 9598, 9802, 10007, 10212, 10419, 10628, 10837,
- 11047, 11248, 11437, 11623, 11809, 11997, 12185, 12374,
- 12564, 12754, 12944, 13135, 13326, 13517, 13709, 13901,
- 14093, 14286, 14478, 14671, 14864, 15057, 15250, 15443,
- 15636, 15829, 16023, 16216, 16409, 16602, 16794, 16987,
- 17179, 17372, 17564, 17755, 17947, 18138, 18329, 18519,
- 18710, 18899, 19089, 19278, 19466, 19654, 19841, 20028,
- 20214, 20400, 20585, 20770, 20954, 21137, 21319, 21501,
- 21682, 21862, 22042, 22220, 22398, 22575, 22751, 22926,
- 23101, 23274, 23446, 23618, 23788, 23958, 24126, 24266,
- 24321, 24460, 24625, 24789, 24953, 25114, 25275, 25435,
- 25593, 25751, 25907, 26061, 26215, 26367, 26518, 26668,
- 26817, 26964, 27110, 27254, 27398, 27540, 27680, 27819,
- 27957, 28093, 28228, 28362, 28494, 28625, 28754, 28882,
- 29008, 29133, 29256, 29378, 29499, 29618, 29736, 29852,
- 29966, 30079, 30191, 30301, 30410, 30517, 30623, 30727,
- 30830, 30931, 31031, 31129, 31226, 31322, 31416, 31508,
- 31599, 31689, 31777, 31864, 31950, 32035, 32118, 32200,
- 32280, 32360, 32439, 32517, 32595, 32673, 32673, 32593,
- 32513, 32432, 32349, 32265, 32178, 32090, 31999, 31907,
- 31812, 31715, 31615, 31514, 31410, 31304, 31196, 31085,
- 30972, 30857, 30739, 30619, 30497, 30372, 30245, 30116,
- 29984, 29850, 29714, 29575, 29434, 29290, 29144, 28996,
- 28845, 28692, 28537, 28379, 28219, 28057, 27892, 27725,
- 27555, 27383, 27209, 27033, 26854, 26672, 26489, 26303,
- 26115, 25924, 25731, 25536, 25338, 25138, 24936, 24731,
- 24525, 24316, 24104, 23890, 23674, 23456, 23236, 23013,
- 22788, 22561, 22331, 22138, 22060, 21865, 21629, 21390,
- 21150, 20907, 20662, 20414, 20165, 19913, 19659, 19403,
- 19145, 18885, 18622, 18357, 18090, 17821, 17550, 17277,
- 17001, 16723, 16443, 16161, 15877, 15591, 15303, 15012,
- 14719, 14425, 14127, 13828, 13527, 13223, 12918, 12610,
- 12300, 11988, 11673, 11356, 11038, 10716, 10393, 10067,
- 9739, 9408, 9076, 8740, 8403, 8062, 7720, 7374,
- 7026, 6675, 6322, 5965, 5606, 5243, 4878, 4508,
- 4136, 3759, 3378, 2993, 2603, 2208, 1807, 1397,
- 978, 545
-};//Q15
-
-const Word16 window_48kHz_fx[1110] =
-{
- 0, 1, 2, 3, 5, 8, 10, 13,
- 17, 21, 25, 30, 35, 40, 46, 52,
- 58, 65, 72, 80, 88, 96, 105, 114,
- 124, 133, 144, 154, 165, 176, 188, 200,
- 212, 225, 238, 251, 265, 279, 293, 308,
- 323, 339, 354, 371, 387, 404, 421, 439,
- 457, 475, 493, 512, 532, 551, 571, 591,
- 612, 633, 654, 676, 698, 720, 743, 766,
- 789, 813, 837, 861, 885, 910, 936, 961,
- 987, 1013, 1040, 1067, 1094, 1122, 1149, 1178,
- 1206, 1235, 1264, 1293, 1323, 1353, 1384, 1414,
- 1445, 1477, 1508, 1540, 1573, 1605, 1638, 1671,
- 1705, 1739, 1773, 1807, 1842, 1877, 1912, 1948,
- 1984, 2020, 2057, 2093, 2130, 2168, 2206, 2244,
- 2282, 2320, 2359, 2399, 2438, 2478, 2518, 2558,
- 2599, 2640, 2681, 2722, 2764, 2806, 2848, 2891,
- 2934, 2977, 3020, 3064, 3108, 3152, 3196, 3241,
- 3286, 3332, 3377, 3423, 3469, 3515, 3562, 3609,
- 3656, 3704, 3751, 3799, 3847, 3896, 3945, 3994,
- 4043, 4092, 4142, 4192, 4242, 4293, 4343, 4394,
- 4445, 4497, 4549, 4600, 4653, 4705, 4758, 4811,
- 4864, 4917, 4971, 5024, 5078, 5133, 5187, 5242,
- 5297, 5352, 5407, 5463, 5519, 5575, 5631, 5688,
- 5744, 5801, 5859, 5916, 5974, 6031, 6089, 6147,
- 6206, 6265, 6323, 6382, 6442, 6501, 6561, 6620,
- 6680, 6741, 6801, 6862, 6922, 6983, 7045, 7106,
- 7168, 7229, 7291, 7353, 7416, 7478, 7541, 7604,
- 7667, 7730, 7793, 7857, 7920, 7984, 8048, 8112,
- 8177, 8241, 8306, 8371, 8436, 8501, 8566, 8632,
- 8697, 8763, 8829, 8895, 8961, 9028, 9094, 9161,
- 9228, 9295, 9362, 9429, 9497, 9564, 9632, 9700,
- 9768, 9836, 9904, 9972, 10041, 10109, 10178, 10247,
- 10316, 10385, 10454, 10523, 10593, 10662, 10732, 10802,
- 10871, 10941, 11012, 11082, 11152, 11222, 11283, 11344,
- 11406, 11467, 11529, 11591, 11653, 11716, 11778, 11840,
- 11903, 11966, 12028, 12091, 12154, 12217, 12280, 12343,
- 12406, 12469, 12532, 12595, 12658, 12722, 12785, 12849,
- 12912, 12976, 13039, 13103, 13166, 13230, 13294, 13358,
- 13421, 13485, 13549, 13613, 13677, 13741, 13805, 13869,
- 13933, 13997, 14061, 14125, 14189, 14253, 14318, 14382,
- 14446, 14510, 14574, 14639, 14703, 14767, 14832, 14896,
- 14960, 15025, 15089, 15153, 15218, 15282, 15346, 15411,
- 15475, 15540, 15604, 15668, 15733, 15797, 15862, 15926,
- 15990, 16055, 16119, 16183, 16248, 16312, 16376, 16441,
- 16505, 16569, 16634, 16698, 16762, 16826, 16891, 16955,
- 17019, 17083, 17147, 17211, 17275, 17339, 17404, 17468,
- 17532, 17596, 17659, 17723, 17787, 17851, 17915, 17979,
- 18042, 18106, 18170, 18233, 18297, 18361, 18424, 18488,
- 18551, 18614, 18678, 18741, 18804, 18868, 18931, 18994,
- 19057, 19120, 19183, 19246, 19309, 19372, 19434, 19497,
- 19560, 19622, 19685, 19748, 19810, 19872, 19935, 19997,
- 20059, 20121, 20183, 20245, 20307, 20369, 20431, 20493,
- 20554, 20616, 20677, 20739, 20800, 20862, 20923, 20984,
- 21045, 21106, 21167, 21228, 21289, 21349, 21410, 21471,
- 21531, 21591, 21652, 21712, 21772, 21832, 21892, 21952,
- 22012, 22071, 22131, 22190, 22250, 22309, 22368, 22427,
- 22486, 22545, 22604, 22663, 22722, 22780, 22839, 22897,
- 22955, 23013, 23071, 23129, 23187, 23245, 23303, 23360,
- 23418, 23475, 23532, 23589, 23646, 23703, 23760, 23817,
- 23873, 23930, 23986, 24042, 24098, 24154, 24210, 24266,
- 24321, 24377, 24432, 24488, 24543, 24598, 24653, 24707,
- 24762, 24817, 24871, 24925, 24979, 25034, 25087, 25141,
- 25195, 25248, 25302, 25355, 25408, 25461, 25514, 25567,
- 25620, 25672, 25724, 25777, 25829, 25881, 25932, 25984,
- 26036, 26087, 26138, 26189, 26240, 26291, 26342, 26393,
- 26443, 26493, 26543, 26593, 26643, 26693, 26743, 26792,
- 26841, 26890, 26939, 26988, 27037, 27086, 27134, 27182,
- 27230, 27278, 27326, 27374, 27421, 27469, 27516, 27563,
- 27610, 27657, 27703, 27750, 27796, 27842, 27888, 27934,
- 27980, 28025, 28071, 28116, 28161, 28206, 28250, 28295,
- 28340, 28384, 28428, 28472, 28516, 28559, 28603, 28646,
- 28689, 28732, 28775, 28818, 28860, 28903, 28945, 28987,
- 29029, 29071, 29112, 29154, 29195, 29236, 29277, 29318,
- 29358, 29399, 29439, 29479, 29519, 29559, 29598, 29638,
- 29677, 29716, 29755, 29794, 29832, 29871, 29909, 29947,
- 29985, 30023, 30061, 30098, 30135, 30172, 30209, 30246,
- 30283, 30319, 30356, 30392, 30428, 30464, 30499, 30535,
- 30570, 30605, 30640, 30675, 30710, 30744, 30779, 30813,
- 30847, 30881, 30914, 30948, 30981, 31014, 31047, 31080,
- 31113, 31145, 31178, 31210, 31242, 31274, 31306, 31337,
- 31369, 31400, 31431, 31462, 31493, 31523, 31554, 31584,
- 31614, 31644, 31674, 31704, 31733, 31763, 31792, 31821,
- 31850, 31879, 31907, 31936, 31964, 31992, 32020, 32048,
- 32076, 32104, 32131, 32159, 32186, 32213, 32240, 32267,
- 32294, 32320, 32347, 32373, 32399, 32426, 32452, 32478,
- 32504, 32530, 32556, 32582, 32607, 32633, 32659, 32685,
- 32712, 32739, 32739, 32712, 32685, 32659, 32633, 32606,
- 32580, 32553, 32527, 32500, 32473, 32446, 32418, 32391,
- 32363, 32335, 32307, 32279, 32251, 32222, 32193, 32164,
- 32134, 32105, 32075, 32045, 32015, 31984, 31953, 31922,
- 31891, 31859, 31828, 31796, 31764, 31731, 31698, 31665,
- 31632, 31599, 31565, 31531, 31497, 31462, 31428, 31393,
- 31357, 31322, 31286, 31250, 31214, 31177, 31141, 31104,
- 31066, 31029, 30991, 30953, 30915, 30876, 30837, 30798,
- 30759, 30719, 30679, 30639, 30599, 30558, 30517, 30476,
- 30435, 30393, 30351, 30309, 30266, 30224, 30181, 30138,
- 30094, 30050, 30006, 29962, 29917, 29873, 29827, 29782,
- 29737, 29691, 29645, 29598, 29551, 29505, 29457, 29410,
- 29362, 29314, 29266, 29218, 29169, 29120, 29070, 29021,
- 28971, 28921, 28871, 28820, 28769, 28718, 28667, 28615,
- 28563, 28511, 28459, 28406, 28353, 28300, 28246, 28192,
- 28138, 28084, 28030, 27975, 27920, 27864, 27809, 27753,
- 27697, 27640, 27584, 27527, 27470, 27412, 27355, 27297,
- 27238, 27180, 27121, 27062, 27003, 26944, 26884, 26824,
- 26763, 26703, 26642, 26581, 26520, 26458, 26396, 26334,
- 26272, 26209, 26146, 26083, 26020, 25956, 25892, 25828,
- 25763, 25699, 25634, 25568, 25503, 25437, 25371, 25305,
- 25239, 25172, 25105, 25037, 24970, 24902, 24834, 24766,
- 24697, 24628, 24559, 24490, 24420, 24351, 24281, 24210,
- 24140, 24069, 23998, 23926, 23855, 23783, 23711, 23638,
- 23566, 23493, 23420, 23346, 23273, 23199, 23125, 23050,
- 22976, 22901, 22826, 22750, 22675, 22599, 22523, 22446,
- 22370, 22293, 22215, 22138, 22060, 21983, 21904, 21826,
- 21747, 21669, 21589, 21510, 21430, 21351, 21271, 21190,
- 21110, 21029, 20948, 20866, 20785, 20703, 20621, 20538,
- 20456, 20373, 20290, 20207, 20123, 20039, 19955, 19871,
- 19787, 19702, 19617, 19532, 19446, 19360, 19274, 19188,
- 19102, 19015, 18928, 18841, 18754, 18666, 18578, 18490,
- 18402, 18313, 18224, 18135, 18046, 17956, 17866, 17776,
- 17686, 17595, 17505, 17414, 17322, 17231, 17139, 17047,
- 16955, 16863, 16770, 16677, 16584, 16490, 16397, 16303,
- 16209, 16114, 16020, 15925, 15830, 15735, 15639, 15543,
- 15447, 15351, 15254, 15158, 15061, 14964, 14866, 14768,
- 14671, 14572, 14474, 14375, 14276, 14177, 14078, 13978,
- 13878, 13778, 13678, 13578, 13477, 13376, 13274, 13173,
- 13071, 12969, 12867, 12764, 12662, 12559, 12455, 12352,
- 12248, 12144, 12040, 11936, 11831, 11726, 11621, 11515,
- 11410, 11304, 11197, 11091, 10984, 10877, 10770, 10663,
- 10555, 10447, 10339, 10230, 10122, 10013, 9904, 9794,
- 9684, 9574, 9464, 9353, 9243, 9131, 9020, 8908,
- 8797, 8684, 8572, 8459, 8346, 8233, 8119, 8006,
- 7892, 7777, 7662, 7547, 7432, 7317, 7201, 7085,
- 6968, 6851, 6734, 6617, 6499, 6381, 6263, 6144,
- 6025, 5906, 5786, 5666, 5546, 5425, 5304, 5183,
- 5061, 4939, 4817, 4694, 4570, 4447, 4323, 4198,
- 4074, 3948, 3823, 3696, 3570, 3443, 3315, 3187,
- 3058, 2929, 2800, 2669, 2539, 2407, 2275, 2142,
- 2009, 1875, 1740, 1604, 1467, 1330, 1191, 1051,
- 909, 766, 621, 474, 324, 169
-};//Q15
-
-const Word16 window_256kHz[592] = /*ALDO at 25.6 maybe not needed ?Q15*/
-{
- 1, 3, 7, 12, 19, 27, 36, 47,
- 58, 72, 86, 102, 119, 138, 157, 178,
- 201, 224, 249, 275, 302, 331, 361, 391,
- 424, 457, 492, 527, 564, 603, 642, 683,
- 724, 767, 811, 857, 903, 951, 999, 1049,
- 1100, 1152, 1205, 1260, 1315, 1372, 1430, 1488,
- 1548, 1609, 1671, 1735, 1799, 1864, 1931, 1998,
- 2066, 2136, 2207, 2278, 2351, 2424, 2499, 2575,
- 2651, 2729, 2808, 2887, 2968, 3049, 3132, 3215,
- 3300, 3385, 3472, 3559, 3647, 3736, 3826, 3917,
- 4009, 4101, 4195, 4289, 4385, 4481, 4578, 4676,
- 4774, 4874, 4974, 5075, 5177, 5280, 5384, 5488,
- 5593, 5699, 5806, 5913, 6021, 6130, 6240, 6350,
- 6461, 6573, 6685, 6798, 6912, 7026, 7141, 7257,
- 7373, 7491, 7608, 7726, 7845, 7965, 8085, 8206,
- 8327, 8449, 8571, 8694, 8817, 8941, 9066, 9191,
- 9316, 9442, 9569, 9696, 9823, 9951, 10079, 10208,
- 10337, 10467, 10597, 10727, 10858, 10990, 11121, 11253,
- 11367, 11482, 11598, 11714, 11831, 11948, 12065, 12182,
- 12300, 12418, 12536, 12654, 12772, 12891, 13010, 13129,
- 13248, 13367, 13486, 13605, 13725, 13844, 13964, 14084,
- 14203, 14323, 14443, 14563, 14683, 14804, 14924, 15044,
- 15164, 15284, 15405, 15525, 15645, 15765, 15885, 16006,
- 16126, 16246, 16366, 16486, 16606, 16726, 16846, 16966,
- 17086, 17206, 17325, 17445, 17564, 17684, 17803, 17922,
- 18041, 18160, 18279, 18397, 18516, 18634, 18753, 18871,
- 18988, 19106, 19224, 19341, 19458, 19575, 19692, 19809,
- 19925, 20041, 20157, 20273, 20388, 20503, 20618, 20733,
- 20848, 20962, 21076, 21190, 21303, 21416, 21529, 21642,
- 21754, 21866, 21978, 22089, 22200, 22311, 22421, 22531,
- 22641, 22751, 22860, 22968, 23077, 23185, 23293, 23400,
- 23507, 23613, 23719, 23825, 23931, 24036, 24140, 24244,
- 24348, 24452, 24555, 24657, 24759, 24861, 24962, 25063,
- 25163, 25263, 25363, 25462, 25561, 25659, 25756, 25854,
- 25950, 26047, 26142, 26238, 26333, 26427, 26521, 26614,
- 26707, 26799, 26891, 26982, 27073, 27164, 27253, 27343,
- 27432, 27520, 27608, 27695, 27781, 27868, 27953, 28038,
- 28123, 28207, 28290, 28373, 28456, 28537, 28619, 28699,
- 28780, 28859, 28938, 29017, 29095, 29172, 29249, 29325,
- 29401, 29476, 29550, 29624, 29698, 29771, 29843, 29915,
- 29986, 30056, 30126, 30196, 30264, 30333, 30400, 30467,
- 30534, 30600, 30665, 30730, 30794, 30858, 30921, 30984,
- 31046, 31107, 31168, 31228, 31288, 31347, 31406, 31464,
- 31522, 31579, 31635, 31691, 31746, 31801, 31856, 31909,
- 31963, 32016, 32068, 32120, 32171, 32222, 32273, 32323,
- 32372, 32422, 32471, 32520, 32568, 32617, 32666, 32715,
- 32715, 32666, 32616, 32567, 32517, 32466, 32415, 32364,
- 32311, 32258, 32204, 32150, 32094, 32038, 31981, 31923,
- 31864, 31805, 31744, 31683, 31621, 31557, 31494, 31429,
- 31363, 31296, 31229, 31161, 31091, 31021, 30950, 30878,
- 30805, 30731, 30657, 30581, 30505, 30427, 30349, 30270,
- 30189, 30108, 30026, 29943, 29860, 29775, 29689, 29603,
- 29515, 29427, 29337, 29247, 29156, 29064, 28971, 28877,
- 28782, 28687, 28590, 28492, 28394, 28294, 28194, 28093,
- 27991, 27888, 27784, 27679, 27573, 27466, 27358, 27250,
- 27140, 27030, 26919, 26806, 26693, 26579, 26464, 26349,
- 26232, 26114, 25996, 25876, 25756, 25635, 25512, 25389,
- 25265, 25140, 25015, 24888, 24761, 24632, 24503, 24373,
- 24242, 24110, 23977, 23843, 23708, 23573, 23436, 23299,
- 23161, 23022, 22882, 22741, 22599, 22457, 22313, 22169,
- 22024, 21878, 21731, 21583, 21435, 21285, 21135, 20984,
- 20832, 20679, 20525, 20370, 20215, 20059, 19901, 19743,
- 19584, 19425, 19264, 19103, 18940, 18777, 18613, 18448,
- 18283, 18116, 17949, 17781, 17612, 17442, 17271, 17100,
- 16927, 16754, 16580, 16405, 16230, 16053, 15876, 15698,
- 15518, 15339, 15158, 14976, 14794, 14611, 14427, 14242,
- 14056, 13869, 13682, 13494, 13305, 13115, 12924, 12732,
- 12540, 12346, 12152, 11957, 11761, 11564, 11366, 11168,
- 10968, 10768, 10566, 10364, 10161, 9957, 9752, 9547,
- 9340, 9132, 8924, 8714, 8503, 8292, 8079, 7866,
- 7651, 7436, 7219, 7002, 6783, 6563, 6343, 6121,
- 5897, 5673, 5448, 5221, 4993, 4764, 4533, 4301,
- 4067, 3832, 3596, 3358, 3118, 2876, 2632, 2387,
- 2139, 1888, 1635, 1379, 1119, 854, 583, 304
-};
-
-const Word16 small_overlap_48[R2_48 / 7] =//Q15
-{
- 429, 1286, 2143, 2998, 3851, 4702, 5549, 6393,
- 7232, 8066, 8895, 9717, 10533, 11342, 12142, 12935,
- 13719, 14493, 15257, 16011, 16754, 17485, 18205, 18912,
- 19606, 20286, 20953, 21605, 22243, 22865, 23472, 24062,
- 24636, 25193, 25733, 26255, 26760, 27246, 27713, 28161,
- 28590, 28999, 29389, 29758, 30107, 30435, 30743, 31029,
- 31294, 31538, 31760, 31960, 32138, 32295, 32429, 32541,
- 32631, 32698, 32743, 32765
-};
-
-const Word16 small_overlap_25[R2_25 / 7] =//Q15
-{
- 804, 2411, 4011, 5602, 7180, 8740, 10279, 11793,
- 13279, 14733, 16151, 17531, 18868, 20160, 21403, 22595,
- 23732, 24812, 25833, 26791, 27684, 28511, 29269, 29957,
- 30572, 31114, 31581, 31972, 32286, 32522, 32679, 32758
-};
-
-const Word16 small_overlap_int[R2_16 / 7] =//Q15
-{
- 2571, 5126,
- 7650, 10126, 12540, 14876, 17121, 19261, 21281, 22865,
- 23472, 24917, 26510, 27939, 29197, 30274, 31164, 31863,
- 32365, 32667
-};
-
-
-const Word16 half_overlap_48[3 * R2_48 / 7] =//Q15
-{
- 143, 429,
- 715, 1001, 1286, 1572, 1858, 2143, 2428, 2713,
- 2998, 3283, 3567, 3851, 4135, 4419, 4702, 4985,
- 5267, 5549, 5831, 6112, 6393, 6673, 6953, 7232,
- 7510, 7788, 8066, 8343, 8619, 8895, 9169, 9444,
- 9717, 9990, 10262, 10533, 10803, 11073, 11342, 11609,
- 11876, 12142, 12408, 12672, 12935, 13197, 13458, 13719,
- 13978, 14236, 14493, 14749, 15004, 15257, 15510, 15761,
- 16011, 16260, 16508, 16754, 16999, 17243, 17485, 17727,
- 17966, 18205, 18442, 18678, 18912, 19145, 19376, 19606,
- 19834, 20061, 20286, 20510, 20732, 20953, 21172, 21390,
- 21605, 21820, 22032, 22243, 22452, 22659, 22865, 23069,
- 23271, 23472, 23670, 23867, 24062, 24255, 24447, 24636,
- 24824, 25010, 25193, 25375, 25555, 25733, 25909, 26083,
- 26255, 26426, 26594, 26760, 26924, 27086, 27246, 27403,
- 27559, 27713, 27864, 28014, 28161, 28306, 28449, 28590,
- 28729, 28865, 28999, 29131, 29261, 29389, 29514, 29637,
- 29758, 29877, 29993, 30107, 30219, 30328, 30435, 30540,
- 30643, 30743, 30840, 30936, 31029, 31120, 31208, 31294,
- 31378, 31459, 31538, 31614, 31688, 31760, 31829, 31896,
- 31960, 32022, 32081, 32138, 32193, 32245, 32295, 32342,
- 32387, 32429, 32469, 32506, 32541, 32573, 32603, 32631,
- 32655, 32678, 32698, 32715, 32730, 32743, 32753, 32760,
- 32765, 32767
-};
-
-const Word16 half_overlap_25[3 * R2_25 / 7] =//Q15
-{
- 268, 804, 1340, 1876, 2411, 2945, 3479, 4011,
- 4543, 5073, 5602, 6130, 6655, 7180, 7702, 8222,
- 8740, 9255, 9768, 10279, 10786, 11291, 11793, 12292,
- 12787, 13279, 13767, 14252, 14733, 15210, 15683, 16151,
- 16616, 17075, 17531, 17981, 18427, 18868, 19304, 19735,
- 20160, 20580, 20994, 21403, 21806, 22204, 22595, 22980,
- 23359, 23732, 24099, 24459, 24812, 25159, 25499, 25833,
- 26159, 26478, 26791, 27096, 27394, 27684, 27967, 28243,
- 28511, 28771, 29024, 29269, 29506, 29736, 29957, 30170,
- 30375, 30572, 30761, 30942, 31114, 31278, 31434, 31581,
- 31720, 31850, 31972, 32085, 32190, 32286, 32373, 32452,
- 32522, 32583, 32635, 32679, 32714, 32741, 32758, 32767
-};
-
-const Word16 half_overlap_int[3 * R2_16 / 7] =//Q15
-{
- 858, 1715, 2571, 3425, 4277, 5126,
- 5971, 6813, 7650, 8481, 9307, 10126, 10938, 11743,
- 12540, 13328, 14107, 14876, 15636, 16384, 17121, 17847,
- 18560, 19261, 19948, 20622, 21281, 21926, 22556, 23069,
- 23271, 23769, 24351, 24917, 25466, 25997, 26510, 27005,
- 27482, 27939, 28378, 28797, 29197, 29576, 29935, 30274,
- 30592, 30888, 31164, 31419, 31651, 31863, 32052, 32219,
- 32365, 32488, 32588, 32667, 32723, 32757
-};
-const Word16 wac_h[LPC_SHB_ORDER] =//Q15
-{
- 32763,
- 32751,
- 32731,
- 32703,
- 32667,
- 32622,
- 32570,
- 32510,
- 32442,
- 32366
-};
-
-const Word16 wac_l[LPC_SHB_ORDER] =//Q15
-{
- 31381,
- 27317,
- 20869,
- 12529,
- 2980,
- 25869,
- 16731,
- 9600,
- 5926,
- 7354
-};
-
-const Word16 dsDiracsTab[65] =
-{
- 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 23, 25,
- 27, 29, 31, 33, 35, 37, 39, 43,
- 47, 51, 55, 59, 63, 67, 71, 75,
- 83, 91, 99, 107, 115, 123, 131, 139,
- 147, 163, 179, 195, 211, 227, 243, 259,
- 275, 291, 323, 355, 387, 419, 451, 483,
- 512
-};
-
-const Word16 pwf_fx[17] =//Q12
-{
- 22938, 16056, 11239, 7868, 5507, 3855, 2699, 1889,
- 1322, 926, 648, 454, 317, 222, 156, 109,
- 76
-};
-
-const Word32 inverse_table[] =//Q29
-{
- 0,
- 134217728, 67108864, 44739242, 33554432, 26843545, 22369621, 19173961, 16777216, 14913080, 13421772, 12201611, 11184810, 10324440, 9586980, 8947848, 8388608, 7895160, 7456540, 7064090, 6710886, 6391320, 6100805, 5835553, 5592405, 5368709, 5162220, 4971026, 4793490, 4628197, 4473924, 4329604, 4194304, 4067203, 3947580, 3834792, 3728270, 3627506, 3532045, 3441480, 3355443, 3273603, 3195660, 3121342, 3050402, 2982616, 2917776, 2855696, 2796202, 2739137, 2684354, 2631720, 2581110, 2532409, 2485513, 2440322, 2396745, 2354696, 2314098, 2274876, 2236962, 2200290, 2164802, 2130440, 2097152, 2064888, 2033601, 2003249, 1973790, 1945184, 1917396, 1890390, 1864135, 1838599, 1813753, 1789569, 1766022, 1743087, 1720740, 1698958, 1677721, 1657008, 1636801, 1617081, 1597830, 1579032, 1560671, 1542732, 1525201, 1508064, 1491308, 1474920, 1458888, 1443201, 1427848, 1412818, 1398101, 1383687, 1369568, 1355734, 1342177, 1328888, 1315860, 1303084, 1290555, 1278264, 1266204, 1254371, 1242756, 1231355, 1220161, 1209168, 1198372, 1187767, 1177348, 1167110, 1157049, 1147160, 1137438, 1127880, 1118481, 1109237, 1100145, 1091201, 1082401, 1073741, 1065220, 1056832, 1048576, 1040447, 1032444, 1024562, 1016800, 1009155, 1001624, 994205, 986895, 979691, 972592, 965595, 958698, 951898, 945195, 938585, 932067, 925639, 919299, 913045, 906876, 900790, 894784, 888859, 883011, 877240, 871543, 865920, 860370, 854889, 849479, 844136, 838860, 833650, 828504, 823421, 818400, 813440, 808540, 803698, 798915, 794187, 789516, 784898, 780335, 775825, 771366, 766958, 762600, 758292, 754032, 749819, 745654, 741534, 737460, 733430, 729444, 725501, 721600, 717741, 713924, 710146, 706409, 702710, 699050, 695428, 691843, 688296, 684784, 681308, 677867, 674460, 671088, 667749, 664444, 661171, 657930, 654720, 651542, 648394, 645277, 642190, 639132, 636102, 633102, 630130, 627185, 624268, 621378, 618514, 615677, 612866, 610080, 607320, 604584, 601873, 599186, 596523, 593883, 591267, 588674, 586103, 583555, 581029, 578524, 576041, 573580, 571139, 568719, 566319, 563940, 561580, 559240, 556920, 554618, 552336, 550072, 547827, 545600, 543391, 541200, 539027, 536870, 534731, 532610, 530504, 528416, 526344,
-};
-
-const Word16 cos_diff_table[512] =//Q15
-{
- SHC(0xFFFF), SHC(0xFFF8), SHC(0xFFF4), SHC(0xFFEF), SHC(0xFFE9), SHC(0xFFE5), SHC(0xFFE0), SHC(0xFFDB),
- SHC(0xFFD6), SHC(0xFFD2), SHC(0xFFCC), SHC(0xFFC7), SHC(0xFFC3), SHC(0xFFBE), SHC(0xFFB8), SHC(0xFFB4),
- SHC(0xFFB0), SHC(0xFFAA), SHC(0xFFA5), SHC(0xFFA1), SHC(0xFF9C), SHC(0xFF97), SHC(0xFF92), SHC(0xFF8E),
- SHC(0xFF89), SHC(0xFF84), SHC(0xFF80), SHC(0xFF7B), SHC(0xFF76), SHC(0xFF71), SHC(0xFF6D), SHC(0xFF69),
- SHC(0xFF64), SHC(0xFF5F), SHC(0xFF5B), SHC(0xFF56), SHC(0xFF52), SHC(0xFF4D), SHC(0xFF49), SHC(0xFF45),
- SHC(0xFF40), SHC(0xFF3C), SHC(0xFF38), SHC(0xFF33), SHC(0xFF2F), SHC(0xFF2B), SHC(0xFF27), SHC(0xFF23),
- SHC(0xFF1E), SHC(0xFF1B), SHC(0xFF16), SHC(0xFF13), SHC(0xFF0E), SHC(0xFF0B), SHC(0xFF06), SHC(0xFF03),
- SHC(0xFEFF), SHC(0xFEFB), SHC(0xFEF8), SHC(0xFEF3), SHC(0xFEF1), SHC(0xFEEC), SHC(0xFEE9), SHC(0xFEE5),
- SHC(0xFEE2), SHC(0xFEDF), SHC(0xFEDB), SHC(0xFED8), SHC(0xFED4), SHC(0xFED1), SHC(0xFECE), SHC(0xFECB),
- SHC(0xFEC7), SHC(0xFEC5), SHC(0xFEC1), SHC(0xFEBF), SHC(0xFEBB), SHC(0xFEB9), SHC(0xFEB6), SHC(0xFEB3),
- SHC(0xFEB0), SHC(0xFEAE), SHC(0xFEAB), SHC(0xFEA8), SHC(0xFEA6), SHC(0xFEA3), SHC(0xFEA1), SHC(0xFE9F),
- SHC(0xFE9C), SHC(0xFE9A), SHC(0xFE98), SHC(0xFE95), SHC(0xFE94), SHC(0xFE91), SHC(0xFE8F), SHC(0xFE8E),
- SHC(0xFE8B), SHC(0xFE8A), SHC(0xFE88), SHC(0xFE86), SHC(0xFE85), SHC(0xFE83), SHC(0xFE81), SHC(0xFE80),
- SHC(0xFE7F), SHC(0xFE7D), SHC(0xFE7B), SHC(0xFE7B), SHC(0xFE79), SHC(0xFE79), SHC(0xFE77), SHC(0xFE76),
- SHC(0xFE75), SHC(0xFE74), SHC(0xFE73), SHC(0xFE73), SHC(0xFE72), SHC(0xFE71), SHC(0xFE71), SHC(0xFE70),
- SHC(0xFE6F), SHC(0xFE70), SHC(0xFE6E), SHC(0xFE6F), SHC(0xFE6E), SHC(0xFE6E), SHC(0xFE6E), SHC(0xFE6E),
- SHC(0xFE6E), SHC(0xFE6E), SHC(0xFE6E), SHC(0xFE6E), SHC(0xFE6F), SHC(0xFE6E), SHC(0xFE70), SHC(0xFE6F),
- SHC(0xFE70), SHC(0xFE71), SHC(0xFE71), SHC(0xFE72), SHC(0xFE73), SHC(0xFE73), SHC(0xFE74), SHC(0xFE75),
- SHC(0xFE76), SHC(0xFE77), SHC(0xFE79), SHC(0xFE79), SHC(0xFE7B), SHC(0xFE7B), SHC(0xFE7D), SHC(0xFE7F),
- SHC(0xFE80), SHC(0xFE81), SHC(0xFE83), SHC(0xFE85), SHC(0xFE86), SHC(0xFE88), SHC(0xFE8A), SHC(0xFE8B),
- SHC(0xFE8E), SHC(0xFE8F), SHC(0xFE91), SHC(0xFE94), SHC(0xFE95), SHC(0xFE98), SHC(0xFE9A), SHC(0xFE9C),
- SHC(0xFE9F), SHC(0xFEA1), SHC(0xFEA3), SHC(0xFEA6), SHC(0xFEA8), SHC(0xFEAB), SHC(0xFEAE), SHC(0xFEB0),
- SHC(0xFEB3), SHC(0xFEB6), SHC(0xFEB9), SHC(0xFEBB), SHC(0xFEBF), SHC(0xFEC1), SHC(0xFEC5), SHC(0xFEC7),
- SHC(0xFECB), SHC(0xFECE), SHC(0xFED1), SHC(0xFED4), SHC(0xFED8), SHC(0xFEDB), SHC(0xFEDF), SHC(0xFEE2),
- SHC(0xFEE5), SHC(0xFEE9), SHC(0xFEEC), SHC(0xFEF1), SHC(0xFEF3), SHC(0xFEF8), SHC(0xFEFB), SHC(0xFEFF),
- SHC(0xFF03), SHC(0xFF06), SHC(0xFF0B), SHC(0xFF0E), SHC(0xFF13), SHC(0xFF16), SHC(0xFF1B), SHC(0xFF1E),
- SHC(0xFF23), SHC(0xFF27), SHC(0xFF2B), SHC(0xFF2F), SHC(0xFF33), SHC(0xFF38), SHC(0xFF3C), SHC(0xFF40),
- SHC(0xFF45), SHC(0xFF49), SHC(0xFF4D), SHC(0xFF52), SHC(0xFF56), SHC(0xFF5B), SHC(0xFF5F), SHC(0xFF64),
- SHC(0xFF69), SHC(0xFF6D), SHC(0xFF71), SHC(0xFF76), SHC(0xFF7B), SHC(0xFF80), SHC(0xFF84), SHC(0xFF89),
- SHC(0xFF8E), SHC(0xFF92), SHC(0xFF97), SHC(0xFF9C), SHC(0xFFA1), SHC(0xFFA5), SHC(0xFFAA), SHC(0xFFB0),
- SHC(0xFFB4), SHC(0xFFB8), SHC(0xFFBE), SHC(0xFFC3), SHC(0xFFC7), SHC(0xFFCC), SHC(0xFFD2), SHC(0xFFD6),
- SHC(0xFFDB), SHC(0xFFE0), SHC(0xFFE5), SHC(0xFFE9), SHC(0xFFEF), SHC(0xFFF4), SHC(0xFFF8), SHC(0xFFFF),
- SHC(0x0001), SHC(0x0008), SHC(0x000C), SHC(0x0011), SHC(0x0017), SHC(0x001B), SHC(0x0020), SHC(0x0025),
- SHC(0x002A), SHC(0x002E), SHC(0x0034), SHC(0x0039), SHC(0x003D), SHC(0x0042), SHC(0x0048), SHC(0x004C),
- SHC(0x0050), SHC(0x0056), SHC(0x005B), SHC(0x005F), SHC(0x0064), SHC(0x0069), SHC(0x006E), SHC(0x0072),
- SHC(0x0077), SHC(0x007C), SHC(0x0080), SHC(0x0085), SHC(0x008A), SHC(0x008F), SHC(0x0093), SHC(0x0097),
- SHC(0x009C), SHC(0x00A1), SHC(0x00A5), SHC(0x00AA), SHC(0x00AE), SHC(0x00B3), SHC(0x00B7), SHC(0x00BB),
- SHC(0x00C0), SHC(0x00C4), SHC(0x00C8), SHC(0x00CD), SHC(0x00D1), SHC(0x00D5), SHC(0x00D9), SHC(0x00DD),
- SHC(0x00E2), SHC(0x00E5), SHC(0x00EA), SHC(0x00ED), SHC(0x00F2), SHC(0x00F5), SHC(0x00FA), SHC(0x00FD),
- SHC(0x0101), SHC(0x0105), SHC(0x0108), SHC(0x010D), SHC(0x010F), SHC(0x0114), SHC(0x0117), SHC(0x011B),
- SHC(0x011E), SHC(0x0121), SHC(0x0125), SHC(0x0128), SHC(0x012C), SHC(0x012F), SHC(0x0132), SHC(0x0135),
- SHC(0x0139), SHC(0x013B), SHC(0x013F), SHC(0x0141), SHC(0x0145), SHC(0x0147), SHC(0x014A), SHC(0x014D),
- SHC(0x0150), SHC(0x0152), SHC(0x0155), SHC(0x0158), SHC(0x015A), SHC(0x015D), SHC(0x015F), SHC(0x0161),
- SHC(0x0164), SHC(0x0166), SHC(0x0168), SHC(0x016B), SHC(0x016C), SHC(0x016F), SHC(0x0171), SHC(0x0172),
- SHC(0x0175), SHC(0x0176), SHC(0x0178), SHC(0x017A), SHC(0x017B), SHC(0x017D), SHC(0x017F), SHC(0x0180),
- SHC(0x0181), SHC(0x0183), SHC(0x0185), SHC(0x0185), SHC(0x0187), SHC(0x0187), SHC(0x0189), SHC(0x018A),
- SHC(0x018B), SHC(0x018C), SHC(0x018D), SHC(0x018D), SHC(0x018E), SHC(0x018F), SHC(0x018F), SHC(0x0190),
- SHC(0x0191), SHC(0x0190), SHC(0x0192), SHC(0x0191), SHC(0x0192), SHC(0x0192), SHC(0x0192), SHC(0x0192),
- SHC(0x0192), SHC(0x0192), SHC(0x0192), SHC(0x0192), SHC(0x0191), SHC(0x0192), SHC(0x0190), SHC(0x0191),
- SHC(0x0190), SHC(0x018F), SHC(0x018F), SHC(0x018E), SHC(0x018D), SHC(0x018D), SHC(0x018C), SHC(0x018B),
- SHC(0x018A), SHC(0x0189), SHC(0x0187), SHC(0x0187), SHC(0x0185), SHC(0x0185), SHC(0x0183), SHC(0x0181),
- SHC(0x0180), SHC(0x017F), SHC(0x017D), SHC(0x017B), SHC(0x017A), SHC(0x0178), SHC(0x0176), SHC(0x0175),
- SHC(0x0172), SHC(0x0171), SHC(0x016F), SHC(0x016C), SHC(0x016B), SHC(0x0168), SHC(0x0166), SHC(0x0164),
- SHC(0x0161), SHC(0x015F), SHC(0x015D), SHC(0x015A), SHC(0x0158), SHC(0x0155), SHC(0x0152), SHC(0x0150),
- SHC(0x014D), SHC(0x014A), SHC(0x0147), SHC(0x0145), SHC(0x0141), SHC(0x013F), SHC(0x013B), SHC(0x0139),
- SHC(0x0135), SHC(0x0132), SHC(0x012F), SHC(0x012C), SHC(0x0128), SHC(0x0125), SHC(0x0121), SHC(0x011E),
- SHC(0x011B), SHC(0x0117), SHC(0x0114), SHC(0x010F), SHC(0x010D), SHC(0x0108), SHC(0x0105), SHC(0x0101),
- SHC(0x00FD), SHC(0x00FA), SHC(0x00F5), SHC(0x00F2), SHC(0x00ED), SHC(0x00EA), SHC(0x00E5), SHC(0x00E2),
- SHC(0x00DD), SHC(0x00D9), SHC(0x00D5), SHC(0x00D1), SHC(0x00CD), SHC(0x00C8), SHC(0x00C4), SHC(0x00C0),
- SHC(0x00BB), SHC(0x00B7), SHC(0x00B3), SHC(0x00AE), SHC(0x00AA), SHC(0x00A5), SHC(0x00A1), SHC(0x009C),
- SHC(0x0097), SHC(0x0093), SHC(0x008F), SHC(0x008A), SHC(0x0085), SHC(0x0080), SHC(0x007C), SHC(0x0077),
- SHC(0x0072), SHC(0x006E), SHC(0x0069), SHC(0x0064), SHC(0x005F), SHC(0x005B), SHC(0x0056), SHC(0x0050),
- SHC(0x004C), SHC(0x0048), SHC(0x0042), SHC(0x003D), SHC(0x0039), SHC(0x0034), SHC(0x002E), SHC(0x002A),
- SHC(0x0025), SHC(0x0020), SHC(0x001B), SHC(0x0017), SHC(0x0011), SHC(0x000C), SHC(0x0008), SHC(0x0001)
-
-};
-
-const Word16 fftSineTab640_fx[ 321 ] =
-{//Q15
- SHC( 0x0000 ), SHC( 0x0141 ), SHC( 0x0283 ), SHC( 0x03c4 ), SHC( 0x0506 ), SHC( 0x0647 ), SHC( 0x0789 ), SHC( 0x08ca ),
- SHC( 0x0a0a ), SHC( 0x0b4b ), SHC( 0x0c8b ), SHC( 0x0dcb ), SHC( 0x0f0b ), SHC( 0x104a ), SHC( 0x1189 ), SHC( 0x12c8 ),
- SHC( 0x1406 ), SHC( 0x1543 ), SHC( 0x1680 ), SHC( 0x17bc ), SHC( 0x18f8 ), SHC( 0x1a33 ), SHC( 0x1b6e ), SHC( 0x1ca8 ),
- SHC( 0x1de1 ), SHC( 0x1f19 ), SHC( 0x2051 ), SHC( 0x2188 ), SHC( 0x22be ), SHC( 0x23f3 ), SHC( 0x2528 ), SHC( 0x265b ),
- SHC( 0x278d ), SHC( 0x28bf ), SHC( 0x29ef ), SHC( 0x2b1f ), SHC( 0x2c4d ), SHC( 0x2d7a ), SHC( 0x2ea6 ), SHC( 0x2fd1 ),
- SHC( 0x30fb ), SHC( 0x3224 ), SHC( 0x334b ), SHC( 0x3471 ), SHC( 0x3596 ), SHC( 0x36ba ), SHC( 0x37dc ), SHC( 0x38fd ),
- SHC( 0x3a1c ), SHC( 0x3b3a ), SHC( 0x3c56 ), SHC( 0x3d71 ), SHC( 0x3e8b ), SHC( 0x3fa3 ), SHC( 0x40b9 ), SHC( 0x41ce ),
- SHC( 0x42e1 ), SHC( 0x43f2 ), SHC( 0x4502 ), SHC( 0x4610 ), SHC( 0x471c ), SHC( 0x4827 ), SHC( 0x4930 ), SHC( 0x4a37 ),
- SHC( 0x4b3c ), SHC( 0x4c3f ), SHC( 0x4d41 ), SHC( 0x4e40 ), SHC( 0x4f3e ), SHC( 0x503a ), SHC( 0x5133 ), SHC( 0x522b ),
- SHC( 0x5321 ), SHC( 0x5414 ), SHC( 0x5506 ), SHC( 0x55f5 ), SHC( 0x56e2 ), SHC( 0x57ce ), SHC( 0x58b7 ), SHC( 0x599d ),
- SHC( 0x5a82 ), SHC( 0x5b64 ), SHC( 0x5c44 ), SHC( 0x5d22 ), SHC( 0x5dfe ), SHC( 0x5ed7 ), SHC( 0x5fae ), SHC( 0x6082 ),
- SHC( 0x6154 ), SHC( 0x6224 ), SHC( 0x62f2 ), SHC( 0x63bc ), SHC( 0x6485 ), SHC( 0x654b ), SHC( 0x660e ), SHC( 0x66cf ),
- SHC( 0x678d ), SHC( 0x6849 ), SHC( 0x6902 ), SHC( 0x69b9 ), SHC( 0x6a6d ), SHC( 0x6b1f ), SHC( 0x6bcd ), SHC( 0x6c79 ),
- SHC( 0x6d23 ), SHC( 0x6dca ), SHC( 0x6e6e ), SHC( 0x6f0f ), SHC( 0x6fad ), SHC( 0x7049 ), SHC( 0x70e2 ), SHC( 0x7179 ),
- SHC( 0x720c ), SHC( 0x729d ), SHC( 0x732a ), SHC( 0x73b5 ), SHC( 0x743e ), SHC( 0x74c3 ), SHC( 0x7545 ), SHC( 0x75c5 ),
- SHC( 0x7641 ), SHC( 0x76bb ), SHC( 0x7732 ), SHC( 0x77a5 ), SHC( 0x7816 ), SHC( 0x7884 ), SHC( 0x78ef ), SHC( 0x7957 ),
- SHC( 0x79bc ), SHC( 0x7a1e ), SHC( 0x7a7d ), SHC( 0x7ad8 ), SHC( 0x7b31 ), SHC( 0x7b87 ), SHC( 0x7bda ), SHC( 0x7c29 ),
- SHC( 0x7c76 ), SHC( 0x7cc0 ), SHC( 0x7d06 ), SHC( 0x7d4a ), SHC( 0x7d8a ), SHC( 0x7dc7 ), SHC( 0x7e01 ), SHC( 0x7e38 ),
- SHC( 0x7e6c ), SHC( 0x7e9d ), SHC( 0x7eca ), SHC( 0x7ef5 ), SHC( 0x7f1c ), SHC( 0x7f41 ), SHC( 0x7f62 ), SHC( 0x7f80 ),
- SHC( 0x7f9a ), SHC( 0x7fb2 ), SHC( 0x7fc7 ), SHC( 0x7fd8 ), SHC( 0x7fe6 ), SHC( 0x7ff1 ), SHC( 0x7ff9 ), SHC( 0x7ffe ),
- SHC( 0x7fff ), SHC( 0x7ffe ), SHC( 0x7ff9 ), SHC( 0x7ff1 ), SHC( 0x7fe6 ), SHC( 0x7fd8 ), SHC( 0x7fc7 ), SHC( 0x7fb2 ),
- SHC( 0x7f9a ), SHC( 0x7f80 ), SHC( 0x7f62 ), SHC( 0x7f41 ), SHC( 0x7f1c ), SHC( 0x7ef5 ), SHC( 0x7eca ), SHC( 0x7e9d ),
- SHC( 0x7e6c ), SHC( 0x7e38 ), SHC( 0x7e01 ), SHC( 0x7dc7 ), SHC( 0x7d8a ), SHC( 0x7d4a ), SHC( 0x7d06 ), SHC( 0x7cc0 ),
- SHC( 0x7c76 ), SHC( 0x7c29 ), SHC( 0x7bda ), SHC( 0x7b87 ), SHC( 0x7b31 ), SHC( 0x7ad8 ), SHC( 0x7a7d ), SHC( 0x7a1e ),
- SHC( 0x79bc ), SHC( 0x7957 ), SHC( 0x78ef ), SHC( 0x7884 ), SHC( 0x7816 ), SHC( 0x77a5 ), SHC( 0x7732 ), SHC( 0x76bb ),
- SHC( 0x7641 ), SHC( 0x75c5 ), SHC( 0x7545 ), SHC( 0x74c3 ), SHC( 0x743e ), SHC( 0x73b5 ), SHC( 0x732a ), SHC( 0x729d ),
- SHC( 0x720c ), SHC( 0x7179 ), SHC( 0x70e2 ), SHC( 0x7049 ), SHC( 0x6fad ), SHC( 0x6f0f ), SHC( 0x6e6e ), SHC( 0x6dca ),
- SHC( 0x6d23 ), SHC( 0x6c79 ), SHC( 0x6bcd ), SHC( 0x6b1f ), SHC( 0x6a6d ), SHC( 0x69b9 ), SHC( 0x6902 ), SHC( 0x6849 ),
- SHC( 0x678d ), SHC( 0x66cf ), SHC( 0x660e ), SHC( 0x654b ), SHC( 0x6485 ), SHC( 0x63bc ), SHC( 0x62f2 ), SHC( 0x6224 ),
- SHC( 0x6154 ), SHC( 0x6082 ), SHC( 0x5fae ), SHC( 0x5ed7 ), SHC( 0x5dfe ), SHC( 0x5d22 ), SHC( 0x5c44 ), SHC( 0x5b64 ),
- SHC( 0x5a82 ), SHC( 0x599d ), SHC( 0x58b7 ), SHC( 0x57ce ), SHC( 0x56e2 ), SHC( 0x55f5 ), SHC( 0x5506 ), SHC( 0x5414 ),
- SHC( 0x5321 ), SHC( 0x522b ), SHC( 0x5133 ), SHC( 0x503a ), SHC( 0x4f3e ), SHC( 0x4e40 ), SHC( 0x4d41 ), SHC( 0x4c3f ),
- SHC( 0x4b3c ), SHC( 0x4a37 ), SHC( 0x4930 ), SHC( 0x4827 ), SHC( 0x471c ), SHC( 0x4610 ), SHC( 0x4502 ), SHC( 0x43f2 ),
- SHC( 0x42e1 ), SHC( 0x41ce ), SHC( 0x40b9 ), SHC( 0x3fa3 ), SHC( 0x3e8b ), SHC( 0x3d71 ), SHC( 0x3c56 ), SHC( 0x3b3a ),
- SHC( 0x3a1c ), SHC( 0x38fd ), SHC( 0x37dc ), SHC( 0x36ba ), SHC( 0x3596 ), SHC( 0x3471 ), SHC( 0x334b ), SHC( 0x3224 ),
- SHC( 0x30fb ), SHC( 0x2fd1 ), SHC( 0x2ea6 ), SHC( 0x2d7a ), SHC( 0x2c4d ), SHC( 0x2b1f ), SHC( 0x29ef ), SHC( 0x28bf ),
- SHC( 0x278d ), SHC( 0x265b ), SHC( 0x2528 ), SHC( 0x23f3 ), SHC( 0x22be ), SHC( 0x2188 ), SHC( 0x2051 ), SHC( 0x1f19 ),
- SHC( 0x1de1 ), SHC( 0x1ca8 ), SHC( 0x1b6e ), SHC( 0x1a33 ), SHC( 0x18f8 ), SHC( 0x17bc ), SHC( 0x1680 ), SHC( 0x1543 ),
- SHC( 0x1406 ), SHC( 0x12c8 ), SHC( 0x1189 ), SHC( 0x104a ), SHC( 0x0f0b ), SHC( 0x0dcb ), SHC( 0x0c8b ), SHC( 0x0b4b ),
- SHC( 0x0a0a ), SHC( 0x08ca ), SHC( 0x0789 ), SHC( 0x0647 ), SHC( 0x0506 ), SHC( 0x03c4 ), SHC( 0x0283 ), SHC( 0x0141 ),
- SHC( 0x0000 ),
-};
-
-
-const Word32 bwMode2fs[4] = { 8000, 16000, 32000, 48000 };//Q0
-
-const Word16 cos_pi_by_127[128] = /* Q15 */
-{
- 32767 ,32756 ,32726 ,32676 ,32606 ,32516 ,
- 32406 ,32276 ,32127 ,31958 ,31769 ,
- 31561 ,31333 ,31087 ,30821 ,30537 ,
- 30233 ,29912 ,29572 ,29213 ,28837 ,
- 28444 ,28033 ,27605 ,27160 ,26698 ,
- 26220 ,25726 ,25216 ,24691 ,24150 ,
- 23595 ,23026 ,22442 ,21844 ,21234 ,
- 20610 ,19974 ,19325 ,18665 ,17993 ,
- 17310 ,16616 ,15913 ,15199 ,14477 ,
- 13745 ,13005 ,12258 ,11502 ,10740 ,
- 9971 ,9196 ,8415 ,7629 ,6839 ,
- 6044 ,5245 ,4444 ,3639 ,2833 ,
- 2025 ,1215 ,405 ,-405 ,-1215 ,
- -2025 ,-2833 ,-3639 ,-4444 ,-5245 ,
- -6044 ,-6839 ,-7629 ,-8415 ,-9196 ,
- -9971 ,-10740 ,-11502 ,-12258 ,-13005 ,
- -13745 ,-14477 ,-15199 ,-15913 ,-16616 ,
- -17310 ,-17993 ,-18665 ,-19325 ,-19974 ,
- -20610 ,-21234 ,-21844 ,-22442 ,-23026 ,
- -23595 ,-24150 ,-24691 ,-25216 ,-25726 ,
- -26220 ,-26698 ,-27160 ,-27605 ,-28033 ,
- -28444 ,-28837 ,-29213 ,-29572 ,-29912 ,
- -30233 ,-30537 ,-30821 ,-31087 ,-31333 ,
- -31561 ,-31769 ,-31958 ,-32127 ,-32276 ,
- -32406 ,-32516 ,-32606 ,-32676 ,-32726 ,
- -32756 ,-32767
-};
-
-const Word16 cos_pi_by_255[256] = /* Q15 */
-{
- 32767 ,32764 ,32757 ,32744 ,32727 ,32704 ,
- 32677 ,32645 ,32607 ,32565 ,32518 ,
- 32466 ,32409 ,32347 ,32280 ,32209 ,
- 32132 ,32050 ,31964 ,31873 ,31777 ,
- 31676 ,31570 ,31460 ,31345 ,31225 ,
- 31100 ,30970 ,30836 ,30697 ,30554 ,
- 30406 ,30253 ,30096 ,29934 ,29767 ,
- 29596 ,29421 ,29241 ,29056 ,28868 ,
- 28674 ,28477 ,28275 ,28069 ,27859 ,
- 27644 ,27425 ,27202 ,26975 ,26744 ,
- 26509 ,26269 ,26026 ,25779 ,25528 ,
- 25273 ,25014 ,24751 ,24485 ,24215 ,
- 23941 ,23663 ,23382 ,23098 ,22810 ,
- 22518 ,22223 ,21925 ,21623 ,21318 ,
- 21010 ,20699 ,20384 ,20067 ,19746 ,
- 19422 ,19096 ,18766 ,18434 ,18099 ,
- 17761 ,17420 ,17077 ,16731 ,16383 ,
- 16032 ,15679 ,15323 ,14965 ,14605 ,
- 14243 ,13878 ,13511 ,13142 ,12772 ,
- 12399 ,12024 ,11648 ,11270 ,10890 ,
- 10508 ,10125 ,9740 ,9354 ,8967 ,
- 8578 ,8187 ,7796 ,7403 ,7009 ,
- 6615 ,6219 ,5822 ,5424 ,5026 ,
- 4626 ,4226 ,3826 ,3425 ,3023 ,
- 2621 ,2218 ,1815 ,1412 ,1009 ,
- 605 ,201 ,-201 ,-605 ,-1009 ,
- -1412 ,-1815 ,-2218 ,-2621 ,-3023 ,
- -3425 ,-3826 ,-4226 ,-4626 ,-5026 ,
- -5424 ,-5822 ,-6219 ,-6615 ,-7009 ,
- -7403 ,-7796 ,-8187 ,-8578 ,-8967 ,
- -9354 ,-9740 ,-10125 ,-10508 ,-10890 ,
- -11270 ,-11648 ,-12024 ,-12399 ,-12772 ,
- -13142 ,-13511 ,-13878 ,-14243 ,-14605 ,
- -14965 ,-15323 ,-15679 ,-16032 ,-16383 ,
- -16731 ,-17077 ,-17420 ,-17761 ,-18099 ,
- -18434 ,-18766 ,-19096 ,-19422 ,-19746 ,
- -20067 ,-20384 ,-20699 ,-21010 ,-21318 ,
- -21623 ,-21925 ,-22223 ,-22518 ,-22810 ,
- -23098 ,-23382 ,-23663 ,-23941 ,-24215 ,
- -24485 ,-24751 ,-25014 ,-25273 ,-25528 ,
- -25779 ,-26026 ,-26269 ,-26509 ,-26744 ,
- -26975 ,-27202 ,-27425 ,-27644 ,-27859 ,
- -28069 ,-28275 ,-28477 ,-28674 ,-28868 ,
- -29056 ,-29241 ,-29421 ,-29596 ,-29767 ,
- -29934 ,-30096 ,-30253 ,-30406 ,-30554 ,
- -30697 ,-30836 ,-30970 ,-31100 ,-31225 ,
- -31345 ,-31460 ,-31570 ,-31676 ,-31777 ,
- -31873 ,-31964 ,-32050 ,-32132 ,-32209 ,
- -32280 ,-32347 ,-32409 ,-32466 ,-32518 ,
- -32565 ,-32607 ,-32645 ,-32677 ,-32704 ,
- -32727 ,-32744 ,-32757 ,-32764 ,-32767
-};
-
-const Word16 cos_pi_by_383[384] = /* Q15 */
-{
- 32767 ,32765 ,32762 ,32757 ,32749 ,32739 ,
- 32727 ,32713 ,32696 ,32677 ,32656 ,
- 32633 ,32608 ,32580 ,32551 ,32519 ,
- 32485 ,32448 ,32410 ,32369 ,32327 ,
- 32282 ,32234 ,32185 ,32134 ,32080 ,
- 32024 ,31966 ,31906 ,31844 ,31779 ,
- 31713 ,31644 ,31573 ,31500 ,31425 ,
- 31348 ,31269 ,31188 ,31104 ,31019 ,
- 30931 ,30841 ,30749 ,30655 ,30560 ,
- 30462 ,30361 ,30259 ,30155 ,30049 ,
- 29941 ,29831 ,29719 ,29604 ,29488 ,
- 29370 ,29250 ,29128 ,29004 ,28878 ,
- 28750 ,28620 ,28488 ,28354 ,28218 ,
- 28081 ,27941 ,27800 ,27657 ,27512 ,
- 27365 ,27216 ,27066 ,26913 ,26759 ,
- 26603 ,26445 ,26286 ,26124 ,25961 ,
- 25796 ,25630 ,25461 ,25291 ,25120 ,
- 24946 ,24771 ,24594 ,24416 ,24236 ,
- 24054 ,23871 ,23686 ,23499 ,23311 ,
- 23122 ,22930 ,22738 ,22543 ,22348 ,
- 22150 ,21952 ,21751 ,21550 ,21346 ,
- 21142 ,20936 ,20728 ,20519 ,20309 ,
- 20097 ,19885 ,19670 ,19455 ,19238 ,
- 19019 ,18800 ,18579 ,18357 ,18134 ,
- 17910 ,17684 ,17457 ,17229 ,17000 ,
- 16769 ,16538 ,16305 ,16072 ,15837 ,
- 15601 ,15364 ,15126 ,14887 ,14647 ,
- 14407 ,14165 ,13922 ,13678 ,13433 ,
- 13188 ,12941 ,12694 ,12446 ,12197 ,
- 11947 ,11696 ,11445 ,11192 ,10939 ,
- 10686 ,10431 ,10176 ,9920 ,9664 ,
- 9407 ,9149 ,8891 ,8632 ,8372 ,
- 8112 ,7851 ,7590 ,7328 ,7066 ,
- 6803 ,6540 ,6277 ,6013 ,5748 ,
- 5483 ,5218 ,4953 ,4687 ,4421 ,
- 4154 ,3888 ,3621 ,3353 ,3086 ,
- 2818 ,2550 ,2282 ,2014 ,1746 ,
- 1477 ,1209 ,940 ,671 ,403 ,
- 134 ,-134 ,-403 ,-671 ,-940 ,
- -1209 ,-1477 ,-1746 ,-2014 ,-2282 ,
- -2550 ,-2818 ,-3086 ,-3353 ,-3621 ,
- -3888 ,-4154 ,-4421 ,-4687 ,-4953 ,
- -5218 ,-5483 ,-5748 ,-6013 ,-6277 ,
- -6540 ,-6803 ,-7066 ,-7328 ,-7590 ,
- -7851 ,-8112 ,-8372 ,-8632 ,-8891 ,
- -9149 ,-9407 ,-9664 ,-9920 ,-10176 ,
- -10431 ,-10686 ,-10939 ,-11192 ,-11445 ,
- -11696 ,-11947 ,-12197 ,-12446 ,-12694 ,
- -12941 ,-13188 ,-13433 ,-13678 ,-13922 ,
- -14165 ,-14407 ,-14647 ,-14887 ,-15126 ,
- -15364 ,-15601 ,-15837 ,-16072 ,-16305 ,
- -16538 ,-16769 ,-17000 ,-17229 ,-17457 ,
- -17684 ,-17910 ,-18134 ,-18357 ,-18579 ,
- -18800 ,-19019 ,-19238 ,-19455 ,-19670 ,
- -19885 ,-20097 ,-20309 ,-20519 ,-20728 ,
- -20936 ,-21142 ,-21346 ,-21550 ,-21751 ,
- -21952 ,-22150 ,-22348 ,-22543 ,-22738 ,
- -22930 ,-23122 ,-23311 ,-23499 ,-23686 ,
- -23871 ,-24054 ,-24236 ,-24416 ,-24594 ,
- -24771 ,-24946 ,-25120 ,-25291 ,-25461 ,
- -25630 ,-25796 ,-25961 ,-26124 ,-26286 ,
- -26445 ,-26603 ,-26759 ,-26913 ,-27066 ,
- -27216 ,-27365 ,-27512 ,-27657 ,-27800 ,
- -27941 ,-28081 ,-28218 ,-28354 ,-28488 ,
- -28620 ,-28750 ,-28878 ,-29004 ,-29128 ,
- -29250 ,-29370 ,-29488 ,-29604 ,-29719 ,
- -29831 ,-29941 ,-30049 ,-30155 ,-30259 ,
- -30361 ,-30462 ,-30560 ,-30655 ,-30749 ,
- -30841 ,-30931 ,-31019 ,-31104 ,-31188 ,
- -31269 ,-31348 ,-31425 ,-31500 ,-31573 ,
- -31644 ,-31713 ,-31779 ,-31844 ,-31906 ,
- -31966 ,-32024 ,-32080 ,-32134 ,-32185 ,
- -32234 ,-32282 ,-32327 ,-32369 ,-32410 ,
- -32448 ,-32485 ,-32519 ,-32551 ,-32580 ,
- -32608 ,-32633 ,-32656 ,-32677 ,-32696 ,
- -32713 ,-32727 ,-32739 ,-32749 ,-32757 ,
- -32762 ,-32765 ,-32767
-};
-
-const Word16 swb_lsp_prev_interp_init[10] = { 32767, 31164, 26510, 19261, 10126, 0, -10126, -19261, -26510, -31164 };//Q15
-/* st->swb_lsp_prev_interp[i] = (float)cos( (float)i * PI / (float)10.0f )*/
-
-//ivas_sns_com_fx.c
-/*
- powf( 10.0f, (float) i * (float) tilt / ( (float) FDNS_NPTS - 1.0f ) / 10.0f ) where 0 =< i < FDNS_NPTS;
- tilt = 19.f for L_FRAME16k,
- 22.f for L_FRAME25_6k,
- 23.5f for L_FRAME32k;
-*/
-
-/* Q23 */
-const Word32 pow_tilt_16k[64] = {
- 8388608, 8991841, 9638454, 10331564, 11074518, 11870897, 12724546, 13639580,
- 14620416, 15671785, 16798759, 18006775, 19301660, 20689662, 22177476, 23772281,
- 25481769, 27314189, 29278380, 31383818, 33640660, 36059793, 38652889, 41432458,
- 44411907, 47605612, 51028980, 54698525, 58631951, 62848233, 67367713, 72212193,
- 77405045, 82971319, 88937870, 95333482, 102189009, 109537523, 117414477, 125857870,
- 134908436, 144609837, 155008876, 166155720, 178104145, 190911793, 204640453, 219356353,
- 235130489, 252038960, 270163335, 289591052, 310415836, 332738151, 356665686, 382313874,
- 409806450, 439276044, 470864826, 504725189, 541020486, 579925813, 621628862, 666330818
-};
-
-/* Q23 */
-const Word32 pow_tilt_25_6k[64] = {
- 8388608, 9090977, 9852154, 10677063, 11571041, 12539871, 13589820, 14727680,
- 15960812, 17297192, 18745466, 20315003, 22015955, 23859325, 25857039, 28022019,
- 30368270, 32910971, 35666569, 38652889, 41889251, 45396590, 49197594, 53316853,
- 57781011, 62618949, 67861961, 73543965, 79701717, 86375050, 93607134, 101444752,
- 109938604, 119143637, 129119397, 139930415, 151646628, 164343826, 178104145, 193016600,
- 209177658, 226691863, 245672512, 266242389, 288534558, 312693225, 338874669, 367248256,
- 397997530, 431321405, 467435450, 506573283, 548988082, 594954222, 644769055, 698754827,
- 757260765, 820665338, 889378703, 963845359, 1044547023, 1132005744, 1226787283, 1329504771
-};
-
-/* Q23 */
-const Word32 pow_tilt_32k[64] = {
- 8388608, 9140953, 9960774, 10854121, 11827590, 12888365, 14044278, 15303861,
- 16676411, 18172061, 19801850, 21577810, 23513049, 25621853, 27919788, 30423818,
- 33152425, 36125751, 39365745, 42896322, 46743545, 50935812, 55504069, 60482037,
- 65906462, 71817384, 78258437, 85277166, 92925380, 101259536, 110341153, 120237270,
- 131020935, 142771749, 155576454, 169529568, 184734089, 201302251, 219356353, 239029666,
- 260467410, 283827832, 309283369, 337021925, 367248256, 400185482, 436076734, 475186948,
- 517804822, 564244946, 614850125, 669993906, 730083343, 795561993, 866913198, 944663645,
- 1029387260, 1121709444, 1222311686, 1331936594, 1451393382, 1581563835, 1723408827, 1877975405
-};
-
-const Word16 L_frame_inv[8] = { 0x4000, 0x369D, 0x3333, 0x2D83, 0x2AAB, 0x28F6, 0, 0x2222 }; // Q14
-
-const Word16 InvIntTable[65] = // Q15
-{
- 0x7FFF,
- 0x7FFF, 0x4000, 0x2AAB, 0x2000, 0x199A, 0x1555, 0x1249, 0x1000,
- 0x0E39, 0x0CCD, 0x0BA3, 0x0AAB, 0x09D9, 0x0925, 0x0889, 0x0800,
- 0x0788, 0x071C, 0x06BD, 0x0666, 0x0618, 0x05D1, 0x0591, 0x0555,
- 0x051F, 0x04EC, 0x04BE, 0x0492, 0x046A, 0x0444, 0x0421, 0x0400,
- 0x03E1, 0x03C4, 0x03A8, 0x038E, 0x0376, 0x035E, 0x0348, 0x0333,
- 0x031F, 0x030C, 0x02FA, 0x02E9, 0x02D8, 0x02C8, 0x02B9, 0x02AB,
- 0x029D, 0x028F, 0x0283, 0x0276, 0x026A, 0x025F, 0x0254, 0x0249,
- 0x023F, 0x0235, 0x022B, 0x0222, 0x0219, 0x0211, 0x0208, 0x0200
-};
-
-const Word16 TecLowBandTable[] = { 0, 2, 4, 6 }; //Q0
-const Word16 TecSC_Fx[] =
-{
- 23999/*0.3662f*2.0f Q15*/, 7065/*0.1078f*2.0f Q15*/, 7825/*0.1194f*2.0f Q15*/,
- 8448/*0.1289f*2.0f Q15*/, 8946/*0.1365f*2.0f Q15*/, 9254/*0.1412f*2.0f Q15*/
-};
-
-/* clang-format on */
-const Word16 sqrt_table_pitch_search[256 + 1] = /* Q11 */
- {
- 0, 2048, 2896, 3547, 4096, 4579, 5017, 5418,
- 5793, 6144, 6476, 6792, 7094, 7384, 7663, 7932,
- 8192, 8444, 8689, 8927, 9159, 9385, 9606, 9822,
- 10033, 10240, 10443, 10642, 10837, 11029, 11217, 11403,
- 11585, 11765, 11942, 12116, 12288, 12457, 12625, 12790,
- 12953, 13114, 13273, 13430, 13585, 13738, 13890, 14040,
- 14189, 14336, 14482, 14626, 14768, 14910, 15050, 15188,
- 15326, 15462, 15597, 15731, 15864, 15995, 16126, 16255,
- 16384, 16512, 16638, 16764, 16888, 17012, 17135, 17257,
- 17378, 17498, 17618, 17736, 17854, 17971, 18087, 18203,
- 18318, 18432, 18545, 18658, 18770, 18882, 18992, 19102,
- 19212, 19321, 19429, 19537, 19644, 19750, 19856, 19961,
- 20066, 20170, 20274, 20377, 20480, 20582, 20684, 20785,
- 20886, 20986, 21085, 21185, 21283, 21382, 21480, 21577,
- 21674, 21771, 21867, 21962, 22058, 22153, 22247, 22341,
- 22435, 22528, 22621, 22713, 22806, 22897, 22989, 23080,
- 23170, 23261, 23351, 23440, 23530, 23619, 23707, 23796,
- 23884, 23971, 24059, 24146, 24232, 24319, 24405, 24491,
- 24576, 24661, 24746, 24831, 24915, 24999, 25083, 25166,
- 25249, 25332, 25415, 25497, 25580, 25661, 25743, 25824,
- 25905, 25986, 26067, 26147, 26227, 26307, 26387, 26466,
- 26545, 26624, 26703, 26781, 26859, 26937, 27015, 27092,
- 27170, 27247, 27324, 27400, 27477, 27553, 27629, 27705,
- 27780, 27856, 27931, 28006, 28081, 28155, 28230, 28304,
- 28378, 28452, 28525, 28599, 28672, 28745, 28818, 28891,
- 28963, 29035, 29108, 29180, 29251, 29323, 29394, 29466,
- 29537, 29608, 29678, 29749, 29819, 29890, 29960, 30030,
- 30099, 30169, 30238, 30308, 30377, 30446, 30515, 30583,
- 30652, 30720, 30788, 30856, 30924, 30992, 31059, 31127,
- 31194, 31261, 31328, 31395, 31462, 31529, 31595, 31661,
- 31727, 31794, 31859, 31925, 31991, 32056, 32122, 32187,
- 32252, 32317, 32382, 32446, 32511, 32575, 32640, 32704,
- 32766
- };
-
-// fft_evs.c
-const Word16 RotVector_32[2 * 20] = { // Q15
- /**
- * \brief Twiddle factors are unscaled
- */
- SHC( 0x7d8a ), SHC( 0xe707 ), SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x5a82 ), SHC( 0xa57e ),
- SHC( 0x471d ), SHC( 0x9592 ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0x7642 ), SHC( 0xcf04 ),
- SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0xcf04 ), SHC( 0x89be ), SHC( 0xa57e ), SHC( 0xa57e ),
- SHC( 0x89be ), SHC( 0xcf04 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0xe707 ), SHC( 0x8276 ),
- SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x8276 ), SHC( 0xe707 ), SHC( 0x89be ), SHC( 0x30fc ), SHC( 0xb8e3 ), SHC( 0x6a6e )
-};
-
-/**
- * \brief Twiddle factors are unscaled
- */
-const Word16 RotVector_480[2 * ( 480 - 30 )] = { // Q15
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ff5 ), SHC( 0xfca6 ),
- SHC( 0x7fd3 ), SHC( 0xf94d ), SHC( 0x7f9b ), SHC( 0xf5f5 ), SHC( 0x7f4c ), SHC( 0xf29f ), SHC( 0x7ee8 ), SHC( 0xef4b ),
- SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7ddb ), SHC( 0xe8ad ), SHC( 0x7d34 ), SHC( 0xe563 ), SHC( 0x7c77 ), SHC( 0xe21e ),
- SHC( 0x7ba3 ), SHC( 0xdedf ), SHC( 0x7abb ), SHC( 0xdba5 ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x78a8 ), SHC( 0xd546 ),
- SHC( 0x7780 ), SHC( 0xd221 ), SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x74ef ), SHC( 0xcbf0 ), SHC( 0x7388 ), SHC( 0xc8e5 ),
- SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x707d ), SHC( 0xc2ec ), SHC( 0x6eda ), SHC( 0xc000 ), SHC( 0x6d23 ), SHC( 0xbd1f ),
- SHC( 0x6b5a ), SHC( 0xba49 ), SHC( 0x697d ), SHC( 0xb780 ), SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x658d ), SHC( 0xb214 ),
- SHC( 0x637a ), SHC( 0xaf72 ), SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x5f1f ), SHC( 0xaa5a ), SHC( 0x5cd9 ), SHC( 0xa7e4 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fd3 ), SHC( 0xf94d ), SHC( 0x7f4c ), SHC( 0xf29f ), SHC( 0x7e6d ), SHC( 0xebfa ),
- SHC( 0x7d34 ), SHC( 0xe563 ), SHC( 0x7ba3 ), SHC( 0xdedf ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x7780 ), SHC( 0xd221 ),
- SHC( 0x74ef ), SHC( 0xcbf0 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6eda ), SHC( 0xc000 ), SHC( 0x6b5a ), SHC( 0xba49 ),
- SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x637a ), SHC( 0xaf72 ), SHC( 0x5f1f ), SHC( 0xaa5a ), SHC( 0x5a82 ), SHC( 0xa57e ),
- SHC( 0x55a6 ), SHC( 0xa0e1 ), SHC( 0x508e ), SHC( 0x9c86 ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x45b7 ), SHC( 0x94a6 ),
- SHC( 0x4000 ), SHC( 0x9126 ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x3410 ), SHC( 0x8b11 ), SHC( 0x2ddf ), SHC( 0x8880 ),
- SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x2121 ), SHC( 0x845d ), SHC( 0x1a9d ), SHC( 0x82cc ), SHC( 0x1406 ), SHC( 0x8193 ),
- SHC( 0x0d61 ), SHC( 0x80b4 ), SHC( 0x06b3 ), SHC( 0x802d ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f9b ), SHC( 0xf5f5 ),
- SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x7642 ), SHC( 0xcf04 ),
- SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6d23 ), SHC( 0xbd1f ), SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x6155 ), SHC( 0xacdf ),
- SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x5321 ), SHC( 0x9eab ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x42e1 ), SHC( 0x92dd ),
- SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1de2 ), SHC( 0x8389 ),
- SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0x0a0b ), SHC( 0x8065 ), SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xf5f5 ), SHC( 0x8065 ),
- SHC( 0xebfa ), SHC( 0x8193 ), SHC( 0xe21e ), SHC( 0x8389 ), SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xcf04 ), SHC( 0x89be ),
- SHC( 0xc5e4 ), SHC( 0x8df3 ), SHC( 0xbd1f ), SHC( 0x92dd ), SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xacdf ), SHC( 0x9eab ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f4c ), SHC( 0xf29f ), SHC( 0x7d34 ), SHC( 0xe563 ), SHC( 0x79bc ), SHC( 0xd872 ),
- SHC( 0x74ef ), SHC( 0xcbf0 ), SHC( 0x6eda ), SHC( 0xc000 ), SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x5f1f ), SHC( 0xaa5a ),
- SHC( 0x55a6 ), SHC( 0xa0e1 ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x4000 ), SHC( 0x9126 ), SHC( 0x3410 ), SHC( 0x8b11 ),
- SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1a9d ), SHC( 0x82cc ), SHC( 0x0d61 ), SHC( 0x80b4 ), SHC( 0x0000 ), SHC( 0x8000 ),
- SHC( 0xf29f ), SHC( 0x80b4 ), SHC( 0xe563 ), SHC( 0x82cc ), SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xcbf0 ), SHC( 0x8b11 ),
- SHC( 0xc000 ), SHC( 0x9126 ), SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xaa5a ), SHC( 0xa0e1 ), SHC( 0xa0e1 ), SHC( 0xaa5a ),
- SHC( 0x9872 ), SHC( 0xb4c3 ), SHC( 0x9126 ), SHC( 0xc000 ), SHC( 0x8b11 ), SHC( 0xcbf0 ), SHC( 0x8644 ), SHC( 0xd872 ),
- SHC( 0x82cc ), SHC( 0xe563 ), SHC( 0x80b4 ), SHC( 0xf29f ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ee8 ), SHC( 0xef4b ),
- SHC( 0x7ba3 ), SHC( 0xdedf ), SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x6eda ), SHC( 0xc000 ), SHC( 0x658d ), SHC( 0xb214 ),
- SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x4dec ), SHC( 0x9a73 ), SHC( 0x4000 ), SHC( 0x9126 ), SHC( 0x30fc ), SHC( 0x89be ),
- SHC( 0x2121 ), SHC( 0x845d ), SHC( 0x10b5 ), SHC( 0x8118 ), SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xef4b ), SHC( 0x8118 ),
- SHC( 0xdedf ), SHC( 0x845d ), SHC( 0xcf04 ), SHC( 0x89be ), SHC( 0xc000 ), SHC( 0x9126 ), SHC( 0xb214 ), SHC( 0x9a73 ),
- SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x9a73 ), SHC( 0xb214 ), SHC( 0x9126 ), SHC( 0xc000 ), SHC( 0x89be ), SHC( 0xcf04 ),
- SHC( 0x845d ), SHC( 0xdedf ), SHC( 0x8118 ), SHC( 0xef4b ), SHC( 0x8000 ), SHC( 0x0000 ), SHC( 0x8118 ), SHC( 0x10b5 ),
- SHC( 0x845d ), SHC( 0x2121 ), SHC( 0x89be ), SHC( 0x30fc ), SHC( 0x9126 ), SHC( 0x4000 ), SHC( 0x9a73 ), SHC( 0x4dec ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x720d ), SHC( 0xc5e4 ),
- SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x3a1c ), SHC( 0x8df3 ),
- SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xebfa ), SHC( 0x8193 ),
- SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xc5e4 ), SHC( 0x8df3 ), SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xa57e ), SHC( 0xa57e ),
- SHC( 0x9872 ), SHC( 0xb4c3 ), SHC( 0x8df3 ), SHC( 0xc5e4 ), SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8193 ), SHC( 0xebfa ),
- SHC( 0x8000 ), SHC( 0x0000 ), SHC( 0x8193 ), SHC( 0x1406 ), SHC( 0x8644 ), SHC( 0x278e ), SHC( 0x8df3 ), SHC( 0x3a1c ),
- SHC( 0x9872 ), SHC( 0x4b3d ), SHC( 0xa57e ), SHC( 0x5a82 ), SHC( 0xb4c3 ), SHC( 0x678e ), SHC( 0xc5e4 ), SHC( 0x720d ),
- SHC( 0xd872 ), SHC( 0x79bc ), SHC( 0xebfa ), SHC( 0x7e6d ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ddb ), SHC( 0xe8ad ),
- SHC( 0x7780 ), SHC( 0xd221 ), SHC( 0x6d23 ), SHC( 0xbd1f ), SHC( 0x5f1f ), SHC( 0xaa5a ), SHC( 0x4dec ), SHC( 0x9a73 ),
- SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x245b ), SHC( 0x8545 ), SHC( 0x0d61 ), SHC( 0x80b4 ), SHC( 0xf5f5 ), SHC( 0x8065 ),
- SHC( 0xdedf ), SHC( 0x845d ), SHC( 0xc8e5 ), SHC( 0x8c78 ), SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xa327 ), SHC( 0xa7e4 ),
- SHC( 0x94a6 ), SHC( 0xba49 ), SHC( 0x89be ), SHC( 0xcf04 ), SHC( 0x82cc ), SHC( 0xe563 ), SHC( 0x800b ), SHC( 0xfca6 ),
- SHC( 0x8193 ), SHC( 0x1406 ), SHC( 0x8758 ), SHC( 0x2aba ), SHC( 0x9126 ), SHC( 0x4000 ), SHC( 0x9eab ), SHC( 0x5321 ),
- SHC( 0xaf72 ), SHC( 0x637a ), SHC( 0xc2ec ), SHC( 0x707d ), SHC( 0xd872 ), SHC( 0x79bc ), SHC( 0xef4b ), SHC( 0x7ee8 ),
- SHC( 0x06b3 ), SHC( 0x7fd3 ), SHC( 0x1de2 ), SHC( 0x7c77 ), SHC( 0x3410 ), SHC( 0x74ef ), SHC( 0x4880 ), SHC( 0x697d ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ffd ), SHC( 0xfe53 ), SHC( 0x7ff5 ), SHC( 0xfca6 ), SHC( 0x7fe7 ), SHC( 0xfafa ),
- SHC( 0x7fd3 ), SHC( 0xf94d ), SHC( 0x7fba ), SHC( 0xf7a1 ), SHC( 0x7f9b ), SHC( 0xf5f5 ), SHC( 0x7f77 ), SHC( 0xf44a ),
- SHC( 0x7f4c ), SHC( 0xf29f ), SHC( 0x7f1d ), SHC( 0xf0f5 ), SHC( 0x7ee8 ), SHC( 0xef4b ), SHC( 0x7ead ), SHC( 0xeda2 ),
- SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7e27 ), SHC( 0xea53 ), SHC( 0x7ddb ), SHC( 0xe8ad ), SHC( 0x7d8a ), SHC( 0xe707 ),
- SHC( 0x7d34 ), SHC( 0xe563 ), SHC( 0x7cd8 ), SHC( 0xe3c0 ), SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x7c10 ), SHC( 0xe07e ),
- SHC( 0x7ba3 ), SHC( 0xdedf ), SHC( 0x7b32 ), SHC( 0xdd41 ), SHC( 0x7abb ), SHC( 0xdba5 ), SHC( 0x7a3e ), SHC( 0xda0b ),
- SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x7935 ), SHC( 0xd6db ), SHC( 0x78a8 ), SHC( 0xd546 ), SHC( 0x7817 ), SHC( 0xd3b2 ),
- SHC( 0x7780 ), SHC( 0xd221 ), SHC( 0x76e3 ), SHC( 0xd092 ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fe7 ), SHC( 0xfafa ),
- SHC( 0x7f9b ), SHC( 0xf5f5 ), SHC( 0x7f1d ), SHC( 0xf0f5 ), SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7d8a ), SHC( 0xe707 ),
- SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x7b32 ), SHC( 0xdd41 ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x7817 ), SHC( 0xd3b2 ),
- SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x743e ), SHC( 0xca69 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6fae ), SHC( 0xc175 ),
- SHC( 0x6d23 ), SHC( 0xbd1f ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x6485 ), SHC( 0xb0c2 ),
- SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x5dfe ), SHC( 0xa91d ), SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x56e3 ), SHC( 0xa202 ),
- SHC( 0x5321 ), SHC( 0x9eab ), SHC( 0x4f3e ), SHC( 0x9b7b ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x471d ), SHC( 0x9592 ),
- SHC( 0x42e1 ), SHC( 0x92dd ), SHC( 0x3e8b ), SHC( 0x9052 ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x3597 ), SHC( 0x8bc2 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fba ), SHC( 0xf7a1 ), SHC( 0x7ee8 ), SHC( 0xef4b ), SHC( 0x7d8a ), SHC( 0xe707 ),
- SHC( 0x7ba3 ), SHC( 0xdedf ), SHC( 0x7935 ), SHC( 0xd6db ), SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x72cd ), SHC( 0xc763 ),
- SHC( 0x6eda ), SHC( 0xc000 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x658d ), SHC( 0xb214 ), SHC( 0x603c ), SHC( 0xab9b ),
- SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x5465 ), SHC( 0x9fc4 ), SHC( 0x4dec ), SHC( 0x9a73 ), SHC( 0x471d ), SHC( 0x9592 ),
- SHC( 0x4000 ), SHC( 0x9126 ), SHC( 0x389d ), SHC( 0x8d33 ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x2925 ), SHC( 0x86cb ),
- SHC( 0x2121 ), SHC( 0x845d ), SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0x10b5 ), SHC( 0x8118 ), SHC( 0x085f ), SHC( 0x8046 ),
- SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xf7a1 ), SHC( 0x8046 ), SHC( 0xef4b ), SHC( 0x8118 ), SHC( 0xe707 ), SHC( 0x8276 ),
- SHC( 0xdedf ), SHC( 0x845d ), SHC( 0xd6db ), SHC( 0x86cb ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f77 ), SHC( 0xf44a ),
- SHC( 0x7ddb ), SHC( 0xe8ad ), SHC( 0x7b32 ), SHC( 0xdd41 ), SHC( 0x7780 ), SHC( 0xd221 ), SHC( 0x72cd ), SHC( 0xc763 ),
- SHC( 0x6d23 ), SHC( 0xbd1f ), SHC( 0x668f ), SHC( 0xb36a ), SHC( 0x5f1f ), SHC( 0xaa5a ), SHC( 0x56e3 ), SHC( 0xa202 ),
- SHC( 0x4dec ), SHC( 0x9a73 ), SHC( 0x444d ), SHC( 0x93bf ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x2f6e ), SHC( 0x891d ),
- SHC( 0x245b ), SHC( 0x8545 ), SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0x0d61 ), SHC( 0x80b4 ), SHC( 0x01ad ), SHC( 0x8003 ),
- SHC( 0xf5f5 ), SHC( 0x8065 ), SHC( 0xea53 ), SHC( 0x81d9 ), SHC( 0xdedf ), SHC( 0x845d ), SHC( 0xd3b2 ), SHC( 0x87e9 ),
- SHC( 0xc8e5 ), SHC( 0x8c78 ), SHC( 0xbe8e ), SHC( 0x91ff ), SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xab9b ), SHC( 0x9fc4 ),
- SHC( 0xa327 ), SHC( 0xa7e4 ), SHC( 0x9b7b ), SHC( 0xb0c2 ), SHC( 0x94a6 ), SHC( 0xba49 ), SHC( 0x8eb9 ), SHC( 0xc467 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f1d ), SHC( 0xf0f5 ), SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x7817 ), SHC( 0xd3b2 ),
- SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x56e3 ), SHC( 0xa202 ),
- SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x3e8b ), SHC( 0x9052 ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x22bf ), SHC( 0x84ce ),
- SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0x0506 ), SHC( 0x8019 ), SHC( 0xf5f5 ), SHC( 0x8065 ), SHC( 0xe707 ), SHC( 0x8276 ),
- SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xca69 ), SHC( 0x8bc2 ), SHC( 0xbd1f ), SHC( 0x92dd ), SHC( 0xb0c2 ), SHC( 0x9b7b ),
- SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x9b7b ), SHC( 0xb0c2 ), SHC( 0x92dd ), SHC( 0xbd1f ), SHC( 0x8bc2 ), SHC( 0xca69 ),
- SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8276 ), SHC( 0xe707 ), SHC( 0x8065 ), SHC( 0xf5f5 ), SHC( 0x8019 ), SHC( 0x0506 ),
- SHC( 0x8193 ), SHC( 0x1406 ), SHC( 0x84ce ), SHC( 0x22bf ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ead ), SHC( 0xeda2 ),
- SHC( 0x7abb ), SHC( 0xdba5 ), SHC( 0x743e ), SHC( 0xca69 ), SHC( 0x6b5a ), SHC( 0xba49 ), SHC( 0x603c ), SHC( 0xab9b ),
- SHC( 0x5321 ), SHC( 0x9eab ), SHC( 0x444d ), SHC( 0x93bf ), SHC( 0x3410 ), SHC( 0x8b11 ), SHC( 0x22bf ), SHC( 0x84ce ),
- SHC( 0x10b5 ), SHC( 0x8118 ), SHC( 0xfe53 ), SHC( 0x8003 ), SHC( 0xebfa ), SHC( 0x8193 ), SHC( 0xda0b ), SHC( 0x85c2 ),
- SHC( 0xc8e5 ), SHC( 0x8c78 ), SHC( 0xb8e3 ), SHC( 0x9592 ), SHC( 0xaa5a ), SHC( 0xa0e1 ), SHC( 0x9d97 ), SHC( 0xae27 ),
- SHC( 0x92dd ), SHC( 0xbd1f ), SHC( 0x8a65 ), SHC( 0xcd79 ), SHC( 0x845d ), SHC( 0xdedf ), SHC( 0x80e3 ), SHC( 0xf0f5 ),
- SHC( 0x800b ), SHC( 0x035a ), SHC( 0x81d9 ), SHC( 0x15ad ), SHC( 0x8644 ), SHC( 0x278e ), SHC( 0x8d33 ), SHC( 0x389d ),
- SHC( 0x9683 ), SHC( 0x4880 ), SHC( 0xa202 ), SHC( 0x56e3 ), SHC( 0xaf72 ), SHC( 0x637a ), SHC( 0xbe8e ), SHC( 0x6e01 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e27 ), SHC( 0xea53 ), SHC( 0x78a8 ), SHC( 0xd546 ), SHC( 0x6fae ), SHC( 0xc175 ),
- SHC( 0x637a ), SHC( 0xaf72 ), SHC( 0x5465 ), SHC( 0x9fc4 ), SHC( 0x42e1 ), SHC( 0x92dd ), SHC( 0x2f6e ), SHC( 0x891d ),
- SHC( 0x1a9d ), SHC( 0x82cc ), SHC( 0x0506 ), SHC( 0x8019 ), SHC( 0xef4b ), SHC( 0x8118 ), SHC( 0xda0b ), SHC( 0x85c2 ),
- SHC( 0xc5e4 ), SHC( 0x8df3 ), SHC( 0xb36a ), SHC( 0x9971 ), SHC( 0xa327 ), SHC( 0xa7e4 ), SHC( 0x9592 ), SHC( 0xb8e3 ),
- SHC( 0x8b11 ), SHC( 0xcbf0 ), SHC( 0x83f0 ), SHC( 0xe07e ), SHC( 0x8065 ), SHC( 0xf5f5 ), SHC( 0x8089 ), SHC( 0x0bb6 ),
- SHC( 0x845d ), SHC( 0x2121 ), SHC( 0x8bc2 ), SHC( 0x3597 ), SHC( 0x9683 ), SHC( 0x4880 ), SHC( 0xa450 ), SHC( 0x5951 ),
- SHC( 0xb4c3 ), SHC( 0x678e ), SHC( 0xc763 ), SHC( 0x72cd ), SHC( 0xdba5 ), SHC( 0x7abb ), SHC( 0xf0f5 ), SHC( 0x7f1d ),
- SHC( 0x06b3 ), SHC( 0x7fd3 ), SHC( 0x1c40 ), SHC( 0x7cd8 ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7d8a ), SHC( 0xe707 ),
- SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x471d ), SHC( 0x9592 ),
- SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xe707 ), SHC( 0x8276 ),
- SHC( 0xcf04 ), SHC( 0x89be ), SHC( 0xb8e3 ), SHC( 0x9592 ), SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x9592 ), SHC( 0xb8e3 ),
- SHC( 0x89be ), SHC( 0xcf04 ), SHC( 0x8276 ), SHC( 0xe707 ), SHC( 0x8000 ), SHC( 0x0000 ), SHC( 0x8276 ), SHC( 0x18f9 ),
- SHC( 0x89be ), SHC( 0x30fc ), SHC( 0x9592 ), SHC( 0x471d ), SHC( 0xa57e ), SHC( 0x5a82 ), SHC( 0xb8e3 ), SHC( 0x6a6e ),
- SHC( 0xcf04 ), SHC( 0x7642 ), SHC( 0xe707 ), SHC( 0x7d8a ), SHC( 0x0000 ), SHC( 0x7fff ), SHC( 0x18f9 ), SHC( 0x7d8a ),
- SHC( 0x30fc ), SHC( 0x7642 ), SHC( 0x471d ), SHC( 0x6a6e ), SHC( 0x5a82 ), SHC( 0x5a82 ), SHC( 0x6a6e ), SHC( 0x471d )
-};
-
-const Word16 RotVector_600[2 * ( 600 - 30 )] = { // Q15
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ff9 ), SHC( 0xfd52 ),
- SHC( 0x7fe3 ), SHC( 0xfaa4 ), SHC( 0x7fbf ), SHC( 0xf7f6 ), SHC( 0x7f8d ), SHC( 0xf54a ), SHC( 0x7f4c ), SHC( 0xf29f ),
- SHC( 0x7efe ), SHC( 0xeff5 ), SHC( 0x7ea0 ), SHC( 0xed4d ), SHC( 0x7e35 ), SHC( 0xeaa7 ), SHC( 0x7dbc ), SHC( 0xe804 ),
- SHC( 0x7d34 ), SHC( 0xe563 ), SHC( 0x7c9e ), SHC( 0xe2c5 ), SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x7b49 ), SHC( 0xdd94 ),
- SHC( 0x7a89 ), SHC( 0xdb01 ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x78e1 ), SHC( 0xd5e8 ), SHC( 0x77f9 ), SHC( 0xd362 ),
- SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x7600 ), SHC( 0xce66 ), SHC( 0x74ef ), SHC( 0xcbf0 ), SHC( 0x73d1 ), SHC( 0xc980 ),
- SHC( 0x72a7 ), SHC( 0xc716 ), SHC( 0x716f ), SHC( 0xc4b3 ), SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x6eda ), SHC( 0xc000 ),
- SHC( 0x6d7d ), SHC( 0xbdb1 ), SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x6a9d ), SHC( 0xb92a ), SHC( 0x691b ), SHC( 0xb6f3 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fe3 ), SHC( 0xfaa4 ), SHC( 0x7f8d ), SHC( 0xf54a ), SHC( 0x7efe ), SHC( 0xeff5 ),
- SHC( 0x7e35 ), SHC( 0xeaa7 ), SHC( 0x7d34 ), SHC( 0xe563 ), SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x7a89 ), SHC( 0xdb01 ),
- SHC( 0x78e1 ), SHC( 0xd5e8 ), SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x74ef ), SHC( 0xcbf0 ), SHC( 0x72a7 ), SHC( 0xc716 ),
- SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x6d7d ), SHC( 0xbdb1 ), SHC( 0x6a9d ), SHC( 0xb92a ), SHC( 0x678e ), SHC( 0xb4c3 ),
- SHC( 0x6450 ), SHC( 0xb07e ), SHC( 0x60e5 ), SHC( 0xac5d ), SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x598f ), SHC( 0xa48c ),
- SHC( 0x55a6 ), SHC( 0xa0e1 ), SHC( 0x5197 ), SHC( 0x9d60 ), SHC( 0x4d64 ), SHC( 0x9a0b ), SHC( 0x490d ), SHC( 0x96e5 ),
- SHC( 0x4496 ), SHC( 0x93ed ), SHC( 0x4000 ), SHC( 0x9126 ), SHC( 0x3b4d ), SHC( 0x8e91 ), SHC( 0x3680 ), SHC( 0x8c2f ),
- SHC( 0x319a ), SHC( 0x8a00 ), SHC( 0x2c9e ), SHC( 0x8807 ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fbf ), SHC( 0xf7f6 ),
- SHC( 0x7efe ), SHC( 0xeff5 ), SHC( 0x7dbc ), SHC( 0xe804 ), SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x79bc ), SHC( 0xd872 ),
- SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x73d1 ), SHC( 0xc980 ), SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x6c13 ), SHC( 0xbb6a ),
- SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x62a0 ), SHC( 0xae69 ), SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x579f ), SHC( 0xa2b1 ),
- SHC( 0x5197 ), SHC( 0x9d60 ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x4496 ), SHC( 0x93ed ), SHC( 0x3daa ), SHC( 0x8fd5 ),
- SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x2f1f ), SHC( 0x88fd ), SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1fd5 ), SHC( 0x8405 ),
- SHC( 0x17fc ), SHC( 0x8244 ), SHC( 0x100b ), SHC( 0x8102 ), SHC( 0x080a ), SHC( 0x8041 ), SHC( 0x0000 ), SHC( 0x8000 ),
- SHC( 0xf7f6 ), SHC( 0x8041 ), SHC( 0xeff5 ), SHC( 0x8102 ), SHC( 0xe804 ), SHC( 0x8244 ), SHC( 0xe02b ), SHC( 0x8405 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f8d ), SHC( 0xf54a ), SHC( 0x7e35 ), SHC( 0xeaa7 ), SHC( 0x7bfb ), SHC( 0xe02b ),
- SHC( 0x78e1 ), SHC( 0xd5e8 ), SHC( 0x74ef ), SHC( 0xcbf0 ), SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x6a9d ), SHC( 0xb92a ),
- SHC( 0x6450 ), SHC( 0xb07e ), SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x55a6 ), SHC( 0xa0e1 ), SHC( 0x4d64 ), SHC( 0x9a0b ),
- SHC( 0x4496 ), SHC( 0x93ed ), SHC( 0x3b4d ), SHC( 0x8e91 ), SHC( 0x319a ), SHC( 0x8a00 ), SHC( 0x278e ), SHC( 0x8644 ),
- SHC( 0x1d3b ), SHC( 0x8362 ), SHC( 0x12b3 ), SHC( 0x8160 ), SHC( 0x080a ), SHC( 0x8041 ), SHC( 0xfd52 ), SHC( 0x8007 ),
- SHC( 0xf29f ), SHC( 0x80b4 ), SHC( 0xe804 ), SHC( 0x8244 ), SHC( 0xdd94 ), SHC( 0x84b7 ), SHC( 0xd362 ), SHC( 0x8807 ),
- SHC( 0xc980 ), SHC( 0x8c2f ), SHC( 0xc000 ), SHC( 0x9126 ), SHC( 0xb6f3 ), SHC( 0x96e5 ), SHC( 0xae69 ), SHC( 0x9d60 ),
- SHC( 0xa671 ), SHC( 0xa48c ), SHC( 0x9f1b ), SHC( 0xac5d ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f4c ), SHC( 0xf29f ),
- SHC( 0x7d34 ), SHC( 0xe563 ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x74ef ), SHC( 0xcbf0 ), SHC( 0x6eda ), SHC( 0xc000 ),
- SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x5f1f ), SHC( 0xaa5a ), SHC( 0x55a6 ), SHC( 0xa0e1 ), SHC( 0x4b3d ), SHC( 0x9872 ),
- SHC( 0x4000 ), SHC( 0x9126 ), SHC( 0x3410 ), SHC( 0x8b11 ), SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1a9d ), SHC( 0x82cc ),
- SHC( 0x0d61 ), SHC( 0x80b4 ), SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xf29f ), SHC( 0x80b4 ), SHC( 0xe563 ), SHC( 0x82cc ),
- SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xcbf0 ), SHC( 0x8b11 ), SHC( 0xc000 ), SHC( 0x9126 ), SHC( 0xb4c3 ), SHC( 0x9872 ),
- SHC( 0xaa5a ), SHC( 0xa0e1 ), SHC( 0xa0e1 ), SHC( 0xaa5a ), SHC( 0x9872 ), SHC( 0xb4c3 ), SHC( 0x9126 ), SHC( 0xc000 ),
- SHC( 0x8b11 ), SHC( 0xcbf0 ), SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x82cc ), SHC( 0xe563 ), SHC( 0x80b4 ), SHC( 0xf29f ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7efe ), SHC( 0xeff5 ), SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x7703 ), SHC( 0xd0e1 ),
- SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x5197 ), SHC( 0x9d60 ),
- SHC( 0x4496 ), SHC( 0x93ed ), SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x17fc ), SHC( 0x8244 ),
- SHC( 0x080a ), SHC( 0x8041 ), SHC( 0xf7f6 ), SHC( 0x8041 ), SHC( 0xe804 ), SHC( 0x8244 ), SHC( 0xd872 ), SHC( 0x8644 ),
- SHC( 0xc980 ), SHC( 0x8c2f ), SHC( 0xbb6a ), SHC( 0x93ed ), SHC( 0xae69 ), SHC( 0x9d60 ), SHC( 0xa2b1 ), SHC( 0xa861 ),
- SHC( 0x9872 ), SHC( 0xb4c3 ), SHC( 0x8fd5 ), SHC( 0xc256 ), SHC( 0x88fd ), SHC( 0xd0e1 ), SHC( 0x8405 ), SHC( 0xe02b ),
- SHC( 0x8102 ), SHC( 0xeff5 ), SHC( 0x8000 ), SHC( 0x0000 ), SHC( 0x8102 ), SHC( 0x100b ), SHC( 0x8405 ), SHC( 0x1fd5 ),
- SHC( 0x88fd ), SHC( 0x2f1f ), SHC( 0x8fd5 ), SHC( 0x3daa ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ea0 ), SHC( 0xed4d ),
- SHC( 0x7a89 ), SHC( 0xdb01 ), SHC( 0x73d1 ), SHC( 0xc980 ), SHC( 0x6a9d ), SHC( 0xb92a ), SHC( 0x5f1f ), SHC( 0xaa5a ),
- SHC( 0x5197 ), SHC( 0x9d60 ), SHC( 0x424f ), SHC( 0x9283 ), SHC( 0x319a ), SHC( 0x8a00 ), SHC( 0x1fd5 ), SHC( 0x8405 ),
- SHC( 0x0d61 ), SHC( 0x80b4 ), SHC( 0xfaa4 ), SHC( 0x801d ), SHC( 0xe804 ), SHC( 0x8244 ), SHC( 0xd5e8 ), SHC( 0x871f ),
- SHC( 0xc4b3 ), SHC( 0x8e91 ), SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xa671 ), SHC( 0xa48c ), SHC( 0x9a0b ), SHC( 0xb29c ),
- SHC( 0x8fd5 ), SHC( 0xc256 ), SHC( 0x8807 ), SHC( 0xd362 ), SHC( 0x82cc ), SHC( 0xe563 ), SHC( 0x8041 ), SHC( 0xf7f6 ),
- SHC( 0x8073 ), SHC( 0x0ab6 ), SHC( 0x8362 ), SHC( 0x1d3b ), SHC( 0x88fd ), SHC( 0x2f1f ), SHC( 0x9126 ), SHC( 0x4000 ),
- SHC( 0x9bb0 ), SHC( 0x4f82 ), SHC( 0xa861 ), SHC( 0x5d4f ), SHC( 0xb6f3 ), SHC( 0x691b ), SHC( 0xc716 ), SHC( 0x72a7 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e35 ), SHC( 0xeaa7 ), SHC( 0x78e1 ), SHC( 0xd5e8 ), SHC( 0x702b ), SHC( 0xc256 ),
- SHC( 0x6450 ), SHC( 0xb07e ), SHC( 0x55a6 ), SHC( 0xa0e1 ), SHC( 0x4496 ), SHC( 0x93ed ), SHC( 0x319a ), SHC( 0x8a00 ),
- SHC( 0x1d3b ), SHC( 0x8362 ), SHC( 0x080a ), SHC( 0x8041 ), SHC( 0xf29f ), SHC( 0x80b4 ), SHC( 0xdd94 ), SHC( 0x84b7 ),
- SHC( 0xc980 ), SHC( 0x8c2f ), SHC( 0xb6f3 ), SHC( 0x96e5 ), SHC( 0xa671 ), SHC( 0xa48c ), SHC( 0x9872 ), SHC( 0xb4c3 ),
- SHC( 0x8d59 ), SHC( 0xc716 ), SHC( 0x8577 ), SHC( 0xdb01 ), SHC( 0x8102 ), SHC( 0xeff5 ), SHC( 0x801d ), SHC( 0x055c ),
- SHC( 0x82cc ), SHC( 0x1a9d ), SHC( 0x88fd ), SHC( 0x2f1f ), SHC( 0x9283 ), SHC( 0x424f ), SHC( 0x9f1b ), SHC( 0x53a3 ),
- SHC( 0xae69 ), SHC( 0x62a0 ), SHC( 0xc000 ), SHC( 0x6eda ), SHC( 0xd362 ), SHC( 0x77f9 ), SHC( 0xe804 ), SHC( 0x7dbc ),
- SHC( 0xfd52 ), SHC( 0x7ff9 ), SHC( 0x12b3 ), SHC( 0x7ea0 ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7dbc ), SHC( 0xe804 ),
- SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x4b3d ), SHC( 0x9872 ),
- SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x1fd5 ), SHC( 0x8405 ), SHC( 0x080a ), SHC( 0x8041 ), SHC( 0xeff5 ), SHC( 0x8102 ),
- SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xc256 ), SHC( 0x8fd5 ), SHC( 0xae69 ), SHC( 0x9d60 ), SHC( 0x9d60 ), SHC( 0xae69 ),
- SHC( 0x8fd5 ), SHC( 0xc256 ), SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8102 ), SHC( 0xeff5 ), SHC( 0x8041 ), SHC( 0x080a ),
- SHC( 0x8405 ), SHC( 0x1fd5 ), SHC( 0x8c2f ), SHC( 0x3680 ), SHC( 0x9872 ), SHC( 0x4b3d ), SHC( 0xa861 ), SHC( 0x5d4f ),
- SHC( 0xbb6a ), SHC( 0x6c13 ), SHC( 0xd0e1 ), SHC( 0x7703 ), SHC( 0xe804 ), SHC( 0x7dbc ), SHC( 0x0000 ), SHC( 0x7fff ),
- SHC( 0x17fc ), SHC( 0x7dbc ), SHC( 0x2f1f ), SHC( 0x7703 ), SHC( 0x4496 ), SHC( 0x6c13 ), SHC( 0x579f ), SHC( 0x5d4f ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ffe ), SHC( 0xfea9 ), SHC( 0x7ff9 ), SHC( 0xfd52 ), SHC( 0x7ff0 ), SHC( 0xfbfb ),
- SHC( 0x7fe3 ), SHC( 0xfaa4 ), SHC( 0x7fd3 ), SHC( 0xf94d ), SHC( 0x7fbf ), SHC( 0xf7f6 ), SHC( 0x7fa8 ), SHC( 0xf6a0 ),
- SHC( 0x7f8d ), SHC( 0xf54a ), SHC( 0x7f6f ), SHC( 0xf3f4 ), SHC( 0x7f4c ), SHC( 0xf29f ), SHC( 0x7f27 ), SHC( 0xf14a ),
- SHC( 0x7efe ), SHC( 0xeff5 ), SHC( 0x7ed1 ), SHC( 0xeea1 ), SHC( 0x7ea0 ), SHC( 0xed4d ), SHC( 0x7e6d ), SHC( 0xebfa ),
- SHC( 0x7e35 ), SHC( 0xeaa7 ), SHC( 0x7dfa ), SHC( 0xe955 ), SHC( 0x7dbc ), SHC( 0xe804 ), SHC( 0x7d7a ), SHC( 0xe6b3 ),
- SHC( 0x7d34 ), SHC( 0xe563 ), SHC( 0x7ceb ), SHC( 0xe414 ), SHC( 0x7c9e ), SHC( 0xe2c5 ), SHC( 0x7c4e ), SHC( 0xe178 ),
- SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x7ba3 ), SHC( 0xdedf ), SHC( 0x7b49 ), SHC( 0xdd94 ), SHC( 0x7aeb ), SHC( 0xdc4a ),
- SHC( 0x7a89 ), SHC( 0xdb01 ), SHC( 0x7a25 ), SHC( 0xd9b9 ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ff0 ), SHC( 0xfbfb ),
- SHC( 0x7fbf ), SHC( 0xf7f6 ), SHC( 0x7f6f ), SHC( 0xf3f4 ), SHC( 0x7efe ), SHC( 0xeff5 ), SHC( 0x7e6d ), SHC( 0xebfa ),
- SHC( 0x7dbc ), SHC( 0xe804 ), SHC( 0x7ceb ), SHC( 0xe414 ), SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x7aeb ), SHC( 0xdc4a ),
- SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x786f ), SHC( 0xd4a4 ), SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x7579 ), SHC( 0xcd2a ),
- SHC( 0x73d1 ), SHC( 0xc980 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x6e2d ), SHC( 0xbed8 ),
- SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x69de ), SHC( 0xb80e ), SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x6524 ), SHC( 0xb18c ),
- SHC( 0x62a0 ), SHC( 0xae69 ), SHC( 0x6004 ), SHC( 0xab5a ), SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x5a82 ), SHC( 0xa57e ),
- SHC( 0x579f ), SHC( 0xa2b1 ), SHC( 0x54a6 ), SHC( 0x9ffc ), SHC( 0x5197 ), SHC( 0x9d60 ), SHC( 0x4e74 ), SHC( 0x9adc ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fd3 ), SHC( 0xf94d ), SHC( 0x7f4c ), SHC( 0xf29f ), SHC( 0x7e6d ), SHC( 0xebfa ),
- SHC( 0x7d34 ), SHC( 0xe563 ), SHC( 0x7ba3 ), SHC( 0xdedf ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x7780 ), SHC( 0xd221 ),
- SHC( 0x74ef ), SHC( 0xcbf0 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6eda ), SHC( 0xc000 ), SHC( 0x6b5a ), SHC( 0xba49 ),
- SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x637a ), SHC( 0xaf72 ), SHC( 0x5f1f ), SHC( 0xaa5a ), SHC( 0x5a82 ), SHC( 0xa57e ),
- SHC( 0x55a6 ), SHC( 0xa0e1 ), SHC( 0x508e ), SHC( 0x9c86 ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x45b7 ), SHC( 0x94a6 ),
- SHC( 0x4000 ), SHC( 0x9126 ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x3410 ), SHC( 0x8b11 ), SHC( 0x2ddf ), SHC( 0x8880 ),
- SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x2121 ), SHC( 0x845d ), SHC( 0x1a9d ), SHC( 0x82cc ), SHC( 0x1406 ), SHC( 0x8193 ),
- SHC( 0x0d61 ), SHC( 0x80b4 ), SHC( 0x06b3 ), SHC( 0x802d ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fa8 ), SHC( 0xf6a0 ),
- SHC( 0x7ea0 ), SHC( 0xed4d ), SHC( 0x7ceb ), SHC( 0xe414 ), SHC( 0x7a89 ), SHC( 0xdb01 ), SHC( 0x7780 ), SHC( 0xd221 ),
- SHC( 0x73d1 ), SHC( 0xc980 ), SHC( 0x6f84 ), SHC( 0xc12a ), SHC( 0x6a9d ), SHC( 0xb92a ), SHC( 0x6524 ), SHC( 0xb18c ),
- SHC( 0x5f1f ), SHC( 0xaa5a ), SHC( 0x5898 ), SHC( 0xa39d ), SHC( 0x5197 ), SHC( 0x9d60 ), SHC( 0x4a26 ), SHC( 0x97aa ),
- SHC( 0x424f ), SHC( 0x9283 ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x319a ), SHC( 0x8a00 ), SHC( 0x28d4 ), SHC( 0x86b0 ),
- SHC( 0x1fd5 ), SHC( 0x8405 ), SHC( 0x16ab ), SHC( 0x8206 ), SHC( 0x0d61 ), SHC( 0x80b4 ), SHC( 0x0405 ), SHC( 0x8010 ),
- SHC( 0xfaa4 ), SHC( 0x801d ), SHC( 0xf14a ), SHC( 0x80d9 ), SHC( 0xe804 ), SHC( 0x8244 ), SHC( 0xdedf ), SHC( 0x845d ),
- SHC( 0xd5e8 ), SHC( 0x871f ), SHC( 0xcd2a ), SHC( 0x8a87 ), SHC( 0xc4b3 ), SHC( 0x8e91 ), SHC( 0xbc8d ), SHC( 0x9337 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f6f ), SHC( 0xf3f4 ), SHC( 0x7dbc ), SHC( 0xe804 ), SHC( 0x7aeb ), SHC( 0xdc4a ),
- SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x6524 ), SHC( 0xb18c ),
- SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x54a6 ), SHC( 0x9ffc ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x4128 ), SHC( 0x91d3 ),
- SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x2b5c ), SHC( 0x8791 ), SHC( 0x1fd5 ), SHC( 0x8405 ), SHC( 0x1406 ), SHC( 0x8193 ),
- SHC( 0x080a ), SHC( 0x8041 ), SHC( 0xfbfb ), SHC( 0x8010 ), SHC( 0xeff5 ), SHC( 0x8102 ), SHC( 0xe414 ), SHC( 0x8315 ),
- SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xcd2a ), SHC( 0x8a87 ), SHC( 0xc256 ), SHC( 0x8fd5 ), SHC( 0xb80e ), SHC( 0x9622 ),
- SHC( 0xae69 ), SHC( 0x9d60 ), SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x9d60 ), SHC( 0xae69 ), SHC( 0x9622 ), SHC( 0xb80e ),
- SHC( 0x8fd5 ), SHC( 0xc256 ), SHC( 0x8a87 ), SHC( 0xcd2a ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f27 ), SHC( 0xf14a ),
- SHC( 0x7c9e ), SHC( 0xe2c5 ), SHC( 0x786f ), SHC( 0xd4a4 ), SHC( 0x72a7 ), SHC( 0xc716 ), SHC( 0x6b5a ), SHC( 0xba49 ),
- SHC( 0x62a0 ), SHC( 0xae69 ), SHC( 0x5898 ), SHC( 0xa39d ), SHC( 0x4d64 ), SHC( 0x9a0b ), SHC( 0x4128 ), SHC( 0x91d3 ),
- SHC( 0x3410 ), SHC( 0x8b11 ), SHC( 0x2647 ), SHC( 0x85db ), SHC( 0x17fc ), SHC( 0x8244 ), SHC( 0x0960 ), SHC( 0x8058 ),
- SHC( 0xfaa4 ), SHC( 0x801d ), SHC( 0xebfa ), SHC( 0x8193 ), SHC( 0xdd94 ), SHC( 0x84b7 ), SHC( 0xcfa3 ), SHC( 0x897d ),
- SHC( 0xc256 ), SHC( 0x8fd5 ), SHC( 0xb5da ), SHC( 0x97aa ), SHC( 0xaa5a ), SHC( 0xa0e1 ), SHC( 0x9ffc ), SHC( 0xab5a ),
- SHC( 0x96e5 ), SHC( 0xb6f3 ), SHC( 0x8f31 ), SHC( 0xc383 ), SHC( 0x88fd ), SHC( 0xd0e1 ), SHC( 0x845d ), SHC( 0xdedf ),
- SHC( 0x8160 ), SHC( 0xed4d ), SHC( 0x8010 ), SHC( 0xfbfb ), SHC( 0x8073 ), SHC( 0x0ab6 ), SHC( 0x8286 ), SHC( 0x194d ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ed1 ), SHC( 0xeea1 ), SHC( 0x7b49 ), SHC( 0xdd94 ), SHC( 0x7579 ), SHC( 0xcd2a ),
- SHC( 0x6d7d ), SHC( 0xbdb1 ), SHC( 0x637a ), SHC( 0xaf72 ), SHC( 0x579f ), SHC( 0xa2b1 ), SHC( 0x4a26 ), SHC( 0x97aa ),
- SHC( 0x3b4d ), SHC( 0x8e91 ), SHC( 0x2b5c ), SHC( 0x8791 ), SHC( 0x1a9d ), SHC( 0x82cc ), SHC( 0x0960 ), SHC( 0x8058 ),
- SHC( 0xf7f6 ), SHC( 0x8041 ), SHC( 0xe6b3 ), SHC( 0x8286 ), SHC( 0xd5e8 ), SHC( 0x871f ), SHC( 0xc5e4 ), SHC( 0x8df3 ),
- SHC( 0xb6f3 ), SHC( 0x96e5 ), SHC( 0xa95c ), SHC( 0xa1c8 ), SHC( 0x9d60 ), SHC( 0xae69 ), SHC( 0x9337 ), SHC( 0xbc8d ),
- SHC( 0x8b11 ), SHC( 0xcbf0 ), SHC( 0x8515 ), SHC( 0xdc4a ), SHC( 0x8160 ), SHC( 0xed4d ), SHC( 0x8002 ), SHC( 0xfea9 ),
- SHC( 0x8102 ), SHC( 0x100b ), SHC( 0x845d ), SHC( 0x2121 ), SHC( 0x8a00 ), SHC( 0x319a ), SHC( 0x91d3 ), SHC( 0x4128 ),
- SHC( 0x9bb0 ), SHC( 0x4f82 ), SHC( 0xa768 ), SHC( 0x5c63 ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e6d ), SHC( 0xebfa ),
- SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x5a82 ), SHC( 0xa57e ),
- SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1406 ), SHC( 0x8193 ),
- SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xebfa ), SHC( 0x8193 ), SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xc5e4 ), SHC( 0x8df3 ),
- SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x9872 ), SHC( 0xb4c3 ), SHC( 0x8df3 ), SHC( 0xc5e4 ),
- SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8193 ), SHC( 0xebfa ), SHC( 0x8000 ), SHC( 0x0000 ), SHC( 0x8193 ), SHC( 0x1406 ),
- SHC( 0x8644 ), SHC( 0x278e ), SHC( 0x8df3 ), SHC( 0x3a1c ), SHC( 0x9872 ), SHC( 0x4b3d ), SHC( 0xa57e ), SHC( 0x5a82 ),
- SHC( 0xb4c3 ), SHC( 0x678e ), SHC( 0xc5e4 ), SHC( 0x720d ), SHC( 0xd872 ), SHC( 0x79bc ), SHC( 0xebfa ), SHC( 0x7e6d ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7dfa ), SHC( 0xe955 ), SHC( 0x77f9 ), SHC( 0xd362 ), SHC( 0x6e2d ), SHC( 0xbed8 ),
- SHC( 0x60e5 ), SHC( 0xac5d ), SHC( 0x508e ), SHC( 0x9c86 ), SHC( 0x3daa ), SHC( 0x8fd5 ), SHC( 0x28d4 ), SHC( 0x86b0 ),
- SHC( 0x12b3 ), SHC( 0x8160 ), SHC( 0xfbfb ), SHC( 0x8010 ), SHC( 0xe563 ), SHC( 0x82cc ), SHC( 0xcfa3 ), SHC( 0x897d ),
- SHC( 0xbb6a ), SHC( 0x93ed ), SHC( 0xa95c ), SHC( 0xa1c8 ), SHC( 0x9a0b ), SHC( 0xb29c ), SHC( 0x8df3 ), SHC( 0xc5e4 ),
- SHC( 0x8577 ), SHC( 0xdb01 ), SHC( 0x80d9 ), SHC( 0xf14a ), SHC( 0x8041 ), SHC( 0x080a ), SHC( 0x83b2 ), SHC( 0x1e88 ),
- SHC( 0x8b11 ), SHC( 0x3410 ), SHC( 0x9622 ), SHC( 0x47f2 ), SHC( 0xa48c ), SHC( 0x598f ), SHC( 0xb5da ), SHC( 0x6856 ),
- SHC( 0xc980 ), SHC( 0x73d1 ), SHC( 0xdedf ), SHC( 0x7ba3 ), SHC( 0xf54a ), SHC( 0x7f8d ), SHC( 0x0c0c ), SHC( 0x7f6f ),
- SHC( 0x226c ), SHC( 0x7b49 ), SHC( 0x37b6 ), SHC( 0x733e ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7d7a ), SHC( 0xe6b3 ),
- SHC( 0x7600 ), SHC( 0xce66 ), SHC( 0x69de ), SHC( 0xb80e ), SHC( 0x598f ), SHC( 0xa48c ), SHC( 0x45b7 ), SHC( 0x94a6 ),
- SHC( 0x2f1f ), SHC( 0x88fd ), SHC( 0x16ab ), SHC( 0x8206 ), SHC( 0xfd52 ), SHC( 0x8007 ), SHC( 0xe414 ), SHC( 0x8315 ),
- SHC( 0xcbf0 ), SHC( 0x8b11 ), SHC( 0xb5da ), SHC( 0x97aa ), SHC( 0xa2b1 ), SHC( 0xa861 ), SHC( 0x9337 ), SHC( 0xbc8d ),
- SHC( 0x8807 ), SHC( 0xd362 ), SHC( 0x8193 ), SHC( 0xebfa ), SHC( 0x801d ), SHC( 0x055c ), SHC( 0x83b2 ), SHC( 0x1e88 ),
- SHC( 0x8c2f ), SHC( 0x3680 ), SHC( 0x993d ), SHC( 0x4c51 ), SHC( 0xaa5a ), SHC( 0x5f1f ), SHC( 0xbed8 ), SHC( 0x6e2d ),
- SHC( 0xd5e8 ), SHC( 0x78e1 ), SHC( 0xeea1 ), SHC( 0x7ed1 ), SHC( 0x080a ), SHC( 0x7fbf ), SHC( 0x2121 ), SHC( 0x7ba3 ),
- SHC( 0x38ea ), SHC( 0x72a7 ), SHC( 0x4e74 ), SHC( 0x6524 ), SHC( 0x60e5 ), SHC( 0x53a3 ), SHC( 0x6f84 ), SHC( 0x3ed6 )
-};
-
-
-/**
- * \brief Twiddle factors are unscaled
- */
-const Word16 RotVector_256[2 * ( 256 - 32 )] = { // Q15
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ff6 ), SHC( 0xfcdc ), SHC( 0x7fd9 ), SHC( 0xf9b8 ), SHC( 0x7fa7 ), SHC( 0xf695 ),
- SHC( 0x7f62 ), SHC( 0xf374 ), SHC( 0x7f0a ), SHC( 0xf055 ), SHC( 0x7e9d ), SHC( 0xed38 ), SHC( 0x7e1e ), SHC( 0xea1e ),
- SHC( 0x7d8a ), SHC( 0xe707 ), SHC( 0x7ce4 ), SHC( 0xe3f4 ), SHC( 0x7c2a ), SHC( 0xe0e6 ), SHC( 0x7b5d ), SHC( 0xdddc ),
- SHC( 0x7a7d ), SHC( 0xdad8 ), SHC( 0x798a ), SHC( 0xd7d9 ), SHC( 0x7885 ), SHC( 0xd4e1 ), SHC( 0x776c ), SHC( 0xd1ef ),
- SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x7505 ), SHC( 0xcc21 ), SHC( 0x73b6 ), SHC( 0xc946 ), SHC( 0x7255 ), SHC( 0xc673 ),
- SHC( 0x70e3 ), SHC( 0xc3a9 ), SHC( 0x6f5f ), SHC( 0xc0e9 ), SHC( 0x6dca ), SHC( 0xbe32 ), SHC( 0x6c24 ), SHC( 0xbb85 ),
- SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x68a7 ), SHC( 0xb64c ), SHC( 0x66d0 ), SHC( 0xb3c0 ), SHC( 0x64e9 ), SHC( 0xb140 ),
- SHC( 0x62f2 ), SHC( 0xaecc ), SHC( 0x60ec ), SHC( 0xac65 ), SHC( 0x5ed7 ), SHC( 0xaa0a ), SHC( 0x5cb4 ), SHC( 0xa7bd ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fd9 ), SHC( 0xf9b8 ), SHC( 0x7f62 ), SHC( 0xf374 ), SHC( 0x7e9d ), SHC( 0xed38 ),
- SHC( 0x7d8a ), SHC( 0xe707 ), SHC( 0x7c2a ), SHC( 0xe0e6 ), SHC( 0x7a7d ), SHC( 0xdad8 ), SHC( 0x7885 ), SHC( 0xd4e1 ),
- SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x73b6 ), SHC( 0xc946 ), SHC( 0x70e3 ), SHC( 0xc3a9 ), SHC( 0x6dca ), SHC( 0xbe32 ),
- SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x66d0 ), SHC( 0xb3c0 ), SHC( 0x62f2 ), SHC( 0xaecc ), SHC( 0x5ed7 ), SHC( 0xaa0a ),
- SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x55f6 ), SHC( 0xa129 ), SHC( 0x5134 ), SHC( 0x9d0e ), SHC( 0x4c40 ), SHC( 0x9930 ),
- SHC( 0x471d ), SHC( 0x9592 ), SHC( 0x41ce ), SHC( 0x9236 ), SHC( 0x3c57 ), SHC( 0x8f1d ), SHC( 0x36ba ), SHC( 0x8c4a ),
- SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x2b1f ), SHC( 0x877b ), SHC( 0x2528 ), SHC( 0x8583 ), SHC( 0x1f1a ), SHC( 0x83d6 ),
- SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0x12c8 ), SHC( 0x8163 ), SHC( 0x0c8c ), SHC( 0x809e ), SHC( 0x0648 ), SHC( 0x8027 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fa7 ), SHC( 0xf695 ), SHC( 0x7e9d ), SHC( 0xed38 ), SHC( 0x7ce4 ), SHC( 0xe3f4 ),
- SHC( 0x7a7d ), SHC( 0xdad8 ), SHC( 0x776c ), SHC( 0xd1ef ), SHC( 0x73b6 ), SHC( 0xc946 ), SHC( 0x6f5f ), SHC( 0xc0e9 ),
- SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x64e9 ), SHC( 0xb140 ), SHC( 0x5ed7 ), SHC( 0xaa0a ), SHC( 0x5843 ), SHC( 0xa34c ),
- SHC( 0x5134 ), SHC( 0x9d0e ), SHC( 0x49b4 ), SHC( 0x9759 ), SHC( 0x41ce ), SHC( 0x9236 ), SHC( 0x398d ), SHC( 0x8dab ),
- SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x2827 ), SHC( 0x8676 ), SHC( 0x1f1a ), SHC( 0x83d6 ), SHC( 0x15e2 ), SHC( 0x81e2 ),
- SHC( 0x0c8c ), SHC( 0x809e ), SHC( 0x0324 ), SHC( 0x800a ), SHC( 0xf9b8 ), SHC( 0x8027 ), SHC( 0xf055 ), SHC( 0x80f6 ),
- SHC( 0xe707 ), SHC( 0x8276 ), SHC( 0xdddc ), SHC( 0x84a3 ), SHC( 0xd4e1 ), SHC( 0x877b ), SHC( 0xcc21 ), SHC( 0x8afb ),
- SHC( 0xc3a9 ), SHC( 0x8f1d ), SHC( 0xbb85 ), SHC( 0x93dc ), SHC( 0xb3c0 ), SHC( 0x9930 ), SHC( 0xac65 ), SHC( 0x9f14 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f62 ), SHC( 0xf374 ), SHC( 0x7d8a ), SHC( 0xe707 ), SHC( 0x7a7d ), SHC( 0xdad8 ),
- SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x70e3 ), SHC( 0xc3a9 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x62f2 ), SHC( 0xaecc ),
- SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x5134 ), SHC( 0x9d0e ), SHC( 0x471d ), SHC( 0x9592 ), SHC( 0x3c57 ), SHC( 0x8f1d ),
- SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x2528 ), SHC( 0x8583 ), SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0x0c8c ), SHC( 0x809e ),
- SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xf374 ), SHC( 0x809e ), SHC( 0xe707 ), SHC( 0x8276 ), SHC( 0xdad8 ), SHC( 0x8583 ),
- SHC( 0xcf04 ), SHC( 0x89be ), SHC( 0xc3a9 ), SHC( 0x8f1d ), SHC( 0xb8e3 ), SHC( 0x9592 ), SHC( 0xaecc ), SHC( 0x9d0e ),
- SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x9d0e ), SHC( 0xaecc ), SHC( 0x9592 ), SHC( 0xb8e3 ), SHC( 0x8f1d ), SHC( 0xc3a9 ),
- SHC( 0x89be ), SHC( 0xcf04 ), SHC( 0x8583 ), SHC( 0xdad8 ), SHC( 0x8276 ), SHC( 0xe707 ), SHC( 0x809e ), SHC( 0xf374 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f0a ), SHC( 0xf055 ), SHC( 0x7c2a ), SHC( 0xe0e6 ), SHC( 0x776c ), SHC( 0xd1ef ),
- SHC( 0x70e3 ), SHC( 0xc3a9 ), SHC( 0x68a7 ), SHC( 0xb64c ), SHC( 0x5ed7 ), SHC( 0xaa0a ), SHC( 0x539b ), SHC( 0x9f14 ),
- SHC( 0x471d ), SHC( 0x9592 ), SHC( 0x398d ), SHC( 0x8dab ), SHC( 0x2b1f ), SHC( 0x877b ), SHC( 0x1c0c ), SHC( 0x831c ),
- SHC( 0x0c8c ), SHC( 0x809e ), SHC( 0xfcdc ), SHC( 0x800a ), SHC( 0xed38 ), SHC( 0x8163 ), SHC( 0xdddc ), SHC( 0x84a3 ),
- SHC( 0xcf04 ), SHC( 0x89be ), SHC( 0xc0e9 ), SHC( 0x90a1 ), SHC( 0xb3c0 ), SHC( 0x9930 ), SHC( 0xa7bd ), SHC( 0xa34c ),
- SHC( 0x9d0e ), SHC( 0xaecc ), SHC( 0x93dc ), SHC( 0xbb85 ), SHC( 0x8c4a ), SHC( 0xc946 ), SHC( 0x8676 ), SHC( 0xd7d9 ),
- SHC( 0x8276 ), SHC( 0xe707 ), SHC( 0x8059 ), SHC( 0xf695 ), SHC( 0x8027 ), SHC( 0x0648 ), SHC( 0x81e2 ), SHC( 0x15e2 ),
- SHC( 0x8583 ), SHC( 0x2528 ), SHC( 0x8afb ), SHC( 0x33df ), SHC( 0x9236 ), SHC( 0x41ce ), SHC( 0x9b17 ), SHC( 0x4ec0 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e9d ), SHC( 0xed38 ), SHC( 0x7a7d ), SHC( 0xdad8 ), SHC( 0x73b6 ), SHC( 0xc946 ),
- SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x5ed7 ), SHC( 0xaa0a ), SHC( 0x5134 ), SHC( 0x9d0e ), SHC( 0x41ce ), SHC( 0x9236 ),
- SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x1f1a ), SHC( 0x83d6 ), SHC( 0x0c8c ), SHC( 0x809e ), SHC( 0xf9b8 ), SHC( 0x8027 ),
- SHC( 0xe707 ), SHC( 0x8276 ), SHC( 0xd4e1 ), SHC( 0x877b ), SHC( 0xc3a9 ), SHC( 0x8f1d ), SHC( 0xb3c0 ), SHC( 0x9930 ),
- SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x9930 ), SHC( 0xb3c0 ), SHC( 0x8f1d ), SHC( 0xc3a9 ), SHC( 0x877b ), SHC( 0xd4e1 ),
- SHC( 0x8276 ), SHC( 0xe707 ), SHC( 0x8027 ), SHC( 0xf9b8 ), SHC( 0x809e ), SHC( 0x0c8c ), SHC( 0x83d6 ), SHC( 0x1f1a ),
- SHC( 0x89be ), SHC( 0x30fc ), SHC( 0x9236 ), SHC( 0x41ce ), SHC( 0x9d0e ), SHC( 0x5134 ), SHC( 0xaa0a ), SHC( 0x5ed7 ),
- SHC( 0xb8e3 ), SHC( 0x6a6e ), SHC( 0xc946 ), SHC( 0x73b6 ), SHC( 0xdad8 ), SHC( 0x7a7d ), SHC( 0xed38 ), SHC( 0x7e9d ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e1e ), SHC( 0xea1e ), SHC( 0x7885 ), SHC( 0xd4e1 ), SHC( 0x6f5f ), SHC( 0xc0e9 ),
- SHC( 0x62f2 ), SHC( 0xaecc ), SHC( 0x539b ), SHC( 0x9f14 ), SHC( 0x41ce ), SHC( 0x9236 ), SHC( 0x2e11 ), SHC( 0x8894 ),
- SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0x0324 ), SHC( 0x800a ), SHC( 0xed38 ), SHC( 0x8163 ), SHC( 0xd7d9 ), SHC( 0x8676 ),
- SHC( 0xc3a9 ), SHC( 0x8f1d ), SHC( 0xb140 ), SHC( 0x9b17 ), SHC( 0xa129 ), SHC( 0xaa0a ), SHC( 0x93dc ), SHC( 0xbb85 ),
- SHC( 0x89be ), SHC( 0xcf04 ), SHC( 0x831c ), SHC( 0xe3f4 ), SHC( 0x8027 ), SHC( 0xf9b8 ), SHC( 0x80f6 ), SHC( 0x0fab ),
- SHC( 0x8583 ), SHC( 0x2528 ), SHC( 0x8dab ), SHC( 0x398d ), SHC( 0x9930 ), SHC( 0x4c40 ), SHC( 0xa7bd ), SHC( 0x5cb4 ),
- SHC( 0xb8e3 ), SHC( 0x6a6e ), SHC( 0xcc21 ), SHC( 0x7505 ), SHC( 0xe0e6 ), SHC( 0x7c2a ), SHC( 0xf695 ), SHC( 0x7fa7 ),
- SHC( 0x0c8c ), SHC( 0x7f62 ), SHC( 0x2224 ), SHC( 0x7b5d ), SHC( 0x36ba ), SHC( 0x73b6 ), SHC( 0x49b4 ), SHC( 0x68a7 )
-};
-
-/**
- * \brief Twiddle factors are unscaled
- */
-const Word16 RotVector_320[2 * ( 320 - 20 )] = { // Q15
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fe7 ), SHC( 0xfafa ), SHC( 0x7f9b ), SHC( 0xf5f5 ), SHC( 0x7f1d ), SHC( 0xf0f5 ),
- SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7d8a ), SHC( 0xe707 ), SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x7b32 ), SHC( 0xdd41 ),
- SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x7817 ), SHC( 0xd3b2 ), SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x743e ), SHC( 0xca69 ),
- SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6fae ), SHC( 0xc175 ), SHC( 0x6d23 ), SHC( 0xbd1f ), SHC( 0x6a6e ), SHC( 0xb8e3 ),
- SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x6485 ), SHC( 0xb0c2 ), SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x5dfe ), SHC( 0xa91d ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f9b ), SHC( 0xf5f5 ), SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7c77 ), SHC( 0xe21e ),
- SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6d23 ), SHC( 0xbd1f ),
- SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x5321 ), SHC( 0x9eab ),
- SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x42e1 ), SHC( 0x92dd ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x30fc ), SHC( 0x89be ),
- SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1de2 ), SHC( 0x8389 ), SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0x0a0b ), SHC( 0x8065 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f1d ), SHC( 0xf0f5 ), SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x7817 ), SHC( 0xd3b2 ),
- SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x56e3 ), SHC( 0xa202 ),
- SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x3e8b ), SHC( 0x9052 ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x22bf ), SHC( 0x84ce ),
- SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0x0506 ), SHC( 0x8019 ), SHC( 0xf5f5 ), SHC( 0x8065 ), SHC( 0xe707 ), SHC( 0x8276 ),
- SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xca69 ), SHC( 0x8bc2 ), SHC( 0xbd1f ), SHC( 0x92dd ), SHC( 0xb0c2 ), SHC( 0x9b7b ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x720d ), SHC( 0xc5e4 ),
- SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x3a1c ), SHC( 0x8df3 ),
- SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xebfa ), SHC( 0x8193 ),
- SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xc5e4 ), SHC( 0x8df3 ), SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xa57e ), SHC( 0xa57e ),
- SHC( 0x9872 ), SHC( 0xb4c3 ), SHC( 0x8df3 ), SHC( 0xc5e4 ), SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8193 ), SHC( 0xebfa ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7d8a ), SHC( 0xe707 ), SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x6a6e ), SHC( 0xb8e3 ),
- SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x471d ), SHC( 0x9592 ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x18f9 ), SHC( 0x8276 ),
- SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xe707 ), SHC( 0x8276 ), SHC( 0xcf04 ), SHC( 0x89be ), SHC( 0xb8e3 ), SHC( 0x9592 ),
- SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x9592 ), SHC( 0xb8e3 ), SHC( 0x89be ), SHC( 0xcf04 ), SHC( 0x8276 ), SHC( 0xe707 ),
- SHC( 0x8000 ), SHC( 0x0000 ), SHC( 0x8276 ), SHC( 0x18f9 ), SHC( 0x89be ), SHC( 0x30fc ), SHC( 0x9592 ), SHC( 0x471d ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6155 ), SHC( 0xacdf ),
- SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0xf5f5 ), SHC( 0x8065 ),
- SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xbd1f ), SHC( 0x92dd ), SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x92dd ), SHC( 0xbd1f ),
- SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8065 ), SHC( 0xf5f5 ), SHC( 0x8193 ), SHC( 0x1406 ), SHC( 0x89be ), SHC( 0x30fc ),
- SHC( 0x9872 ), SHC( 0x4b3d ), SHC( 0xacdf ), SHC( 0x6155 ), SHC( 0xc5e4 ), SHC( 0x720d ), SHC( 0xe21e ), SHC( 0x7c77 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7b32 ), SHC( 0xdd41 ), SHC( 0x6d23 ), SHC( 0xbd1f ), SHC( 0x56e3 ), SHC( 0xa202 ),
- SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0xf5f5 ), SHC( 0x8065 ), SHC( 0xd3b2 ), SHC( 0x87e9 ),
- SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0x9b7b ), SHC( 0xb0c2 ), SHC( 0x89be ), SHC( 0xcf04 ), SHC( 0x80e3 ), SHC( 0xf0f5 ),
- SHC( 0x8193 ), SHC( 0x1406 ), SHC( 0x8bc2 ), SHC( 0x3597 ), SHC( 0x9eab ), SHC( 0x5321 ), SHC( 0xb8e3 ), SHC( 0x6a6e ),
- SHC( 0xd872 ), SHC( 0x79bc ), SHC( 0xfafa ), SHC( 0x7fe7 ), SHC( 0x1de2 ), SHC( 0x7c77 ), SHC( 0x3e8b ), SHC( 0x6fae ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ffa ), SHC( 0xfd7d ), SHC( 0x7fe7 ), SHC( 0xfafa ), SHC( 0x7fc7 ), SHC( 0xf877 ),
- SHC( 0x7f9b ), SHC( 0xf5f5 ), SHC( 0x7f62 ), SHC( 0xf374 ), SHC( 0x7f1d ), SHC( 0xf0f5 ), SHC( 0x7ecb ), SHC( 0xee76 ),
- SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7e02 ), SHC( 0xe980 ), SHC( 0x7d8a ), SHC( 0xe707 ), SHC( 0x7d07 ), SHC( 0xe492 ),
- SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x7bda ), SHC( 0xdfae ), SHC( 0x7b32 ), SHC( 0xdd41 ), SHC( 0x7a7d ), SHC( 0xdad8 ),
- SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x78ef ), SHC( 0xd610 ), SHC( 0x7817 ), SHC( 0xd3b2 ), SHC( 0x7732 ), SHC( 0xd159 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fc7 ), SHC( 0xf877 ), SHC( 0x7f1d ), SHC( 0xf0f5 ), SHC( 0x7e02 ), SHC( 0xe980 ),
- SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x7a7d ), SHC( 0xdad8 ), SHC( 0x7817 ), SHC( 0xd3b2 ), SHC( 0x7546 ), SHC( 0xccb4 ),
- SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6e6e ), SHC( 0xbf47 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x660f ), SHC( 0xb2bf ),
- SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x5c45 ), SHC( 0xa749 ), SHC( 0x56e3 ), SHC( 0xa202 ), SHC( 0x5134 ), SHC( 0x9d0e ),
- SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x4502 ), SHC( 0x9432 ), SHC( 0x3e8b ), SHC( 0x9052 ), SHC( 0x37dc ), SHC( 0x8cd5 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f62 ), SHC( 0xf374 ), SHC( 0x7d8a ), SHC( 0xe707 ), SHC( 0x7a7d ), SHC( 0xdad8 ),
- SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x70e3 ), SHC( 0xc3a9 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x62f2 ), SHC( 0xaecc ),
- SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x5134 ), SHC( 0x9d0e ), SHC( 0x471d ), SHC( 0x9592 ), SHC( 0x3c57 ), SHC( 0x8f1d ),
- SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x2528 ), SHC( 0x8583 ), SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0x0c8c ), SHC( 0x809e ),
- SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xf374 ), SHC( 0x809e ), SHC( 0xe707 ), SHC( 0x8276 ), SHC( 0xdad8 ), SHC( 0x8583 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ecb ), SHC( 0xee76 ), SHC( 0x7b32 ), SHC( 0xdd41 ), SHC( 0x7546 ), SHC( 0xccb4 ),
- SHC( 0x6d23 ), SHC( 0xbd1f ), SHC( 0x62f2 ), SHC( 0xaecc ), SHC( 0x56e3 ), SHC( 0xa202 ), SHC( 0x4930 ), SHC( 0x96fd ),
- SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x29f0 ), SHC( 0x8711 ), SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0x0789 ), SHC( 0x8039 ),
- SHC( 0xf5f5 ), SHC( 0x8065 ), SHC( 0xe492 ), SHC( 0x82f9 ), SHC( 0xd3b2 ), SHC( 0x87e9 ), SHC( 0xc3a9 ), SHC( 0x8f1d ),
- SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xa749 ), SHC( 0xa3bb ), SHC( 0x9b7b ), SHC( 0xb0c2 ), SHC( 0x9192 ), SHC( 0xbf47 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e02 ), SHC( 0xe980 ), SHC( 0x7817 ), SHC( 0xd3b2 ), SHC( 0x6e6e ), SHC( 0xbf47 ),
- SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x5134 ), SHC( 0x9d0e ), SHC( 0x3e8b ), SHC( 0x9052 ), SHC( 0x29f0 ), SHC( 0x8711 ),
- SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0xfd7d ), SHC( 0x8006 ), SHC( 0xe707 ), SHC( 0x8276 ), SHC( 0xd159 ), SHC( 0x88ce ),
- SHC( 0xbd1f ), SHC( 0x92dd ), SHC( 0xaafa ), SHC( 0xa052 ), SHC( 0x9b7b ), SHC( 0xb0c2 ), SHC( 0x8f1d ), SHC( 0xc3a9 ),
- SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8135 ), SHC( 0xee76 ), SHC( 0x8019 ), SHC( 0x0506 ), SHC( 0x82f9 ), SHC( 0x1b6e ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7d07 ), SHC( 0xe492 ), SHC( 0x743e ), SHC( 0xca69 ), SHC( 0x660f ), SHC( 0xb2bf ),
- SHC( 0x5321 ), SHC( 0x9eab ), SHC( 0x3c57 ), SHC( 0x8f1d ), SHC( 0x22bf ), SHC( 0x84ce ), SHC( 0x0789 ), SHC( 0x8039 ),
- SHC( 0xebfa ), SHC( 0x8193 ), SHC( 0xd159 ), SHC( 0x88ce ), SHC( 0xb8e3 ), SHC( 0x9592 ), SHC( 0xa3bb ), SHC( 0xa749 ),
- SHC( 0x92dd ), SHC( 0xbd1f ), SHC( 0x8711 ), SHC( 0xd610 ), SHC( 0x80e3 ), SHC( 0xf0f5 ), SHC( 0x809e ), SHC( 0x0c8c ),
- SHC( 0x8644 ), SHC( 0x278e ), SHC( 0x9192 ), SHC( 0x40b9 ), SHC( 0xa202 ), SHC( 0x56e3 ), SHC( 0xb6d0 ), SHC( 0x6903 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7bda ), SHC( 0xdfae ), SHC( 0x6fae ), SHC( 0xc175 ), SHC( 0x5c45 ), SHC( 0xa749 ),
- SHC( 0x42e1 ), SHC( 0x92dd ), SHC( 0x2528 ), SHC( 0x8583 ), SHC( 0x0506 ), SHC( 0x8019 ), SHC( 0xe492 ), SHC( 0x82f9 ),
- SHC( 0xc5e4 ), SHC( 0x8df3 ), SHC( 0xaafa ), SHC( 0xa052 ), SHC( 0x9592 ), SHC( 0xb8e3 ), SHC( 0x8711 ), SHC( 0xd610 ),
- SHC( 0x8065 ), SHC( 0xf5f5 ), SHC( 0x81fe ), SHC( 0x1680 ), SHC( 0x8bc2 ), SHC( 0x3597 ), SHC( 0x9d0e ), SHC( 0x5134 ),
- SHC( 0xb4c3 ), SHC( 0x678e ), SHC( 0xd159 ), SHC( 0x7732 ), SHC( 0xf0f5 ), SHC( 0x7f1d ), SHC( 0x118a ), SHC( 0x7ecb ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7a7d ), SHC( 0xdad8 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x5134 ), SHC( 0x9d0e ),
- SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x0c8c ), SHC( 0x809e ), SHC( 0xe707 ), SHC( 0x8276 ), SHC( 0xc3a9 ), SHC( 0x8f1d ),
- SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x8f1d ), SHC( 0xc3a9 ), SHC( 0x8276 ), SHC( 0xe707 ), SHC( 0x809e ), SHC( 0x0c8c ),
- SHC( 0x89be ), SHC( 0x30fc ), SHC( 0x9d0e ), SHC( 0x5134 ), SHC( 0xb8e3 ), SHC( 0x6a6e ), SHC( 0xdad8 ), SHC( 0x7a7d ),
- SHC( 0x0000 ), SHC( 0x7fff ), SHC( 0x2528 ), SHC( 0x7a7d ), SHC( 0x471d ), SHC( 0x6a6e ), SHC( 0x62f2 ), SHC( 0x5134 )
-};
-
-
-/**
- * \brief Twiddle factors are unscaled
- * Rotation factor table, real and imaginary part interleaved, for dim1=20,dim2=20
- */
-
-const Word16 RotVector_400[2 * ( 400 - 20 )] = { // Q15
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ff0 ), SHC( 0xfbfb ), SHC( 0x7fbf ), SHC( 0xf7f6 ), SHC( 0x7f6f ), SHC( 0xf3f4 ),
- SHC( 0x7efe ), SHC( 0xeff5 ), SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7dbc ), SHC( 0xe804 ), SHC( 0x7ceb ), SHC( 0xe414 ),
- SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x7aeb ), SHC( 0xdc4a ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x786f ), SHC( 0xd4a4 ),
- SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x7579 ), SHC( 0xcd2a ), SHC( 0x73d1 ), SHC( 0xc980 ), SHC( 0x720d ), SHC( 0xc5e4 ),
- SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x6e2d ), SHC( 0xbed8 ), SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x69de ), SHC( 0xb80e ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fbf ), SHC( 0xf7f6 ), SHC( 0x7efe ), SHC( 0xeff5 ), SHC( 0x7dbc ), SHC( 0xe804 ),
- SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x73d1 ), SHC( 0xc980 ),
- SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x62a0 ), SHC( 0xae69 ),
- SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x579f ), SHC( 0xa2b1 ), SHC( 0x5197 ), SHC( 0x9d60 ), SHC( 0x4b3d ), SHC( 0x9872 ),
- SHC( 0x4496 ), SHC( 0x93ed ), SHC( 0x3daa ), SHC( 0x8fd5 ), SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x2f1f ), SHC( 0x88fd ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f6f ), SHC( 0xf3f4 ), SHC( 0x7dbc ), SHC( 0xe804 ), SHC( 0x7aeb ), SHC( 0xdc4a ),
- SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x6524 ), SHC( 0xb18c ),
- SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x54a6 ), SHC( 0x9ffc ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x4128 ), SHC( 0x91d3 ),
- SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x2b5c ), SHC( 0x8791 ), SHC( 0x1fd5 ), SHC( 0x8405 ), SHC( 0x1406 ), SHC( 0x8193 ),
- SHC( 0x080a ), SHC( 0x8041 ), SHC( 0xfbfb ), SHC( 0x8010 ), SHC( 0xeff5 ), SHC( 0x8102 ), SHC( 0xe414 ), SHC( 0x8315 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7efe ), SHC( 0xeff5 ), SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x7703 ), SHC( 0xd0e1 ),
- SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x5197 ), SHC( 0x9d60 ),
- SHC( 0x4496 ), SHC( 0x93ed ), SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x17fc ), SHC( 0x8244 ),
- SHC( 0x080a ), SHC( 0x8041 ), SHC( 0xf7f6 ), SHC( 0x8041 ), SHC( 0xe804 ), SHC( 0x8244 ), SHC( 0xd872 ), SHC( 0x8644 ),
- SHC( 0xc980 ), SHC( 0x8c2f ), SHC( 0xbb6a ), SHC( 0x93ed ), SHC( 0xae69 ), SHC( 0x9d60 ), SHC( 0xa2b1 ), SHC( 0xa861 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x720d ), SHC( 0xc5e4 ),
- SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x3a1c ), SHC( 0x8df3 ),
- SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xebfa ), SHC( 0x8193 ),
- SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xc5e4 ), SHC( 0x8df3 ), SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xa57e ), SHC( 0xa57e ),
- SHC( 0x9872 ), SHC( 0xb4c3 ), SHC( 0x8df3 ), SHC( 0xc5e4 ), SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8193 ), SHC( 0xebfa ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7dbc ), SHC( 0xe804 ), SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x6c13 ), SHC( 0xbb6a ),
- SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x1fd5 ), SHC( 0x8405 ),
- SHC( 0x080a ), SHC( 0x8041 ), SHC( 0xeff5 ), SHC( 0x8102 ), SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xc256 ), SHC( 0x8fd5 ),
- SHC( 0xae69 ), SHC( 0x9d60 ), SHC( 0x9d60 ), SHC( 0xae69 ), SHC( 0x8fd5 ), SHC( 0xc256 ), SHC( 0x8644 ), SHC( 0xd872 ),
- SHC( 0x8102 ), SHC( 0xeff5 ), SHC( 0x8041 ), SHC( 0x080a ), SHC( 0x8405 ), SHC( 0x1fd5 ), SHC( 0x8c2f ), SHC( 0x3680 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ceb ), SHC( 0xe414 ), SHC( 0x73d1 ), SHC( 0xc980 ), SHC( 0x6524 ), SHC( 0xb18c ),
- SHC( 0x5197 ), SHC( 0x9d60 ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x1fd5 ), SHC( 0x8405 ), SHC( 0x0405 ), SHC( 0x8010 ),
- SHC( 0xe804 ), SHC( 0x8244 ), SHC( 0xcd2a ), SHC( 0x8a87 ), SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0x9ffc ), SHC( 0xab5a ),
- SHC( 0x8fd5 ), SHC( 0xc256 ), SHC( 0x8515 ), SHC( 0xdc4a ), SHC( 0x8041 ), SHC( 0xf7f6 ), SHC( 0x8193 ), SHC( 0x1406 ),
- SHC( 0x88fd ), SHC( 0x2f1f ), SHC( 0x9622 ), SHC( 0x47f2 ), SHC( 0xa861 ), SHC( 0x5d4f ), SHC( 0xbed8 ), SHC( 0x6e2d ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x5d4f ), SHC( 0xa861 ),
- SHC( 0x4496 ), SHC( 0x93ed ), SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x080a ), SHC( 0x8041 ), SHC( 0xe804 ), SHC( 0x8244 ),
- SHC( 0xc980 ), SHC( 0x8c2f ), SHC( 0xae69 ), SHC( 0x9d60 ), SHC( 0x9872 ), SHC( 0xb4c3 ), SHC( 0x88fd ), SHC( 0xd0e1 ),
- SHC( 0x8102 ), SHC( 0xeff5 ), SHC( 0x8102 ), SHC( 0x100b ), SHC( 0x88fd ), SHC( 0x2f1f ), SHC( 0x9872 ), SHC( 0x4b3d ),
- SHC( 0xae69 ), SHC( 0x62a0 ), SHC( 0xc980 ), SHC( 0x73d1 ), SHC( 0xe804 ), SHC( 0x7dbc ), SHC( 0x080a ), SHC( 0x7fbf ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7aeb ), SHC( 0xdc4a ), SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x54a6 ), SHC( 0x9ffc ),
- SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0xeff5 ), SHC( 0x8102 ), SHC( 0xcd2a ), SHC( 0x8a87 ),
- SHC( 0xae69 ), SHC( 0x9d60 ), SHC( 0x9622 ), SHC( 0xb80e ), SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8010 ), SHC( 0xfbfb ),
- SHC( 0x8405 ), SHC( 0x1fd5 ), SHC( 0x91d3 ), SHC( 0x4128 ), SHC( 0xa861 ), SHC( 0x5d4f ), SHC( 0xc5e4 ), SHC( 0x720d ),
- SHC( 0xe804 ), SHC( 0x7dbc ), SHC( 0x0c0c ), SHC( 0x7f6f ), SHC( 0x2f1f ), SHC( 0x7703 ), SHC( 0x4e74 ), SHC( 0x6524 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ffc ), SHC( 0xfdfd ), SHC( 0x7ff0 ), SHC( 0xfbfb ), SHC( 0x7fdc ), SHC( 0xf9f8 ),
- SHC( 0x7fbf ), SHC( 0xf7f6 ), SHC( 0x7f9b ), SHC( 0xf5f5 ), SHC( 0x7f6f ), SHC( 0xf3f4 ), SHC( 0x7f3a ), SHC( 0xf1f4 ),
- SHC( 0x7efe ), SHC( 0xeff5 ), SHC( 0x7eb9 ), SHC( 0xedf7 ), SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7e18 ), SHC( 0xe9fe ),
- SHC( 0x7dbc ), SHC( 0xe804 ), SHC( 0x7d57 ), SHC( 0xe60b ), SHC( 0x7ceb ), SHC( 0xe414 ), SHC( 0x7c77 ), SHC( 0xe21e ),
- SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x7b77 ), SHC( 0xde39 ), SHC( 0x7aeb ), SHC( 0xdc4a ), SHC( 0x7a57 ), SHC( 0xda5d ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fdc ), SHC( 0xf9f8 ), SHC( 0x7f6f ), SHC( 0xf3f4 ), SHC( 0x7eb9 ), SHC( 0xedf7 ),
- SHC( 0x7dbc ), SHC( 0xe804 ), SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x7aeb ), SHC( 0xdc4a ), SHC( 0x7919 ), SHC( 0xd68a ),
- SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x74a9 ), SHC( 0xcb53 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6f2f ), SHC( 0xc095 ),
- SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x68b9 ), SHC( 0xb666 ), SHC( 0x6524 ), SHC( 0xb18c ), SHC( 0x6155 ), SHC( 0xacdf ),
- SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x5914 ), SHC( 0xa414 ), SHC( 0x54a6 ), SHC( 0x9ffc ), SHC( 0x5008 ), SHC( 0x9c1b ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f9b ), SHC( 0xf5f5 ), SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7c77 ), SHC( 0xe21e ),
- SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6d23 ), SHC( 0xbd1f ),
- SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x5321 ), SHC( 0x9eab ),
- SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x42e1 ), SHC( 0x92dd ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x30fc ), SHC( 0x89be ),
- SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1de2 ), SHC( 0x8389 ), SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0x0a0b ), SHC( 0x8065 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f3a ), SHC( 0xf1f4 ), SHC( 0x7ceb ), SHC( 0xe414 ), SHC( 0x7919 ), SHC( 0xd68a ),
- SHC( 0x73d1 ), SHC( 0xc980 ), SHC( 0x6d23 ), SHC( 0xbd1f ), SHC( 0x6524 ), SHC( 0xb18c ), SHC( 0x5bec ), SHC( 0xa6ec ),
- SHC( 0x5197 ), SHC( 0x9d60 ), SHC( 0x4646 ), SHC( 0x9504 ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x2d3f ), SHC( 0x8843 ),
- SHC( 0x1fd5 ), SHC( 0x8405 ), SHC( 0x1209 ), SHC( 0x8147 ), SHC( 0x0405 ), SHC( 0x8010 ), SHC( 0xf5f5 ), SHC( 0x8065 ),
- SHC( 0xe804 ), SHC( 0x8244 ), SHC( 0xda5d ), SHC( 0x85a9 ), SHC( 0xcd2a ), SHC( 0x8a87 ), SHC( 0xc095 ), SHC( 0x90d1 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7eb9 ), SHC( 0xedf7 ), SHC( 0x7aeb ), SHC( 0xdc4a ), SHC( 0x74a9 ), SHC( 0xcb53 ),
- SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x54a6 ), SHC( 0x9ffc ), SHC( 0x4646 ), SHC( 0x9504 ),
- SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x25a3 ), SHC( 0x85a9 ), SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0x0203 ), SHC( 0x8004 ),
- SHC( 0xeff5 ), SHC( 0x8102 ), SHC( 0xde39 ), SHC( 0x8489 ), SHC( 0xcd2a ), SHC( 0x8a87 ), SHC( 0xbd1f ), SHC( 0x92dd ),
- SHC( 0xae69 ), SHC( 0x9d60 ), SHC( 0xa154 ), SHC( 0xa9db ), SHC( 0x9622 ), SHC( 0xb80e ), SHC( 0x8d0d ), SHC( 0xc7b0 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e18 ), SHC( 0xe9fe ), SHC( 0x786f ), SHC( 0xd4a4 ), SHC( 0x6f2f ), SHC( 0xc095 ),
- SHC( 0x62a0 ), SHC( 0xae69 ), SHC( 0x5321 ), SHC( 0x9eab ), SHC( 0x4128 ), SHC( 0x91d3 ), SHC( 0x2d3f ), SHC( 0x8843 ),
- SHC( 0x17fc ), SHC( 0x8244 ), SHC( 0x0203 ), SHC( 0x8004 ), SHC( 0xebfa ), SHC( 0x8193 ), SHC( 0xd68a ), SHC( 0x86e7 ),
- SHC( 0xc256 ), SHC( 0x8fd5 ), SHC( 0xaff8 ), SHC( 0x9c1b ), SHC( 0x9ffc ), SHC( 0xab5a ), SHC( 0x92dd ), SHC( 0xbd1f ),
- SHC( 0x88fd ), SHC( 0xd0e1 ), SHC( 0x82a9 ), SHC( 0xe60b ), SHC( 0x8010 ), SHC( 0xfbfb ), SHC( 0x8147 ), SHC( 0x1209 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7d57 ), SHC( 0xe60b ), SHC( 0x7579 ), SHC( 0xcd2a ), SHC( 0x68b9 ), SHC( 0xb666 ),
- SHC( 0x579f ), SHC( 0xa2b1 ), SHC( 0x42e1 ), SHC( 0x92dd ), SHC( 0x2b5c ), SHC( 0x8791 ), SHC( 0x1209 ), SHC( 0x8147 ),
- SHC( 0xf7f6 ), SHC( 0x8041 ), SHC( 0xde39 ), SHC( 0x8489 ), SHC( 0xc5e4 ), SHC( 0x8df3 ), SHC( 0xaff8 ), SHC( 0x9c1b ),
- SHC( 0x9d60 ), SHC( 0xae69 ), SHC( 0x8ee1 ), SHC( 0xc41b ), SHC( 0x8515 ), SHC( 0xdc4a ), SHC( 0x8065 ), SHC( 0xf5f5 ),
- SHC( 0x8102 ), SHC( 0x100b ), SHC( 0x86e7 ), SHC( 0x2976 ), SHC( 0x91d3 ), SHC( 0x4128 ), SHC( 0xa154 ), SHC( 0x5625 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6155 ), SHC( 0xacdf ),
- SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0xf5f5 ), SHC( 0x8065 ),
- SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xbd1f ), SHC( 0x92dd ), SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x92dd ), SHC( 0xbd1f ),
- SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8065 ), SHC( 0xf5f5 ), SHC( 0x8193 ), SHC( 0x1406 ), SHC( 0x89be ), SHC( 0x30fc ),
- SHC( 0x9872 ), SHC( 0x4b3d ), SHC( 0xacdf ), SHC( 0x6155 ), SHC( 0xc5e4 ), SHC( 0x720d ), SHC( 0xe21e ), SHC( 0x7c77 ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7b77 ), SHC( 0xde39 ), SHC( 0x6e2d ), SHC( 0xbed8 ), SHC( 0x5914 ), SHC( 0xa414 ),
- SHC( 0x3daa ), SHC( 0x8fd5 ), SHC( 0x1de2 ), SHC( 0x8389 ), SHC( 0xfbfb ), SHC( 0x8010 ), SHC( 0xda5d ), SHC( 0x85a9 ),
- SHC( 0xbb6a ), SHC( 0x93ed ), SHC( 0xa154 ), SHC( 0xa9db ), SHC( 0x8df3 ), SHC( 0xc5e4 ), SHC( 0x82a9 ), SHC( 0xe60b ),
- SHC( 0x8041 ), SHC( 0x080a ), SHC( 0x86e7 ), SHC( 0x2976 ), SHC( 0x9622 ), SHC( 0x47f2 ), SHC( 0xacdf ), SHC( 0x6155 ),
- SHC( 0xc980 ), SHC( 0x73d1 ), SHC( 0xe9fe ), SHC( 0x7e18 ), SHC( 0x0c0c ), SHC( 0x7f6f ), SHC( 0x2d3f ), SHC( 0x77bd ),
- SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7a57 ), SHC( 0xda5d ), SHC( 0x69de ), SHC( 0xb80e ), SHC( 0x5008 ), SHC( 0x9c1b ),
- SHC( 0x2f1f ), SHC( 0x88fd ), SHC( 0x0a0b ), SHC( 0x8065 ), SHC( 0xe414 ), SHC( 0x8315 ), SHC( 0xc095 ), SHC( 0x90d1 ),
- SHC( 0xa2b1 ), SHC( 0xa861 ), SHC( 0x8d0d ), SHC( 0xc7b0 ), SHC( 0x8193 ), SHC( 0xebfa ), SHC( 0x8147 ), SHC( 0x1209 ),
- SHC( 0x8c2f ), SHC( 0x3680 ), SHC( 0xa154 ), SHC( 0x5625 ), SHC( 0xbed8 ), SHC( 0x6e2d ), SHC( 0xe21e ), SHC( 0x7c77 ),
- SHC( 0x080a ), SHC( 0x7fbf ), SHC( 0x2d3f ), SHC( 0x77bd ), SHC( 0x4e74 ), SHC( 0x6524 ), SHC( 0x68b9 ), SHC( 0x499a )
-};
-
-const Word16 FFT_W64[( 64 * 2 ) * 2] = { // Q15
- 16384, 0, 16364, -804, 16305, -1606, 16207, -2404,
- 16069, -3196, 15893, -3981, 15679, -4756, 15426, -5520,
- 15137, -6270, 14811, -7005, 14449, -7723, 14053, -8423,
- 13623, -9102, 13160, -9760, 12665, -10394, 12140, -11003,
- 11585, -11585, 11003, -12140, 10394, -12665, 9760, -13160,
- 9102, -13623, 8423, -14053, 7723, -14449, 7005, -14811,
- 6270, -15137, 5520, -15426, 4756, -15679, 3981, -15893,
- 3196, -16069, 2404, -16207, 1606, -16305, 804, -16364,
- 0, -16384, -804, -16364, -1606, -16305, -2404, -16207,
- -3196, -16069, -3981, -15893, -4756, -15679, -5520, -15426,
- -6270, -15137, -7005, -14811, -7723, -14449, -8423, -14053,
- -9102, -13623, -9760, -13160, -10394, -12665, -11003, -12140,
- -11585, -11585, -12140, -11003, -12665, -10394, -13160, -9760,
- -13623, -9102, -14053, -8423, -14449, -7723, -14811, -7005,
- -15137, -6270, -15426, -5520, -15679, -4756, -15893, -3981,
- -16069, -3196, -16207, -2404, -16305, -1606, -16364, -804,
- /* The following is a duplication of the above but scaled up by a factor of 2.
- * This save one operation in inverse FFT inner loops */
- 32767, 0, 32729, -1608, 32610, -3212, 32413, -4808,
- 32138, -6393, 31786, -7962, 31357, -9512, 30853, -11039,
- 30274, -12540, 29622, -14010, 28899, -15447, 28106, -16846,
- 27246, -18205, 26320, -19520, 25330, -20788, 24279, -22006,
- 23170, -23170, 22006, -24279, 20788, -25330, 19520, -26320,
- 18205, -27246, 16846, -28106, 15447, -28899, 14010, -29622,
- 12540, -30274, 11039, -30853, 9512, -31357, 7962, -31786,
- 6393, -32138, 4808, -32413, 3212, -32610, 1608, -32729,
- 0, -32768, -1608, -32729, -3212, -32610, -4808, -32413,
- -6393, -32138, -7962, -31786, -9512, -31357, -11039, -30853,
- -12540, -30274, -14010, -29622, -15447, -28899, -16846, -28106,
- -18205, -27246, -19520, -26320, -20788, -25330, -22006, -24279,
- -23170, -23170, -24279, -22006, -25330, -20788, -26320, -19520,
- -27246, -18205, -28106, -16846, -28899, -15447, -29622, -14010,
- -30274, -12540, -30853, -11039, -31357, -9512, -31786, -7962,
- -32138, -6393, -32413, -4808, -32610, -3212, -32729, -1608
-};
-
-const Word16 FFT_W128[] = { // Q15
- /* part of table that is not scaled by 2 */
- 16384, 0, 16379, -402, 16364, -804, 16339, -1205,
- 16305, -1606, 16260, -2006, 16206, -2404, 16142, -2801,
- 16069, -3196, 15985, -3590, 15893, -3981, 15790, -4370,
- 15678, -4756, 15557, -5139, 15426, -5519, 15286, -5896,
- 15136, -6270, 14978, -6639, 14811, -7005, 14634, -7366,
- 14449, -7723, 14255, -8075, 14053, -8423, 13842, -8765,
- 13622, -9102, 13395, -9434, 13159, -9760, 12916, -10080,
- 12665, -10394, 12406, -10701, 12139, -11002, 11866, -11297,
- 11585, -11585, 11297, -11866, 11002, -12139, 10701, -12406,
- 10394, -12665, 10080, -12916, 9760, -13159, 9434, -13395,
- 9102, -13622, 8765, -13842, 8423, -14053, 8075, -14255,
- 7723, -14449, 7366, -14634, 7005, -14811, 6639, -14978,
- 6270, -15136, 5896, -15286, 5519, -15426, 5139, -15557,
- 4756, -15678, 4370, -15790, 3981, -15893, 3590, -15985,
- 3196, -16069, 2801, -16142, 2404, -16206, 2006, -16260,
- 1606, -16305, 1205, -16339, 804, -16364, 402, -16379,
- 0, -16384, -402, -16379, -804, -16364, -1205, -16339,
- -1606, -16305, -2006, -16260, -2404, -16206, -2801, -16142,
- -3196, -16069, -3590, -15985, -3981, -15893, -4370, -15790,
- -4756, -15678, -5139, -15557, -5519, -15426, -5896, -15286,
- -6270, -15136, -6639, -14978, -7005, -14811, -7366, -14634,
- -7723, -14449, -8075, -14255, -8423, -14053, -8765, -13842,
- -9102, -13622, -9434, -13395, -9760, -13159, -10080, -12916,
- -10394, -12665, -10701, -12406, -11002, -12139, -11297, -11866,
- -11585, -11585, -11866, -11297, -12139, -11002, -12406, -10701,
- -12665, -10394, -12916, -10080, -13159, -9760, -13395, -9434,
- -13622, -9102, -13842, -8765, -14053, -8423, -14255, -8075,
- -14449, -7723, -14634, -7366, -14811, -7005, -14978, -6639,
- -15136, -6270, -15286, -5896, -15426, -5519, -15557, -5139,
- -15678, -4756, -15790, -4370, -15893, -3981, -15985, -3590,
- -16069, -3196, -16142, -2801, -16206, -2404, -16260, -2006,
- -16305, -1606, -16339, -1205, -16364, -804, -16379, -402,
- /* part of table that is scaled by 2 (this save one operation in FFT inner loops) */
- 32767, 0, 32758, -804, 32728, -1608, 32678, -2410,
- 32610, -3212, 32520, -4012, 32412, -4808, 32284, -5602,
- 32138, -6392, 31970, -7180, 31786, -7962, 31580, -8740,
- 31356, -9512, 31114, -10278, 30852, -11038, 30572, -11792,
- 30272, -12540, 29956, -13278, 29622, -14010, 29268, -14732,
- 28898, -15446, 28510, -16150, 28106, -16846, 27684, -17530,
- 27244, -18204, 26790, -18868, 26318, -19520, 25832, -20160,
- 25330, -20788, 24812, -21402, 24278, -22004, 23732, -22594,
- 23170, -23170, 22594, -23732, 22004, -24278, 21402, -24812,
- 20788, -25330, 20160, -25832, 19520, -26318, 18868, -26790,
- 18204, -27244, 17530, -27684, 16846, -28106, 16150, -28510,
- 15446, -28898, 14732, -29268, 14010, -29622, 13278, -29956,
- 12540, -30272, 11792, -30572, 11038, -30852, 10278, -31114,
- 9512, -31356, 8740, -31580, 7962, -31786, 7180, -31970,
- 6392, -32138, 5602, -32284, 4808, -32412, 4012, -32520,
- 3212, -32610, 2410, -32678, 1608, -32728, 804, -32758,
- 0, -32768, -804, -32758, -1608, -32728, -2410, -32678,
- -3212, -32610, -4012, -32520, -4808, -32412, -5602, -32284,
- -6392, -32138, -7180, -31970, -7962, -31786, -8740, -31580,
- -9512, -31356, -10278, -31114, -11038, -30852, -11792, -30572,
- -12540, -30272, -13278, -29956, -14010, -29622, -14732, -29268,
- -15446, -28898, -16150, -28510, -16846, -28106, -17530, -27684,
- -18204, -27244, -18868, -26790, -19520, -26318, -20160, -25832,
- -20788, -25330, -21402, -24812, -22004, -24278, -22594, -23732,
- -23170, -23170, -23732, -22594, -24278, -22004, -24812, -21402,
- -25330, -20788, -25832, -20160, -26318, -19520, -26790, -18868,
- -27244, -18204, -27684, -17530, -28106, -16846, -28510, -16150,
- -28898, -15446, -29268, -14732, -29622, -14010, -29956, -13278,
- -30272, -12540, -30572, -11792, -30852, -11038, -31114, -10278,
- -31356, -9512, -31580, -8740, -31786, -7962, -31970, -7180,
- -32138, -6392, -32284, -5602, -32412, -4808, -32520, -4012,
- -32610, -3212, -32678, -2410, -32728, -1608, -32758, -804
-};
-
-const Word16 FFT_W256[( 256 * 2 ) * 2] = { // Q15
- /* Each adjacent pair represents the real and imaginary part of a complex number: */
- /* W = exp{-j*(PI*n/256)} = cos(PI*n/256)*16384 -j*sin(PI*n/256)*16384 for n=0, 1, ..., 255. */
- 16384, 0, 16383, -201, 16379, -402, 16373, -603,
- 16364, -804, 16353, -1005, 16340, -1205, 16324, -1406,
- 16305, -1606, 16284, -1806, 16261, -2006, 16235, -2205,
- 16207, -2404, 16176, -2603, 16143, -2801, 16107, -2999,
- 16069, -3196, 16029, -3393, 15986, -3590, 15941, -3786,
- 15893, -3981, 15843, -4176, 15791, -4370, 15736, -4563,
- 15679, -4756, 15619, -4948, 15557, -5139, 15493, -5330,
- 15426, -5520, 15357, -5708, 15286, -5897, 15213, -6084,
- 15137, -6270, 15059, -6455, 14978, -6639, 14896, -6823,
- 14811, -7005, 14724, -7186, 14635, -7366, 14543, -7545,
- 14449, -7723, 14354, -7900, 14256, -8076, 14155, -8250,
- 14053, -8423, 13949, -8595, 13842, -8765, 13733, -8935,
- 13623, -9102, 13510, -9269, 13395, -9434, 13279, -9598,
- 13160, -9760, 13039, -9921, 12916, -10080, 12792, -10238,
- 12665, -10394, 12537, -10549, 12406, -10702, 12274, -10853,
- 12140, -11003, 12004, -11151, 11866, -11297, 11727, -11442,
- 11585, -11585, 11442, -11727, 11297, -11866, 11151, -12004,
- 11003, -12140, 10853, -12274, 10702, -12406, 10549, -12537,
- 10394, -12665, 10238, -12792, 10080, -12916, 9921, -13039,
- 9760, -13160, 9598, -13279, 9434, -13395, 9269, -13510,
- 9102, -13623, 8935, -13733, 8765, -13842, 8595, -13949,
- 8423, -14053, 8250, -14155, 8076, -14256, 7900, -14354,
- 7723, -14449, 7545, -14543, 7366, -14635, 7186, -14724,
- 7005, -14811, 6823, -14896, 6639, -14978, 6455, -15059,
- 6270, -15137, 6084, -15213, 5897, -15286, 5708, -15357,
- 5520, -15426, 5330, -15493, 5139, -15557, 4948, -15619,
- 4756, -15679, 4563, -15736, 4370, -15791, 4176, -15843,
- 3981, -15893, 3786, -15941, 3590, -15986, 3393, -16029,
- 3196, -16069, 2999, -16107, 2801, -16143, 2603, -16176,
- 2404, -16207, 2205, -16235, 2006, -16261, 1806, -16284,
- 1606, -16305, 1406, -16324, 1205, -16340, 1005, -16353,
- 804, -16364, 603, -16373, 402, -16379, 201, -16383,
- 0, -16384, -201, -16383, -402, -16379, -603, -16373,
- -804, -16364, -1005, -16353, -1205, -16340, -1406, -16324,
- -1606, -16305, -1806, -16284, -2006, -16261, -2205, -16235,
- -2404, -16207, -2603, -16176, -2801, -16143, -2999, -16107,
- -3196, -16069, -3393, -16029, -3590, -15986, -3786, -15941,
- -3981, -15893, -4176, -15843, -4370, -15791, -4563, -15736,
- -4756, -15679, -4948, -15619, -5139, -15557, -5330, -15493,
- -5520, -15426, -5708, -15357, -5897, -15286, -6084, -15213,
- -6270, -15137, -6455, -15059, -6639, -14978, -6823, -14896,
- -7005, -14811, -7186, -14724, -7366, -14635, -7545, -14543,
- -7723, -14449, -7900, -14354, -8076, -14256, -8250, -14155,
- -8423, -14053, -8595, -13949, -8765, -13842, -8935, -13733,
- -9102, -13623, -9269, -13510, -9434, -13395, -9598, -13279,
- -9760, -13160, -9921, -13039, -10080, -12916, -10238, -12792,
- -10394, -12665, -10549, -12537, -10702, -12406, -10853, -12274,
- -11003, -12140, -11151, -12004, -11297, -11866, -11442, -11727,
- -11585, -11585, -11727, -11442, -11866, -11297, -12004, -11151,
- -12140, -11003, -12274, -10853, -12406, -10702, -12537, -10549,
- -12665, -10394, -12792, -10238, -12916, -10080, -13039, -9921,
- -13160, -9760, -13279, -9598, -13395, -9434, -13510, -9269,
- -13623, -9102, -13733, -8935, -13842, -8765, -13949, -8595,
- -14053, -8423, -14155, -8250, -14256, -8076, -14354, -7900,
- -14449, -7723, -14543, -7545, -14635, -7366, -14724, -7186,
- -14811, -7005, -14896, -6823, -14978, -6639, -15059, -6455,
- -15137, -6270, -15213, -6084, -15286, -5897, -15357, -5708,
- -15426, -5520, -15493, -5330, -15557, -5139, -15619, -4948,
- -15679, -4756, -15736, -4563, -15791, -4370, -15843, -4176,
- -15893, -3981, -15941, -3786, -15986, -3590, -16029, -3393,
- -16069, -3196, -16107, -2999, -16143, -2801, -16176, -2603,
- -16207, -2404, -16235, -2205, -16261, -2006, -16284, -1806,
- -16305, -1606, -16324, -1406, -16340, -1205, -16353, -1005,
- -16364, -804, -16373, -603, -16379, -402, -16383, -201,
-
- /* The following is a duplication of the above but scaled up by a factor of 2.
- * This save one operation in inverse FFT inner loops */
- 32767, 0, 32766, -402, 32758, -804, 32746, -1206,
- 32729, -1608, 32706, -2009, 32679, -2411, 32647, -2811,
- 32610, -3212, 32568, -3612, 32522, -4011, 32470, -4410,
- 32413, -4808, 32352, -5205, 32286, -5602, 32214, -5998,
- 32138, -6393, 32058, -6787, 31972, -7180, 31881, -7571,
- 31786, -7962, 31686, -8351, 31581, -8740, 31471, -9127,
- 31357, -9512, 31238, -9896, 31114, -10279, 30986, -10660,
- 30853, -11039, 30715, -11417, 30572, -11793, 30425, -12167,
- 30274, -12540, 30118, -12910, 29957, -13279, 29792, -13646,
- 29622, -14010, 29448, -14373, 29269, -14733, 29086, -15091,
- 28899, -15447, 28707, -15800, 28511, -16151, 28311, -16500,
- 28106, -16846, 27897, -17190, 27684, -17531, 27467, -17869,
- 27246, -18205, 27020, -18538, 26791, -18868, 26557, -19195,
- 26320, -19520, 26078, -19841, 25833, -20160, 25583, -20475,
- 25330, -20788, 25073, -21097, 24812, -21403, 24548, -21706,
- 24279, -22006, 24008, -22302, 23732, -22595, 23453, -22884,
- 23170, -23170, 22884, -23453, 22595, -23732, 22302, -24008,
- 22006, -24279, 21706, -24548, 21403, -24812, 21097, -25073,
- 20788, -25330, 20475, -25583, 20160, -25833, 19841, -26078,
- 19520, -26320, 19195, -26557, 18868, -26791, 18538, -27020,
- 18205, -27246, 17869, -27467, 17531, -27684, 17190, -27897,
- 16846, -28106, 16500, -28311, 16151, -28511, 15800, -28707,
- 15447, -28899, 15091, -29086, 14733, -29269, 14373, -29448,
- 14010, -29622, 13646, -29792, 13279, -29957, 12910, -30118,
- 12540, -30274, 12167, -30425, 11793, -30572, 11417, -30715,
- 11039, -30853, 10660, -30986, 10279, -31114, 9896, -31238,
- 9512, -31357, 9127, -31471, 8740, -31581, 8351, -31686,
- 7962, -31786, 7571, -31881, 7180, -31972, 6787, -32058,
- 6393, -32138, 5998, -32214, 5602, -32286, 5205, -32352,
- 4808, -32413, 4410, -32470, 4011, -32522, 3612, -32568,
- 3212, -32610, 2811, -32647, 2411, -32679, 2009, -32706,
- 1608, -32729, 1206, -32746, 804, -32758, 402, -32766,
- 0, -32768, -402, -32766, -804, -32758, -1206, -32746,
- -1608, -32729, -2009, -32706, -2411, -32679, -2811, -32647,
- -3212, -32610, -3612, -32568, -4011, -32522, -4410, -32470,
- -4808, -32413, -5205, -32352, -5602, -32286, -5998, -32214,
- -6393, -32138, -6787, -32058, -7180, -31972, -7571, -31881,
- -7962, -31786, -8351, -31686, -8740, -31581, -9127, -31471,
- -9512, -31357, -9896, -31238, -10279, -31114, -10660, -30986,
- -11039, -30853, -11417, -30715, -11793, -30572, -12167, -30425,
- -12540, -30274, -12910, -30118, -13279, -29957, -13646, -29792,
- -14010, -29622, -14373, -29448, -14733, -29269, -15091, -29086,
- -15447, -28899, -15800, -28707, -16151, -28511, -16500, -28311,
- -16846, -28106, -17190, -27897, -17531, -27684, -17869, -27467,
- -18205, -27246, -18538, -27020, -18868, -26791, -19195, -26557,
- -19520, -26320, -19841, -26078, -20160, -25833, -20475, -25583,
- -20788, -25330, -21097, -25073, -21403, -24812, -21706, -24548,
- -22006, -24279, -22302, -24008, -22595, -23732, -22884, -23453,
- -23170, -23170, -23453, -22884, -23732, -22595, -24008, -22302,
- -24279, -22006, -24548, -21706, -24812, -21403, -25073, -21097,
- -25330, -20788, -25583, -20475, -25833, -20160, -26078, -19841,
- -26320, -19520, -26557, -19195, -26791, -18868, -27020, -18538,
- -27246, -18205, -27467, -17869, -27684, -17531, -27897, -17190,
- -28106, -16846, -28311, -16500, -28511, -16151, -28707, -15800,
- -28899, -15447, -29086, -15091, -29269, -14733, -29448, -14373,
- -29622, -14010, -29792, -13646, -29957, -13279, -30118, -12910,
- -30274, -12540, -30425, -12167, -30572, -11793, -30715, -11417,
- -30853, -11039, -30986, -10660, -31114, -10279, -31238, -9896,
- -31357, -9512, -31471, -9127, -31581, -8740, -31686, -8351,
- -31786, -7962, -31881, -7571, -31972, -7180, -32058, -6787,
- -32138, -6393, -32214, -5998, -32286, -5602, -32352, -5205,
- -32413, -4808, -32470, -4410, -32522, -4011, -32568, -3612,
- -32610, -3212, -32647, -2811, -32679, -2411, -32706, -2009,
- -32729, -1608, -32746, -1206, -32758, -804, -32766, -402
-};
-
-const Word16 FFT_W512[( 512 * 2 ) * 2] = { // Q15
- 16384, 0, 16384, -101, 16383, -201, 16381, -302,
- 16379, -402, 16376, -503, 16373, -603, 16369, -704,
- 16364, -804, 16359, -904, 16353, -1005, 16347, -1105,
- 16340, -1205, 16332, -1306, 16324, -1406, 16315, -1506,
- 16305, -1606, 16295, -1706, 16284, -1806, 16273, -1906,
- 16261, -2006, 16248, -2105, 16235, -2205, 16221, -2305,
- 16207, -2404, 16192, -2503, 16176, -2603, 16160, -2702,
- 16143, -2801, 16125, -2900, 16107, -2999, 16088, -3098,
- 16069, -3196, 16049, -3295, 16029, -3393, 16008, -3492,
- 15986, -3590, 15964, -3688, 15941, -3786, 15917, -3883,
- 15893, -3981, 15868, -4078, 15843, -4176, 15817, -4273,
- 15791, -4370, 15763, -4467, 15736, -4563, 15707, -4660,
- 15679, -4756, 15649, -4852, 15619, -4948, 15588, -5044,
- 15557, -5139, 15525, -5235, 15493, -5330, 15460, -5425,
- 15426, -5520, 15392, -5614, 15357, -5708, 15322, -5803,
- 15286, -5897, 15250, -5990, 15213, -6084, 15175, -6177,
- 15137, -6270, 15098, -6363, 15059, -6455, 15019, -6547,
- 14978, -6639, 14937, -6731, 14896, -6823, 14854, -6914,
- 14811, -7005, 14768, -7096, 14724, -7186, 14680, -7276,
- 14635, -7366, 14589, -7456, 14543, -7545, 14497, -7635,
- 14449, -7723, 14402, -7812, 14354, -7900, 14305, -7988,
- 14256, -8076, 14206, -8163, 14155, -8250, 14104, -8337,
- 14053, -8423, 14001, -8509, 13949, -8595, 13896, -8680,
- 13842, -8765, 13788, -8850, 13733, -8935, 13678, -9019,
- 13623, -9102, 13567, -9186, 13510, -9269, 13453, -9352,
- 13395, -9434, 13337, -9516, 13279, -9598, 13219, -9679,
- 13160, -9760, 13100, -9841, 13039, -9921, 12978, -10001,
- 12916, -10080, 12854, -10159, 12792, -10238, 12729, -10316,
- 12665, -10394, 12601, -10471, 12537, -10549, 12472, -10625,
- 12406, -10702, 12340, -10778, 12274, -10853, 12207, -10928,
- 12140, -11003, 12072, -11077, 12004, -11151, 11935, -11224,
- 11866, -11297, 11797, -11370, 11727, -11442, 11656, -11514,
- 11585, -11585, 11514, -11656, 11442, -11727, 11370, -11797,
- 11297, -11866, 11224, -11935, 11151, -12004, 11077, -12072,
- 11003, -12140, 10928, -12207, 10853, -12274, 10778, -12340,
- 10702, -12406, 10625, -12472, 10549, -12537, 10471, -12601,
- 10394, -12665, 10316, -12729, 10238, -12792, 10159, -12854,
- 10080, -12916, 10001, -12978, 9921, -13039, 9841, -13100,
- 9760, -13160, 9679, -13219, 9598, -13279, 9516, -13337,
- 9434, -13395, 9352, -13453, 9269, -13510, 9186, -13567,
- 9102, -13623, 9019, -13678, 8935, -13733, 8850, -13788,
- 8765, -13842, 8680, -13896, 8595, -13949, 8509, -14001,
- 8423, -14053, 8337, -14104, 8250, -14155, 8163, -14206,
- 8076, -14256, 7988, -14305, 7900, -14354, 7812, -14402,
- 7723, -14449, 7635, -14497, 7545, -14543, 7456, -14589,
- 7366, -14635, 7276, -14680, 7186, -14724, 7096, -14768,
- 7005, -14811, 6914, -14854, 6823, -14896, 6731, -14937,
- 6639, -14978, 6547, -15019, 6455, -15059, 6363, -15098,
- 6270, -15137, 6177, -15175, 6084, -15213, 5990, -15250,
- 5897, -15286, 5803, -15322, 5708, -15357, 5614, -15392,
- 5520, -15426, 5425, -15460, 5330, -15493, 5235, -15525,
- 5139, -15557, 5044, -15588, 4948, -15619, 4852, -15649,
- 4756, -15679, 4660, -15707, 4563, -15736, 4467, -15763,
- 4370, -15791, 4273, -15817, 4176, -15843, 4078, -15868,
- 3981, -15893, 3883, -15917, 3786, -15941, 3688, -15964,
- 3590, -15986, 3492, -16008, 3393, -16029, 3295, -16049,
- 3196, -16069, 3098, -16088, 2999, -16107, 2900, -16125,
- 2801, -16143, 2702, -16160, 2603, -16176, 2503, -16192,
- 2404, -16207, 2305, -16221, 2205, -16235, 2105, -16248,
- 2006, -16261, 1906, -16273, 1806, -16284, 1706, -16295,
- 1606, -16305, 1506, -16315, 1406, -16324, 1306, -16332,
- 1205, -16340, 1105, -16347, 1005, -16353, 904, -16359,
- 804, -16364, 703, -16369, 603, -16373, 503, -16376,
- 402, -16379, 302, -16381, 201, -16383, 101, -16384,
- 0, -16384, -101, -16384, -201, -16383, -302, -16381,
- -402, -16379, -503, -16376, -603, -16373, -704, -16369,
- -804, -16364, -904, -16359, -1005, -16353, -1105, -16347,
- -1205, -16340, -1306, -16332, -1406, -16324, -1506, -16315,
- -1606, -16305, -1706, -16295, -1806, -16284, -1906, -16273,
- -2006, -16261, -2105, -16248, -2205, -16235, -2305, -16221,
- -2404, -16207, -2503, -16192, -2603, -16176, -2702, -16160,
- -2801, -16143, -2900, -16125, -2999, -16107, -3098, -16088,
- -3196, -16069, -3295, -16049, -3393, -16029, -3492, -16008,
- -3590, -15986, -3688, -15964, -3786, -15941, -3883, -15917,
- -3981, -15893, -4078, -15868, -4176, -15843, -4273, -15817,
- -4370, -15791, -4467, -15763, -4563, -15736, -4660, -15707,
- -4756, -15679, -4852, -15649, -4948, -15619, -5044, -15588,
- -5139, -15557, -5235, -15525, -5330, -15493, -5425, -15460,
- -5520, -15426, -5614, -15392, -5708, -15357, -5803, -15322,
- -5897, -15286, -5990, -15250, -6084, -15213, -6177, -15175,
- -6270, -15137, -6363, -15098, -6455, -15059, -6547, -15019,
- -6639, -14978, -6731, -14937, -6823, -14896, -6914, -14854,
- -7005, -14811, -7096, -14768, -7186, -14724, -7276, -14680,
- -7366, -14635, -7456, -14589, -7545, -14543, -7635, -14497,
- -7723, -14449, -7812, -14402, -7900, -14354, -7988, -14305,
- -8076, -14256, -8163, -14206, -8250, -14155, -8337, -14104,
- -8423, -14053, -8509, -14001, -8595, -13949, -8680, -13896,
- -8765, -13842, -8850, -13788, -8935, -13733, -9019, -13678,
- -9102, -13623, -9186, -13567, -9269, -13510, -9352, -13453,
- -9434, -13395, -9516, -13337, -9598, -13279, -9679, -13219,
- -9760, -13160, -9841, -13100, -9921, -13039, -10001, -12978,
- -10080, -12916, -10159, -12854, -10238, -12792, -10316, -12729,
- -10394, -12665, -10471, -12601, -10549, -12537, -10625, -12472,
- -10702, -12406, -10778, -12340, -10853, -12274, -10928, -12207,
- -11003, -12140, -11077, -12072, -11151, -12004, -11224, -11935,
- -11297, -11866, -11370, -11797, -11442, -11727, -11514, -11656,
- -11585, -11585, -11656, -11514, -11727, -11442, -11797, -11370,
- -11866, -11297, -11935, -11224, -12004, -11151, -12072, -11077,
- -12140, -11003, -12207, -10928, -12274, -10853, -12340, -10778,
- -12406, -10702, -12472, -10625, -12537, -10549, -12601, -10471,
- -12665, -10394, -12729, -10316, -12792, -10238, -12854, -10159,
- -12916, -10080, -12978, -10001, -13039, -9921, -13100, -9840,
- -13160, -9760, -13219, -9679, -13279, -9598, -13337, -9516,
- -13395, -9434, -13453, -9352, -13510, -9269, -13567, -9186,
- -13623, -9102, -13678, -9019, -13733, -8935, -13788, -8850,
- -13842, -8765, -13896, -8680, -13949, -8595, -14001, -8509,
- -14053, -8423, -14104, -8337, -14155, -8250, -14206, -8163,
- -14256, -8076, -14305, -7988, -14354, -7900, -14402, -7812,
- -14449, -7723, -14497, -7635, -14543, -7545, -14589, -7456,
- -14635, -7366, -14680, -7276, -14724, -7186, -14768, -7096,
- -14811, -7005, -14854, -6914, -14896, -6823, -14937, -6731,
- -14978, -6639, -15019, -6547, -15059, -6455, -15098, -6363,
- -15137, -6270, -15175, -6177, -15213, -6084, -15250, -5990,
- -15286, -5897, -15322, -5803, -15357, -5708, -15392, -5614,
- -15426, -5520, -15460, -5425, -15493, -5330, -15525, -5235,
- -15557, -5139, -15588, -5044, -15619, -4948, -15649, -4852,
- -15679, -4756, -15707, -4660, -15736, -4563, -15763, -4467,
- -15791, -4370, -15817, -4273, -15843, -4176, -15868, -4078,
- -15893, -3981, -15917, -3883, -15941, -3786, -15964, -3688,
- -15986, -3590, -16008, -3492, -16029, -3393, -16049, -3295,
- -16069, -3196, -16088, -3098, -16107, -2999, -16125, -2900,
- -16143, -2801, -16160, -2702, -16176, -2603, -16192, -2503,
- -16207, -2404, -16221, -2305, -16235, -2205, -16248, -2105,
- -16261, -2006, -16273, -1906, -16284, -1806, -16295, -1706,
- -16305, -1606, -16315, -1506, -16324, -1406, -16332, -1306,
- -16340, -1205, -16347, -1105, -16353, -1005, -16359, -904,
- -16364, -804, -16369, -703, -16373, -603, -16376, -503,
- -16379, -402, -16381, -302, -16383, -201, -16384, -101,
- /* The following is a duplication of the above but scaled up by a factor of 2.
- * This save one operation in inverse FFT inner loops */
- 32767, 0, 32767, -201, 32766, -402, 32762, -603,
- 32758, -804, 32753, -1005, 32746, -1206, 32738, -1407,
- 32729, -1608, 32718, -1809, 32706, -2009, 32693, -2210,
- 32679, -2411, 32664, -2611, 32647, -2811, 32629, -3012,
- 32610, -3212, 32590, -3412, 32568, -3612, 32546, -3812,
- 32522, -4011, 32496, -4211, 32470, -4410, 32442, -4609,
- 32413, -4808, 32383, -5007, 32352, -5205, 32319, -5404,
- 32286, -5602, 32251, -5800, 32214, -5998, 32177, -6195,
- 32138, -6393, 32099, -6590, 32058, -6787, 32015, -6983,
- 31972, -7180, 31927, -7376, 31881, -7571, 31834, -7767,
- 31786, -7962, 31737, -8157, 31686, -8351, 31634, -8546,
- 31581, -8740, 31527, -8933, 31471, -9127, 31415, -9319,
- 31357, -9512, 31298, -9704, 31238, -9896, 31177, -10088,
- 31114, -10279, 31050, -10469, 30986, -10660, 30920, -10850,
- 30853, -11039, 30784, -11228, 30715, -11417, 30644, -11605,
- 30572, -11793, 30499, -11980, 30425, -12167, 30350, -12354,
- 30274, -12540, 30196, -12725, 30118, -12910, 30038, -13095,
- 29957, -13279, 29875, -13463, 29792, -13646, 29707, -13828,
- 29622, -14010, 29535, -14192, 29448, -14373, 29359, -14553,
- 29269, -14733, 29178, -14912, 29086, -15091, 28993, -15269,
- 28899, -15447, 28803, -15624, 28707, -15800, 28610, -15976,
- 28511, -16151, 28411, -16326, 28311, -16500, 28209, -16673,
- 28106, -16846, 28002, -17018, 27897, -17190, 27791, -17361,
- 27684, -17531, 27576, -17700, 27467, -17869, 27357, -18037,
- 27246, -18205, 27133, -18372, 27020, -18538, 26906, -18703,
- 26791, -18868, 26674, -19032, 26557, -19195, 26439, -19358,
- 26320, -19520, 26199, -19681, 26078, -19841, 25956, -20001,
- 25833, -20160, 25708, -20318, 25583, -20475, 25457, -20632,
- 25330, -20788, 25202, -20943, 25073, -21097, 24943, -21251,
- 24812, -21403, 24680, -21555, 24548, -21706, 24414, -21856,
- 24279, -22006, 24144, -22154, 24008, -22302, 23870, -22449,
- 23732, -22595, 23593, -22740, 23453, -22884, 23312, -23028,
- 23170, -23170, 23028, -23312, 22884, -23453, 22740, -23593,
- 22595, -23732, 22449, -23870, 22302, -24008, 22154, -24144,
- 22006, -24279, 21856, -24414, 21706, -24548, 21555, -24680,
- 21403, -24812, 21251, -24943, 21097, -25073, 20943, -25202,
- 20788, -25330, 20632, -25457, 20475, -25583, 20318, -25708,
- 20160, -25833, 20001, -25956, 19841, -26078, 19681, -26199,
- 19520, -26320, 19358, -26439, 19195, -26557, 19032, -26674,
- 18868, -26791, 18703, -26906, 18538, -27020, 18372, -27133,
- 18205, -27246, 18037, -27357, 17869, -27467, 17700, -27576,
- 17531, -27684, 17361, -27791, 17190, -27897, 17018, -28002,
- 16846, -28106, 16673, -28209, 16500, -28311, 16326, -28411,
- 16151, -28511, 15976, -28610, 15800, -28707, 15624, -28803,
- 15447, -28899, 15269, -28993, 15091, -29086, 14912, -29178,
- 14733, -29269, 14553, -29359, 14373, -29448, 14192, -29535,
- 14010, -29622, 13828, -29707, 13646, -29792, 13463, -29875,
- 13279, -29957, 13095, -30038, 12910, -30118, 12725, -30196,
- 12540, -30274, 12354, -30350, 12167, -30425, 11980, -30499,
- 11793, -30572, 11605, -30644, 11417, -30715, 11228, -30784,
- 11039, -30853, 10850, -30920, 10660, -30986, 10469, -31050,
- 10279, -31114, 10088, -31177, 9896, -31238, 9704, -31298,
- 9512, -31357, 9319, -31415, 9127, -31471, 8933, -31527,
- 8740, -31581, 8546, -31634, 8351, -31686, 8157, -31737,
- 7962, -31786, 7767, -31834, 7571, -31881, 7376, -31927,
- 7180, -31972, 6983, -32015, 6787, -32058, 6590, -32099,
- 6393, -32138, 6195, -32177, 5998, -32214, 5800, -32251,
- 5602, -32286, 5404, -32319, 5205, -32352, 5007, -32383,
- 4808, -32413, 4609, -32442, 4410, -32470, 4211, -32496,
- 4011, -32522, 3812, -32546, 3612, -32568, 3412, -32590,
- 3212, -32610, 3012, -32629, 2811, -32647, 2611, -32664,
- 2411, -32679, 2210, -32693, 2009, -32706, 1809, -32718,
- 1608, -32729, 1407, -32738, 1206, -32746, 1005, -32753,
- 804, -32758, 603, -32762, 402, -32766, 201, -32767,
- 0, -32768, -201, -32767, -402, -32766, -603, -32762,
- -804, -32758, -1005, -32753, -1206, -32746, -1407, -32738,
- -1608, -32729, -1809, -32718, -2009, -32706, -2210, -32693,
- -2411, -32679, -2611, -32664, -2811, -32647, -3012, -32629,
- -3212, -32610, -3412, -32590, -3612, -32568, -3812, -32546,
- -4011, -32522, -4211, -32496, -4410, -32470, -4609, -32442,
- -4808, -32413, -5007, -32383, -5205, -32352, -5404, -32319,
- -5602, -32286, -5800, -32251, -5998, -32214, -6195, -32177,
- -6393, -32138, -6590, -32099, -6787, -32058, -6983, -32015,
- -7180, -31972, -7376, -31927, -7571, -31881, -7767, -31834,
- -7962, -31786, -8157, -31737, -8351, -31686, -8546, -31634,
- -8740, -31581, -8933, -31527, -9127, -31471, -9319, -31415,
- -9512, -31357, -9704, -31298, -9896, -31238, -10088, -31177,
- -10279, -31114, -10469, -31050, -10660, -30986, -10850, -30920,
- -11039, -30853, -11228, -30784, -11417, -30715, -11605, -30644,
- -11793, -30572, -11980, -30499, -12167, -30425, -12354, -30350,
- -12540, -30274, -12725, -30196, -12910, -30118, -13095, -30038,
- -13279, -29957, -13463, -29875, -13646, -29792, -13828, -29707,
- -14010, -29622, -14192, -29535, -14373, -29448, -14553, -29359,
- -14733, -29269, -14912, -29178, -15091, -29086, -15269, -28993,
- -15447, -28899, -15624, -28803, -15800, -28707, -15976, -28610,
- -16151, -28511, -16326, -28411, -16500, -28311, -16673, -28209,
- -16846, -28106, -17018, -28002, -17190, -27897, -17361, -27791,
- -17531, -27684, -17700, -27576, -17869, -27467, -18037, -27357,
- -18205, -27246, -18372, -27133, -18538, -27020, -18703, -26906,
- -18868, -26791, -19032, -26674, -19195, -26557, -19358, -26439,
- -19520, -26320, -19681, -26199, -19841, -26078, -20001, -25956,
- -20160, -25833, -20318, -25708, -20475, -25583, -20632, -25457,
- -20788, -25330, -20943, -25202, -21097, -25073, -21251, -24943,
- -21403, -24812, -21555, -24680, -21706, -24548, -21856, -24414,
- -22006, -24279, -22154, -24144, -22302, -24008, -22449, -23870,
- -22595, -23732, -22740, -23593, -22884, -23453, -23028, -23312,
- -23170, -23170, -23312, -23028, -23453, -22884, -23593, -22740,
- -23732, -22595, -23870, -22449, -24008, -22302, -24144, -22154,
- -24279, -22006, -24414, -21856, -24548, -21706, -24680, -21555,
- -24812, -21403, -24943, -21251, -25073, -21097, -25202, -20943,
- -25330, -20788, -25457, -20632, -25583, -20475, -25708, -20318,
- -25833, -20160, -25956, -20001, -26078, -19841, -26199, -19681,
- -26320, -19520, -26439, -19358, -26557, -19195, -26674, -19032,
- -26791, -18868, -26906, -18703, -27020, -18538, -27133, -18372,
- -27246, -18205, -27357, -18037, -27467, -17869, -27576, -17700,
- -27684, -17531, -27791, -17361, -27897, -17190, -28002, -17018,
- -28106, -16846, -28209, -16673, -28311, -16500, -28411, -16326,
- -28511, -16151, -28610, -15976, -28707, -15800, -28803, -15624,
- -28899, -15447, -28993, -15269, -29086, -15091, -29178, -14912,
- -29269, -14733, -29359, -14553, -29448, -14373, -29535, -14192,
- -29622, -14010, -29707, -13828, -29792, -13646, -29875, -13463,
- -29957, -13279, -30038, -13095, -30118, -12910, -30196, -12725,
- -30274, -12540, -30350, -12354, -30425, -12167, -30499, -11980,
- -30572, -11793, -30644, -11605, -30715, -11417, -30784, -11228,
- -30853, -11039, -30920, -10850, -30986, -10660, -31050, -10469,
- -31114, -10279, -31177, -10088, -31238, -9896, -31298, -9704,
- -31357, -9512, -31415, -9319, -31471, -9127, -31527, -8933,
- -31581, -8740, -31634, -8546, -31686, -8351, -31737, -8157,
- -31786, -7962, -31834, -7767, -31881, -7571, -31927, -7376,
- -31972, -7180, -32015, -6983, -32058, -6787, -32099, -6590,
- -32138, -6393, -32177, -6195, -32214, -5998, -32251, -5800,
- -32286, -5602, -32319, -5404, -32352, -5205, -32383, -5007,
- -32413, -4808, -32442, -4609, -32470, -4410, -32496, -4211,
- -32522, -4011, -32546, -3812, -32568, -3612, -32590, -3412,
- -32610, -3212, -32629, -3012, -32647, -2811, -32664, -2611,
- -32679, -2411, -32693, -2210, -32706, -2009, -32718, -1809,
- -32729, -1608, -32738, -1407, -32746, -1206, -32753, -1005,
- -32758, -804, -32762, -603, -32766, -402, -32767, -201
-};
-
-const Word16 FFT_REORDER_1024[512] = {
- 0, 512, 256, 768, 128, 640, 384, 896,
- 64, 576, 320, 832, 192, 704, 448, 960,
- 32, 544, 288, 800, 160, 672, 416, 928,
- 96, 608, 352, 864, 224, 736, 480, 992,
- 16, 528, 272, 784, 144, 656, 400, 912,
- 80, 592, 336, 848, 208, 720, 464, 976,
- 48, 560, 304, 816, 176, 688, 432, 944,
- 112, 624, 368, 880, 240, 752, 496, 1008,
- 8, 520, 264, 776, 136, 648, 392, 904,
- 72, 584, 328, 840, 200, 712, 456, 968,
- 40, 552, 296, 808, 168, 680, 424, 936,
- 104, 616, 360, 872, 232, 744, 488, 1000,
- 24, 536, 280, 792, 152, 664, 408, 920,
- 88, 600, 344, 856, 216, 728, 472, 984,
- 56, 568, 312, 824, 184, 696, 440, 952,
- 120, 632, 376, 888, 248, 760, 504, 1016,
- 4, 516, 260, 772, 132, 644, 388, 900,
- 68, 580, 324, 836, 196, 708, 452, 964,
- 36, 548, 292, 804, 164, 676, 420, 932,
- 100, 612, 356, 868, 228, 740, 484, 996,
- 20, 532, 276, 788, 148, 660, 404, 916,
- 84, 596, 340, 852, 212, 724, 468, 980,
- 52, 564, 308, 820, 180, 692, 436, 948,
- 116, 628, 372, 884, 244, 756, 500, 1012,
- 12, 524, 268, 780, 140, 652, 396, 908,
- 76, 588, 332, 844, 204, 716, 460, 972,
- 44, 556, 300, 812, 172, 684, 428, 940,
- 108, 620, 364, 876, 236, 748, 492, 1004,
- 28, 540, 284, 796, 156, 668, 412, 924,
- 92, 604, 348, 860, 220, 732, 476, 988,
- 60, 572, 316, 828, 188, 700, 444, 956,
- 124, 636, 380, 892, 252, 764, 508, 1020,
- 2, 514, 258, 770, 130, 642, 386, 898,
- 66, 578, 322, 834, 194, 706, 450, 962,
- 34, 546, 290, 802, 162, 674, 418, 930,
- 98, 610, 354, 866, 226, 738, 482, 994,
- 18, 530, 274, 786, 146, 658, 402, 914,
- 82, 594, 338, 850, 210, 722, 466, 978,
- 50, 562, 306, 818, 178, 690, 434, 946,
- 114, 626, 370, 882, 242, 754, 498, 1010,
- 10, 522, 266, 778, 138, 650, 394, 906,
- 74, 586, 330, 842, 202, 714, 458, 970,
- 42, 554, 298, 810, 170, 682, 426, 938,
- 106, 618, 362, 874, 234, 746, 490, 1002,
- 26, 538, 282, 794, 154, 666, 410, 922,
- 90, 602, 346, 858, 218, 730, 474, 986,
- 58, 570, 314, 826, 186, 698, 442, 954,
- 122, 634, 378, 890, 250, 762, 506, 1018,
- 6, 518, 262, 774, 134, 646, 390, 902,
- 70, 582, 326, 838, 198, 710, 454, 966,
- 38, 550, 294, 806, 166, 678, 422, 934,
- 102, 614, 358, 870, 230, 742, 486, 998,
- 22, 534, 278, 790, 150, 662, 406, 918,
- 86, 598, 342, 854, 214, 726, 470, 982,
- 54, 566, 310, 822, 182, 694, 438, 950,
- 118, 630, 374, 886, 246, 758, 502, 1014,
- 14, 526, 270, 782, 142, 654, 398, 910,
- 78, 590, 334, 846, 206, 718, 462, 974,
- 46, 558, 302, 814, 174, 686, 430, 942,
- 110, 622, 366, 878, 238, 750, 494, 1006,
- 30, 542, 286, 798, 158, 670, 414, 926,
- 94, 606, 350, 862, 222, 734, 478, 990,
- 62, 574, 318, 830, 190, 702, 446, 958,
- 126, 638, 382, 894, 254, 766, 510, 1022
-};
-
-const Word16 Gamma_19661_Tbl_fx[] = {
- 19661, 11797, 7078, 4247, 2548, 1529, 917, 550, 330, 198, 119, 71, 43, 26, 16, 10
-}; /*Q15 */
-
-const Word16 Gamma_29491_Tbl[] = {
- 29491, 26542, 23888, 21499, 19349, 17414, 15672, 14105,
- 12694, 11425, 10282, 9254, 8329, 7496, 6746, 6071
-}; // Q15
-
-/*---------------------------------------------------------------------*
- * NB post-filter tables
- *---------------------------------------------------------------------*/
-
-const Word16 tab_hup_s_fx[SIZ_TAB_HUP_S] = { // Q15
- -188, 2873, 31650, -1597, -484, 7041, 28469, -2147, -933, 12266,
- 23705, -1992, -1492, 18050, 18050, -1492, -1992, 23705, 12266, -933,
- -2147, 28469, 7041, -484, -1597, 31650, 2873, -188
-};
-
-const Word16 tab_hup_l_fx[SIZ_TAB_HUP_L] = { // Q15
- -40, 72, -156, 315, -579, 1023, -1874, 4439,
- 31915, -3390, 1595, -887, 501, -266, 130, -59,
- -77, 147, -317, 631, -1150, 2030, -3773, 9639,
- 29436, -5579, 2727, -1527, 859, -453, 218, -101,
- -106, 212, -455, 892, -1614, 2850, -5392, 15206,
- 25569, -6549, 3303, -1860, 1041, -543, 258, -122,
- -123, 253, -538, 1044, -1876, 3319, -6414, 20676,
- 20676, -6414, 3319, -1876, 1044, -538, 253, -123,
- -122, 258, -543, 1041, -1860, 3303, -6549, 25569,
- 15206, -5392, 2850, -1614, 892, -455, 212, -106,
- -101, 218, -453, 859, -1527, 2727, -5579, 29436,
- 9639, -3773, 2030, -1150, 631, -317, 147, -77,
- -59, 130, -266, 501, -887, 1595, -3390, 31915,
- 4439, -1874, 1023, -579, 315, -156, 72, -40
-};
-
-const Word16 mfreq_loc_Q2fx[] = { 700, 1500, 3100, 4700, 6300, 7900, 9500, 11100, 12700, 14300, 15900, 17500, 19100, 20700, 22300, 25500, 28700, 31900 }; // Q0
-const Word16 mfreq_loc_div_25[] = { 7, 15, 31, 47, 63, 79, 95, 111, 127, 143, 159, 175, 191, 207, 223, 255, 287, 319 }; // Q0
-
-// low_rate_band_att_fx.c
-/* %* lowered Table ROM, call with band_len_idx[sfm_size>>3] */
-/* % sfms =[ 8, 16, 24, 32, 48, 64, 80, 96 ], */
-/* sfm/8= [ 1 2 3 4 6 8 10 12]; */
-/* % idx= 0 1 2 3 4 5 6 7; */
-/* call with band_len_idx[sfm_size>>3] */
-const Word16 band_len_idx[1 + ( MAX_SFM_LEN_FX / 8 )] = {
- // Q0
- /*sfm/8*/ /*1*/ /*2 */ /*3 */ /*4 */ /*6 */ /*8 */ /*10*/ /*12*/
- -1, 0 /*8*/, 1 /*16*/, 2 /*24*/, 3 /*32*/, -1, 4 /*48 */, -1, 5 /*64 */, -1, 6 /*80*/, -1, 7 /*96*/
-};
-const Word16 band_len_ener_shift[8] = { 1, 2, 2, 2, 3, 3, 4 /*sfm==80*/, 4 /*sfm==96*/ }; /* 96 requires 1 bit more than 48 */ // Q0
-/*% sfms=[8,16,24,32,48,64,80,96], round(sqrt(sfms)*2^11) */
-const Word16 fine_gain_pred_sqrt_bw[8] = { 5793, 8192, 10033, 11585, 14189, 16384, 18318, 20066 }; /* (Q11) */
-const Word16 ivas_band_len_idx[1 + ( MAX_SFM_LEN_FX / 8 )] = {
- /*sfm/8*/ /*1*/ /*2 */ /*3 */ /*4 */ /*6 */ /*8 */ /*10*/ /*12*/
- -1, 0 /*8*/, 1 /*16*/, 2 /*24*/, 3 /*32*/, 4 /*40*/, 5 /*48 */, -1, 6 /*64 */, -1, 7 /*80*/, -1, 8 /*96*/
-}; // Q0
-const Word16 ivas_band_len_ener_shift[9] = { 1, 2, 2, 2, 3, 3, 3, 4 /*sfm==80*/, 4 /*sfm==96*/ }; // Q0 /* 96 requires 1 bit more than 48 */
-const Word16 ivas_fine_gain_pred_sqrt_bw[9] = { 5793, 8192, 10033, 11585, 12953, 14189, 16384, 18318, 20066 }; /* (Q11) */
-/*% sfms=[8,16,24,32,40,48,64,80,96], round(sqrt(sfms)*2^11) */
-/*----------------------------------------------------------------------------------*
- * means of ISFs for WB active speech
- *----------------------------------------------------------------------------------*/
-const Word16 Mean_isf_wb[M] = /* G722.2 active speech ISF's means Q2.56*/
- {
- 738, 1326, 2336, 3578, 4596, 5662, 6711, 7730,
- 8750, 9753, 10705, 11728, 12833, 13971, 15043, 4037
- };
-
-const Word16 lsp_shb_prev_tbl_fx[LPC_SHB_ORDER] = {
- /*Q15 */
- 0,
- 1638,
- 3277,
- 4915,
- 6554,
- 8192,
- 9830,
- 11469,
- 13107,
- 14746
-};
-
-const Word16 lsp_shb_prev_tbl_swb_tbe_enc_fx[LPC_SHB_ORDER] = {
- // Q15
- 32767,
- 31165,
- 26509,
- 19262,
- 10123,
- 0,
- -10124,
- -19261,
- -26509,
- -31166,
-};
-
-const Word16 ivas_lsp_shb_prev_tbl_fx[LPC_SHB_ORDER] = {
- /* Q15 */
- 1489,
- 2979,
- 4468,
- 5958,
- 7447,
- 8937,
- 10426,
- 11916,
- 13405,
- 14895
-};
-
-/* These words are subtracted from high/low/value with a shift left by 1. */
-/* The value 0x0CCC should never be referenced, low is less/equal high */
-/* The value 0x0BBB should never be referenced, loop must break instead. */
-/* Refer to this table with indices: tab_ari_qnew[msb_high][msb_low] */
-const Word16 tab_ari_qnew[4][4] = { { 0x0000, 0x0CCC, 0x0CCC, 0x0CCC },
- { 0x0000, 0x0000, 0x0CCC, 0x0CCC },
- { 0x0BBB, 0x2000, 0x4000, 0x0CCC },
- { 0x0BBB, 0x0BBB, 0x4000, 0x4000 } };
-
-const Word16 phs_tbl_dec[64 * 2] = { // Q15
- /* part of table that is not scaled by 2 */
- 16384, 0, 16305, -1606, 16069, -3196, 15678, -4756, 15136, -6270,
- 14449, -7723, 13622, -9102, 12665, -10394, 11585, -11585, 10394, -12665,
- 9102, -13622, 7723, -14449, 6270, -15136, 4756, -15678, 3196, -16069,
- 1606, -16305, 0, -16384, -1606, -16305, -3196, -16069, -4756, -15678,
- -6270, -15136, -7723, -14449, -9102, -13622, -10394, -12665, -11585, -11585,
- -12665, -10394, -13622, -9102, -14449, -7723, -15136, -6270, -15678, -4756,
- -16069, -3196, -16305, -1606,
- /* part of table that is scaled by 2 (this save one operation in FFT inner loops) */
- 32767, 0, 32610, -3212, 32138, -6392, 31356, -9512, 30272, -12540,
- 28898, -15446, 27244, -18204, 25330, -20788, 23170, -23170, 20788, -25330,
- 18204, -27244, 15446, -28898, 12540, -30272, 9512, -31356, 6392, -32138,
- 3212, -32610, 0, -32768, -3212, -32610, -6392, -32138, -9512, -31356,
- -12540, -30272, -15446, -28898, -18204, -27244, -20788, -25330, -23170, -23170,
- -25330, -20788, -27244, -18204, -28898, -15446, -30272, -12540, -31356, -9512,
- -32138, -6392, -32610, -3212
-};
-
-/* 2.0 - 6.4 kHz phase dispersion */
-const Word16 Low_H_phasedisp[L_SUBFR] = { // Q15
- 16389, 16381, 16386, 16382, 16382, 16383, 16381, 16384, 16385, 10265,
- 10154, 9894, 14052, 16343, -531, 13216, 16373, 15510, 9407, 15949,
- 4726, 14593, 10404, 9796, -16336, -1815, -10623, 12647, 14556, -12683,
- 11389, 8176, 16382, -14197, 11781, 10379, 7516, 10424, -12472, 16285,
- -1200, -13137, 12659, -7446, 15684, -3763, -13418, -5280, 521, -9685,
- -16375, -1219, 8436, -13059, -12861, -12775, 0, 3, 0, -2,
- -1, -1, -1, 2
-};
-
-/* 3.2 - 6.4 kHz phase dispersion */
-const Word16 Mid_H_phasedisp[L_SUBFR] = { // Q15
- 16382, 16382, 16384, 16385, 16386, 16388, 16387, 16383, 16387, 16383,
- 16386, 16386, 16386, 16384, 16382, 16388, 14847, 9629, 13249, 14487,
- 10995, 643, 13818, 13779, 6468, 8665, 11634, 9781, -14636, -982,
- 11746, -722, 16386, -16365, -11422, 16354, 7363, 13148, -11538, -13903,
- -15051, -8862, 8812, -16371, -12146, 7661, -9637, -13253, -6922, 4,
- -4, -1, -5, 1, 7, 6, -7, -1, 4, -4,
- 0, -1, -3, 3
-};
-
-// ACcontextMapping_dec_fx.c
-const Word16 Tab_esc_nb[4] = { 0 << ( NBITS_CONTEXT + NBITS_RATEQ ),
- 1 << ( NBITS_CONTEXT + NBITS_RATEQ ),
- 2 << ( NBITS_CONTEXT + NBITS_RATEQ ),
- 3 << ( NBITS_CONTEXT + NBITS_RATEQ ) }; // Q0
-
-const Word16 pow2tab[15] = { 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 }; // Q0
-const Word32 pow2[] = { // Q0
- 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576
-};
-// d_gain2p.c
-const Word16 Es_pred_qua[8] = {
- 1521 /* 5.9422f Q8*/,
- 3909 /*15.2711f Q8*/,
- 5987 /*23.3857f Q8*/,
- 7816 /*30.5310f Q8*/,
- 9477 /*37.0190f Q8*/,
- 11124 /*43.4539f Q8*/,
- 12863 /*50.2442f Q8*/,
- 15031 /*58.7164f Q8*/
-};
-
-const Word16 Es_pred_qua_2[16] = {
- -1280 /*-5.f Q8*/,
- 0 /* 0.f Q8*/,
- 1280 /* 5.f Q8*/,
- 2560 /*10.f Q8*/,
- 3840 /*15.f Q8*/,
- 5120 /*20.f Q8*/,
- 6400 /*25.f Q8*/,
- 7680 /*30.f Q8*/,
- 8960 /*35.f Q8*/,
- 10240 /*40.f Q8*/,
- 11520 /*45.f Q8*/,
- 12800 /*50.f Q8*/,
- 14080 /*55.f Q8*/,
- 15360 /*60.f Q8*/,
- 16640 /*65.f Q8*/,
- 17920 /*70.f Q8*/
-};
-const Word16 T_DIV_L_Frame[] = /*0Q15 * 2^-7 */
- {
- 26214 /*160*/
- ,
- 16384 /*256*/
- ,
- 13107 /*320*/
- ,
- 8738 /*480*/
- ,
- 8192 /*512*/
- ,
- 6553 /*640*/
- };
-
-/* order 8 LPF for nelp frames when non-native sampling freq inputs used with -max_band NB */
-/* used to suppress frequencies above 4kHz present at the output of filters in pre_proc() */
-
-const Word16 num_nelp_lp_fx[NELP_LP_ORDER + 1] = /*Q13*/
- {
- 727,
- 3506,
- 8988,
- 15029,
- 17732,
- 15022,
- 8979,
- 3501,
- 726
- };
-
-const Word16 den_nelp_lp_fx[NELP_LP_ORDER + 1] = { // Q13
- 8192,
- 8819,
- 21618,
- 12167,
- 15902,
- 3553,
- 3998,
- -120,
- 353
-};
-
-/*----------------------------------------------------------------------------------*
- * AMR-WB IO WB BWE - band-pass 6-8kHz FIR filter, values in Q15:
- *----------------------------------------------------------------------------------*/
-const Word16 fir_6k_8k_fx[31] = { // Q15
- 44, -155, 323, -482, 563, -590, 726, -1180, 1986, -2818, 3028,
- -1991, -423, 3583, -6281, 7342, -6281, 3583, -423, -1991, 3028,
- -2818, 1986, -1180, 726, -590, 563, -482, 323, -155, 44
-};
-
-const Word16 pwf78_fx[17] = { 25559, 19936, 15550, 12129, 9460, 7379, 5755, 4489,
- 3501, 2731, 2130, 1661, 1296, 1011, 788, 615,
- 479 }; /* 0.78^i (i=1,...,17), Q15 */
-
-/*------------------------------------------------------------------------------*
- * lag window for windowing the autocorrelations in LP analysis
- * Used in lib_enc\analy_lp_fx.c
- *------------------------------------------------------------------------------*/
-const Word16 hamcos_window_fx[L_LP_AMR_WB] = { // Q15
- 2621, 2622, 2626, 2632, 2640, 2650, 2662, 2677,
- 2694, 2714, 2735, 2759, 2785, 2814, 2844, 2877,
- 2912, 2949, 2989, 3031, 3075, 3121, 3169, 3220,
- 3273, 3328, 3385, 3444, 3506, 3569, 3635, 3703,
- 3773, 3845, 3919, 3996, 4074, 4155, 4237, 4321,
- 4408, 4496, 4587, 4680, 4774, 4870, 4969, 5069,
- 5171, 5275, 5381, 5489, 5599, 5710, 5824, 5939,
- 6056, 6174, 6295, 6417, 6541, 6666, 6793, 6922,
- 7052, 7185, 7318, 7453, 7590, 7728, 7868, 8009,
- 8152, 8296, 8442, 8589, 8737, 8887, 9038, 9191,
- 9344, 9499, 9655, 9813, 9971, 10131, 10292, 10454,
- 10617, 10781, 10946, 11113, 11280, 11448, 11617, 11787,
- 11958, 12130, 12303, 12476, 12650, 12825, 13001, 13178,
- 13355, 13533, 13711, 13890, 14070, 14250, 14431, 14612,
- 14793, 14975, 15158, 15341, 15524, 15708, 15891, 16076,
- 16260, 16445, 16629, 16814, 16999, 17185, 17370, 17555,
- 17740, 17926, 18111, 18296, 18481, 18666, 18851, 19036,
- 19221, 19405, 19589, 19773, 19956, 20139, 20322, 20504,
- 20686, 20867, 21048, 21229, 21408, 21588, 21767, 21945,
- 22122, 22299, 22475, 22651, 22825, 22999, 23172, 23344,
- 23516, 23686, 23856, 24025, 24192, 24359, 24525, 24689,
- 24853, 25016, 25177, 25337, 25496, 25654, 25811, 25967,
- 26121, 26274, 26426, 26576, 26725, 26873, 27019, 27164,
- 27308, 27450, 27590, 27729, 27867, 28003, 28137, 28270,
- 28401, 28531, 28659, 28785, 28910, 29033, 29154, 29274,
- 29391, 29507, 29622, 29734, 29845, 29953, 30060, 30165,
- 30268, 30370, 30469, 30566, 30662, 30755, 30847, 30936,
- 31024, 31109, 31193, 31274, 31354, 31431, 31506, 31579,
- 31651, 31719, 31786, 31851, 31914, 31974, 32032, 32088,
- 32142, 32194, 32243, 32291, 32336, 32379, 32419, 32458,
- 32494, 32528, 32560, 32589, 32617, 32642, 32664, 32685,
- 32703, 32719, 32733, 32744, 32753, 32760, 32764, 32767,
- 32767, 32765, 32757, 32745, 32727, 32705, 32678, 32646,
- 32609, 32567, 32520, 32468, 32411, 32349, 32283, 32211,
- 32135, 32054, 31968, 31877, 31781, 31681, 31575, 31465,
- 31351, 31231, 31107, 30978, 30844, 30706, 30563, 30415,
- 30263, 30106, 29945, 29779, 29609, 29434, 29255, 29071,
- 28883, 28691, 28494, 28293, 28087, 27878, 27664, 27446,
- 27224, 26997, 26767, 26533, 26294, 26052, 25806, 25555,
- 25301, 25043, 24782, 24516, 24247, 23974, 23698, 23418,
- 23134, 22847, 22557, 22263, 21965, 21665, 21361, 21054,
- 20743, 20430, 20113, 19794, 19471, 19146, 18817, 18486,
- 18152, 17815, 17476, 17134, 16789, 16442, 16092, 15740,
- 15385, 15028, 14669, 14308, 13944, 13579, 13211, 12841,
- 12470, 12096, 11721, 11344, 10965, 10584, 10202, 9819,
- 9433, 9047, 8659, 8270, 7879, 7488, 7095, 6701,
- 6306, 5910, 5514, 5116, 4718, 4319, 3919, 3519,
- 3118, 2716, 2315, 1913, 1510, 1108, 705, 302
-};
-
-
-const Word16 CNG_burst_att_fx[6][8] = { // Q15
- { 30076, 27793, 25832, 24129, 22637, 21319, 20146, 19095 },
- { 29714, 27181, 25046, 23222, 21646, 20270, 20205, 20205 },
- { 29415, 26685, 24418, 22506, 22410, 22410, 22410, 22410 },
- { 29310, 26512, 24201, 23198, 23198, 23198, 23198, 23198 },
- { 29310, 26512, 24201, 23198, 23198, 23198, 23198, 23198 },
- { 29789, 27307, 25206, 23406, 21845, 20480, 19661, 19661 }
-};
-
-const Word16 lpc_weights_fx[LPC_SHB_ORDER + 1] = { // Q15
- 32767, 31948, 31150, 30371, 29612,
- 28871, 28149, 27446, 26760, 26091, 25438
-};
-
-const Word16 SHBCB_SubGain5bit_12_fx[128] = {
- /*Q12 */
- -597,
- -1952,
- -1644,
- -1506,
- -1767,
- -1357,
- -1249,
- -874,
- -4181,
- -3836,
- -240,
- -1985,
- -6573,
- -1480,
- -1229,
- -1094,
- -381,
- -1655,
- -2119,
- -2406,
- -2012,
- -1022,
- -2235,
- -761,
- -908,
- -1282,
- -1241,
- -1845,
- -68,
- -4666,
- -6058,
- -6355,
- -2311,
- -1888,
- -1396,
- -513,
- -523,
- -1155,
- -2300,
- -3657,
- -1161,
- -549,
- -2564,
- -2424,
- -609,
- -2346,
- -2934,
- -1142,
- -3591,
- -2859,
- -2063,
- -205,
- -4048,
- -4083,
- -4261,
- -56,
- -1352,
- -2147,
- -1894,
- -574,
- -6577,
- -5483,
- -1881,
- -628,
- -815,
- -1061,
- -1987,
- -1654,
- -455,
- -1380,
- -3818,
- -4941,
- -926,
- -934,
- -1463,
- -2630,
- -2520,
- -1013,
- -1016,
- -1250,
- -977,
- -2477,
- -720,
- -2401,
- -130,
- -2789,
- -3155,
- -3192,
- -1135,
- -1287,
- -1552,
- -1115,
- -1217,
- -1918,
- -1059,
- -1102,
- -2291,
- -3353,
- -744,
- -979,
- -3067,
- -1892,
- -961,
- -707,
- -1795,
- -1229,
- -652,
- -2348,
- -1569,
- -717,
- -1490,
- -1628,
- -3240,
- -258,
- -2129,
- -2748,
- -2062,
- -1902,
- -625,
- -1257,
- -1453,
- -1250,
- -965,
- -1445,
- -4227,
- -1494,
- -1108,
- -819,
-
-
-};
-
-
-const Word16 E_ROM_inter4_1_fx[UP_SAMP * L_INTERPOL1 + 1] = {
- /* cut-off frequency at 0.9*fs/2 */
- 14746 /*0.900000F Q14*/,
- 13418 /*0.818959F Q14*/, 9910 /*0.604850F Q14*/, 5429 /*0.331379F Q14*/, 1376 /*0.083958F Q14*/,
- -1242 /*-0.075795F Q14*/, -2142 /*-0.130717F Q14*/, -1732 /*-0.105685F Q14*/, -766 /*-0.046774F Q14*/,
- 73 /*0.004467F Q14*/, 455 /*0.027789F Q14*/, 420 /*0.025642F Q14*/, 206 /*0.012571F Q14*/,
- 32 /*0.001927F Q14*/, -26 /*-0.001571F Q14*/, -12 /*-0.000753F Q14*/, 0 /*0.000000f Q14*/
-};
-const Word16 E_ROM_inter6_1_fx[PIT_UP_SAMP6 * L_INTERPOL1 + 1] = {
- 14759 /*0.900848F Q14*/,
- 14158 /*0.864136F Q14*/,
- 12453 /*0.760071F Q14*/,
- 9919 /*0.605408F Q14*/,
- 6948 /*0.424072F Q14*/,
- 3972 /*0.242462F Q14*/,
- 1377 /*0.0840759F Q14*/,
- -563 /*-0.0343933F Q14*/,
- -1729 /*-0.105560F Q14*/,
- -2152 /*-0.131348F Q14*/,
- -1984 /*-0.121124F Q14*/,
- -1450 /*-0.0884705F Q14*/,
- -780 /*-0.0476379F Q14*/,
- -168 /*-0.0102539F Q14*/,
- 267 /*0.0162964F Q14*/,
- 485 /*0.0296021F Q14*/,
- 512 /*0.0312195F Q14*/,
- 412 /*0.0251160F Q14*/,
- 258 /*0.0157471F Q14*/,
- 110 /*0.00671387F Q14*/,
- 0 /*0.000000F Q14*/,
- -65 /*-0.00399780F Q14*/,
- -97 /*-0.00592041F Q14*/,
- -108 /*-0.00656128F Q14*/,
- 0 /*0.000000F Q14*/
-};
-const Word16 kLog2TableFrac_x[256] = { // Q8
- 0, 1, 3, 4, 6, 7, 9, 10,
- 11, 13, 14, 16, 17, 18, 20, 21,
- 22, 24, 25, 26, 28, 29, 30, 32,
- 33, 34, 36, 37, 38, 40, 41, 42,
- 44, 45, 46, 47, 49, 50, 51, 52,
- 54, 55, 56, 57, 59, 60, 61, 62,
- 63, 65, 66, 67, 68, 69, 71, 72,
- 73, 74, 75, 77, 78, 79, 80, 81,
- 82, 84, 85, 86, 87, 88, 89, 90,
- 92, 93, 94, 95, 96, 97, 98, 99,
- 100, 102, 103, 104, 105, 106, 107, 108,
- 109, 110, 111, 112, 113, 114, 116, 117,
- 118, 119, 120, 121, 122, 123, 124, 125,
- 126, 127, 128, 129, 130, 131, 132, 133,
- 134, 135, 136, 137, 138, 139, 140, 141,
- 142, 143, 144, 145, 146, 147, 148, 149,
- 150, 151, 152, 153, 154, 155, 155, 156,
- 157, 158, 159, 160, 161, 162, 163, 164,
- 165, 166, 167, 168, 169, 169, 170, 171,
- 172, 173, 174, 175, 176, 177, 178, 178,
- 179, 180, 181, 182, 183, 184, 185, 185,
- 186, 187, 188, 189, 190, 191, 192, 192,
- 193, 194, 195, 196, 197, 198, 198, 199,
- 200, 201, 202, 203, 203, 204, 205, 206,
- 207, 208, 208, 209, 210, 211, 212, 212,
- 213, 214, 215, 216, 216, 217, 218, 219,
- 220, 220, 221, 222, 223, 224, 224, 225,
- 226, 227, 228, 228, 229, 230, 231, 231,
- 232, 233, 234, 234, 235, 236, 237, 238,
- 238, 239, 240, 241, 241, 242, 243, 244,
- 244, 245, 246, 247, 247, 248, 249, 249,
- 250, 251, 252, 252, 253, 254, 255, 255
-};
-
-const Word16 kExp2TableFrac_x[256] = /* Q15 */
- {
- 32767, 32678, 32590, 32502, 32414, 32326, 32239, 32152,
- 32065, 31978, 31892, 31805, 31719, 31634, 31548, 31463,
- 31378, 31293, 31208, 31124, 31040, 30956, 30872, 30789,
- 30705, 30622, 30540, 30457, 30375, 30293, 30211, 30129,
- 30047, 29966, 29885, 29804, 29724, 29643, 29563, 29483,
- 29404, 29324, 29245, 29166, 29087, 29008, 28930, 28852,
- 28774, 28696, 28618, 28541, 28464, 28387, 28310, 28233,
- 28157, 28081, 28005, 27929, 27854, 27778, 27703, 27628,
- 27554, 27479, 27405, 27331, 27257, 27183, 27110, 27036,
- 26963, 26890, 26818, 26745, 26673, 26601, 26529, 26457,
- 26385, 26314, 26243, 26172, 26101, 26031, 25960, 25890,
- 25820, 25750, 25681, 25611, 25542, 25473, 25404, 25335,
- 25267, 25198, 25130, 25062, 24995, 24927, 24860, 24792,
- 24725, 24659, 24592, 24525, 24459, 24393, 24327, 24261,
- 24196, 24130, 24065, 24000, 23935, 23870, 23806, 23741,
- 23677, 23613, 23549, 23486, 23422, 23359, 23296, 23233,
- 23170, 23107, 23045, 22982, 22920, 22858, 22796, 22735,
- 22673, 22612, 22551, 22490, 22429, 22368, 22308, 22248,
- 22187, 22127, 22068, 22008, 21948, 21889, 21830, 21771,
- 21712, 21653, 21595, 21536, 21478, 21420, 21362, 21304,
- 21247, 21189, 21132, 21075, 21018, 20961, 20904, 20848,
- 20791, 20735, 20679, 20623, 20568, 20512, 20456, 20401,
- 20346, 20291, 20236, 20181, 20127, 20072, 20018, 19964,
- 19910, 19856, 19802, 19749, 19696, 19642, 19589, 19536,
- 19483, 19431, 19378, 19326, 19274, 19221, 19169, 19118,
- 19066, 19014, 18963, 18912, 18861, 18810, 18759, 18708,
- 18657, 18607, 18557, 18506, 18456, 18406, 18357, 18307,
- 18258, 18208, 18159, 18110, 18061, 18012, 17963, 17915,
- 17866, 17818, 17770, 17722, 17674, 17626, 17578, 17531,
- 17483, 17436, 17389, 17342, 17295, 17248, 17202, 17155,
- 17109, 17063, 17016, 16970, 16925, 16879, 16833, 16788,
- 16742, 16697, 16652, 16607, 16562, 16517, 16472, 16428
- };
-
-/*-------------------------------------------------------------------*
- * inverse (reciprocal) of integer, used in FEC_fx.c, pitch_extr and in pitchDoubling_det
- * 1/n = One_div[n-1]
- *-------------------------------------------------------------------*/
-const Word16 One_div_fx[] = /* in Q15 */
- {
- 32767, /* 1/1 */
- 16384, /* 1/2 */
- 10923, /* 1/3 */
- 8192, /* 1/4 */
- 6554, /* 1/5 */
- 5461, /* 1/6 */
- 4681, /* 1/7 */
- 4096 /* 1/8 */
- };
-
-const Word32 tbl_two_pow_shift_by_4[35] = { // Q30
- 1073741824, 902905664, 759250112, 638450688, 536870912, 451452832, 379625056, 319225344,
- 268435456, 225726416, 189812528, 159612672, 134217728, 112863208, 94906264, 79806336,
- 67108864, 56431604, 47453132, 39903168, 33554432, 28215802, 23726566, 19951584,
- 16777216, 14107901, 11863283, 9975792, 8388608, 7053950, 5931641, 4987896,
- 4194304, 3526975, 2965820
-};
-
-
-const Word16 ivas_tan_panning_gain_tbl_fx[601] = { // Q15
- SHC( 0x0000 ), SHC( 0x0042 ), SHC( 0x0084 ), SHC( 0x00c6 ), SHC( 0x0109 ), SHC( 0x014b ), SHC( 0x018e ), SHC( 0x01d1 ),
- SHC( 0x0214 ), SHC( 0x0257 ), SHC( 0x029b ), SHC( 0x02de ), SHC( 0x0322 ), SHC( 0x0365 ), SHC( 0x03a9 ), SHC( 0x03ed ),
- SHC( 0x0431 ), SHC( 0x0475 ), SHC( 0x04ba ), SHC( 0x04fe ), SHC( 0x0543 ), SHC( 0x0588 ), SHC( 0x05cd ), SHC( 0x0612 ),
- SHC( 0x0657 ), SHC( 0x069c ), SHC( 0x06e1 ), SHC( 0x0727 ), SHC( 0x076d ), SHC( 0x07b2 ), SHC( 0x07f8 ), SHC( 0x083e ),
- SHC( 0x0885 ), SHC( 0x08cb ), SHC( 0x0911 ), SHC( 0x0958 ), SHC( 0x099f ), SHC( 0x09e6 ), SHC( 0x0a2d ), SHC( 0x0a74 ),
- SHC( 0x0abb ), SHC( 0x0b02 ), SHC( 0x0b4a ), SHC( 0x0b91 ), SHC( 0x0bd9 ), SHC( 0x0c21 ), SHC( 0x0c69 ), SHC( 0x0cb1 ),
- SHC( 0x0cf9 ), SHC( 0x0d42 ), SHC( 0x0d8a ), SHC( 0x0dd3 ), SHC( 0x0e1c ), SHC( 0x0e65 ), SHC( 0x0eae ), SHC( 0x0ef7 ),
- SHC( 0x0f40 ), SHC( 0x0f89 ), SHC( 0x0fd3 ), SHC( 0x101d ), SHC( 0x1066 ), SHC( 0x10b0 ), SHC( 0x10fa ), SHC( 0x1144 ),
- SHC( 0x118f ), SHC( 0x11d9 ), SHC( 0x1223 ), SHC( 0x126e ), SHC( 0x12b9 ), SHC( 0x1304 ), SHC( 0x134f ), SHC( 0x139a ),
- SHC( 0x13e5 ), SHC( 0x1430 ), SHC( 0x147c ), SHC( 0x14c7 ), SHC( 0x1513 ), SHC( 0x155f ), SHC( 0x15aa ), SHC( 0x15f6 ),
- SHC( 0x1643 ), SHC( 0x168f ), SHC( 0x16db ), SHC( 0x1728 ), SHC( 0x1774 ), SHC( 0x17c1 ), SHC( 0x180e ), SHC( 0x185a ),
- SHC( 0x18a7 ), SHC( 0x18f5 ), SHC( 0x1942 ), SHC( 0x198f ), SHC( 0x19dd ), SHC( 0x1a2a ), SHC( 0x1a78 ), SHC( 0x1ac5 ),
- SHC( 0x1b13 ), SHC( 0x1b61 ), SHC( 0x1baf ), SHC( 0x1bfd ), SHC( 0x1c4c ), SHC( 0x1c9a ), SHC( 0x1ce8 ), SHC( 0x1d37 ),
- SHC( 0x1d86 ), SHC( 0x1dd4 ), SHC( 0x1e23 ), SHC( 0x1e72 ), SHC( 0x1ec1 ), SHC( 0x1f10 ), SHC( 0x1f5f ), SHC( 0x1faf ),
- SHC( 0x1ffe ), SHC( 0x204d ), SHC( 0x209d ), SHC( 0x20ed ), SHC( 0x213c ), SHC( 0x218c ), SHC( 0x21dc ), SHC( 0x222c ),
- SHC( 0x227c ), SHC( 0x22cc ), SHC( 0x231c ), SHC( 0x236d ), SHC( 0x23bd ), SHC( 0x240e ), SHC( 0x245e ), SHC( 0x24af ),
- SHC( 0x24ff ), SHC( 0x2550 ), SHC( 0x25a1 ), SHC( 0x25f2 ), SHC( 0x2643 ), SHC( 0x2694 ), SHC( 0x26e5 ), SHC( 0x2736 ),
- SHC( 0x2787 ), SHC( 0x27d9 ), SHC( 0x282a ), SHC( 0x287b ), SHC( 0x28cd ), SHC( 0x291e ), SHC( 0x2970 ), SHC( 0x29c2 ),
- SHC( 0x2a13 ), SHC( 0x2a65 ), SHC( 0x2ab7 ), SHC( 0x2b09 ), SHC( 0x2b5b ), SHC( 0x2bad ), SHC( 0x2bff ), SHC( 0x2c51 ),
- SHC( 0x2ca3 ), SHC( 0x2cf5 ), SHC( 0x2d47 ), SHC( 0x2d99 ), SHC( 0x2dec ), SHC( 0x2e3e ), SHC( 0x2e90 ), SHC( 0x2ee3 ),
- SHC( 0x2f35 ), SHC( 0x2f87 ), SHC( 0x2fda ), SHC( 0x302c ), SHC( 0x307f ), SHC( 0x30d2 ), SHC( 0x3124 ), SHC( 0x3177 ),
- SHC( 0x31c9 ), SHC( 0x321c ), SHC( 0x326f ), SHC( 0x32c1 ), SHC( 0x3314 ), SHC( 0x3367 ), SHC( 0x33ba ), SHC( 0x340c ),
- SHC( 0x345f ), SHC( 0x34b2 ), SHC( 0x3505 ), SHC( 0x3557 ), SHC( 0x35aa ), SHC( 0x35fd ), SHC( 0x3650 ), SHC( 0x36a2 ),
- SHC( 0x36f5 ), SHC( 0x3748 ), SHC( 0x379b ), SHC( 0x37ed ), SHC( 0x3840 ), SHC( 0x3893 ), SHC( 0x38e6 ), SHC( 0x3938 ),
- SHC( 0x398b ), SHC( 0x39de ), SHC( 0x3a30 ), SHC( 0x3a83 ), SHC( 0x3ad6 ), SHC( 0x3b28 ), SHC( 0x3b7b ), SHC( 0x3bcd ),
- SHC( 0x3c20 ), SHC( 0x3c72 ), SHC( 0x3cc5 ), SHC( 0x3d17 ), SHC( 0x3d69 ), SHC( 0x3dbc ), SHC( 0x3e0e ), SHC( 0x3e60 ),
- SHC( 0x3eb2 ), SHC( 0x3f04 ), SHC( 0x3f57 ), SHC( 0x3fa9 ), SHC( 0x3ffb ), SHC( 0x404c ), SHC( 0x409e ), SHC( 0x40f0 ),
- SHC( 0x4142 ), SHC( 0x4194 ), SHC( 0x41e5 ), SHC( 0x4237 ), SHC( 0x4288 ), SHC( 0x42da ), SHC( 0x432b ), SHC( 0x437c ),
- SHC( 0x43ce ), SHC( 0x441f ), SHC( 0x4470 ), SHC( 0x44c1 ), SHC( 0x4512 ), SHC( 0x4563 ), SHC( 0x45b3 ), SHC( 0x4604 ),
- SHC( 0x4654 ), SHC( 0x46a5 ), SHC( 0x46f5 ), SHC( 0x4746 ), SHC( 0x4796 ), SHC( 0x47e6 ), SHC( 0x4836 ), SHC( 0x4886 ),
- SHC( 0x48d5 ), SHC( 0x4925 ), SHC( 0x4975 ), SHC( 0x49c4 ), SHC( 0x4a13 ), SHC( 0x4a63 ), SHC( 0x4ab2 ), SHC( 0x4b01 ),
- SHC( 0x4b50 ), SHC( 0x4b9e ), SHC( 0x4bed ), SHC( 0x4c3b ), SHC( 0x4c8a ), SHC( 0x4cd8 ), SHC( 0x4d26 ), SHC( 0x4d74 ),
- SHC( 0x4dc2 ), SHC( 0x4e10 ), SHC( 0x4e5d ), SHC( 0x4eab ), SHC( 0x4ef8 ), SHC( 0x4f45 ), SHC( 0x4f92 ), SHC( 0x4fdf ),
- SHC( 0x502c ), SHC( 0x5078 ), SHC( 0x50c4 ), SHC( 0x5111 ), SHC( 0x515d ), SHC( 0x51a9 ), SHC( 0x51f4 ), SHC( 0x5240 ),
- SHC( 0x528b ), SHC( 0x52d7 ), SHC( 0x5322 ), SHC( 0x536d ), SHC( 0x53b8 ), SHC( 0x5402 ), SHC( 0x544d ), SHC( 0x5497 ),
- SHC( 0x54e1 ), SHC( 0x552b ), SHC( 0x5574 ), SHC( 0x55be ), SHC( 0x5607 ), SHC( 0x5650 ), SHC( 0x5699 ), SHC( 0x56e2 ),
- SHC( 0x572b ), SHC( 0x5773 ), SHC( 0x57bb ), SHC( 0x5803 ), SHC( 0x584b ), SHC( 0x5893 ), SHC( 0x58da ), SHC( 0x5921 ),
- SHC( 0x5968 ), SHC( 0x59af ), SHC( 0x59f5 ), SHC( 0x5a3c ), SHC( 0x5a82 ), SHC( 0x5ac8 ), SHC( 0x5b0e ), SHC( 0x5b53 ),
- SHC( 0x5b98 ), SHC( 0x5bde ), SHC( 0x5c22 ), SHC( 0x5c67 ), SHC( 0x5cab ), SHC( 0x5cf0 ), SHC( 0x5d34 ), SHC( 0x5d77 ),
- SHC( 0x5dbb ), SHC( 0x5dfe ), SHC( 0x5e41 ), SHC( 0x5e84 ), SHC( 0x5ec7 ), SHC( 0x5f09 ), SHC( 0x5f4b ), SHC( 0x5f8d ),
- SHC( 0x5fcf ), SHC( 0x6010 ), SHC( 0x6051 ), SHC( 0x6092 ), SHC( 0x60d3 ), SHC( 0x6113 ), SHC( 0x6153 ), SHC( 0x6193 ),
- SHC( 0x61d3 ), SHC( 0x6213 ), SHC( 0x6252 ), SHC( 0x6291 ), SHC( 0x62cf ), SHC( 0x630e ), SHC( 0x634c ), SHC( 0x638a ),
- SHC( 0x63c8 ), SHC( 0x6405 ), SHC( 0x6442 ), SHC( 0x647f ), SHC( 0x64bc ), SHC( 0x64f8 ), SHC( 0x6534 ), SHC( 0x6570 ),
- SHC( 0x65ac ), SHC( 0x65e7 ), SHC( 0x6622 ), SHC( 0x665d ), SHC( 0x6698 ), SHC( 0x66d2 ), SHC( 0x670c ), SHC( 0x6746 ),
- SHC( 0x677f ), SHC( 0x67b8 ), SHC( 0x67f1 ), SHC( 0x682a ), SHC( 0x6862 ), SHC( 0x689a ), SHC( 0x68d2 ), SHC( 0x690a ),
- SHC( 0x6941 ), SHC( 0x6978 ), SHC( 0x69af ), SHC( 0x69e5 ), SHC( 0x6a1c ), SHC( 0x6a52 ), SHC( 0x6a87 ), SHC( 0x6abd ),
- SHC( 0x6af2 ), SHC( 0x6b26 ), SHC( 0x6b5b ), SHC( 0x6b8f ), SHC( 0x6bc3 ), SHC( 0x6bf7 ), SHC( 0x6c2a ), SHC( 0x6c5d ),
- SHC( 0x6c90 ), SHC( 0x6cc3 ), SHC( 0x6cf5 ), SHC( 0x6d27 ), SHC( 0x6d59 ), SHC( 0x6d8a ), SHC( 0x6dbb ), SHC( 0x6dec ),
- SHC( 0x6e1d ), SHC( 0x6e4d ), SHC( 0x6e7d ), SHC( 0x6ead ), SHC( 0x6edc ), SHC( 0x6f0b ), SHC( 0x6f3a ), SHC( 0x6f69 ),
- SHC( 0x6f97 ), SHC( 0x6fc5 ), SHC( 0x6ff3 ), SHC( 0x7020 ), SHC( 0x704e ), SHC( 0x707a ), SHC( 0x70a7 ), SHC( 0x70d3 ),
- SHC( 0x70ff ), SHC( 0x712b ), SHC( 0x7157 ), SHC( 0x7182 ), SHC( 0x71ad ), SHC( 0x71d7 ), SHC( 0x7202 ), SHC( 0x722c ),
- SHC( 0x7255 ), SHC( 0x727f ), SHC( 0x72a8 ), SHC( 0x72d1 ), SHC( 0x72fa ), SHC( 0x7322 ), SHC( 0x734a ), SHC( 0x7372 ),
- SHC( 0x7399 ), SHC( 0x73c0 ), SHC( 0x73e7 ), SHC( 0x740e ), SHC( 0x7434 ), SHC( 0x745a ), SHC( 0x7480 ), SHC( 0x74a6 ),
- SHC( 0x74cb ), SHC( 0x74f0 ), SHC( 0x7515 ), SHC( 0x7539 ), SHC( 0x755d ), SHC( 0x7581 ), SHC( 0x75a5 ), SHC( 0x75c8 ),
- SHC( 0x75eb ), SHC( 0x760e ), SHC( 0x7630 ), SHC( 0x7652 ), SHC( 0x7674 ), SHC( 0x7696 ), SHC( 0x76b7 ), SHC( 0x76d9 ),
- SHC( 0x76f9 ), SHC( 0x771a ), SHC( 0x773a ), SHC( 0x775a ), SHC( 0x777a ), SHC( 0x779a ), SHC( 0x77b9 ), SHC( 0x77d8 ),
- SHC( 0x77f6 ), SHC( 0x7815 ), SHC( 0x7833 ), SHC( 0x7851 ), SHC( 0x786e ), SHC( 0x788c ), SHC( 0x78a9 ), SHC( 0x78c6 ),
- SHC( 0x78e2 ), SHC( 0x78ff ), SHC( 0x791b ), SHC( 0x7937 ), SHC( 0x7952 ), SHC( 0x796d ), SHC( 0x7988 ), SHC( 0x79a3 ),
- SHC( 0x79be ), SHC( 0x79d8 ), SHC( 0x79f2 ), SHC( 0x7a0c ), SHC( 0x7a25 ), SHC( 0x7a3e ), SHC( 0x7a57 ), SHC( 0x7a70 ),
- SHC( 0x7a89 ), SHC( 0x7aa1 ), SHC( 0x7ab9 ), SHC( 0x7ad1 ), SHC( 0x7ae8 ), SHC( 0x7aff ), SHC( 0x7b16 ), SHC( 0x7b2d ),
- SHC( 0x7b44 ), SHC( 0x7b5a ), SHC( 0x7b70 ), SHC( 0x7b86 ), SHC( 0x7b9b ), SHC( 0x7bb1 ), SHC( 0x7bc6 ), SHC( 0x7bdb ),
- SHC( 0x7bef ), SHC( 0x7c04 ), SHC( 0x7c18 ), SHC( 0x7c2c ), SHC( 0x7c40 ), SHC( 0x7c53 ), SHC( 0x7c66 ), SHC( 0x7c79 ),
- SHC( 0x7c8c ), SHC( 0x7c9e ), SHC( 0x7cb1 ), SHC( 0x7cc3 ), SHC( 0x7cd5 ), SHC( 0x7ce6 ), SHC( 0x7cf8 ), SHC( 0x7d09 ),
- SHC( 0x7d1a ), SHC( 0x7d2b ), SHC( 0x7d3b ), SHC( 0x7d4c ), SHC( 0x7d5c ), SHC( 0x7d6b ), SHC( 0x7d7b ), SHC( 0x7d8b ),
- SHC( 0x7d9a ), SHC( 0x7da9 ), SHC( 0x7db8 ), SHC( 0x7dc6 ), SHC( 0x7dd5 ), SHC( 0x7de3 ), SHC( 0x7df1 ), SHC( 0x7dff ),
- SHC( 0x7e0c ), SHC( 0x7e19 ), SHC( 0x7e27 ), SHC( 0x7e34 ), SHC( 0x7e40 ), SHC( 0x7e4d ), SHC( 0x7e59 ), SHC( 0x7e65 ),
- SHC( 0x7e71 ), SHC( 0x7e7d ), SHC( 0x7e89 ), SHC( 0x7e94 ), SHC( 0x7e9f ), SHC( 0x7eaa ), SHC( 0x7eb5 ), SHC( 0x7ebf ),
- SHC( 0x7eca ), SHC( 0x7ed4 ), SHC( 0x7ede ), SHC( 0x7ee8 ), SHC( 0x7ef1 ), SHC( 0x7efb ), SHC( 0x7f04 ), SHC( 0x7f0d ),
- SHC( 0x7f16 ), SHC( 0x7f1f ), SHC( 0x7f27 ), SHC( 0x7f30 ), SHC( 0x7f38 ), SHC( 0x7f40 ), SHC( 0x7f48 ), SHC( 0x7f4f ),
- SHC( 0x7f57 ), SHC( 0x7f5e ), SHC( 0x7f65 ), SHC( 0x7f6c ), SHC( 0x7f73 ), SHC( 0x7f79 ), SHC( 0x7f80 ), SHC( 0x7f86 ),
- SHC( 0x7f8c ), SHC( 0x7f92 ), SHC( 0x7f98 ), SHC( 0x7f9d ), SHC( 0x7fa3 ), SHC( 0x7fa8 ), SHC( 0x7fad ), SHC( 0x7fb2 ),
- SHC( 0x7fb7 ), SHC( 0x7fbb ), SHC( 0x7fc0 ), SHC( 0x7fc4 ), SHC( 0x7fc8 ), SHC( 0x7fcc ), SHC( 0x7fd0 ), SHC( 0x7fd4 ),
- SHC( 0x7fd7 ), SHC( 0x7fdb ), SHC( 0x7fde ), SHC( 0x7fe1 ), SHC( 0x7fe4 ), SHC( 0x7fe7 ), SHC( 0x7fe9 ), SHC( 0x7fec ),
- SHC( 0x7fee ), SHC( 0x7ff0 ), SHC( 0x7ff2 ), SHC( 0x7ff4 ), SHC( 0x7ff6 ), SHC( 0x7ff7 ), SHC( 0x7ff9 ), SHC( 0x7ffa ),
- SHC( 0x7ffb ), SHC( 0x7ffc ), SHC( 0x7ffd ), SHC( 0x7ffe ), SHC( 0x7ffe ), SHC( 0x7fff ), SHC( 0x7fff ), SHC( 0x7fff ),
- SHC( 0x7fff )
-};
-
-const Word16 ivas_sine_panning_tbl_fx[601] = { // Q15
- SHC( 0xc001 ), SHC( 0xc032 ), SHC( 0xc064 ), SHC( 0xc095 ), SHC( 0xc0c7 ), SHC( 0xc0f9 ), SHC( 0xc12b ), SHC( 0xc15c ),
- SHC( 0xc18e ), SHC( 0xc1c0 ), SHC( 0xc1f2 ), SHC( 0xc224 ), SHC( 0xc256 ), SHC( 0xc289 ), SHC( 0xc2bb ), SHC( 0xc2ed ),
- SHC( 0xc31f ), SHC( 0xc352 ), SHC( 0xc384 ), SHC( 0xc3b6 ), SHC( 0xc3e9 ), SHC( 0xc41b ), SHC( 0xc44e ), SHC( 0xc481 ),
- SHC( 0xc4b3 ), SHC( 0xc4e6 ), SHC( 0xc519 ), SHC( 0xc54b ), SHC( 0xc57e ), SHC( 0xc5b1 ), SHC( 0xc5e4 ), SHC( 0xc617 ),
- SHC( 0xc64a ), SHC( 0xc67d ), SHC( 0xc6b0 ), SHC( 0xc6e3 ), SHC( 0xc717 ), SHC( 0xc74a ), SHC( 0xc77d ), SHC( 0xc7b1 ),
- SHC( 0xc7e4 ), SHC( 0xc817 ), SHC( 0xc84b ), SHC( 0xc87e ), SHC( 0xc8b2 ), SHC( 0xc8e6 ), SHC( 0xc919 ), SHC( 0xc94d ),
- SHC( 0xc981 ), SHC( 0xc9b4 ), SHC( 0xc9e8 ), SHC( 0xca1c ), SHC( 0xca50 ), SHC( 0xca84 ), SHC( 0xcab8 ), SHC( 0xcaec ),
- SHC( 0xcb20 ), SHC( 0xcb54 ), SHC( 0xcb88 ), SHC( 0xcbbc ), SHC( 0xcbf1 ), SHC( 0xcc25 ), SHC( 0xcc59 ), SHC( 0xcc8d ),
- SHC( 0xccc2 ), SHC( 0xccf6 ), SHC( 0xcd2b ), SHC( 0xcd5f ), SHC( 0xcd94 ), SHC( 0xcdc8 ), SHC( 0xcdfd ), SHC( 0xce32 ),
- SHC( 0xce66 ), SHC( 0xce9b ), SHC( 0xced0 ), SHC( 0xcf05 ), SHC( 0xcf3a ), SHC( 0xcf6e ), SHC( 0xcfa3 ), SHC( 0xcfd8 ),
- SHC( 0xd00d ), SHC( 0xd042 ), SHC( 0xd078 ), SHC( 0xd0ad ), SHC( 0xd0e2 ), SHC( 0xd117 ), SHC( 0xd14c ), SHC( 0xd181 ),
- SHC( 0xd1b7 ), SHC( 0xd1ec ), SHC( 0xd221 ), SHC( 0xd257 ), SHC( 0xd28c ), SHC( 0xd2c2 ), SHC( 0xd2f7 ), SHC( 0xd32d ),
- SHC( 0xd362 ), SHC( 0xd398 ), SHC( 0xd3ce ), SHC( 0xd403 ), SHC( 0xd439 ), SHC( 0xd46f ), SHC( 0xd4a5 ), SHC( 0xd4db ),
- SHC( 0xd510 ), SHC( 0xd546 ), SHC( 0xd57c ), SHC( 0xd5b2 ), SHC( 0xd5e8 ), SHC( 0xd61e ), SHC( 0xd654 ), SHC( 0xd68a ),
- SHC( 0xd6c0 ), SHC( 0xd6f7 ), SHC( 0xd72d ), SHC( 0xd763 ), SHC( 0xd799 ), SHC( 0xd7d0 ), SHC( 0xd806 ), SHC( 0xd83c ),
- SHC( 0xd873 ), SHC( 0xd8a9 ), SHC( 0xd8df ), SHC( 0xd916 ), SHC( 0xd94c ), SHC( 0xd983 ), SHC( 0xd9ba ), SHC( 0xd9f0 ),
- SHC( 0xda27 ), SHC( 0xda5d ), SHC( 0xda94 ), SHC( 0xdacb ), SHC( 0xdb02 ), SHC( 0xdb38 ), SHC( 0xdb6f ), SHC( 0xdba6 ),
- SHC( 0xdbdd ), SHC( 0xdc14 ), SHC( 0xdc4b ), SHC( 0xdc81 ), SHC( 0xdcb8 ), SHC( 0xdcef ), SHC( 0xdd26 ), SHC( 0xdd5d ),
- SHC( 0xdd95 ), SHC( 0xddcc ), SHC( 0xde03 ), SHC( 0xde3a ), SHC( 0xde71 ), SHC( 0xdea8 ), SHC( 0xdee0 ), SHC( 0xdf17 ),
- SHC( 0xdf4e ), SHC( 0xdf85 ), SHC( 0xdfbd ), SHC( 0xdff4 ), SHC( 0xe02b ), SHC( 0xe063 ), SHC( 0xe09a ), SHC( 0xe0d2 ),
- SHC( 0xe109 ), SHC( 0xe141 ), SHC( 0xe178 ), SHC( 0xe1b0 ), SHC( 0xe1e7 ), SHC( 0xe21f ), SHC( 0xe257 ), SHC( 0xe28e ),
- SHC( 0xe2c6 ), SHC( 0xe2fe ), SHC( 0xe335 ), SHC( 0xe36d ), SHC( 0xe3a5 ), SHC( 0xe3dd ), SHC( 0xe414 ), SHC( 0xe44c ),
- SHC( 0xe484 ), SHC( 0xe4bc ), SHC( 0xe4f4 ), SHC( 0xe52c ), SHC( 0xe564 ), SHC( 0xe59c ), SHC( 0xe5d4 ), SHC( 0xe60c ),
- SHC( 0xe644 ), SHC( 0xe67c ), SHC( 0xe6b4 ), SHC( 0xe6ec ), SHC( 0xe724 ), SHC( 0xe75c ), SHC( 0xe794 ), SHC( 0xe7cc ),
- SHC( 0xe804 ), SHC( 0xe83d ), SHC( 0xe875 ), SHC( 0xe8ad ), SHC( 0xe8e5 ), SHC( 0xe91e ), SHC( 0xe956 ), SHC( 0xe98e ),
- SHC( 0xe9c6 ), SHC( 0xe9ff ), SHC( 0xea37 ), SHC( 0xea6f ), SHC( 0xeaa8 ), SHC( 0xeae0 ), SHC( 0xeb19 ), SHC( 0xeb51 ),
- SHC( 0xeb8a ), SHC( 0xebc2 ), SHC( 0xebfa ), SHC( 0xec33 ), SHC( 0xec6b ), SHC( 0xeca4 ), SHC( 0xecdd ), SHC( 0xed15 ),
- SHC( 0xed4e ), SHC( 0xed86 ), SHC( 0xedbf ), SHC( 0xedf7 ), SHC( 0xee30 ), SHC( 0xee69 ), SHC( 0xeea1 ), SHC( 0xeeda ),
- SHC( 0xef13 ), SHC( 0xef4b ), SHC( 0xef84 ), SHC( 0xefbd ), SHC( 0xeff6 ), SHC( 0xf02e ), SHC( 0xf067 ), SHC( 0xf0a0 ),
- SHC( 0xf0d9 ), SHC( 0xf111 ), SHC( 0xf14a ), SHC( 0xf183 ), SHC( 0xf1bc ), SHC( 0xf1f5 ), SHC( 0xf22e ), SHC( 0xf266 ),
- SHC( 0xf29f ), SHC( 0xf2d8 ), SHC( 0xf311 ), SHC( 0xf34a ), SHC( 0xf383 ), SHC( 0xf3bc ), SHC( 0xf3f5 ), SHC( 0xf42e ),
- SHC( 0xf467 ), SHC( 0xf4a0 ), SHC( 0xf4d9 ), SHC( 0xf512 ), SHC( 0xf54b ), SHC( 0xf584 ), SHC( 0xf5bd ), SHC( 0xf5f6 ),
- SHC( 0xf62f ), SHC( 0xf668 ), SHC( 0xf6a1 ), SHC( 0xf6da ), SHC( 0xf713 ), SHC( 0xf74c ), SHC( 0xf785 ), SHC( 0xf7be ),
- SHC( 0xf7f7 ), SHC( 0xf830 ), SHC( 0xf869 ), SHC( 0xf8a2 ), SHC( 0xf8db ), SHC( 0xf914 ), SHC( 0xf94e ), SHC( 0xf987 ),
- SHC( 0xf9c0 ), SHC( 0xf9f9 ), SHC( 0xfa32 ), SHC( 0xfa6b ), SHC( 0xfaa4 ), SHC( 0xfadd ), SHC( 0xfb17 ), SHC( 0xfb50 ),
- SHC( 0xfb89 ), SHC( 0xfbc2 ), SHC( 0xfbfb ), SHC( 0xfc34 ), SHC( 0xfc6e ), SHC( 0xfca7 ), SHC( 0xfce0 ), SHC( 0xfd19 ),
- SHC( 0xfd52 ), SHC( 0xfd8b ), SHC( 0xfdc5 ), SHC( 0xfdfe ), SHC( 0xfe37 ), SHC( 0xfe70 ), SHC( 0xfea9 ), SHC( 0xfee3 ),
- SHC( 0xff1c ), SHC( 0xff55 ), SHC( 0xff8e ), SHC( 0xffc7 ), SHC( 0x0000 ), SHC( 0x0039 ), SHC( 0x0072 ), SHC( 0x00ab ),
- SHC( 0x00e4 ), SHC( 0x011d ), SHC( 0x0157 ), SHC( 0x0190 ), SHC( 0x01c9 ), SHC( 0x0202 ), SHC( 0x023b ), SHC( 0x0275 ),
- SHC( 0x02ae ), SHC( 0x02e7 ), SHC( 0x0320 ), SHC( 0x0359 ), SHC( 0x0392 ), SHC( 0x03cc ), SHC( 0x0405 ), SHC( 0x043e ),
- SHC( 0x0477 ), SHC( 0x04b0 ), SHC( 0x04e9 ), SHC( 0x0523 ), SHC( 0x055c ), SHC( 0x0595 ), SHC( 0x05ce ), SHC( 0x0607 ),
- SHC( 0x0640 ), SHC( 0x0679 ), SHC( 0x06b2 ), SHC( 0x06ec ), SHC( 0x0725 ), SHC( 0x075e ), SHC( 0x0797 ), SHC( 0x07d0 ),
- SHC( 0x0809 ), SHC( 0x0842 ), SHC( 0x087b ), SHC( 0x08b4 ), SHC( 0x08ed ), SHC( 0x0926 ), SHC( 0x095f ), SHC( 0x0998 ),
- SHC( 0x09d1 ), SHC( 0x0a0a ), SHC( 0x0a43 ), SHC( 0x0a7c ), SHC( 0x0ab5 ), SHC( 0x0aee ), SHC( 0x0b27 ), SHC( 0x0b60 ),
- SHC( 0x0b99 ), SHC( 0x0bd2 ), SHC( 0x0c0b ), SHC( 0x0c44 ), SHC( 0x0c7d ), SHC( 0x0cb6 ), SHC( 0x0cef ), SHC( 0x0d28 ),
- SHC( 0x0d61 ), SHC( 0x0d9a ), SHC( 0x0dd2 ), SHC( 0x0e0b ), SHC( 0x0e44 ), SHC( 0x0e7d ), SHC( 0x0eb6 ), SHC( 0x0eef ),
- SHC( 0x0f27 ), SHC( 0x0f60 ), SHC( 0x0f99 ), SHC( 0x0fd2 ), SHC( 0x100a ), SHC( 0x1043 ), SHC( 0x107c ), SHC( 0x10b5 ),
- SHC( 0x10ed ), SHC( 0x1126 ), SHC( 0x115f ), SHC( 0x1197 ), SHC( 0x11d0 ), SHC( 0x1209 ), SHC( 0x1241 ), SHC( 0x127a ),
- SHC( 0x12b2 ), SHC( 0x12eb ), SHC( 0x1323 ), SHC( 0x135c ), SHC( 0x1395 ), SHC( 0x13cd ), SHC( 0x1406 ), SHC( 0x143e ),
- SHC( 0x1476 ), SHC( 0x14af ), SHC( 0x14e7 ), SHC( 0x1520 ), SHC( 0x1558 ), SHC( 0x1591 ), SHC( 0x15c9 ), SHC( 0x1601 ),
- SHC( 0x163a ), SHC( 0x1672 ), SHC( 0x16aa ), SHC( 0x16e2 ), SHC( 0x171b ), SHC( 0x1753 ), SHC( 0x178b ), SHC( 0x17c3 ),
- SHC( 0x17fc ), SHC( 0x1834 ), SHC( 0x186c ), SHC( 0x18a4 ), SHC( 0x18dc ), SHC( 0x1914 ), SHC( 0x194c ), SHC( 0x1984 ),
- SHC( 0x19bc ), SHC( 0x19f4 ), SHC( 0x1a2c ), SHC( 0x1a64 ), SHC( 0x1a9c ), SHC( 0x1ad4 ), SHC( 0x1b0c ), SHC( 0x1b44 ),
- SHC( 0x1b7c ), SHC( 0x1bb4 ), SHC( 0x1bec ), SHC( 0x1c23 ), SHC( 0x1c5b ), SHC( 0x1c93 ), SHC( 0x1ccb ), SHC( 0x1d02 ),
- SHC( 0x1d3a ), SHC( 0x1d72 ), SHC( 0x1da9 ), SHC( 0x1de1 ), SHC( 0x1e19 ), SHC( 0x1e50 ), SHC( 0x1e88 ), SHC( 0x1ebf ),
- SHC( 0x1ef7 ), SHC( 0x1f2e ), SHC( 0x1f66 ), SHC( 0x1f9d ), SHC( 0x1fd5 ), SHC( 0x200c ), SHC( 0x2043 ), SHC( 0x207b ),
- SHC( 0x20b2 ), SHC( 0x20e9 ), SHC( 0x2120 ), SHC( 0x2158 ), SHC( 0x218f ), SHC( 0x21c6 ), SHC( 0x21fd ), SHC( 0x2234 ),
- SHC( 0x226b ), SHC( 0x22a3 ), SHC( 0x22da ), SHC( 0x2311 ), SHC( 0x2348 ), SHC( 0x237f ), SHC( 0x23b5 ), SHC( 0x23ec ),
- SHC( 0x2423 ), SHC( 0x245a ), SHC( 0x2491 ), SHC( 0x24c8 ), SHC( 0x24fe ), SHC( 0x2535 ), SHC( 0x256c ), SHC( 0x25a3 ),
- SHC( 0x25d9 ), SHC( 0x2610 ), SHC( 0x2646 ), SHC( 0x267d ), SHC( 0x26b4 ), SHC( 0x26ea ), SHC( 0x2721 ), SHC( 0x2757 ),
- SHC( 0x278d ), SHC( 0x27c4 ), SHC( 0x27fa ), SHC( 0x2830 ), SHC( 0x2867 ), SHC( 0x289d ), SHC( 0x28d3 ), SHC( 0x2909 ),
- SHC( 0x2940 ), SHC( 0x2976 ), SHC( 0x29ac ), SHC( 0x29e2 ), SHC( 0x2a18 ), SHC( 0x2a4e ), SHC( 0x2a84 ), SHC( 0x2aba ),
- SHC( 0x2af0 ), SHC( 0x2b25 ), SHC( 0x2b5b ), SHC( 0x2b91 ), SHC( 0x2bc7 ), SHC( 0x2bfd ), SHC( 0x2c32 ), SHC( 0x2c68 ),
- SHC( 0x2c9e ), SHC( 0x2cd3 ), SHC( 0x2d09 ), SHC( 0x2d3e ), SHC( 0x2d74 ), SHC( 0x2da9 ), SHC( 0x2ddf ), SHC( 0x2e14 ),
- SHC( 0x2e49 ), SHC( 0x2e7f ), SHC( 0x2eb4 ), SHC( 0x2ee9 ), SHC( 0x2f1e ), SHC( 0x2f53 ), SHC( 0x2f88 ), SHC( 0x2fbe ),
- SHC( 0x2ff3 ), SHC( 0x3028 ), SHC( 0x305d ), SHC( 0x3092 ), SHC( 0x30c6 ), SHC( 0x30fb ), SHC( 0x3130 ), SHC( 0x3165 ),
- SHC( 0x319a ), SHC( 0x31ce ), SHC( 0x3203 ), SHC( 0x3238 ), SHC( 0x326c ), SHC( 0x32a1 ), SHC( 0x32d5 ), SHC( 0x330a ),
- SHC( 0x333e ), SHC( 0x3373 ), SHC( 0x33a7 ), SHC( 0x33db ), SHC( 0x340f ), SHC( 0x3444 ), SHC( 0x3478 ), SHC( 0x34ac ),
- SHC( 0x34e0 ), SHC( 0x3514 ), SHC( 0x3548 ), SHC( 0x357c ), SHC( 0x35b0 ), SHC( 0x35e4 ), SHC( 0x3618 ), SHC( 0x364c ),
- SHC( 0x367f ), SHC( 0x36b3 ), SHC( 0x36e7 ), SHC( 0x371a ), SHC( 0x374e ), SHC( 0x3782 ), SHC( 0x37b5 ), SHC( 0x37e9 ),
- SHC( 0x381c ), SHC( 0x384f ), SHC( 0x3883 ), SHC( 0x38b6 ), SHC( 0x38e9 ), SHC( 0x391d ), SHC( 0x3950 ), SHC( 0x3983 ),
- SHC( 0x39b6 ), SHC( 0x39e9 ), SHC( 0x3a1c ), SHC( 0x3a4f ), SHC( 0x3a82 ), SHC( 0x3ab5 ), SHC( 0x3ae7 ), SHC( 0x3b1a ),
- SHC( 0x3b4d ), SHC( 0x3b7f ), SHC( 0x3bb2 ), SHC( 0x3be5 ), SHC( 0x3c17 ), SHC( 0x3c4a ), SHC( 0x3c7c ), SHC( 0x3cae ),
- SHC( 0x3ce1 ), SHC( 0x3d13 ), SHC( 0x3d45 ), SHC( 0x3d77 ), SHC( 0x3daa ), SHC( 0x3ddc ), SHC( 0x3e0e ), SHC( 0x3e40 ),
- SHC( 0x3e72 ), SHC( 0x3ea4 ), SHC( 0x3ed5 ), SHC( 0x3f07 ), SHC( 0x3f39 ), SHC( 0x3f6b ), SHC( 0x3f9c ), SHC( 0x3fce ),
- SHC( 0x3fff )
-};
-
-const Word16 ivas_sin_az_fx[361] = { // Q15
- SHC( 0x0000 ), SHC( 0xfdc5 ), SHC( 0xfb89 ), SHC( 0xf94e ), SHC( 0xf713 ), SHC( 0xf4d9 ), SHC( 0xf29f ), SHC( 0xf067 ),
- SHC( 0xee30 ), SHC( 0xebfa ), SHC( 0xe9c6 ), SHC( 0xe794 ), SHC( 0xe564 ), SHC( 0xe335 ), SHC( 0xe109 ), SHC( 0xdee0 ),
- SHC( 0xdcb8 ), SHC( 0xda94 ), SHC( 0xd873 ), SHC( 0xd654 ), SHC( 0xd439 ), SHC( 0xd221 ), SHC( 0xd00d ), SHC( 0xcdfd ),
- SHC( 0xcbf1 ), SHC( 0xc9e8 ), SHC( 0xc7e4 ), SHC( 0xc5e4 ), SHC( 0xc3e9 ), SHC( 0xc1f2 ), SHC( 0xc001 ), SHC( 0xbe14 ),
- SHC( 0xbc2c ), SHC( 0xba4a ), SHC( 0xb86d ), SHC( 0xb696 ), SHC( 0xb4c4 ), SHC( 0xb2f8 ), SHC( 0xb133 ), SHC( 0xaf73 ),
- SHC( 0xadba ), SHC( 0xac07 ), SHC( 0xaa5a ), SHC( 0xa8b5 ), SHC( 0xa716 ), SHC( 0xa57e ), SHC( 0xa3ed ), SHC( 0xa264 ),
- SHC( 0xa0e1 ), SHC( 0x9f66 ), SHC( 0x9df3 ), SHC( 0x9c87 ), SHC( 0x9b23 ), SHC( 0x99c7 ), SHC( 0x9873 ), SHC( 0x9727 ),
- SHC( 0x95e3 ), SHC( 0x94a7 ), SHC( 0x9374 ), SHC( 0x9249 ), SHC( 0x9127 ), SHC( 0x900d ), SHC( 0x8efc ), SHC( 0x8df4 ),
- SHC( 0x8cf5 ), SHC( 0x8bff ), SHC( 0x8b11 ), SHC( 0x8a2d ), SHC( 0x8953 ), SHC( 0x8881 ), SHC( 0x87b9 ), SHC( 0x86fa ),
- SHC( 0x8644 ), SHC( 0x8598 ), SHC( 0x84f6 ), SHC( 0x845d ), SHC( 0x83ce ), SHC( 0x8348 ), SHC( 0x82cd ), SHC( 0x825b ),
- SHC( 0x81f2 ), SHC( 0x8194 ), SHC( 0x813f ), SHC( 0x80f5 ), SHC( 0x80b4 ), SHC( 0x807d ), SHC( 0x8050 ), SHC( 0x802d ),
- SHC( 0x8014 ), SHC( 0x8005 ), SHC( 0x8000 ), SHC( 0x8005 ), SHC( 0x8014 ), SHC( 0x802d ), SHC( 0x8050 ), SHC( 0x807d ),
- SHC( 0x80b4 ), SHC( 0x80f5 ), SHC( 0x813f ), SHC( 0x8194 ), SHC( 0x81f2 ), SHC( 0x825b ), SHC( 0x82cd ), SHC( 0x8348 ),
- SHC( 0x83ce ), SHC( 0x845d ), SHC( 0x84f6 ), SHC( 0x8598 ), SHC( 0x8644 ), SHC( 0x86fa ), SHC( 0x87b9 ), SHC( 0x8881 ),
- SHC( 0x8953 ), SHC( 0x8a2d ), SHC( 0x8b11 ), SHC( 0x8bff ), SHC( 0x8cf5 ), SHC( 0x8df4 ), SHC( 0x8efc ), SHC( 0x900d ),
- SHC( 0x9127 ), SHC( 0x9249 ), SHC( 0x9374 ), SHC( 0x94a7 ), SHC( 0x95e3 ), SHC( 0x9727 ), SHC( 0x9873 ), SHC( 0x99c7 ),
- SHC( 0x9b23 ), SHC( 0x9c87 ), SHC( 0x9df3 ), SHC( 0x9f66 ), SHC( 0xa0e1 ), SHC( 0xa264 ), SHC( 0xa3ed ), SHC( 0xa57e ),
- SHC( 0xa716 ), SHC( 0xa8b5 ), SHC( 0xaa5a ), SHC( 0xac07 ), SHC( 0xadba ), SHC( 0xaf73 ), SHC( 0xb133 ), SHC( 0xb2f8 ),
- SHC( 0xb4c4 ), SHC( 0xb696 ), SHC( 0xb86d ), SHC( 0xba4a ), SHC( 0xbc2c ), SHC( 0xbe14 ), SHC( 0xc001 ), SHC( 0xc1f2 ),
- SHC( 0xc3e9 ), SHC( 0xc5e4 ), SHC( 0xc7e4 ), SHC( 0xc9e8 ), SHC( 0xcbf1 ), SHC( 0xcdfd ), SHC( 0xd00d ), SHC( 0xd221 ),
- SHC( 0xd439 ), SHC( 0xd654 ), SHC( 0xd873 ), SHC( 0xda94 ), SHC( 0xdcb8 ), SHC( 0xdee0 ), SHC( 0xe109 ), SHC( 0xe335 ),
- SHC( 0xe564 ), SHC( 0xe794 ), SHC( 0xe9c6 ), SHC( 0xebfa ), SHC( 0xee30 ), SHC( 0xf067 ), SHC( 0xf29f ), SHC( 0xf4d9 ),
- SHC( 0xf713 ), SHC( 0xf94e ), SHC( 0xfb89 ), SHC( 0xfdc5 ), SHC( 0x0000 ), SHC( 0x023b ), SHC( 0x0477 ), SHC( 0x06b2 ),
- SHC( 0x08ed ), SHC( 0x0b27 ), SHC( 0x0d61 ), SHC( 0x0f99 ), SHC( 0x11d0 ), SHC( 0x1406 ), SHC( 0x163a ), SHC( 0x186c ),
- SHC( 0x1a9c ), SHC( 0x1ccb ), SHC( 0x1ef7 ), SHC( 0x2120 ), SHC( 0x2348 ), SHC( 0x256c ), SHC( 0x278d ), SHC( 0x29ac ),
- SHC( 0x2bc7 ), SHC( 0x2ddf ), SHC( 0x2ff3 ), SHC( 0x3203 ), SHC( 0x340f ), SHC( 0x3618 ), SHC( 0x381c ), SHC( 0x3a1c ),
- SHC( 0x3c17 ), SHC( 0x3e0e ), SHC( 0x3fff ), SHC( 0x41ec ), SHC( 0x43d4 ), SHC( 0x45b6 ), SHC( 0x4793 ), SHC( 0x496a ),
- SHC( 0x4b3c ), SHC( 0x4d08 ), SHC( 0x4ecd ), SHC( 0x508d ), SHC( 0x5246 ), SHC( 0x53f9 ), SHC( 0x55a6 ), SHC( 0x574b ),
- SHC( 0x58ea ), SHC( 0x5a82 ), SHC( 0x5c13 ), SHC( 0x5d9c ), SHC( 0x5f1f ), SHC( 0x609a ), SHC( 0x620d ), SHC( 0x6379 ),
- SHC( 0x64dd ), SHC( 0x6639 ), SHC( 0x678d ), SHC( 0x68d9 ), SHC( 0x6a1d ), SHC( 0x6b59 ), SHC( 0x6c8c ), SHC( 0x6db7 ),
- SHC( 0x6ed9 ), SHC( 0x6ff3 ), SHC( 0x7104 ), SHC( 0x720c ), SHC( 0x730b ), SHC( 0x7401 ), SHC( 0x74ef ), SHC( 0x75d3 ),
- SHC( 0x76ad ), SHC( 0x777f ), SHC( 0x7847 ), SHC( 0x7906 ), SHC( 0x79bc ), SHC( 0x7a68 ), SHC( 0x7b0a ), SHC( 0x7ba3 ),
- SHC( 0x7c32 ), SHC( 0x7cb8 ), SHC( 0x7d33 ), SHC( 0x7da5 ), SHC( 0x7e0e ), SHC( 0x7e6c ), SHC( 0x7ec1 ), SHC( 0x7f0b ),
- SHC( 0x7f4c ), SHC( 0x7f83 ), SHC( 0x7fb0 ), SHC( 0x7fd3 ), SHC( 0x7fec ), SHC( 0x7ffb ), SHC( 0x7fff ), SHC( 0x7ffb ),
- SHC( 0x7fec ), SHC( 0x7fd3 ), SHC( 0x7fb0 ), SHC( 0x7f83 ), SHC( 0x7f4c ), SHC( 0x7f0b ), SHC( 0x7ec1 ), SHC( 0x7e6c ),
- SHC( 0x7e0e ), SHC( 0x7da5 ), SHC( 0x7d33 ), SHC( 0x7cb8 ), SHC( 0x7c32 ), SHC( 0x7ba3 ), SHC( 0x7b0a ), SHC( 0x7a68 ),
- SHC( 0x79bc ), SHC( 0x7906 ), SHC( 0x7847 ), SHC( 0x777f ), SHC( 0x76ad ), SHC( 0x75d3 ), SHC( 0x74ef ), SHC( 0x7401 ),
- SHC( 0x730b ), SHC( 0x720c ), SHC( 0x7104 ), SHC( 0x6ff3 ), SHC( 0x6ed9 ), SHC( 0x6db7 ), SHC( 0x6c8c ), SHC( 0x6b59 ),
- SHC( 0x6a1d ), SHC( 0x68d9 ), SHC( 0x678d ), SHC( 0x6639 ), SHC( 0x64dd ), SHC( 0x6379 ), SHC( 0x620d ), SHC( 0x609a ),
- SHC( 0x5f1f ), SHC( 0x5d9c ), SHC( 0x5c13 ), SHC( 0x5a82 ), SHC( 0x58ea ), SHC( 0x574b ), SHC( 0x55a6 ), SHC( 0x53f9 ),
- SHC( 0x5246 ), SHC( 0x508d ), SHC( 0x4ecd ), SHC( 0x4d08 ), SHC( 0x4b3c ), SHC( 0x496a ), SHC( 0x4793 ), SHC( 0x45b6 ),
- SHC( 0x43d4 ), SHC( 0x41ec ), SHC( 0x3fff ), SHC( 0x3e0e ), SHC( 0x3c17 ), SHC( 0x3a1c ), SHC( 0x381c ), SHC( 0x3618 ),
- SHC( 0x340f ), SHC( 0x3203 ), SHC( 0x2ff3 ), SHC( 0x2ddf ), SHC( 0x2bc7 ), SHC( 0x29ac ), SHC( 0x278d ), SHC( 0x256c ),
- SHC( 0x2348 ), SHC( 0x2120 ), SHC( 0x1ef7 ), SHC( 0x1ccb ), SHC( 0x1a9c ), SHC( 0x186c ), SHC( 0x163a ), SHC( 0x1406 ),
- SHC( 0x11d0 ), SHC( 0x0f99 ), SHC( 0x0d61 ), SHC( 0x0b27 ), SHC( 0x08ed ), SHC( 0x06b2 ), SHC( 0x0477 ), SHC( 0x023b ),
- SHC( 0x0000 )
-
-};
-
-/* Tables required in edxt_fx() */
-const Word16 sin_scale_tbl_960[960] = /* Q15 */
- {
- 0, 53, 107, 160, 214,
- 268, 321, 375, 428, 482,
- 536, 589, 643, 696, 750,
- 804, 857, 911, 964, 1018,
- 1072, 1125, 1179, 1232, 1286,
- 1339, 1393, 1447, 1500, 1554,
- 1607, 1661, 1714, 1768, 1821,
- 1875, 1929, 1982, 2036, 2089,
- 2143, 2196, 2250, 2303, 2357,
- 2410, 2463, 2517, 2570, 2624,
- 2677, 2731, 2784, 2838, 2891,
- 2944, 2998, 3051, 3104, 3158,
- 3211, 3265, 3318, 3371, 3425,
- 3478, 3531, 3585, 3638, 3691,
- 3744, 3798, 3851, 3904, 3957,
- 4011, 4064, 4117, 4170, 4223,
- 4276, 4330, 4383, 4436, 4489,
- 4542, 4595, 4648, 4701, 4754,
- 4807, 4860, 4913, 4966, 5019,
- 5072, 5125, 5178, 5231, 5284,
- 5337, 5390, 5443, 5496, 5549,
- 5601, 5654, 5707, 5760, 5813,
- 5865, 5918, 5971, 6024, 6076,
- 6129, 6182, 6234, 6287, 6339,
- 6392, 6445, 6497, 6550, 6602,
- 6655, 6707, 6760, 6812, 6865,
- 6917, 6969, 7022, 7074, 7126,
- 7179, 7231, 7283, 7336, 7388,
- 7440, 7492, 7544, 7597, 7649,
- 7701, 7753, 7805, 7857, 7909,
- 7961, 8013, 8065, 8117, 8169,
- 8221, 8273, 8325, 8377, 8428,
- 8480, 8532, 8584, 8635, 8687,
- 8739, 8791, 8842, 8894, 8945,
- 8997, 9048, 9100, 9151, 9203,
- 9254, 9306, 9357, 9409, 9460,
- 9511, 9563, 9614, 9665, 9716,
- 9767, 9819, 9870, 9921, 9972,
- 10023, 10074, 10125, 10176, 10227,
- 10278, 10329, 10380, 10431, 10481,
- 10532, 10583, 10634, 10684, 10735,
- 10786, 10836, 10887, 10937, 10988,
- 11038, 11089, 11139, 11190, 11240,
- 11290, 11341, 11391, 11441, 11491,
- 11542, 11592, 11642, 11692, 11742,
- 11792, 11842, 11892, 11942, 11992,
- 12042, 12092, 12142, 12191, 12241,
- 12291, 12340, 12390, 12440, 12489,
- 12539, 12588, 12638, 12687, 12737,
- 12786, 12835, 12885, 12934, 12983,
- 13033, 13082, 13131, 13180, 13229,
- 13278, 13327, 13376, 13425, 13474,
- 13523, 13571, 13620, 13669, 13718,
- 13766, 13815, 13864, 13912, 13961,
- 14009, 14058, 14106, 14154, 14203,
- 14251, 14299, 14348, 14396, 14444,
- 14492, 14540, 14588, 14636, 14684,
- 14732, 14780, 14828, 14875, 14923,
- 14971, 15019, 15066, 15114, 15161,
- 15209, 15256, 15304, 15351, 15398,
- 15446, 15493, 15540, 15587, 15635,
- 15682, 15729, 15776, 15823, 15870,
- 15917, 15963, 16010, 16057, 16104,
- 16150, 16197, 16244, 16290, 16337,
- 16383, 16429, 16476, 16522, 16568,
- 16615, 16661, 16707, 16753, 16799,
- 16845, 16891, 16937, 16983, 17029,
- 17074, 17120, 17166, 17212, 17257,
- 17303, 17348, 17394, 17439, 17484,
- 17530, 17575, 17620, 17665, 17711,
- 17756, 17801, 17846, 17891, 17936,
- 17980, 18025, 18070, 18115, 18159,
- 18204, 18248, 18293, 18337, 18382,
- 18426, 18470, 18515, 18559, 18603,
- 18647, 18691, 18735, 18779, 18823,
- 18867, 18911, 18955, 18998, 19042,
- 19086, 19129, 19173, 19216, 19259,
- 19303, 19346, 19389, 19433, 19476,
- 19519, 19562, 19605, 19648, 19691,
- 19733, 19776, 19819, 19862, 19904,
- 19947, 19989, 20032, 20074, 20116,
- 20159, 20201, 20243, 20285, 20327,
- 20369, 20411, 20453, 20495, 20537,
- 20579, 20620, 20662, 20704, 20745,
- 20787, 20828, 20869, 20911, 20952,
- 20993, 21034, 21075, 21116, 21157,
- 21198, 21239, 21280, 21321, 21361,
- 21402, 21443, 21483, 21524, 21564,
- 21604, 21645, 21685, 21725, 21765,
- 21805, 21845, 21885, 21925, 21965,
- 22004, 22044, 22084, 22123, 22163,
- 22202, 22242, 22281, 22320, 22360,
- 22399, 22438, 22477, 22516, 22555,
- 22594, 22632, 22671, 22710, 22749,
- 22787, 22826, 22864, 22902, 22941,
- 22979, 23017, 23055, 23093, 23131,
- 23169, 23207, 23245, 23283, 23320,
- 23358, 23396, 23433, 23471, 23508,
- 23545, 23583, 23620, 23657, 23694,
- 23731, 23768, 23805, 23842, 23878,
- 23915, 23952, 23988, 24025, 24061,
- 24097, 24134, 24170, 24206, 24242,
- 24278, 24314, 24350, 24386, 24422,
- 24457, 24493, 24529, 24564, 24600,
- 24635, 24670, 24706, 24741, 24776,
- 24811, 24846, 24881, 24916, 24951,
- 24985, 25020, 25054, 25089, 25123,
- 25158, 25192, 25226, 25261, 25295,
- 25329, 25363, 25397, 25430, 25464,
- 25498, 25532, 25565, 25599, 25632,
- 25665, 25699, 25732, 25765, 25798,
- 25831, 25864, 25897, 25930, 25963,
- 25995, 26028, 26060, 26093, 26125,
- 26158, 26190, 26222, 26254, 26286,
- 26318, 26350, 26382, 26414, 26445,
- 26477, 26509, 26540, 26571, 26603,
- 26634, 26665, 26696, 26727, 26758,
- 26789, 26820, 26851, 26882, 26912,
- 26943, 26973, 27004, 27034, 27064,
- 27094, 27125, 27155, 27185, 27214,
- 27244, 27274, 27304, 27333, 27363,
- 27392, 27422, 27451, 27480, 27509,
- 27538, 27567, 27596, 27625, 27654,
- 27683, 27711, 27740, 27769, 27797,
- 27825, 27854, 27882, 27910, 27938,
- 27966, 27994, 28022, 28049, 28077,
- 28105, 28132, 28160, 28187, 28214,
- 28242, 28269, 28296, 28323, 28350,
- 28377, 28403, 28430, 28457, 28483,
- 28510, 28536, 28562, 28589, 28615,
- 28641, 28667, 28693, 28719, 28744,
- 28770, 28796, 28821, 28847, 28872,
- 28897, 28923, 28948, 28973, 28998,
- 29023, 29048, 29072, 29097, 29122,
- 29146, 29171, 29195, 29219, 29244,
- 29268, 29292, 29316, 29340, 29364,
- 29387, 29411, 29435, 29458, 29482,
- 29505, 29528, 29551, 29575, 29598,
- 29621, 29643, 29666, 29689, 29712,
- 29734, 29757, 29779, 29801, 29824,
- 29846, 29868, 29890, 29912, 29934,
- 29955, 29977, 29999, 30020, 30042,
- 30063, 30084, 30106, 30127, 30148,
- 30169, 30190, 30210, 30231, 30252,
- 30272, 30293, 30313, 30333, 30354,
- 30374, 30394, 30414, 30434, 30454,
- 30473, 30493, 30513, 30532, 30552,
- 30571, 30590, 30609, 30628, 30647,
- 30666, 30685, 30704, 30723, 30741,
- 30760, 30778, 30797, 30815, 30833,
- 30851, 30869, 30887, 30905, 30923,
- 30940, 30958, 30975, 30993, 31010,
- 31028, 31045, 31062, 31079, 31096,
- 31113, 31129, 31146, 31163, 31179,
- 31196, 31212, 31228, 31245, 31261,
- 31277, 31293, 31308, 31324, 31340,
- 31356, 31371, 31387, 31402, 31417,
- 31432, 31447, 31462, 31477, 31492,
- 31507, 31522, 31536, 31551, 31565,
- 31580, 31594, 31608, 31622, 31636,
- 31650, 31664, 31678, 31691, 31705,
- 31718, 31732, 31745, 31758, 31771,
- 31785, 31797, 31810, 31823, 31836,
- 31849, 31861, 31874, 31886, 31898,
- 31911, 31923, 31935, 31947, 31959,
- 31970, 31982, 31994, 32005, 32017,
- 32028, 32039, 32050, 32062, 32073,
- 32084, 32094, 32105, 32116, 32126,
- 32137, 32147, 32158, 32168, 32178,
- 32188, 32198, 32208, 32218, 32228,
- 32237, 32247, 32256, 32266, 32275,
- 32284, 32293, 32302, 32311, 32320,
- 32329, 32338, 32346, 32355, 32363,
- 32371, 32380, 32388, 32396, 32404,
- 32412, 32420, 32427, 32435, 32443,
- 32450, 32457, 32465, 32472, 32479,
- 32486, 32493, 32500, 32507, 32513,
- 32520, 32527, 32533, 32539, 32546,
- 32552, 32558, 32564, 32570, 32576,
- 32581, 32587, 32593, 32598, 32603,
- 32609, 32614, 32619, 32624, 32629,
- 32634, 32639, 32643, 32648, 32652,
- 32657, 32661, 32665, 32670, 32674,
- 32678, 32682, 32685, 32689, 32693,
- 32696, 32700, 32703, 32706, 32710,
- 32713, 32716, 32719, 32722, 32724,
- 32727, 32730, 32732, 32735, 32737,
- 32739, 32741, 32743, 32745, 32747,
- 32749, 32751, 32752, 32754, 32755,
- 32757, 32758, 32759, 32760, 32761,
- 32762, 32763, 32764, 32764, 32765,
- 32765, 32766, 32766, 32766, 32766
- };
-
-const Word16 cos_scale_tbl_960[960] = /* Q15 */
- {
- 32767, 32766, 32766, 32766, 32766,
- 32765, 32765, 32764, 32764, 32763,
- 32762, 32761, 32760, 32759, 32758,
- 32757, 32755, 32754, 32752, 32751,
- 32749, 32747, 32745, 32743, 32741,
- 32739, 32737, 32735, 32732, 32730,
- 32727, 32724, 32722, 32719, 32716,
- 32713, 32710, 32706, 32703, 32700,
- 32696, 32693, 32689, 32685, 32682,
- 32678, 32674, 32670, 32665, 32661,
- 32657, 32652, 32648, 32643, 32639,
- 32634, 32629, 32624, 32619, 32614,
- 32609, 32603, 32598, 32593, 32587,
- 32581, 32576, 32570, 32564, 32558,
- 32552, 32546, 32539, 32533, 32527,
- 32520, 32513, 32507, 32500, 32493,
- 32486, 32479, 32472, 32465, 32457,
- 32450, 32443, 32435, 32427, 32420,
- 32412, 32404, 32396, 32388, 32380,
- 32371, 32363, 32355, 32346, 32338,
- 32329, 32320, 32311, 32302, 32293,
- 32284, 32275, 32266, 32256, 32247,
- 32237, 32228, 32218, 32208, 32198,
- 32188, 32178, 32168, 32158, 32147,
- 32137, 32126, 32116, 32105, 32094,
- 32084, 32073, 32062, 32050, 32039,
- 32028, 32017, 32005, 31994, 31982,
- 31970, 31959, 31947, 31935, 31923,
- 31911, 31898, 31886, 31874, 31861,
- 31849, 31836, 31823, 31810, 31797,
- 31785, 31771, 31758, 31745, 31732,
- 31718, 31705, 31691, 31678, 31664,
- 31650, 31636, 31622, 31608, 31594,
- 31580, 31565, 31551, 31536, 31522,
- 31507, 31492, 31477, 31462, 31447,
- 31432, 31417, 31402, 31387, 31371,
- 31356, 31340, 31324, 31308, 31293,
- 31277, 31261, 31245, 31228, 31212,
- 31196, 31179, 31163, 31146, 31129,
- 31113, 31096, 31079, 31062, 31045,
- 31028, 31010, 30993, 30975, 30958,
- 30940, 30923, 30905, 30887, 30869,
- 30851, 30833, 30815, 30797, 30778,
- 30760, 30741, 30723, 30704, 30685,
- 30666, 30647, 30628, 30609, 30590,
- 30571, 30552, 30532, 30513, 30493,
- 30473, 30454, 30434, 30414, 30394,
- 30374, 30354, 30333, 30313, 30293,
- 30272, 30252, 30231, 30210, 30190,
- 30169, 30148, 30127, 30106, 30084,
- 30063, 30042, 30020, 29999, 29977,
- 29955, 29934, 29912, 29890, 29868,
- 29846, 29824, 29801, 29779, 29757,
- 29734, 29712, 29689, 29666, 29643,
- 29621, 29598, 29575, 29551, 29528,
- 29505, 29482, 29458, 29435, 29411,
- 29387, 29364, 29340, 29316, 29292,
- 29268, 29244, 29219, 29195, 29171,
- 29146, 29122, 29097, 29072, 29048,
- 29023, 28998, 28973, 28948, 28923,
- 28897, 28872, 28847, 28821, 28796,
- 28770, 28744, 28719, 28693, 28667,
- 28641, 28615, 28589, 28562, 28536,
- 28510, 28483, 28457, 28430, 28403,
- 28377, 28350, 28323, 28296, 28269,
- 28242, 28214, 28187, 28160, 28132,
- 28105, 28077, 28049, 28022, 27994,
- 27966, 27938, 27910, 27882, 27854,
- 27825, 27797, 27769, 27740, 27711,
- 27683, 27654, 27625, 27596, 27567,
- 27538, 27509, 27480, 27451, 27422,
- 27392, 27363, 27333, 27304, 27274,
- 27244, 27214, 27185, 27155, 27125,
- 27094, 27064, 27034, 27004, 26973,
- 26943, 26912, 26882, 26851, 26820,
- 26789, 26758, 26727, 26696, 26665,
- 26634, 26603, 26571, 26540, 26509,
- 26477, 26445, 26414, 26382, 26350,
- 26318, 26286, 26254, 26222, 26190,
- 26158, 26125, 26093, 26060, 26028,
- 25995, 25963, 25930, 25897, 25864,
- 25831, 25798, 25765, 25732, 25699,
- 25665, 25632, 25599, 25565, 25532,
- 25498, 25464, 25430, 25397, 25363,
- 25329, 25295, 25261, 25226, 25192,
- 25158, 25123, 25089, 25054, 25020,
- 24985, 24951, 24916, 24881, 24846,
- 24811, 24776, 24741, 24706, 24670,
- 24635, 24600, 24564, 24529, 24493,
- 24457, 24422, 24386, 24350, 24314,
- 24278, 24242, 24206, 24170, 24134,
- 24097, 24061, 24025, 23988, 23952,
- 23915, 23878, 23842, 23805, 23768,
- 23731, 23694, 23657, 23620, 23583,
- 23545, 23508, 23471, 23433, 23396,
- 23358, 23320, 23283, 23245, 23207,
- 23169, 23131, 23093, 23055, 23017,
- 22979, 22941, 22902, 22864, 22826,
- 22787, 22749, 22710, 22671, 22632,
- 22594, 22555, 22516, 22477, 22438,
- 22399, 22360, 22320, 22281, 22242,
- 22202, 22163, 22123, 22084, 22044,
- 22004, 21965, 21925, 21885, 21845,
- 21805, 21765, 21725, 21685, 21645,
- 21604, 21564, 21524, 21483, 21443,
- 21402, 21361, 21321, 21280, 21239,
- 21198, 21157, 21116, 21075, 21034,
- 20993, 20952, 20911, 20869, 20828,
- 20787, 20745, 20704, 20662, 20620,
- 20579, 20537, 20495, 20453, 20411,
- 20369, 20327, 20285, 20243, 20201,
- 20159, 20116, 20074, 20032, 19989,
- 19947, 19904, 19862, 19819, 19776,
- 19733, 19691, 19648, 19605, 19562,
- 19519, 19476, 19433, 19389, 19346,
- 19303, 19259, 19216, 19173, 19129,
- 19086, 19042, 18998, 18955, 18911,
- 18867, 18823, 18779, 18735, 18691,
- 18647, 18603, 18559, 18515, 18470,
- 18426, 18382, 18337, 18293, 18248,
- 18204, 18159, 18115, 18070, 18025,
- 17980, 17936, 17891, 17846, 17801,
- 17756, 17711, 17665, 17620, 17575,
- 17530, 17484, 17439, 17394, 17348,
- 17303, 17257, 17212, 17166, 17120,
- 17074, 17029, 16983, 16937, 16891,
- 16845, 16799, 16753, 16707, 16661,
- 16615, 16568, 16522, 16476, 16429,
- 16383, 16337, 16290, 16244, 16197,
- 16150, 16104, 16057, 16010, 15963,
- 15917, 15870, 15823, 15776, 15729,
- 15682, 15635, 15587, 15540, 15493,
- 15446, 15398, 15351, 15304, 15256,
- 15209, 15161, 15114, 15066, 15019,
- 14971, 14923, 14875, 14828, 14780,
- 14732, 14684, 14636, 14588, 14540,
- 14492, 14444, 14396, 14348, 14299,
- 14251, 14203, 14154, 14106, 14058,
- 14009, 13961, 13912, 13864, 13815,
- 13766, 13718, 13669, 13620, 13571,
- 13523, 13474, 13425, 13376, 13327,
- 13278, 13229, 13180, 13131, 13082,
- 13033, 12983, 12934, 12885, 12835,
- 12786, 12737, 12687, 12638, 12588,
- 12539, 12489, 12440, 12390, 12340,
- 12291, 12241, 12191, 12142, 12092,
- 12042, 11992, 11942, 11892, 11842,
- 11792, 11742, 11692, 11642, 11592,
- 11542, 11491, 11441, 11391, 11341,
- 11290, 11240, 11190, 11139, 11089,
- 11038, 10988, 10937, 10887, 10836,
- 10786, 10735, 10684, 10634, 10583,
- 10532, 10481, 10431, 10380, 10329,
- 10278, 10227, 10176, 10125, 10074,
- 10023, 9972, 9921, 9870, 9819,
- 9767, 9716, 9665, 9614, 9563,
- 9511, 9460, 9409, 9357, 9306,
- 9254, 9203, 9151, 9100, 9048,
- 8997, 8945, 8894, 8842, 8791,
- 8739, 8687, 8635, 8584, 8532,
- 8480, 8428, 8377, 8325, 8273,
- 8221, 8169, 8117, 8065, 8013,
- 7961, 7909, 7857, 7805, 7753,
- 7701, 7649, 7597, 7544, 7492,
- 7440, 7388, 7336, 7283, 7231,
- 7179, 7126, 7074, 7022, 6969,
- 6917, 6865, 6812, 6760, 6707,
- 6655, 6602, 6550, 6497, 6445,
- 6392, 6339, 6287, 6234, 6182,
- 6129, 6076, 6024, 5971, 5918,
- 5865, 5813, 5760, 5707, 5654,
- 5601, 5549, 5496, 5443, 5390,
- 5337, 5284, 5231, 5178, 5125,
- 5072, 5019, 4966, 4913, 4860,
- 4807, 4754, 4701, 4648, 4595,
- 4542, 4489, 4436, 4383, 4330,
- 4276, 4223, 4170, 4117, 4064,
- 4011, 3957, 3904, 3851, 3798,
- 3744, 3691, 3638, 3585, 3531,
- 3478, 3425, 3371, 3318, 3265,
- 3211, 3158, 3104, 3051, 2998,
- 2944, 2891, 2838, 2784, 2731,
- 2677, 2624, 2570, 2517, 2463,
- 2410, 2357, 2303, 2250, 2196,
- 2143, 2089, 2036, 1982, 1929,
- 1875, 1821, 1768, 1714, 1661,
- 1607, 1554, 1500, 1447, 1393,
- 1339, 1286, 1232, 1179, 1125,
- 1072, 1018, 964, 911, 857,
- 804, 750, 696, 643, 589,
- 536, 482, 428, 375, 321,
- 268, 214, 160, 107, 53
- };
-
-const Word16 cos_scale_tbl_640[640] = /* Q15 */
- {
- 32767, 32766, 32766, 32766, 32765,
- 32764, 32763, 32762, 32760, 32759,
- 32757, 32755, 32752, 32750, 32747,
- 32744, 32741, 32738, 32735, 32731,
- 32727, 32723, 32719, 32714, 32710,
- 32705, 32700, 32695, 32689, 32684,
- 32678, 32672, 32665, 32659, 32652,
- 32646, 32639, 32631, 32624, 32617,
- 32609, 32601, 32593, 32584, 32576,
- 32567, 32558, 32549, 32539, 32530,
- 32520, 32510, 32500, 32490, 32479,
- 32468, 32457, 32446, 32435, 32424,
- 32412, 32400, 32388, 32376, 32363,
- 32350, 32338, 32324, 32311, 32298,
- 32284, 32270, 32256, 32242, 32228,
- 32213, 32198, 32183, 32168, 32152,
- 32137, 32121, 32105, 32089, 32073,
- 32056, 32039, 32022, 32005, 31988,
- 31970, 31953, 31935, 31917, 31898,
- 31880, 31861, 31842, 31823, 31804,
- 31785, 31765, 31745, 31725, 31705,
- 31684, 31664, 31643, 31622, 31601,
- 31580, 31558, 31536, 31514, 31492,
- 31470, 31447, 31425, 31402, 31379,
- 31356, 31332, 31308, 31285, 31261,
- 31236, 31212, 31188, 31163, 31138,
- 31113, 31087, 31062, 31036, 31010,
- 30984, 30958, 30932, 30905, 30878,
- 30851, 30824, 30797, 30769, 30741,
- 30713, 30685, 30657, 30628, 30600,
- 30571, 30542, 30513, 30483, 30454,
- 30424, 30394, 30364, 30333, 30303,
- 30272, 30241, 30210, 30179, 30148,
- 30116, 30084, 30052, 30020, 29988,
- 29955, 29923, 29890, 29857, 29824,
- 29790, 29757, 29723, 29689, 29655,
- 29621, 29586, 29551, 29517, 29482,
- 29446, 29411, 29375, 29340, 29304,
- 29268, 29232, 29195, 29159, 29122,
- 29085, 29048, 29010, 28973, 28935,
- 28897, 28859, 28821, 28783, 28744,
- 28706, 28667, 28628, 28589, 28549,
- 28510, 28470, 28430, 28390, 28350,
- 28309, 28269, 28228, 28187, 28146,
- 28105, 28063, 28022, 27980, 27938,
- 27896, 27854, 27811, 27769, 27726,
- 27683, 27640, 27596, 27553, 27509,
- 27466, 27422, 27378, 27333, 27289,
- 27244, 27200, 27155, 27109, 27064,
- 27019, 26973, 26927, 26882, 26836,
- 26789, 26743, 26696, 26650, 26603,
- 26556, 26509, 26461, 26414, 26366,
- 26318, 26270, 26222, 26174, 26125,
- 26077, 26028, 25979, 25930, 25881,
- 25831, 25782, 25732, 25682, 25632,
- 25582, 25532, 25481, 25430, 25380,
- 25329, 25278, 25226, 25175, 25123,
- 25072, 25020, 24968, 24916, 24863,
- 24811, 24758, 24706, 24653, 24600,
- 24546, 24493, 24440, 24386, 24332,
- 24278, 24224, 24170, 24116, 24061,
- 24006, 23952, 23897, 23842, 23786,
- 23731, 23675, 23620, 23564, 23508,
- 23452, 23396, 23339, 23283, 23226,
- 23169, 23112, 23055, 22998, 22941,
- 22883, 22826, 22768, 22710, 22652,
- 22594, 22535, 22477, 22418, 22360,
- 22301, 22242, 22183, 22123, 22064,
- 22004, 21945, 21885, 21825, 21765,
- 21705, 21645, 21584, 21524, 21463,
- 21402, 21341, 21280, 21219, 21157,
- 21096, 21034, 20973, 20911, 20849,
- 20787, 20724, 20662, 20600, 20537,
- 20474, 20411, 20348, 20285, 20222,
- 20159, 20095, 20032, 19968, 19904,
- 19840, 19776, 19712, 19648, 19583,
- 19519, 19454, 19389, 19324, 19259,
- 19194, 19129, 19064, 18998, 18933,
- 18867, 18801, 18735, 18669, 18603,
- 18537, 18470, 18404, 18337, 18271,
- 18204, 18137, 18070, 18003, 17936,
- 17868, 17801, 17733, 17665, 17598,
- 17530, 17462, 17394, 17325, 17257,
- 17189, 17120, 17052, 16983, 16914,
- 16845, 16776, 16707, 16638, 16568,
- 16499, 16429, 16360, 16290, 16220,
- 16150, 16080, 16010, 15940, 15870,
- 15799, 15729, 15658, 15587, 15517,
- 15446, 15375, 15304, 15233, 15161,
- 15090, 15019, 14947, 14875, 14804,
- 14732, 14660, 14588, 14516, 14444,
- 14372, 14299, 14227, 14154, 14082,
- 14009, 13936, 13864, 13791, 13718,
- 13645, 13571, 13498, 13425, 13352,
- 13278, 13204, 13131, 13057, 12983,
- 12909, 12835, 12761, 12687, 12613,
- 12539, 12465, 12390, 12316, 12241,
- 12166, 12092, 12017, 11942, 11867,
- 11792, 11717, 11642, 11567, 11491,
- 11416, 11341, 11265, 11190, 11114,
- 11038, 10963, 10887, 10811, 10735,
- 10659, 10583, 10507, 10431, 10354,
- 10278, 10202, 10125, 10049, 9972,
- 9895, 9819, 9742, 9665, 9588,
- 9511, 9434, 9357, 9280, 9203,
- 9126, 9048, 8971, 8894, 8816,
- 8739, 8661, 8584, 8506, 8428,
- 8351, 8273, 8195, 8117, 8039,
- 7961, 7883, 7805, 7727, 7649,
- 7571, 7492, 7414, 7336, 7257,
- 7179, 7100, 7022, 6943, 6865,
- 6786, 6707, 6628, 6550, 6471,
- 6392, 6313, 6234, 6155, 6076,
- 5997, 5918, 5839, 5760, 5681,
- 5601, 5522, 5443, 5364, 5284,
- 5205, 5125, 5046, 4966, 4887,
- 4807, 4728, 4648, 4569, 4489,
- 4409, 4330, 4250, 4170, 4090,
- 4011, 3931, 3851, 3771, 3691,
- 3611, 3531, 3451, 3371, 3291,
- 3211, 3131, 3051, 2971, 2891,
- 2811, 2731, 2651, 2570, 2490,
- 2410, 2330, 2250, 2169, 2089,
- 2009, 1929, 1848, 1768, 1688,
- 1607, 1527, 1447, 1366, 1286,
- 1206, 1125, 1045, 964, 884,
- 804, 723, 643, 562, 482,
- 402, 321, 241, 160, 80
- };
-
-const Word16 sin_scale_tbl_640[640] = /* Q15 */
- {
- 0, 80, 160, 241, 321,
- 402, 482, 562, 643, 723,
- 804, 884, 964, 1045, 1125,
- 1206, 1286, 1366, 1447, 1527,
- 1607, 1688, 1768, 1848, 1929,
- 2009, 2089, 2169, 2250, 2330,
- 2410, 2490, 2570, 2651, 2731,
- 2811, 2891, 2971, 3051, 3131,
- 3211, 3291, 3371, 3451, 3531,
- 3611, 3691, 3771, 3851, 3931,
- 4011, 4090, 4170, 4250, 4330,
- 4409, 4489, 4569, 4648, 4728,
- 4807, 4887, 4966, 5046, 5125,
- 5205, 5284, 5364, 5443, 5522,
- 5601, 5681, 5760, 5839, 5918,
- 5997, 6076, 6155, 6234, 6313,
- 6392, 6471, 6550, 6628, 6707,
- 6786, 6865, 6943, 7022, 7100,
- 7179, 7257, 7336, 7414, 7492,
- 7571, 7649, 7727, 7805, 7883,
- 7961, 8039, 8117, 8195, 8273,
- 8351, 8428, 8506, 8584, 8661,
- 8739, 8816, 8894, 8971, 9048,
- 9126, 9203, 9280, 9357, 9434,
- 9511, 9588, 9665, 9742, 9819,
- 9895, 9972, 10049, 10125, 10202,
- 10278, 10354, 10431, 10507, 10583,
- 10659, 10735, 10811, 10887, 10963,
- 11038, 11114, 11190, 11265, 11341,
- 11416, 11491, 11567, 11642, 11717,
- 11792, 11867, 11942, 12017, 12092,
- 12166, 12241, 12316, 12390, 12465,
- 12539, 12613, 12687, 12761, 12835,
- 12909, 12983, 13057, 13131, 13204,
- 13278, 13352, 13425, 13498, 13571,
- 13645, 13718, 13791, 13864, 13936,
- 14009, 14082, 14154, 14227, 14299,
- 14372, 14444, 14516, 14588, 14660,
- 14732, 14804, 14875, 14947, 15019,
- 15090, 15161, 15233, 15304, 15375,
- 15446, 15517, 15587, 15658, 15729,
- 15799, 15870, 15940, 16010, 16080,
- 16150, 16220, 16290, 16360, 16429,
- 16499, 16568, 16638, 16707, 16776,
- 16845, 16914, 16983, 17052, 17120,
- 17189, 17257, 17325, 17394, 17462,
- 17530, 17598, 17665, 17733, 17801,
- 17868, 17936, 18003, 18070, 18137,
- 18204, 18271, 18337, 18404, 18470,
- 18537, 18603, 18669, 18735, 18801,
- 18867, 18933, 18998, 19064, 19129,
- 19194, 19259, 19324, 19389, 19454,
- 19519, 19583, 19648, 19712, 19776,
- 19840, 19904, 19968, 20032, 20095,
- 20159, 20222, 20285, 20348, 20411,
- 20474, 20537, 20600, 20662, 20724,
- 20787, 20849, 20911, 20973, 21034,
- 21096, 21157, 21219, 21280, 21341,
- 21402, 21463, 21524, 21584, 21645,
- 21705, 21765, 21825, 21885, 21945,
- 22004, 22064, 22123, 22183, 22242,
- 22301, 22360, 22418, 22477, 22535,
- 22594, 22652, 22710, 22768, 22826,
- 22883, 22941, 22998, 23055, 23112,
- 23169, 23226, 23283, 23339, 23396,
- 23452, 23508, 23564, 23620, 23675,
- 23731, 23786, 23842, 23897, 23952,
- 24006, 24061, 24116, 24170, 24224,
- 24278, 24332, 24386, 24440, 24493,
- 24546, 24600, 24653, 24706, 24758,
- 24811, 24863, 24916, 24968, 25020,
- 25072, 25123, 25175, 25226, 25278,
- 25329, 25380, 25430, 25481, 25532,
- 25582, 25632, 25682, 25732, 25782,
- 25831, 25881, 25930, 25979, 26028,
- 26077, 26125, 26174, 26222, 26270,
- 26318, 26366, 26414, 26461, 26509,
- 26556, 26603, 26650, 26696, 26743,
- 26789, 26836, 26882, 26927, 26973,
- 27019, 27064, 27109, 27155, 27200,
- 27244, 27289, 27333, 27378, 27422,
- 27466, 27509, 27553, 27596, 27640,
- 27683, 27726, 27769, 27811, 27854,
- 27896, 27938, 27980, 28022, 28063,
- 28105, 28146, 28187, 28228, 28269,
- 28309, 28350, 28390, 28430, 28470,
- 28510, 28549, 28589, 28628, 28667,
- 28706, 28744, 28783, 28821, 28859,
- 28897, 28935, 28973, 29010, 29048,
- 29085, 29122, 29159, 29195, 29232,
- 29268, 29304, 29340, 29375, 29411,
- 29446, 29482, 29517, 29551, 29586,
- 29621, 29655, 29689, 29723, 29757,
- 29790, 29824, 29857, 29890, 29923,
- 29955, 29988, 30020, 30052, 30084,
- 30116, 30148, 30179, 30210, 30241,
- 30272, 30303, 30333, 30364, 30394,
- 30424, 30454, 30483, 30513, 30542,
- 30571, 30600, 30628, 30657, 30685,
- 30713, 30741, 30769, 30797, 30824,
- 30851, 30878, 30905, 30932, 30958,
- 30984, 31010, 31036, 31062, 31087,
- 31113, 31138, 31163, 31188, 31212,
- 31236, 31261, 31285, 31308, 31332,
- 31356, 31379, 31402, 31425, 31447,
- 31470, 31492, 31514, 31536, 31558,
- 31580, 31601, 31622, 31643, 31664,
- 31684, 31705, 31725, 31745, 31765,
- 31785, 31804, 31823, 31842, 31861,
- 31880, 31898, 31917, 31935, 31953,
- 31970, 31988, 32005, 32022, 32039,
- 32056, 32073, 32089, 32105, 32121,
- 32137, 32152, 32168, 32183, 32198,
- 32213, 32228, 32242, 32256, 32270,
- 32284, 32298, 32311, 32324, 32338,
- 32350, 32363, 32376, 32388, 32400,
- 32412, 32424, 32435, 32446, 32457,
- 32468, 32479, 32490, 32500, 32510,
- 32520, 32530, 32539, 32549, 32558,
- 32567, 32576, 32584, 32593, 32601,
- 32609, 32617, 32624, 32631, 32639,
- 32646, 32652, 32659, 32665, 32672,
- 32678, 32684, 32689, 32695, 32700,
- 32705, 32710, 32714, 32719, 32723,
- 32727, 32731, 32735, 32738, 32741,
- 32744, 32747, 32750, 32752, 32755,
- 32757, 32759, 32760, 32762, 32763,
- 32764, 32765, 32766, 32766, 32766
- };
-
-const Word16 sin_scale_tbl_512[512] = /* Q15 */
- {
- 0, 100, 201, 301, 402,
- 502, 603, 703, 804, 904,
- 1005, 1105, 1206, 1306, 1406,
- 1507, 1607, 1708, 1808, 1908,
- 2009, 2109, 2209, 2310, 2410,
- 2510, 2610, 2711, 2811, 2911,
- 3011, 3111, 3211, 3311, 3411,
- 3511, 3611, 3711, 3811, 3911,
- 4011, 4110, 4210, 4310, 4409,
- 4509, 4608, 4708, 4807, 4907,
- 5006, 5106, 5205, 5304, 5403,
- 5502, 5601, 5700, 5799, 5898,
- 5997, 6096, 6195, 6293, 6392,
- 6491, 6589, 6688, 6786, 6884,
- 6982, 7081, 7179, 7277, 7375,
- 7473, 7571, 7668, 7766, 7864,
- 7961, 8059, 8156, 8253, 8351,
- 8448, 8545, 8642, 8739, 8836,
- 8932, 9029, 9126, 9222, 9319,
- 9415, 9511, 9607, 9703, 9799,
- 9895, 9991, 10087, 10182, 10278,
- 10373, 10469, 10564, 10659, 10754,
- 10849, 10944, 11038, 11133, 11227,
- 11322, 11416, 11510, 11604, 11698,
- 11792, 11886, 11980, 12073, 12166,
- 12260, 12353, 12446, 12539, 12632,
- 12724, 12817, 12909, 13002, 13094,
- 13186, 13278, 13370, 13462, 13553,
- 13645, 13736, 13827, 13918, 14009,
- 14100, 14191, 14281, 14372, 14462,
- 14552, 14642, 14732, 14822, 14911,
- 15001, 15090, 15179, 15268, 15357,
- 15446, 15534, 15623, 15711, 15799,
- 15887, 15975, 16063, 16150, 16238,
- 16325, 16412, 16499, 16586, 16672,
- 16759, 16845, 16931, 17017, 17103,
- 17189, 17274, 17360, 17445, 17530,
- 17615, 17699, 17784, 17868, 17952,
- 18036, 18120, 18204, 18287, 18371,
- 18454, 18537, 18620, 18702, 18785,
- 18867, 18949, 19031, 19113, 19194,
- 19276, 19357, 19438, 19519, 19599,
- 19680, 19760, 19840, 19920, 20000,
- 20079, 20159, 20238, 20317, 20396,
- 20474, 20553, 20631, 20709, 20787,
- 20864, 20942, 21019, 21096, 21173,
- 21249, 21326, 21402, 21478, 21554,
- 21629, 21705, 21780, 21855, 21930,
- 22004, 22079, 22153, 22227, 22301,
- 22374, 22448, 22521, 22594, 22666,
- 22739, 22811, 22883, 22955, 23027,
- 23098, 23169, 23240, 23311, 23382,
- 23452, 23522, 23592, 23661, 23731,
- 23800, 23869, 23938, 24006, 24075,
- 24143, 24211, 24278, 24346, 24413,
- 24480, 24546, 24613, 24679, 24745,
- 24811, 24877, 24942, 25007, 25072,
- 25136, 25201, 25265, 25329, 25392,
- 25456, 25519, 25582, 25645, 25707,
- 25769, 25831, 25893, 25954, 26016,
- 26077, 26137, 26198, 26258, 26318,
- 26378, 26437, 26497, 26556, 26615,
- 26673, 26731, 26789, 26847, 26905,
- 26962, 27019, 27076, 27132, 27188,
- 27244, 27300, 27355, 27411, 27466,
- 27520, 27575, 27629, 27683, 27736,
- 27790, 27843, 27896, 27948, 28001,
- 28053, 28105, 28156, 28208, 28259,
- 28309, 28360, 28410, 28460, 28510,
- 28559, 28608, 28657, 28706, 28754,
- 28802, 28850, 28897, 28945, 28992,
- 29038, 29085, 29131, 29177, 29222,
- 29268, 29313, 29358, 29402, 29446,
- 29490, 29534, 29577, 29621, 29663,
- 29706, 29748, 29790, 29832, 29873,
- 29915, 29955, 29996, 30036, 30076,
- 30116, 30156, 30195, 30234, 30272,
- 30311, 30349, 30386, 30424, 30461,
- 30498, 30535, 30571, 30607, 30643,
- 30678, 30713, 30748, 30783, 30817,
- 30851, 30885, 30918, 30951, 30984,
- 31017, 31049, 31081, 31113, 31144,
- 31175, 31206, 31236, 31267, 31297,
- 31326, 31356, 31385, 31413, 31442,
- 31470, 31498, 31525, 31553, 31580,
- 31606, 31633, 31659, 31684, 31710,
- 31735, 31760, 31785, 31809, 31833,
- 31856, 31880, 31903, 31926, 31948,
- 31970, 31992, 32014, 32035, 32056,
- 32077, 32097, 32117, 32137, 32156,
- 32176, 32194, 32213, 32231, 32249,
- 32267, 32284, 32301, 32318, 32334,
- 32350, 32366, 32382, 32397, 32412,
- 32426, 32441, 32455, 32468, 32482,
- 32495, 32508, 32520, 32532, 32544,
- 32556, 32567, 32578, 32588, 32599,
- 32609, 32618, 32628, 32637, 32646,
- 32654, 32662, 32670, 32678, 32685,
- 32692, 32699, 32705, 32711, 32717,
- 32722, 32727, 32732, 32736, 32740,
- 32744, 32748, 32751, 32754, 32757,
- 32759, 32761, 32763, 32764, 32765,
- 32766, 32766
- };
-
-const Word16 cos_scale_tbl_512[512] = /* Q15 */
- {
- 32767, 32766, 32766, 32765, 32764,
- 32763, 32761, 32759, 32757, 32754,
- 32751, 32748, 32744, 32740, 32736,
- 32732, 32727, 32722, 32717, 32711,
- 32705, 32699, 32692, 32685, 32678,
- 32670, 32662, 32654, 32646, 32637,
- 32628, 32618, 32609, 32599, 32588,
- 32578, 32567, 32556, 32544, 32532,
- 32520, 32508, 32495, 32482, 32468,
- 32455, 32441, 32426, 32412, 32397,
- 32382, 32366, 32350, 32334, 32318,
- 32301, 32284, 32267, 32249, 32231,
- 32213, 32194, 32176, 32156, 32137,
- 32117, 32097, 32077, 32056, 32035,
- 32014, 31992, 31970, 31948, 31926,
- 31903, 31880, 31856, 31833, 31809,
- 31785, 31760, 31735, 31710, 31684,
- 31659, 31633, 31606, 31580, 31553,
- 31525, 31498, 31470, 31442, 31413,
- 31385, 31356, 31326, 31297, 31267,
- 31236, 31206, 31175, 31144, 31113,
- 31081, 31049, 31017, 30984, 30951,
- 30918, 30885, 30851, 30817, 30783,
- 30748, 30713, 30678, 30643, 30607,
- 30571, 30535, 30498, 30461, 30424,
- 30386, 30349, 30311, 30272, 30234,
- 30195, 30156, 30116, 30076, 30036,
- 29996, 29955, 29915, 29873, 29832,
- 29790, 29748, 29706, 29663, 29621,
- 29577, 29534, 29490, 29446, 29402,
- 29358, 29313, 29268, 29222, 29177,
- 29131, 29085, 29038, 28992, 28945,
- 28897, 28850, 28802, 28754, 28706,
- 28657, 28608, 28559, 28510, 28460,
- 28410, 28360, 28309, 28259, 28208,
- 28156, 28105, 28053, 28001, 27948,
- 27896, 27843, 27790, 27736, 27683,
- 27629, 27575, 27520, 27466, 27411,
- 27355, 27300, 27244, 27188, 27132,
- 27076, 27019, 26962, 26905, 26847,
- 26789, 26731, 26673, 26615, 26556,
- 26497, 26437, 26378, 26318, 26258,
- 26198, 26137, 26077, 26016, 25954,
- 25893, 25831, 25769, 25707, 25645,
- 25582, 25519, 25456, 25392, 25329,
- 25265, 25201, 25136, 25072, 25007,
- 24942, 24877, 24811, 24745, 24679,
- 24613, 24546, 24480, 24413, 24346,
- 24278, 24211, 24143, 24075, 24006,
- 23938, 23869, 23800, 23731, 23661,
- 23592, 23522, 23452, 23382, 23311,
- 23240, 23169, 23098, 23027, 22955,
- 22883, 22811, 22739, 22666, 22594,
- 22521, 22448, 22374, 22301, 22227,
- 22153, 22079, 22004, 21930, 21855,
- 21780, 21705, 21629, 21554, 21478,
- 21402, 21326, 21249, 21173, 21096,
- 21019, 20942, 20864, 20787, 20709,
- 20631, 20553, 20474, 20396, 20317,
- 20238, 20159, 20079, 20000, 19920,
- 19840, 19760, 19680, 19599, 19519,
- 19438, 19357, 19276, 19194, 19113,
- 19031, 18949, 18867, 18785, 18702,
- 18620, 18537, 18454, 18371, 18287,
- 18204, 18120, 18036, 17952, 17868,
- 17784, 17699, 17615, 17530, 17445,
- 17360, 17274, 17189, 17103, 17017,
- 16931, 16845, 16759, 16672, 16586,
- 16499, 16412, 16325, 16238, 16150,
- 16063, 15975, 15887, 15799, 15711,
- 15623, 15534, 15446, 15357, 15268,
- 15179, 15090, 15001, 14911, 14822,
- 14732, 14642, 14552, 14462, 14372,
- 14281, 14191, 14100, 14009, 13918,
- 13827, 13736, 13645, 13553, 13462,
- 13370, 13278, 13186, 13094, 13002,
- 12909, 12817, 12724, 12632, 12539,
- 12446, 12353, 12260, 12166, 12073,
- 11980, 11886, 11792, 11698, 11604,
- 11510, 11416, 11322, 11227, 11133,
- 11038, 10944, 10849, 10754, 10659,
- 10564, 10469, 10373, 10278, 10182,
- 10087, 9991, 9895, 9799, 9703,
- 9607, 9511, 9415, 9319, 9222,
- 9126, 9029, 8932, 8836, 8739,
- 8642, 8545, 8448, 8351, 8253,
- 8156, 8059, 7961, 7864, 7766,
- 7668, 7571, 7473, 7375, 7277,
- 7179, 7081, 6982, 6884, 6786,
- 6688, 6589, 6491, 6392, 6293,
- 6195, 6096, 5997, 5898, 5799,
- 5700, 5601, 5502, 5403, 5304,
- 5205, 5106, 5006, 4907, 4807,
- 4708, 4608, 4509, 4409, 4310,
- 4210, 4110, 4011, 3911, 3811,
- 3711, 3611, 3511, 3411, 3311,
- 3211, 3111, 3011, 2911, 2811,
- 2711, 2610, 2510, 2410, 2310,
- 2209, 2109, 2009, 1908, 1808,
- 1708, 1607, 1507, 1406, 1306,
- 1206, 1105, 1005, 904, 804,
- 703, 603, 502, 402, 301,
- 201, 100
- };
-
-const Word16 sin_scale_tbl_1200[1200] = { /* Q15 */
- 0, 42, 85, 128, 171, 214, 257, 300,
- 343, 386, 428, 471, 514, 557, 600, 643,
- 686, 729, 771, 814, 857, 900, 943, 986,
- 1029, 1072, 1114, 1157, 1200, 1243, 1286, 1329,
- 1372, 1414, 1457, 1500, 1543, 1586, 1629, 1672,
- 1714, 1757, 1800, 1843, 1886, 1929, 1971, 2014,
- 2057, 2100, 2143, 2185, 2228, 2271, 2314, 2357,
- 2399, 2442, 2485, 2528, 2570, 2613, 2656, 2699,
- 2741, 2784, 2827, 2870, 2912, 2955, 2998, 3040,
- 3083, 3126, 3169, 3211, 3254, 3297, 3339, 3382,
- 3425, 3467, 3510, 3553, 3595, 3638, 3680, 3723,
- 3766, 3808, 3851, 3893, 3936, 3979, 4021, 4064,
- 4106, 4149, 4191, 4234, 4276, 4319, 4361, 4404,
- 4446, 4489, 4531, 4574, 4616, 4659, 4701, 4744,
- 4786, 4829, 4871, 4913, 4956, 4998, 5041, 5083,
- 5125, 5168, 5210, 5252, 5295, 5337, 5379, 5422,
- 5464, 5506, 5549, 5591, 5633, 5675, 5718, 5760,
- 5802, 5844, 5886, 5929, 5971, 6013, 6055, 6097,
- 6139, 6182, 6224, 6266, 6308, 6350, 6392, 6434,
- 6476, 6518, 6560, 6602, 6644, 6686, 6728, 6770,
- 6812, 6854, 6896, 6938, 6980, 7022, 7064, 7106,
- 7147, 7189, 7231, 7273, 7315, 7357, 7398, 7440,
- 7482, 7524, 7565, 7607, 7649, 7691, 7732, 7774,
- 7816, 7857, 7899, 7940, 7982, 8024, 8065, 8107,
- 8148, 8190, 8231, 8273, 8314, 8356, 8397, 8439,
- 8480, 8522, 8563, 8604, 8646, 8687, 8729, 8770,
- 8811, 8853, 8894, 8935, 8976, 9018, 9059, 9100,
- 9141, 9182, 9224, 9265, 9306, 9347, 9388, 9429,
- 9470, 9511, 9552, 9593, 9634, 9675, 9716, 9757,
- 9798, 9839, 9880, 9921, 9962, 10003, 10043, 10084,
- 10125, 10166, 10207, 10247, 10288, 10329, 10370, 10410,
- 10451, 10491, 10532, 10573, 10613, 10654, 10694, 10735,
- 10775, 10816, 10856, 10897, 10937, 10978, 11018, 11059,
- 11099, 11139, 11180, 11220, 11260, 11300, 11341, 11381,
- 11421, 11461, 11502, 11542, 11582, 11622, 11662, 11702,
- 11742, 11782, 11822, 11862, 11902, 11942, 11982, 12022,
- 12062, 12102, 12142, 12181, 12221, 12261, 12301, 12340,
- 12380, 12420, 12460, 12499, 12539, 12579, 12618, 12658,
- 12697, 12737, 12776, 12816, 12855, 12895, 12934, 12973,
- 13013, 13052, 13092, 13131, 13170, 13209, 13249, 13288,
- 13327, 13366, 13405, 13444, 13484, 13523, 13562, 13601,
- 13640, 13679, 13718, 13757, 13796, 13834, 13873, 13912,
- 13951, 13990, 14029, 14067, 14106, 14145, 14183, 14222,
- 14261, 14299, 14338, 14376, 14415, 14453, 14492, 14530,
- 14569, 14607, 14646, 14684, 14722, 14761, 14799, 14837,
- 14875, 14914, 14952, 14990, 15028, 15066, 15104, 15142,
- 15180, 15218, 15256, 15294, 15332, 15370, 15408, 15446,
- 15484, 15521, 15559, 15597, 15635, 15672, 15710, 15748,
- 15785, 15823, 15860, 15898, 15935, 15973, 16010, 16048,
- 16085, 16122, 16160, 16197, 16234, 16271, 16309, 16346,
- 16383, 16420, 16457, 16494, 16531, 16568, 16605, 16642,
- 16679, 16716, 16753, 16790, 16827, 16863, 16900, 16937,
- 16974, 17010, 17047, 17084, 17120, 17157, 17193, 17230,
- 17266, 17303, 17339, 17375, 17412, 17448, 17484, 17521,
- 17557, 17593, 17629, 17665, 17702, 17738, 17774, 17810,
- 17846, 17882, 17918, 17953, 17989, 18025, 18061, 18097,
- 18132, 18168, 18204, 18240, 18275, 18311, 18346, 18382,
- 18417, 18453, 18488, 18524, 18559, 18594, 18630, 18665,
- 18700, 18735, 18770, 18806, 18841, 18876, 18911, 18946,
- 18981, 19016, 19051, 19086, 19120, 19155, 19190, 19225,
- 19259, 19294, 19329, 19363, 19398, 19433, 19467, 19502,
- 19536, 19570, 19605, 19639, 19673, 19708, 19742, 19776,
- 19810, 19845, 19879, 19913, 19947, 19981, 20015, 20049,
- 20083, 20117, 20150, 20184, 20218, 20252, 20285, 20319,
- 20353, 20386, 20420, 20453, 20487, 20520, 20554, 20587,
- 20620, 20654, 20687, 20720, 20753, 20787, 20820, 20853,
- 20886, 20919, 20952, 20985, 21018, 21051, 21084, 21116,
- 21149, 21182, 21215, 21247, 21280, 21313, 21345, 21378,
- 21410, 21443, 21475, 21507, 21540, 21572, 21604, 21637,
- 21669, 21701, 21733, 21765, 21797, 21829, 21861, 21893,
- 21925, 21957, 21989, 22020, 22052, 22084, 22115, 22147,
- 22179, 22210, 22242, 22273, 22305, 22336, 22367, 22399,
- 22430, 22461, 22493, 22524, 22555, 22586, 22617, 22648,
- 22679, 22710, 22741, 22772, 22802, 22833, 22864, 22895,
- 22925, 22956, 22987, 23017, 23048, 23078, 23109, 23139,
- 23169, 23200, 23230, 23260, 23290, 23320, 23351, 23381,
- 23411, 23441, 23471, 23500, 23530, 23560, 23590, 23620,
- 23649, 23679, 23709, 23738, 23768, 23797, 23827, 23856,
- 23886, 23915, 23944, 23974, 24003, 24032, 24061, 24090,
- 24119, 24148, 24177, 24206, 24235, 24264, 24293, 24321,
- 24350, 24379, 24407, 24436, 24465, 24493, 24522, 24550,
- 24578, 24607, 24635, 24663, 24692, 24720, 24748, 24776,
- 24804, 24832, 24860, 24888, 24916, 24944, 24971, 24999,
- 25027, 25054, 25082, 25110, 25137, 25165, 25192, 25220,
- 25247, 25274, 25302, 25329, 25356, 25383, 25410, 25437,
- 25464, 25491, 25518, 25545, 25572, 25599, 25625, 25652,
- 25679, 25705, 25732, 25759, 25785, 25811, 25838, 25864,
- 25891, 25917, 25943, 25969, 25995, 26021, 26047, 26073,
- 26099, 26125, 26151, 26177, 26203, 26228, 26254, 26280,
- 26305, 26331, 26356, 26382, 26407, 26433, 26458, 26483,
- 26509, 26534, 26559, 26584, 26609, 26634, 26659, 26684,
- 26709, 26734, 26758, 26783, 26808, 26832, 26857, 26882,
- 26906, 26931, 26955, 26979, 27004, 27028, 27052, 27076,
- 27100, 27125, 27149, 27173, 27197, 27220, 27244, 27268,
- 27292, 27316, 27339, 27363, 27386, 27410, 27433, 27457,
- 27480, 27504, 27527, 27550, 27573, 27596, 27620, 27643,
- 27666, 27689, 27711, 27734, 27757, 27780, 27803, 27825,
- 27848, 27871, 27893, 27916, 27938, 27960, 27983, 28005,
- 28027, 28049, 28072, 28094, 28116, 28138, 28160, 28182,
- 28203, 28225, 28247, 28269, 28290, 28312, 28334, 28355,
- 28377, 28398, 28419, 28441, 28462, 28483, 28504, 28525,
- 28547, 28568, 28589, 28610, 28630, 28651, 28672, 28693,
- 28713, 28734, 28755, 28775, 28796, 28816, 28837, 28857,
- 28877, 28897, 28918, 28938, 28958, 28978, 28998, 29018,
- 29038, 29058, 29077, 29097, 29117, 29136, 29156, 29176,
- 29195, 29215, 29234, 29253, 29273, 29292, 29311, 29330,
- 29349, 29368, 29387, 29406, 29425, 29444, 29463, 29482,
- 29500, 29519, 29537, 29556, 29575, 29593, 29611, 29630,
- 29648, 29666, 29684, 29703, 29721, 29739, 29757, 29775,
- 29792, 29810, 29828, 29846, 29863, 29881, 29899, 29916,
- 29934, 29951, 29968, 29986, 30003, 30020, 30037, 30055,
- 30072, 30089, 30106, 30122, 30139, 30156, 30173, 30190,
- 30206, 30223, 30239, 30256, 30272, 30289, 30305, 30321,
- 30338, 30354, 30370, 30386, 30402, 30418, 30434, 30450,
- 30465, 30481, 30497, 30513, 30528, 30544, 30559, 30575,
- 30590, 30605, 30621, 30636, 30651, 30666, 30681, 30696,
- 30711, 30726, 30741, 30756, 30771, 30786, 30800, 30815,
- 30829, 30844, 30858, 30873, 30887, 30901, 30916, 30930,
- 30944, 30958, 30972, 30986, 31000, 31014, 31028, 31041,
- 31055, 31069, 31082, 31096, 31109, 31123, 31136, 31149,
- 31163, 31176, 31189, 31202, 31215, 31228, 31241, 31254,
- 31267, 31280, 31293, 31305, 31318, 31331, 31343, 31356,
- 31368, 31380, 31393, 31405, 31417, 31429, 31441, 31453,
- 31465, 31477, 31489, 31501, 31513, 31525, 31536, 31548,
- 31559, 31571, 31582, 31594, 31605, 31616, 31628, 31639,
- 31650, 31661, 31672, 31683, 31694, 31705, 31716, 31726,
- 31737, 31748, 31758, 31769, 31779, 31790, 31800, 31810,
- 31821, 31831, 31841, 31851, 31861, 31871, 31881, 31891,
- 31901, 31911, 31920, 31930, 31940, 31949, 31959, 31968,
- 31977, 31987, 31996, 32005, 32014, 32023, 32033, 32042,
- 32050, 32059, 32068, 32077, 32086, 32094, 32103, 32112,
- 32120, 32128, 32137, 32145, 32154, 32162, 32170, 32178,
- 32186, 32194, 32202, 32210, 32218, 32226, 32233, 32241,
- 32249, 32256, 32264, 32271, 32279, 32286, 32293, 32300,
- 32308, 32315, 32322, 32329, 32336, 32343, 32350, 32356,
- 32363, 32370, 32376, 32383, 32389, 32396, 32402, 32409,
- 32415, 32421, 32427, 32434, 32440, 32446, 32452, 32457,
- 32463, 32469, 32475, 32481, 32486, 32492, 32497, 32503,
- 32508, 32513, 32519, 32524, 32529, 32534, 32539, 32544,
- 32549, 32554, 32559, 32564, 32569, 32573, 32578, 32582,
- 32587, 32591, 32596, 32600, 32604, 32609, 32613, 32617,
- 32621, 32625, 32629, 32633, 32637, 32641, 32644, 32648,
- 32652, 32655, 32659, 32662, 32665, 32669, 32672, 32675,
- 32679, 32682, 32685, 32688, 32691, 32694, 32696, 32699,
- 32702, 32705, 32707, 32710, 32712, 32715, 32717, 32719,
- 32722, 32724, 32726, 32728, 32730, 32732, 32734, 32736,
- 32738, 32740, 32741, 32743, 32744, 32746, 32748, 32749,
- 32750, 32752, 32753, 32754, 32755, 32756, 32757, 32758,
- 32759, 32760, 32761, 32762, 32762, 32763, 32764, 32764,
- 32765, 32765, 32765, 32766, 32766, 32766, 32766, 32766
-};
-
-const Word16 cos_scale_tbl_1200[1200] = { /* Q15 */
- 0, 42, 85, 128, 171, 214, 257, 300,
- 343, 386, 428, 471, 514, 557, 600, 643,
- 686, 729, 771, 814, 857, 900, 943, 986,
- 1029, 1072, 1114, 1157, 1200, 1243, 1286, 1329,
- 1372, 1414, 1457, 1500, 1543, 1586, 1629, 1672,
- 1714, 1757, 1800, 1843, 1886, 1929, 1971, 2014,
- 2057, 2100, 2143, 2185, 2228, 2271, 2314, 2357,
- 2399, 2442, 2485, 2528, 2570, 2613, 2656, 2699,
- 2741, 2784, 2827, 2870, 2912, 2955, 2998, 3040,
- 3083, 3126, 3169, 3211, 3254, 3297, 3339, 3382,
- 3425, 3467, 3510, 3553, 3595, 3638, 3680, 3723,
- 3766, 3808, 3851, 3893, 3936, 3979, 4021, 4064,
- 4106, 4149, 4191, 4234, 4276, 4319, 4361, 4404,
- 4446, 4489, 4531, 4574, 4616, 4659, 4701, 4744,
- 4786, 4829, 4871, 4913, 4956, 4998, 5041, 5083,
- 5125, 5168, 5210, 5252, 5295, 5337, 5379, 5422,
- 5464, 5506, 5549, 5591, 5633, 5675, 5718, 5760,
- 5802, 5844, 5886, 5929, 5971, 6013, 6055, 6097,
- 6139, 6182, 6224, 6266, 6308, 6350, 6392, 6434,
- 6476, 6518, 6560, 6602, 6644, 6686, 6728, 6770,
- 6812, 6854, 6896, 6938, 6980, 7022, 7064, 7106,
- 7147, 7189, 7231, 7273, 7315, 7357, 7398, 7440,
- 7482, 7524, 7565, 7607, 7649, 7691, 7732, 7774,
- 7816, 7857, 7899, 7940, 7982, 8024, 8065, 8107,
- 8148, 8190, 8231, 8273, 8314, 8356, 8397, 8439,
- 8480, 8522, 8563, 8604, 8646, 8687, 8729, 8770,
- 8811, 8853, 8894, 8935, 8976, 9018, 9059, 9100,
- 9141, 9182, 9224, 9265, 9306, 9347, 9388, 9429,
- 9470, 9511, 9552, 9593, 9634, 9675, 9716, 9757,
- 9798, 9839, 9880, 9921, 9962, 10003, 10043, 10084,
- 10125, 10166, 10207, 10247, 10288, 10329, 10370, 10410,
- 10451, 10491, 10532, 10573, 10613, 10654, 10694, 10735,
- 10775, 10816, 10856, 10897, 10937, 10978, 11018, 11059,
- 11099, 11139, 11180, 11220, 11260, 11300, 11341, 11381,
- 11421, 11461, 11502, 11542, 11582, 11622, 11662, 11702,
- 11742, 11782, 11822, 11862, 11902, 11942, 11982, 12022,
- 12062, 12102, 12142, 12181, 12221, 12261, 12301, 12340,
- 12380, 12420, 12460, 12499, 12539, 12579, 12618, 12658,
- 12697, 12737, 12776, 12816, 12855, 12895, 12934, 12973,
- 13013, 13052, 13092, 13131, 13170, 13209, 13249, 13288,
- 13327, 13366, 13405, 13444, 13484, 13523, 13562, 13601,
- 13640, 13679, 13718, 13757, 13796, 13834, 13873, 13912,
- 13951, 13990, 14029, 14067, 14106, 14145, 14183, 14222,
- 14261, 14299, 14338, 14376, 14415, 14453, 14492, 14530,
- 14569, 14607, 14646, 14684, 14722, 14761, 14799, 14837,
- 14875, 14914, 14952, 14990, 15028, 15066, 15104, 15142,
- 15180, 15218, 15256, 15294, 15332, 15370, 15408, 15446,
- 15484, 15521, 15559, 15597, 15635, 15672, 15710, 15748,
- 15785, 15823, 15860, 15898, 15935, 15973, 16010, 16048,
- 16085, 16122, 16160, 16197, 16234, 16271, 16309, 16346,
- 16383, 16420, 16457, 16494, 16531, 16568, 16605, 16642,
- 16679, 16716, 16753, 16790, 16827, 16863, 16900, 16937,
- 16974, 17010, 17047, 17084, 17120, 17157, 17193, 17230,
- 17266, 17303, 17339, 17375, 17412, 17448, 17484, 17521,
- 17557, 17593, 17629, 17665, 17702, 17738, 17774, 17810,
- 17846, 17882, 17918, 17953, 17989, 18025, 18061, 18097,
- 18132, 18168, 18204, 18240, 18275, 18311, 18346, 18382,
- 18417, 18453, 18488, 18524, 18559, 18594, 18630, 18665,
- 18700, 18735, 18770, 18806, 18841, 18876, 18911, 18946,
- 18981, 19016, 19051, 19086, 19120, 19155, 19190, 19225,
- 19259, 19294, 19329, 19363, 19398, 19433, 19467, 19502,
- 19536, 19570, 19605, 19639, 19673, 19708, 19742, 19776,
- 19810, 19845, 19879, 19913, 19947, 19981, 20015, 20049,
- 20083, 20117, 20150, 20184, 20218, 20252, 20285, 20319,
- 20353, 20386, 20420, 20453, 20487, 20520, 20554, 20587,
- 20620, 20654, 20687, 20720, 20753, 20787, 20820, 20853,
- 20886, 20919, 20952, 20985, 21018, 21051, 21084, 21116,
- 21149, 21182, 21215, 21247, 21280, 21313, 21345, 21378,
- 21410, 21443, 21475, 21507, 21540, 21572, 21604, 21637,
- 21669, 21701, 21733, 21765, 21797, 21829, 21861, 21893,
- 21925, 21957, 21989, 22020, 22052, 22084, 22115, 22147,
- 22179, 22210, 22242, 22273, 22305, 22336, 22367, 22399,
- 22430, 22461, 22493, 22524, 22555, 22586, 22617, 22648,
- 22679, 22710, 22741, 22772, 22802, 22833, 22864, 22895,
- 22925, 22956, 22987, 23017, 23048, 23078, 23109, 23139,
- 23169, 23200, 23230, 23260, 23290, 23320, 23351, 23381,
- 23411, 23441, 23471, 23500, 23530, 23560, 23590, 23620,
- 23649, 23679, 23709, 23738, 23768, 23797, 23827, 23856,
- 23886, 23915, 23944, 23974, 24003, 24032, 24061, 24090,
- 24119, 24148, 24177, 24206, 24235, 24264, 24293, 24321,
- 24350, 24379, 24407, 24436, 24465, 24493, 24522, 24550,
- 24578, 24607, 24635, 24663, 24692, 24720, 24748, 24776,
- 24804, 24832, 24860, 24888, 24916, 24944, 24971, 24999,
- 25027, 25054, 25082, 25110, 25137, 25165, 25192, 25220,
- 25247, 25274, 25302, 25329, 25356, 25383, 25410, 25437,
- 25464, 25491, 25518, 25545, 25572, 25599, 25625, 25652,
- 25679, 25705, 25732, 25759, 25785, 25811, 25838, 25864,
- 25891, 25917, 25943, 25969, 25995, 26021, 26047, 26073,
- 26099, 26125, 26151, 26177, 26203, 26228, 26254, 26280,
- 26305, 26331, 26356, 26382, 26407, 26433, 26458, 26483,
- 26509, 26534, 26559, 26584, 26609, 26634, 26659, 26684,
- 26709, 26734, 26758, 26783, 26808, 26832, 26857, 26882,
- 26906, 26931, 26955, 26979, 27004, 27028, 27052, 27076,
- 27100, 27125, 27149, 27173, 27197, 27220, 27244, 27268,
- 27292, 27316, 27339, 27363, 27386, 27410, 27433, 27457,
- 27480, 27504, 27527, 27550, 27573, 27596, 27620, 27643,
- 27666, 27689, 27711, 27734, 27757, 27780, 27803, 27825,
- 27848, 27871, 27893, 27916, 27938, 27960, 27983, 28005,
- 28027, 28049, 28072, 28094, 28116, 28138, 28160, 28182,
- 28203, 28225, 28247, 28269, 28290, 28312, 28334, 28355,
- 28377, 28398, 28419, 28441, 28462, 28483, 28504, 28525,
- 28547, 28568, 28589, 28610, 28630, 28651, 28672, 28693,
- 28713, 28734, 28755, 28775, 28796, 28816, 28837, 28857,
- 28877, 28897, 28918, 28938, 28958, 28978, 28998, 29018,
- 29038, 29058, 29077, 29097, 29117, 29136, 29156, 29176,
- 29195, 29215, 29234, 29253, 29273, 29292, 29311, 29330,
- 29349, 29368, 29387, 29406, 29425, 29444, 29463, 29482,
- 29500, 29519, 29537, 29556, 29575, 29593, 29611, 29630,
- 29648, 29666, 29684, 29703, 29721, 29739, 29757, 29775,
- 29792, 29810, 29828, 29846, 29863, 29881, 29899, 29916,
- 29934, 29951, 29968, 29986, 30003, 30020, 30037, 30055,
- 30072, 30089, 30106, 30122, 30139, 30156, 30173, 30190,
- 30206, 30223, 30239, 30256, 30272, 30289, 30305, 30321,
- 30338, 30354, 30370, 30386, 30402, 30418, 30434, 30450,
- 30465, 30481, 30497, 30513, 30528, 30544, 30559, 30575,
- 30590, 30605, 30621, 30636, 30651, 30666, 30681, 30696,
- 30711, 30726, 30741, 30756, 30771, 30786, 30800, 30815,
- 30829, 30844, 30858, 30873, 30887, 30901, 30916, 30930,
- 30944, 30958, 30972, 30986, 31000, 31014, 31028, 31041,
- 31055, 31069, 31082, 31096, 31109, 31123, 31136, 31149,
- 31163, 31176, 31189, 31202, 31215, 31228, 31241, 31254,
- 31267, 31280, 31293, 31305, 31318, 31331, 31343, 31356,
- 31368, 31380, 31393, 31405, 31417, 31429, 31441, 31453,
- 31465, 31477, 31489, 31501, 31513, 31525, 31536, 31548,
- 31559, 31571, 31582, 31594, 31605, 31616, 31628, 31639,
- 31650, 31661, 31672, 31683, 31694, 31705, 31716, 31726,
- 31737, 31748, 31758, 31769, 31779, 31790, 31800, 31810,
- 31821, 31831, 31841, 31851, 31861, 31871, 31881, 31891,
- 31901, 31911, 31920, 31930, 31940, 31949, 31959, 31968,
- 31977, 31987, 31996, 32005, 32014, 32023, 32033, 32042,
- 32050, 32059, 32068, 32077, 32086, 32094, 32103, 32112,
- 32120, 32128, 32137, 32145, 32154, 32162, 32170, 32178,
- 32186, 32194, 32202, 32210, 32218, 32226, 32233, 32241,
- 32249, 32256, 32264, 32271, 32279, 32286, 32293, 32300,
- 32308, 32315, 32322, 32329, 32336, 32343, 32350, 32356,
- 32363, 32370, 32376, 32383, 32389, 32396, 32402, 32409,
- 32415, 32421, 32427, 32434, 32440, 32446, 32452, 32457,
- 32463, 32469, 32475, 32481, 32486, 32492, 32497, 32503,
- 32508, 32513, 32519, 32524, 32529, 32534, 32539, 32544,
- 32549, 32554, 32559, 32564, 32569, 32573, 32578, 32582,
- 32587, 32591, 32596, 32600, 32604, 32609, 32613, 32617,
- 32621, 32625, 32629, 32633, 32637, 32641, 32644, 32648,
- 32652, 32655, 32659, 32662, 32665, 32669, 32672, 32675,
- 32679, 32682, 32685, 32688, 32691, 32694, 32696, 32699,
- 32702, 32705, 32707, 32710, 32712, 32715, 32717, 32719,
- 32722, 32724, 32726, 32728, 32730, 32732, 32734, 32736,
- 32738, 32740, 32741, 32743, 32744, 32746, 32748, 32749,
- 32750, 32752, 32753, 32754, 32755, 32756, 32757, 32758,
- 32759, 32760, 32761, 32762, 32762, 32763, 32764, 32764,
- 32765, 32765, 32765, 32766, 32766, 32766, 32766, 32766
-};
-
-const Word16 sin_scale_tbl_800[800] = { /* Q15 */
- 0, 64, 128, 193, 257, 321, 386, 450,
- 514, 579, 643, 707, 771, 836, 900, 964,
- 1029, 1093, 1157, 1222, 1286, 1350, 1414, 1479,
- 1543, 1607, 1672, 1736, 1800, 1864, 1929, 1993,
- 2057, 2121, 2185, 2250, 2314, 2378, 2442, 2506,
- 2570, 2635, 2699, 2763, 2827, 2891, 2955, 3019,
- 3083, 3147, 3211, 3275, 3339, 3403, 3467, 3531,
- 3595, 3659, 3723, 3787, 3851, 3915, 3979, 4042,
- 4106, 4170, 4234, 4298, 4361, 4425, 4489, 4553,
- 4616, 4680, 4744, 4807, 4871, 4935, 4998, 5062,
- 5125, 5189, 5252, 5316, 5379, 5443, 5506, 5570,
- 5633, 5696, 5760, 5823, 5886, 5950, 6013, 6076,
- 6139, 6203, 6266, 6329, 6392, 6455, 6518, 6581,
- 6644, 6707, 6770, 6833, 6896, 6959, 7022, 7085,
- 7147, 7210, 7273, 7336, 7398, 7461, 7524, 7586,
- 7649, 7711, 7774, 7836, 7899, 7961, 8024, 8086,
- 8148, 8211, 8273, 8335, 8397, 8460, 8522, 8584,
- 8646, 8708, 8770, 8832, 8894, 8956, 9018, 9079,
- 9141, 9203, 9265, 9326, 9388, 9450, 9511, 9573,
- 9634, 9696, 9757, 9819, 9880, 9941, 10003, 10064,
- 10125, 10186, 10247, 10308, 10370, 10431, 10491, 10552,
- 10613, 10674, 10735, 10796, 10856, 10917, 10978, 11038,
- 11099, 11159, 11220, 11280, 11341, 11401, 11461, 11522,
- 11582, 11642, 11702, 11762, 11822, 11882, 11942, 12002,
- 12062, 12122, 12181, 12241, 12301, 12360, 12420, 12479,
- 12539, 12598, 12658, 12717, 12776, 12835, 12895, 12954,
- 13013, 13072, 13131, 13190, 13249, 13307, 13366, 13425,
- 13484, 13542, 13601, 13659, 13718, 13776, 13834, 13893,
- 13951, 14009, 14067, 14125, 14183, 14241, 14299, 14357,
- 14415, 14473, 14530, 14588, 14646, 14703, 14761, 14818,
- 14875, 14933, 14990, 15047, 15104, 15161, 15218, 15275,
- 15332, 15389, 15446, 15502, 15559, 15616, 15672, 15729,
- 15785, 15841, 15898, 15954, 16010, 16066, 16122, 16178,
- 16234, 16290, 16346, 16402, 16457, 16513, 16568, 16624,
- 16679, 16735, 16790, 16845, 16900, 16955, 17010, 17065,
- 17120, 17175, 17230, 17284, 17339, 17394, 17448, 17503,
- 17557, 17611, 17665, 17720, 17774, 17828, 17882, 17936,
- 17989, 18043, 18097, 18150, 18204, 18257, 18311, 18364,
- 18417, 18470, 18524, 18577, 18630, 18682, 18735, 18788,
- 18841, 18893, 18946, 18998, 19051, 19103, 19155, 19207,
- 19259, 19311, 19363, 19415, 19467, 19519, 19570, 19622,
- 19673, 19725, 19776, 19827, 19879, 19930, 19981, 20032,
- 20083, 20133, 20184, 20235, 20285, 20336, 20386, 20437,
- 20487, 20537, 20587, 20637, 20687, 20737, 20787, 20836,
- 20886, 20936, 20985, 21034, 21084, 21133, 21182, 21231,
- 21280, 21329, 21378, 21426, 21475, 21524, 21572, 21620,
- 21669, 21717, 21765, 21813, 21861, 21909, 21957, 22004,
- 22052, 22100, 22147, 22194, 22242, 22289, 22336, 22383,
- 22430, 22477, 22524, 22570, 22617, 22663, 22710, 22756,
- 22802, 22849, 22895, 22941, 22987, 23032, 23078, 23124,
- 23169, 23215, 23260, 23305, 23351, 23396, 23441, 23486,
- 23530, 23575, 23620, 23664, 23709, 23753, 23797, 23842,
- 23886, 23930, 23974, 24017, 24061, 24105, 24148, 24192,
- 24235, 24278, 24321, 24364, 24407, 24450, 24493, 24536,
- 24578, 24621, 24663, 24706, 24748, 24790, 24832, 24874,
- 24916, 24957, 24999, 25041, 25082, 25123, 25165, 25206,
- 25247, 25288, 25329, 25370, 25410, 25451, 25491, 25532,
- 25572, 25612, 25652, 25692, 25732, 25772, 25811, 25851,
- 25891, 25930, 25969, 26008, 26047, 26086, 26125, 26164,
- 26203, 26241, 26280, 26318, 26356, 26395, 26433, 26471,
- 26509, 26546, 26584, 26622, 26659, 26696, 26734, 26771,
- 26808, 26845, 26882, 26918, 26955, 26991, 27028, 27064,
- 27100, 27137, 27173, 27208, 27244, 27280, 27316, 27351,
- 27386, 27422, 27457, 27492, 27527, 27562, 27596, 27631,
- 27666, 27700, 27734, 27769, 27803, 27837, 27871, 27904,
- 27938, 27972, 28005, 28038, 28072, 28105, 28138, 28171,
- 28203, 28236, 28269, 28301, 28334, 28366, 28398, 28430,
- 28462, 28494, 28525, 28557, 28589, 28620, 28651, 28682,
- 28713, 28744, 28775, 28806, 28837, 28867, 28897, 28928,
- 28958, 28988, 29018, 29048, 29077, 29107, 29136, 29166,
- 29195, 29224, 29253, 29282, 29311, 29340, 29368, 29397,
- 29425, 29453, 29482, 29510, 29537, 29565, 29593, 29621,
- 29648, 29675, 29703, 29730, 29757, 29784, 29810, 29837,
- 29863, 29890, 29916, 29942, 29968, 29994, 30020, 30046,
- 30072, 30097, 30122, 30148, 30173, 30198, 30223, 30248,
- 30272, 30297, 30321, 30346, 30370, 30394, 30418, 30442,
- 30465, 30489, 30513, 30536, 30559, 30582, 30605, 30628,
- 30651, 30674, 30696, 30719, 30741, 30763, 30786, 30807,
- 30829, 30851, 30873, 30894, 30916, 30937, 30958, 30979,
- 31000, 31021, 31041, 31062, 31082, 31103, 31123, 31143,
- 31163, 31183, 31202, 31222, 31241, 31261, 31280, 31299,
- 31318, 31337, 31356, 31374, 31393, 31411, 31429, 31447,
- 31465, 31483, 31501, 31519, 31536, 31554, 31571, 31588,
- 31605, 31622, 31639, 31656, 31672, 31689, 31705, 31721,
- 31737, 31753, 31769, 31785, 31800, 31816, 31831, 31846,
- 31861, 31876, 31891, 31906, 31920, 31935, 31949, 31963,
- 31977, 31991, 32005, 32019, 32033, 32046, 32059, 32073,
- 32086, 32099, 32112, 32124, 32137, 32149, 32162, 32174,
- 32186, 32198, 32210, 32222, 32233, 32245, 32256, 32267,
- 32279, 32290, 32300, 32311, 32322, 32332, 32343, 32353,
- 32363, 32373, 32383, 32393, 32402, 32412, 32421, 32430,
- 32440, 32449, 32457, 32466, 32475, 32483, 32492, 32500,
- 32508, 32516, 32524, 32532, 32539, 32547, 32554, 32561,
- 32569, 32576, 32582, 32589, 32596, 32602, 32609, 32615,
- 32621, 32627, 32633, 32639, 32644, 32650, 32655, 32660,
- 32665, 32670, 32675, 32680, 32685, 32689, 32694, 32698,
- 32702, 32706, 32710, 32713, 32717, 32720, 32724, 32727,
- 32730, 32733, 32736, 32739, 32741, 32744, 32746, 32748,
- 32750, 32752, 32754, 32756, 32757, 32759, 32760, 32761,
- 32762, 32763, 32764, 32765, 32765, 32766, 32766, 32766
-};
-
-const Word16 cos_scale_tbl_800[800] = { /* Q15 */
- 0, 64, 128, 193, 257, 321, 386, 450,
- 514, 579, 643, 707, 771, 836, 900, 964,
- 1029, 1093, 1157, 1222, 1286, 1350, 1414, 1479,
- 1543, 1607, 1672, 1736, 1800, 1864, 1929, 1993,
- 2057, 2121, 2185, 2250, 2314, 2378, 2442, 2506,
- 2570, 2635, 2699, 2763, 2827, 2891, 2955, 3019,
- 3083, 3147, 3211, 3275, 3339, 3403, 3467, 3531,
- 3595, 3659, 3723, 3787, 3851, 3915, 3979, 4042,
- 4106, 4170, 4234, 4298, 4361, 4425, 4489, 4553,
- 4616, 4680, 4744, 4807, 4871, 4935, 4998, 5062,
- 5125, 5189, 5252, 5316, 5379, 5443, 5506, 5570,
- 5633, 5696, 5760, 5823, 5886, 5950, 6013, 6076,
- 6139, 6203, 6266, 6329, 6392, 6455, 6518, 6581,
- 6644, 6707, 6770, 6833, 6896, 6959, 7022, 7085,
- 7147, 7210, 7273, 7336, 7398, 7461, 7524, 7586,
- 7649, 7711, 7774, 7836, 7899, 7961, 8024, 8086,
- 8148, 8211, 8273, 8335, 8397, 8460, 8522, 8584,
- 8646, 8708, 8770, 8832, 8894, 8956, 9018, 9079,
- 9141, 9203, 9265, 9326, 9388, 9450, 9511, 9573,
- 9634, 9696, 9757, 9819, 9880, 9941, 10003, 10064,
- 10125, 10186, 10247, 10308, 10370, 10431, 10491, 10552,
- 10613, 10674, 10735, 10796, 10856, 10917, 10978, 11038,
- 11099, 11159, 11220, 11280, 11341, 11401, 11461, 11522,
- 11582, 11642, 11702, 11762, 11822, 11882, 11942, 12002,
- 12062, 12122, 12181, 12241, 12301, 12360, 12420, 12479,
- 12539, 12598, 12658, 12717, 12776, 12835, 12895, 12954,
- 13013, 13072, 13131, 13190, 13249, 13307, 13366, 13425,
- 13484, 13542, 13601, 13659, 13718, 13776, 13834, 13893,
- 13951, 14009, 14067, 14125, 14183, 14241, 14299, 14357,
- 14415, 14473, 14530, 14588, 14646, 14703, 14761, 14818,
- 14875, 14933, 14990, 15047, 15104, 15161, 15218, 15275,
- 15332, 15389, 15446, 15502, 15559, 15616, 15672, 15729,
- 15785, 15841, 15898, 15954, 16010, 16066, 16122, 16178,
- 16234, 16290, 16346, 16402, 16457, 16513, 16568, 16624,
- 16679, 16735, 16790, 16845, 16900, 16955, 17010, 17065,
- 17120, 17175, 17230, 17284, 17339, 17394, 17448, 17503,
- 17557, 17611, 17665, 17720, 17774, 17828, 17882, 17936,
- 17989, 18043, 18097, 18150, 18204, 18257, 18311, 18364,
- 18417, 18470, 18524, 18577, 18630, 18682, 18735, 18788,
- 18841, 18893, 18946, 18998, 19051, 19103, 19155, 19207,
- 19259, 19311, 19363, 19415, 19467, 19519, 19570, 19622,
- 19673, 19725, 19776, 19827, 19879, 19930, 19981, 20032,
- 20083, 20133, 20184, 20235, 20285, 20336, 20386, 20437,
- 20487, 20537, 20587, 20637, 20687, 20737, 20787, 20836,
- 20886, 20936, 20985, 21034, 21084, 21133, 21182, 21231,
- 21280, 21329, 21378, 21426, 21475, 21524, 21572, 21620,
- 21669, 21717, 21765, 21813, 21861, 21909, 21957, 22004,
- 22052, 22100, 22147, 22194, 22242, 22289, 22336, 22383,
- 22430, 22477, 22524, 22570, 22617, 22663, 22710, 22756,
- 22802, 22849, 22895, 22941, 22987, 23032, 23078, 23124,
- 23169, 23215, 23260, 23305, 23351, 23396, 23441, 23486,
- 23530, 23575, 23620, 23664, 23709, 23753, 23797, 23842,
- 23886, 23930, 23974, 24017, 24061, 24105, 24148, 24192,
- 24235, 24278, 24321, 24364, 24407, 24450, 24493, 24536,
- 24578, 24621, 24663, 24706, 24748, 24790, 24832, 24874,
- 24916, 24957, 24999, 25041, 25082, 25123, 25165, 25206,
- 25247, 25288, 25329, 25370, 25410, 25451, 25491, 25532,
- 25572, 25612, 25652, 25692, 25732, 25772, 25811, 25851,
- 25891, 25930, 25969, 26008, 26047, 26086, 26125, 26164,
- 26203, 26241, 26280, 26318, 26356, 26395, 26433, 26471,
- 26509, 26546, 26584, 26622, 26659, 26696, 26734, 26771,
- 26808, 26845, 26882, 26918, 26955, 26991, 27028, 27064,
- 27100, 27137, 27173, 27208, 27244, 27280, 27316, 27351,
- 27386, 27422, 27457, 27492, 27527, 27562, 27596, 27631,
- 27666, 27700, 27734, 27769, 27803, 27837, 27871, 27904,
- 27938, 27972, 28005, 28038, 28072, 28105, 28138, 28171,
- 28203, 28236, 28269, 28301, 28334, 28366, 28398, 28430,
- 28462, 28494, 28525, 28557, 28589, 28620, 28651, 28682,
- 28713, 28744, 28775, 28806, 28837, 28867, 28897, 28928,
- 28958, 28988, 29018, 29048, 29077, 29107, 29136, 29166,
- 29195, 29224, 29253, 29282, 29311, 29340, 29368, 29397,
- 29425, 29453, 29482, 29510, 29537, 29565, 29593, 29621,
- 29648, 29675, 29703, 29730, 29757, 29784, 29810, 29837,
- 29863, 29890, 29916, 29942, 29968, 29994, 30020, 30046,
- 30072, 30097, 30122, 30148, 30173, 30198, 30223, 30248,
- 30272, 30297, 30321, 30346, 30370, 30394, 30418, 30442,
- 30465, 30489, 30513, 30536, 30559, 30582, 30605, 30628,
- 30651, 30674, 30696, 30719, 30741, 30763, 30786, 30807,
- 30829, 30851, 30873, 30894, 30916, 30937, 30958, 30979,
- 31000, 31021, 31041, 31062, 31082, 31103, 31123, 31143,
- 31163, 31183, 31202, 31222, 31241, 31261, 31280, 31299,
- 31318, 31337, 31356, 31374, 31393, 31411, 31429, 31447,
- 31465, 31483, 31501, 31519, 31536, 31554, 31571, 31588,
- 31605, 31622, 31639, 31656, 31672, 31689, 31705, 31721,
- 31737, 31753, 31769, 31785, 31800, 31816, 31831, 31846,
- 31861, 31876, 31891, 31906, 31920, 31935, 31949, 31963,
- 31977, 31991, 32005, 32019, 32033, 32046, 32059, 32073,
- 32086, 32099, 32112, 32124, 32137, 32149, 32162, 32174,
- 32186, 32198, 32210, 32222, 32233, 32245, 32256, 32267,
- 32279, 32290, 32300, 32311, 32322, 32332, 32343, 32353,
- 32363, 32373, 32383, 32393, 32402, 32412, 32421, 32430,
- 32440, 32449, 32457, 32466, 32475, 32483, 32492, 32500,
- 32508, 32516, 32524, 32532, 32539, 32547, 32554, 32561,
- 32569, 32576, 32582, 32589, 32596, 32602, 32609, 32615,
- 32621, 32627, 32633, 32639, 32644, 32650, 32655, 32660,
- 32665, 32670, 32675, 32680, 32685, 32689, 32694, 32698,
- 32702, 32706, 32710, 32713, 32717, 32720, 32724, 32727,
- 32730, 32733, 32736, 32739, 32741, 32744, 32746, 32748,
- 32750, 32752, 32754, 32756, 32757, 32759, 32760, 32761,
- 32762, 32763, 32764, 32765, 32765, 32766, 32766, 32766
-};
-
-const Word16 scales_ivas_fx[][MAX_NO_SCALES * 2] = /* 2 subvectors Q11*/
- {
- {
- 3129,
- 0,
- 0,
- 3137,
- 0,
- 0,
- },
- {
- 3287,
- 0,
- 0,
- 3137,
- 0,
- 0,
- },
- {
- 2611,
- 5033,
- 0,
- 3137,
- 0,
- 0,
- },
- {
- 2611,
- 5033,
- 0,
- 3340,
- 0,
- 0,
- },
- {
- 2164,
- 3674,
- 5931,
- 2363,
- 3809,
- 6281,
- },
- {
- 1898,
- 2985,
- 4745,
- 2115,
- 3667,
- 7045,
- },
- {
- 2629,
- 5480,
- 0,
- 2971,
- 0,
- 0,
- },
- {
- 2801,
- 0,
- 0,
- 2869,
- 5072,
- 0,
- },
- {
- 1763,
- 2545,
- 3723,
- 2514,
- 4558,
- 21108,
- },
- {
- 2195,
- 3960,
- 7440,
- 2500,
- 6017,
- 21960,
- },
- {
- 1841,
- 2902,
- 1386,
- 2115,
- 3762,
- 22308,
- },
- {
- 1699,
- 2709,
- 1288,
- 1865,
- 3246,
- 20660,
- },
- {
- 3221,
- 0,
- 0,
- 3391,
- 0,
- 0,
- },
- {
- 2537,
- 4923,
- 0,
- 3186,
- 0,
- 0,
- },
- {
- 2816,
- 4229,
- 6397,
- 3676,
- 0,
- 0,
- },
- {
- 2816,
- 4229,
- 6397,
- 3893,
- 0,
- 0,
- },
- {
- 2160,
- 3481,
- 9091,
- 3391,
- 0,
- 0,
- },
- {
- 2560,
- 4923,
- 8462,
- 2775,
- 4835,
- 0,
- },
- {
- 2551,
- 3803,
- 5619,
- 3072,
- 5537,
- 0,
- },
- {
- 2545,
- 4206,
- 7450,
- 3229,
- 0,
- 0,
- },
- {
- 2162,
- 3655,
- 9263,
- 2699,
- 5296,
- 0,
- },
- {
- 2039,
- 3082,
- 6871,
- 2426,
- 3637,
- 5586,
- },
- {
- 1902,
- 2840,
- 6875,
- 2211,
- 3483,
- 5908,
- },
- {
- 1888,
- 3057,
- 6899,
- 2211,
- 3483,
- 5908,
- },
- {
- 1888,
- 3057,
- 6899,
- 2183,
- 3469,
- 6420,
- },
- {
- 1888,
- 3057,
- 6899,
- 1970,
- 3174,
- 8081,
- },
- {
- 2633,
- 1855,
- 4960,
- 2301,
- 3477,
- 5083,
- },
- {
- 1527,
- 2269,
- 5875,
- 1964,
- 3033,
- 8001,
- },
- {
- 1576,
- 2445,
- 5781,
- 1857,
- 2871,
- 4333,
- },
- {
- 1531,
- 2258,
- 5869,
- 2420,
- 1660,
- 6823,
- },
- {
- 1566,
- 2318,
- 3776,
- 2543,
- 3876,
- 1888,
- },
- {
- 1568,
- 2320,
- 3780,
- 2183,
- 3360,
- 1665,
- },
- {
- 1386,
- 1972,
- 4356,
- 1486,
- 2215,
- 4513,
- },
- {
- 3356,
- 0,
- 0,
- 2494,
- 4425,
- 0,
- },
- {
- 2633,
- 5009,
- 0,
- 2887,
- 0,
- 0,
- },
- {
- 2224,
- 3538,
- 7696,
- 2494,
- 4425,
- 0,
- },
- {
- 2119,
- 3225,
- 9861,
- 2494,
- 4425,
- 0,
- },
- {
- 1974,
- 3139,
- 10121,
- 2494,
- 4425,
- 0,
- },
- {
- 1722,
- 2453,
- 4059,
- 2494,
- 4425,
- 0,
- },
- {
- 1839,
- 2658,
- 4472,
- 2490,
- 5455,
- 0,
- },
- {
- 1722,
- 2533,
- 4581,
- 2037,
- 3393,
- 5808,
- },
- {
- 1427,
- 2009,
- 4184,
- 1914,
- 3082,
- 1349,
- },
- {
- 1370,
- 1861,
- 2719,
- 2017,
- 1339,
- 3913,
- },
- {
- 2482,
- 3885,
- 0,
- 0,
- 0,
- 0,
- },
- {
- 2375,
- 3827,
- 6975,
- 0,
- 0,
- 0,
- },
- {
- 3395,
- 0,
- 0,
- 3883,
- 0,
- 0,
- },
- {
- 3563,
- 0,
- 0,
- 3883,
- 0,
- 0,
- },
- {
- 3346,
- 0,
- 0,
- 3418,
- 0,
- 0,
- },
- {
- 3563,
- 0,
- 0,
- 4128,
- 0,
- 0,
- },
- {
- 2820,
- 5218,
- 0,
- 3883,
- 0,
- 0,
- },
- {
- 2637,
- 4962,
- 0,
- 3418,
- 0,
- 0,
- },
- {
- 2482,
- 3885,
- 0,
- 3418,
- 0,
- 0,
- },
- {
- 2217,
- 3616,
- 6502,
- 3418,
- 0,
- 0,
- },
- {
- 2123,
- 3295,
- 8658,
- 3418,
- 0,
- 0,
- },
- {
- 2242,
- 3397,
- 5562,
- 2693,
- 5132,
- 0,
- },
- {
- 2387,
- 4024,
- 7483,
- 3452,
- 0,
- 0,
- },
- {
- 1927,
- 2838,
- 4548,
- 2693,
- 5132,
- 0,
- },
- {
- 1859,
- 2674,
- 3893,
- 2703,
- 5371,
- 0,
- },
- {
- 2201,
- 3618,
- 1617,
- 2703,
- 5371,
- 0,
- },
- {
- 2093,
- 3135,
- 1554,
- 2273,
- 3594,
- 5312,
- },
- {
- 2201,
- 3618,
- 1617,
- 2238,
- 3895,
- 6172,
- },
- {
- 1828,
- 3014,
- 1382,
- 2258,
- 3624,
- 5820,
- },
- {
- 1863,
- 3170,
- 1402,
- 2113,
- 3381,
- 5146,
- },
- {
- 1691,
- 2572,
- 1294,
- 2009,
- 3158,
- 4540,
- },
- {
- 2424,
- 3706,
- 5654,
- 0,
- 0,
- 0,
- },
- {
- 3299,
- 0,
- 0,
- 3313,
- 0,
- 0,
- },
- {
- 2424,
- 3706,
- 5654,
- 3174,
- 0,
- 0,
- },
- {
- 2424,
- 3706,
- 5654,
- 3313,
- 0,
- 0,
- },
- {
- 2177,
- 3557,
- 6113,
- 3313,
- 0,
- 0,
- },
- {
- 2207,
- 3737,
- 6475,
- 3008,
- 4605,
- 0,
- },
- {
- 2816,
- 1873,
- 4263,
- 3008,
- 4605,
- 0,
- },
- {
- 1966,
- 2914,
- 1433,
- 2682,
- 4366,
- 0,
- },
- {
- 2301,
- 1626,
- 3895,
- 2627,
- 4714,
- 0,
- },
- {
- 2205,
- 3536,
- 1570,
- 2560,
- 3995,
- 6105,
- },
- {
- 1910,
- 3012,
- 1402,
- 2560,
- 3995,
- 6105,
- },
- {
- 1898,
- 3276,
- 1380,
- 2363,
- 3637,
- 5844,
- },
- {
- 2144,
- 1478,
- 3655,
- 2162,
- 3362,
- 5531,
- },
- {
- 1988,
- 1409,
- 3090,
- 2136,
- 3543,
- 6002,
- },
- {
- 1882,
- 1355,
- 2799,
- 2164,
- 3702,
- 6285,
- },
- {
- 3311,
- 0,
- 0,
- 3393,
- 0,
- 0,
- },
- {
- 2611,
- 4706,
- 0,
- 3201,
- 0,
- 0,
- },
- {
- 2820,
- 5218,
- 0,
- 4128,
- 0,
- 0,
- },
- {
- 2660,
- 4134,
- 0,
- 4128,
- 0,
- 0,
- },
- {
- 2678,
- 4820,
- 0,
- 2840,
- 0,
- 0,
- },
- {
- 2643,
- 4952,
- 0,
- 2775,
- 5003,
- 0,
- },
- {
- 2402,
- 3618,
- 5726,
- 3252,
- 6201,
- 0,
- },
- {
- 2209,
- 3622,
- 6168,
- 2840,
- 0,
- 0,
- },
- {
- 2209,
- 3622,
- 6168,
- 2713,
- 5232,
- 0,
- },
- {
- 1992,
- 2850,
- 4124,
- 3262,
- 6518,
- 0,
- },
- {
- 2353,
- 3835,
- 1736,
- 3262,
- 6518,
- 0,
- },
- {
- 1837,
- 2744,
- 5332,
- 2191,
- 3459,
- 5175,
- },
- {
- 2353,
- 3835,
- 1736,
- 2701,
- 4685,
- 7550,
- },
- {
- 1837,
- 2744,
- 5332,
- 1923,
- 2977,
- 4265,
- },
- {
- 1853,
- 2717,
- 5322,
- 2271,
- 1591,
- 3491,
- },
- {
- 1560,
- 2254,
- 4831,
- 1923,
- 2977,
- 4265,
- },
- {
- 1626,
- 2510,
- 6512,
- 2271,
- 1591,
- 3491,
- },
- {
- 3336,
- 0,
- 0,
- 2439,
- 4528,
- 0,
- },
- {
- 2615,
- 5236,
- 0,
- 2799,
- 0,
- 0,
- },
- {
- 2215,
- 3606,
- 8046,
- 2439,
- 4528,
- 0,
- },
- {
- 2084,
- 3143,
- 5750,
- 2439,
- 4528,
- 0,
- },
- {
- 1933,
- 3024,
- 5658,
- 2439,
- 4528,
- 0,
- },
- {
- 1863,
- 3571,
- 6793,
- 2439,
- 4528,
- 0,
- },
- {
- 1884,
- 3375,
- 6283,
- 1984,
- 3446,
- 8095,
- },
- {
- 1513,
- 2275,
- 5517,
- 1800,
- 2889,
- 4720,
- },
- {
- 1452,
- 2113,
- 5564,
- 1658,
- 2549,
- 3735,
- },
- {
- 1552,
- 2285,
- 4022,
- 4139,
- 1634,
- 2496,
- },
- {
- 1431,
- 2117,
- 4050,
- 4139,
- 1634,
- 2496,
- },
- {
- 1486,
- 2150,
- 3778,
- 2775,
- 1761,
- 4515,
- },
- {
- 1386,
- 2041,
- 3418,
- 2775,
- 1761,
- 4515,
- },
- {
- 3371,
- 0,
- 0,
- 2568,
- 5036,
- 0,
- },
- {
- 3031,
- 6023,
- 0,
- 3733,
- 0,
- 0,
- },
- {
- 2801,
- 4704,
- 0,
- 3733,
- 0,
- 0,
- },
- {
- 2801,
- 4704,
- 0,
- 4065,
- 0,
- 0,
- },
- {
- 2197,
- 3815,
- 6617,
- 3436,
- 0,
- 0,
- },
- {
- 2197,
- 3815,
- 6617,
- 2568,
- 5036,
- 0,
- },
- {
- 2162,
- 3229,
- 5052,
- 3698,
- 6123,
- 0,
- },
- {
- 2314,
- 3723,
- 1712,
- 4065,
- 0,
- 0,
- },
- {
- 1947,
- 3055,
- 5111,
- 2570,
- 6084,
- 0,
- },
- {
- 2351,
- 3770,
- 1665,
- 2570,
- 6084,
- 0,
- },
- {
- 2351,
- 1656,
- 3932,
- 3133,
- 5603,
- 0,
- },
- {
- 2469,
- 1742,
- 4464,
- 3098,
- 6504,
- 0,
- },
- {
- 1646,
- 2457,
- 4046,
- 3080,
- 6574,
- 0,
- },
- {
- 2336,
- 1650,
- 3921,
- 4040,
- 2387,
- 7604,
- },
- {
- 2289,
- 1593,
- 4149,
- 2537,
- 4380,
- 7731,
- },
- {
- 1576,
- 2322,
- 3921,
- 2521,
- 4706,
- 7946,
- },
- {
- 2099,
- 1452,
- 3545,
- 2521,
- 4706,
- 7946,
- },
- {
- 1980,
- 1460,
- 3385,
- 3768,
- 2252,
- 5793,
- },
- {
- 2025,
- 1429,
- 3278,
- 2224,
- 4022,
- 5902,
- },
- {
- 1232,
- 1779,
- 2904,
- 2588,
- 1564,
- 4542,
- },
- {
- 1746,
- 3622,
- 9062,
- 2048,
- 2048,
- 2048,
- },
- {
- 2070,
- 3405,
- 9017,
- 3231,
- 0,
- 0,
- },
- {
- 2070,
- 3405,
- 9017,
- 2461,
- 4964,
- 0,
- },
- {
- 1804,
- 3313,
- 8470,
- 2461,
- 4964,
- 0,
- },
- {
- 1734,
- 3667,
- 9146,
- 2461,
- 4964,
- 0,
- },
- {
- 1372,
- 2277,
- 4892,
- 2461,
- 4964,
- 0,
- },
- {
- 2316,
- 3717,
- 1630,
- 2590,
- 5722,
- 0,
- },
- {
- 1167,
- 1646,
- 2451,
- 2379,
- 3991,
- 1490,
- },
- {
- 2140,
- 3248,
- 7688,
- 3418,
- 0,
- 0,
- },
- {
- 2252,
- 3284,
- 4700,
- 2732,
- 4962,
- 0,
- },
- {
- 2234,
- 3588,
- 6479,
- 2881,
- 0,
- 0,
- },
- {
- 2234,
- 3588,
- 6479,
- 2756,
- 5171,
- 0,
- },
- {
- 2234,
- 3588,
- 6479,
- 2230,
- 3448,
- 5167,
- },
- {
- 1925,
- 2762,
- 3897,
- 2455,
- 3665,
- 5251,
- },
- {
- 1802,
- 2621,
- 5783,
- 2250,
- 3553,
- 0,
- },
- {
- 1701,
- 2488,
- 5994,
- 2230,
- 3497,
- 5076,
- },
- {
- 1781,
- 2717,
- 5951,
- 2183,
- 3520,
- 5480,
- },
- {
- 1566,
- 6379,
- 3723,
- 2299,
- 4728,
- 9779,
- },
- {
- 1581,
- 2297,
- 4814,
- 2961,
- 1933,
- 4243,
- },
- {
- 1435,
- 2000,
- 3559,
- 1939,
- 2975,
- 4263,
- },
- {
- 1472,
- 2091,
- 3483,
- 2291,
- 1626,
- 3473,
- },
- {
- 1718,
- 1310,
- 3117,
- 2289,
- 3475,
- 1630,
- },
- {
- 1718,
- 1310,
- 3117,
- 1968,
- 3008,
- 1447,
- },
- {
- 1310,
- 1810,
- 3547,
- 1546,
- 2232,
- 3170,
- },
- {
- 2494,
- 1630,
- 4675,
- 2641,
- 6809,
- 0,
- },
- {
- 3256,
- 1710,
- 9084,
- 2246,
- 6287,
- 0,
- },
- {
- 2035,
- 5359,
- 0,
- 2234,
- 4573,
- 7079,
- },
- {
- 1816,
- 3221,
- 7256,
- 2228,
- 3741,
- 6281,
- },
- {
- 1714,
- 2535,
- 3897,
- 2658,
- 5728,
- 0,
- },
- {
- 2330,
- 5787,
- 0,
- 2265,
- 5726,
- 8992,
- },
- {
- 1927,
- 3954,
- 9160,
- 1394,
- 2592,
- 4767,
- },
- {
- 2768,
- 8871,
- 0,
- 1679,
- 3164,
- 8550,
- },
- {
- 2750,
- 7387,
- 0,
- 1759,
- 2975,
- 5304,
- },
- {
- 2473,
- 5611,
- 0,
- 1554,
- 2539,
- 4468,
- },
- {
- 2299,
- 5603,
- 0,
- 1789,
- 3067,
- 5296,
- },
- {
- 1882,
- 5060,
- 0,
- 1259,
- 2195,
- 4292,
- },
- {
- 3170,
- 9232,
- 0,
- 1689,
- 4460,
- 8816,
- },
- {
- 2492,
- 5935,
- 0,
- 1509,
- 2492,
- 3952,
- },
- {
- 1998,
- 4485,
- 11706,
- 3084,
- 1314,
- 8624,
- },
- {
- 2267,
- 5314,
- 0,
- 2666,
- 1236,
- 1802,
- }
- };
-const Word16 scales_p_ivas_fx[][MAX_NO_SCALES * 2] = /* 2 subvectors 20 modes Q11 */
- {
- {
- 2998,
- 4861,
- 0,
- 0,
- 0,
- 0,
- },
- {
- 2629,
- 4421,
- 0,
- 0,
- 0,
- 0,
- },
- {
- 2549,
- 5304,
- 0,
- 0,
- 0,
- 0,
- },
- {
- 2338,
- 3805,
- 5994,
- 0,
- 0,
- 0,
- },
- {
- 2125,
- 3762,
- 6162,
- 0,
- 0,
- 0,
- },
- {
- 3102,
- 0,
- 0,
- 3153,
- 0,
- 0,
- },
- {
- 3244,
- 0,
- 0,
- 3153,
- 0,
- 0,
- },
- {
- 3244,
- 0,
- 0,
- 3317,
- 0,
- 0,
- },
- {
- 2629,
- 4421,
- 0,
- 3317,
- 0,
- 0,
- },
- {
- 2549,
- 5304,
- 0,
- 3153,
- 0,
- 0,
- },
- {
- 2590,
- 5251,
- 0,
- 3354,
- 0,
- 0,
- },
- {
- 2338,
- 3805,
- 5994,
- 3317,
- 0,
- 0,
- },
- {
- 2125,
- 3762,
- 6162,
- 3317,
- 0,
- 0,
- },
- {
- 2023,
- 3401,
- 5199,
- 3317,
- 0,
- 0,
- },
- {
- 2177,
- 3487,
- 5744,
- 2650,
- 4818,
- 0,
- },
- {
- 2177,
- 3926,
- 6273,
- 2795,
- 0,
- 0,
- },
- {
- 1871,
- 2891,
- 4552,
- 2650,
- 4818,
- 0,
- },
- {
- 1843,
- 2887,
- 4616,
- 2658,
- 4941,
- 0,
- },
- {
- 1806,
- 2869,
- 4919,
- 2689,
- 4999,
- 0,
- },
- {
- 2777,
- 1775,
- 4868,
- 2191,
- 3452,
- 5214,
- },
- {
- 1732,
- 2760,
- 5214,
- 2203,
- 3567,
- 5443,
- },
- {
- 1730,
- 2824,
- 5255,
- 2086,
- 3229,
- 5003,
- },
- {
- 1548,
- 2435,
- 5732,
- 2220,
- 3694,
- 5648,
- },
- {
- 1546,
- 2494,
- 5777,
- 1933,
- 2934,
- 4040,
- },
- {
- 1525,
- 2451,
- 5935,
- 2543,
- 1726,
- 3997,
- },
- {
- 1482,
- 2529,
- 6025,
- 2570,
- 1736,
- 4096,
- },
- {
- 1406,
- 2279,
- 4788,
- 1746,
- 2719,
- 3981,
- },
- {
- 1327,
- 2107,
- 3760,
- 1748,
- 2777,
- 4016,
- },
- {
- 1243,
- 1912,
- 3106,
- 1603,
- 2484,
- 3141,
- },
- {
- 1226,
- 1853,
- 3131,
- 1497,
- 2275,
- 3072,
- },
- {
- 1327,
- 2107,
- 3760,
- 1406,
- 2166,
- 3891,
- },
- {
- 3303,
- 0,
- 0,
- 0,
- 0,
- 0,
- },
- {
- 2594,
- 5068,
- 0,
- 3315,
- 0,
- 0,
- },
- {
- 2076,
- 3338,
- 5046,
- 2631,
- 4405,
- 0,
- },
- {
- 1828,
- 2846,
- 4739,
- 3000,
- 4708,
- 0,
- },
- {
- 1904,
- 2869,
- 4403,
- 2621,
- 4616,
- 0,
- },
- {
- 1828,
- 2846,
- 4739,
- 2613,
- 4517,
- 6111,
- },
- {
- 1828,
- 2846,
- 4739,
- 2121,
- 3371,
- 5060,
- },
- {
- 1755,
- 2738,
- 5046,
- 2136,
- 3543,
- 5376,
- },
- {
- 1566,
- 2496,
- 3180,
- 2121,
- 3371,
- 5060,
- },
- {
- 1615,
- 2719,
- 3383,
- 2154,
- 3653,
- 5541,
- },
- {
- 1564,
- 2506,
- 3184,
- 1884,
- 2955,
- 4167,
- },
- {
- 1357,
- 2172,
- 2535,
- 2824,
- 1839,
- 3995,
- },
- {
- 1378,
- 2260,
- 2674,
- 2578,
- 1695,
- 4001,
- },
- {
- 1363,
- 2193,
- 2557,
- 1644,
- 2541,
- 3540,
- },
- {
- 1347,
- 2127,
- 2486,
- 1945,
- 1333,
- 2926,
- },
- {
- 3276,
- 0,
- 0,
- 3180,
- 0,
- 0,
- },
- {
- 2674,
- 4970,
- 0,
- 3235,
- 0,
- 0,
- },
- {
- 2674,
- 4970,
- 0,
- 3432,
- 0,
- 0,
- },
- {
- 2560,
- 5926,
- 0,
- 3235,
- 0,
- 0,
- },
- {
- 2322,
- 4067,
- 6748,
- 3180,
- 0,
- 0,
- },
- {
- 2340,
- 4202,
- 6850,
- 3432,
- 0,
- 0,
- },
- {
- 2138,
- 4159,
- 7141,
- 3432,
- 0,
- 0,
- },
- {
- 2021,
- 3661,
- 5445,
- 3373,
- 0,
- 0,
- },
- {
- 1841,
- 3280,
- 5281,
- 3373,
- 0,
- 0,
- },
- {
- 1632,
- 2650,
- 4382,
- 3373,
- 0,
- 0,
- },
- {
- 1632,
- 2650,
- 4382,
- 2734,
- 4556,
- 0,
- },
- {
- 1517,
- 2357,
- 3719,
- 2734,
- 4556,
- 0,
- },
- {
- 2007,
- 3485,
- 1445,
- 2697,
- 5382,
- 0,
- },
- {
- 1632,
- 2650,
- 4382,
- 2428,
- 3956,
- 0,
- },
- {
- 1517,
- 2357,
- 3719,
- 2383,
- 3733,
- 5670,
- },
- {
- 1449,
- 2306,
- 3999,
- 2203,
- 3543,
- 5687,
- },
- {
- 1351,
- 2148,
- 3217,
- 2203,
- 3543,
- 5687,
- },
- {
- 1355,
- 2101,
- 3182,
- 2199,
- 3917,
- 6189,
- },
- {
- 1351,
- 2148,
- 3217,
- 2947,
- 1896,
- 4364,
- },
- {
- 1290,
- 1978,
- 3117,
- 2686,
- 1804,
- 4519,
- },
- {
- 1263,
- 1886,
- 2963,
- 2113,
- 3172,
- 1548,
- },
- {
- 3266,
- 0,
- 0,
- 3076,
- 0,
- 0,
- },
- {
- 2299,
- 3985,
- 7643,
- 3076,
- 0,
- 0,
- },
- {
- 2115,
- 4249,
- 8886,
- 2906,
- 5009,
- 0,
- },
- {
- 2017,
- 3672,
- 12216,
- 2623,
- 4759,
- 0,
- },
- {
- 1804,
- 3289,
- 14325,
- 2906,
- 5009,
- 0,
- },
- {
- 1728,
- 3239,
- 14376,
- 2623,
- 4759,
- 0,
- },
- {
- 1615,
- 3112,
- 14751,
- 2623,
- 4759,
- 0,
- },
- {
- 1779,
- 3168,
- 14325,
- 2109,
- 3592,
- 6352,
- },
- {
- 1673,
- 3055,
- 14581,
- 2109,
- 3592,
- 6352,
- },
- {
- 1546,
- 2830,
- 14608,
- 2109,
- 3592,
- 6352,
- },
- {
- 1445,
- 2693,
- 14796,
- 2109,
- 3592,
- 6352,
- },
- {
- 1411,
- 2654,
- 14929,
- 2080,
- 3840,
- 6633,
- },
- {
- 1429,
- 2611,
- 14764,
- 1871,
- 3170,
- 4982,
- },
- {
- 1390,
- 2693,
- 14929,
- 2516,
- 3778,
- 1665,
- },
- {
- 1390,
- 2693,
- 14929,
- 2433,
- 1581,
- 4003,
- },
- {
- 2070,
- 3639,
- 5652,
- 3305,
- 0,
- 0,
- },
- {
- 1974,
- 3235,
- 8183,
- 3540,
- 0,
- 0,
- },
- {
- 1798,
- 2949,
- 4687,
- 3540,
- 0,
- 0,
- },
- {
- 1744,
- 3364,
- 4974,
- 3540,
- 0,
- 0,
- },
- {
- 1746,
- 2830,
- 4231,
- 2549,
- 5486,
- 0,
- },
- {
- 2471,
- 1593,
- 4521,
- 2549,
- 5486,
- 0,
- },
- {
- 1646,
- 2772,
- 5421,
- 2883,
- 5355,
- 0,
- },
- {
- 1601,
- 2568,
- 5732,
- 2822,
- 5545,
- 0,
- },
- {
- 2471,
- 1593,
- 4521,
- 2074,
- 3751,
- 6252,
- },
- {
- 2471,
- 1593,
- 4521,
- 2908,
- 1785,
- 4771,
- },
- {
- 1398,
- 2080,
- 3661,
- 2306,
- 3862,
- 5988,
- },
- {
- 1284,
- 1878,
- 2965,
- 2306,
- 3862,
- 5988,
- },
- {
- 1347,
- 2105,
- 3188,
- 3035,
- 1996,
- 4397,
- },
- {
- 1626,
- 1187,
- 2725,
- 3035,
- 1996,
- 4397,
- },
- {
- 1685,
- 1212,
- 2709,
- 2756,
- 1832,
- 4726,
- },
- {
- 2248,
- 1511,
- 1136,
- 1779,
- 2641,
- 3813,
- },
- {
- 1552,
- 2275,
- 1126,
- 1783,
- 2799,
- 3903,
- },
- {
- 1128,
- 1568,
- 2285,
- 1619,
- 2459,
- 3405,
- },
- {
- 1128,
- 1568,
- 2285,
- 1972,
- 1427,
- 2709,
- },
- {
- 1075,
- 1576,
- 2197,
- 1669,
- 2533,
- 1161,
- },
- {
- 2191,
- 3667,
- 7993,
- 3274,
- 0,
- 0,
- },
- {
- 1679,
- 2492,
- 4278,
- 2570,
- 4689,
- 0,
- },
- {
- 1597,
- 2394,
- 5109,
- 2570,
- 4689,
- 0,
- },
- {
- 2201,
- 1480,
- 4835,
- 2273,
- 4016,
- 7149,
- },
- {
- 1415,
- 2107,
- 4786,
- 2117,
- 3667,
- 8200,
- },
- {
- 1374,
- 2203,
- 5337,
- 1955,
- 3168,
- 5148,
- },
- {
- 2424,
- 1589,
- 4335,
- 2164,
- 3420,
- 1380,
- },
- {
- 1937,
- 2965,
- 5576,
- 2854,
- 5416,
- 9381,
- },
- {
- 1941,
- 2977,
- 5576,
- 4034,
- 2404,
- 7135,
- },
- {
- 1812,
- 2879,
- 5658,
- 4034,
- 2404,
- 7135,
- },
- {
- 2549,
- 1724,
- 4870,
- 4093,
- 2392,
- 7540,
- },
- {
- 1781,
- 2756,
- 5763,
- 3571,
- 2166,
- 5933,
- },
- {
- 1693,
- 2496,
- 4456,
- 3252,
- 5324,
- 2037,
- },
- {
- 1673,
- 2428,
- 4079,
- 3262,
- 1994,
- 5363,
- },
- {
- 1683,
- 2467,
- 4298,
- 2998,
- 1851,
- 4911,
- },
- {
- 1683,
- 2467,
- 4298,
- 4204,
- 1714,
- 2783,
- },
- {
- 1067,
- 1529,
- 2115,
- 1630,
- 2729,
- 1110,
- },
- {
- 3438,
- 0,
- 0,
- 2625,
- 5060,
- 0,
- },
- {
- 2228,
- 3786,
- 6543,
- 3454,
- 0,
- 0,
- },
- {
- 2228,
- 3786,
- 6543,
- 2625,
- 5060,
- 0,
- },
- {
- 2306,
- 3459,
- 1617,
- 2625,
- 5060,
- 0,
- },
- {
- 1904,
- 2830,
- 1396,
- 2625,
- 5060,
- 0,
- },
- {
- 2283,
- 1626,
- 3792,
- 2623,
- 6211,
- 0,
- },
- {
- 1720,
- 2818,
- 1275,
- 1638,
- 2899,
- 8724,
- },
- {
- 1640,
- 2351,
- 3690,
- 0,
- 0,
- 0,
- },
- {
- 2752,
- 5380,
- 0,
- 3223,
- 0,
- 0,
- },
- {
- 2580,
- 4188,
- 0,
- 3223,
- 0,
- 0,
- },
- {
- 2580,
- 4188,
- 0,
- 3430,
- 0,
- 0,
- },
- {
- 2230,
- 3710,
- 6496,
- 3434,
- 0,
- 0,
- },
- {
- 2230,
- 3899,
- 6596,
- 3115,
- 5396,
- 0,
- },
- {
- 1972,
- 2949,
- 4335,
- 3430,
- 0,
- 0,
- },
- {
- 1972,
- 2949,
- 4335,
- 2666,
- 4935,
- 0,
- },
- {
- 1730,
- 2482,
- 3960,
- 2689,
- 4954,
- 0,
- },
- {
- 1595,
- 2242,
- 3481,
- 2689,
- 4954,
- 0,
- },
- {
- 1480,
- 2078,
- 3407,
- 2689,
- 4954,
- 0,
- },
- {
- 2066,
- 3414,
- 1540,
- 2676,
- 6187,
- 0,
- },
- {
- 2058,
- 3373,
- 1533,
- 2179,
- 3831,
- 6856,
- },
- {
- 1832,
- 3051,
- 1396,
- 2179,
- 3831,
- 6856,
- },
- {
- 1611,
- 2605,
- 1245,
- 2179,
- 3831,
- 6856,
- },
- {
- 1763,
- 1327,
- 2988,
- 2179,
- 3831,
- 6856,
- },
- {
- 1697,
- 1292,
- 2738,
- 2168,
- 4161,
- 7020,
- },
- {
- 1763,
- 1327,
- 2988,
- 3155,
- 1884,
- 5142,
- },
- {
- 1736,
- 1296,
- 2781,
- 2883,
- 1800,
- 5552,
- },
- {
- 1828,
- 1335,
- 2945,
- 2203,
- 1474,
- 3674,
- },
- {
- 2783,
- 4722,
- 0,
- 3418,
- 0,
- 0,
- },
- {
- 2205,
- 3946,
- 7262,
- 3418,
- 0,
- 0,
- },
- {
- 2205,
- 4161,
- 7327,
- 2926,
- 5552,
- 0,
- },
- {
- 1705,
- 2566,
- 4311,
- 2627,
- 5234,
- 0,
- },
- {
- 1589,
- 2359,
- 3805,
- 2627,
- 5234,
- 0,
- },
- {
- 1472,
- 2183,
- 3547,
- 2627,
- 5234,
- 0,
- },
- {
- 1927,
- 1333,
- 3205,
- 1478,
- 2437,
- 3973,
- },
- {
- 2646,
- 5076,
- 0,
- 3155,
- 0,
- 0,
- },
- {
- 2461,
- 3897,
- 0,
- 3155,
- 0,
- 0,
- },
- {
- 2105,
- 3360,
- 5027,
- 3375,
- 0,
- 0,
- },
- {
- 2553,
- 1798,
- 4769,
- 3375,
- 0,
- 0,
- },
- {
- 1767,
- 2781,
- 5165,
- 3375,
- 0,
- 0,
- },
- {
- 1673,
- 2502,
- 4116,
- 2199,
- 3655,
- 5597,
- },
- {
- 1669,
- 1253,
- 2623,
- 2160,
- 3530,
- 6045,
- },
- {
- 3164,
- 0,
- 0,
- 3170,
- 0,
- 0,
- },
- {
- 3358,
- 0,
- 0,
- 3170,
- 0,
- 0,
- },
- {
- 2723,
- 0,
- 0,
- 3270,
- 0,
- 0,
- },
- {
- 2529,
- 4743,
- 0,
- 3270,
- 0,
- 0,
- },
- {
- 2635,
- 5629,
- 0,
- 3170,
- 0,
- 0,
- },
- {
- 2635,
- 5629,
- 0,
- 3387,
- 0,
- 0,
- },
- {
- 2437,
- 4149,
- 0,
- 3387,
- 0,
- 0,
- },
- {
- 1949,
- 3428,
- 5656,
- 3270,
- 0,
- 0,
- },
- {
- 1880,
- 3217,
- 6574,
- 3270,
- 0,
- 0,
- },
- {
- 2572,
- 1622,
- 4255,
- 3270,
- 0,
- 0,
- },
- {
- 1550,
- 2463,
- 3837,
- 3270,
- 0,
- 0,
- },
- {
- 1906,
- 2985,
- 5017,
- 2650,
- 5615,
- 0,
- },
- {
- 2287,
- 1507,
- 3840,
- 2562,
- 5257,
- 0,
- },
- {
- 1581,
- 2531,
- 3934,
- 2562,
- 5257,
- 0,
- },
- {
- 1796,
- 2859,
- 5605,
- 2213,
- 3719,
- 6881,
- },
- {
- 2316,
- 3350,
- 0,
- 2807,
- 0,
- 0,
- },
- {
- 1826,
- 3260,
- 7012,
- 2658,
- 6565,
- 0,
- },
- {
- 1792,
- 3168,
- 7084,
- 2631,
- 5937,
- 8499,
- },
- {
- 1732,
- 3379,
- 6772,
- 2611,
- 5009,
- 8202,
- },
- {
- 1654,
- 6285,
- 3514,
- 2611,
- 5009,
- 8202,
- },
- {
- 1566,
- 6406,
- 3733,
- 2611,
- 5009,
- 8202,
- },
- {
- 1912,
- 2615,
- 1490,
- 2369,
- 3475,
- 0,
- },
- {
- 1705,
- 2379,
- 1347,
- 2357,
- 3454,
- 0,
- },
- {
- 1538,
- 2113,
- 1224,
- 2357,
- 3454,
- 0,
- },
- {
- 1554,
- 6426,
- 3778,
- 1888,
- 3088,
- 6369,
- },
- {
- 1452,
- 2058,
- 1167,
- 2170,
- 3629,
- 5568,
- },
- {
- 1527,
- 2050,
- 1230,
- 2056,
- 3692,
- 5922,
- },
- {
- 1521,
- 2048,
- 1226,
- 1916,
- 3811,
- 5885,
- },
- {
- 1536,
- 6492,
- 3942,
- 1509,
- 2914,
- 5502,
- },
- {
- 1536,
- 6492,
- 3942,
- 1349,
- 2168,
- 4044,
- },
- {
- 1587,
- 1257,
- 2123,
- 1630,
- 2670,
- 3901,
- },
- {
- 1830,
- 2742,
- 5220,
- 2678,
- 5326,
- 0,
- },
- {
- 1703,
- 2568,
- 3966,
- 2676,
- 5353,
- 0,
- },
- {
- 1703,
- 2523,
- 3923,
- 2371,
- 4048,
- 0,
- },
- {
- 1689,
- 2580,
- 4081,
- 2095,
- 3561,
- 5726,
- },
- {
- 1536,
- 2281,
- 3201,
- 2140,
- 3690,
- 5490,
- },
- {
- 1417,
- 2048,
- 2930,
- 2095,
- 3561,
- 5726,
- },
- {
- 1474,
- 2072,
- 3272,
- 3096,
- 1896,
- 4376,
- },
- {
- 1394,
- 1992,
- 3377,
- 2828,
- 1794,
- 4360,
- },
- {
- 1400,
- 1974,
- 3358,
- 2392,
- 3637,
- 1611,
- },
- {
- 1368,
- 1914,
- 3176,
- 2080,
- 3108,
- 1458,
- },
- {
- 1349,
- 1865,
- 2918,
- 2738,
- 1820,
- 1314,
- },
- {
- 1349,
- 1865,
- 2918,
- 1718,
- 2635,
- 1243,
- },
- {
- 3344,
- 0,
- 0,
- 3454,
- 0,
- 0,
- },
- {
- 3463,
- 0,
- 0,
- 3428,
- 0,
- 0,
- },
- {
- 2719,
- 5251,
- 0,
- 3180,
- 0,
- 0,
- },
- {
- 2560,
- 4079,
- 0,
- 3180,
- 0,
- 0,
- },
- {
- 2560,
- 4079,
- 0,
- 3428,
- 0,
- 0,
- },
- {
- 2203,
- 3665,
- 6025,
- 3454,
- 0,
- 0,
- },
- {
- 2183,
- 3446,
- 8349,
- 3428,
- 0,
- 0,
- },
- {
- 2621,
- 1865,
- 5072,
- 3428,
- 0,
- 0,
- },
- {
- 1708,
- 2516,
- 3870,
- 3454,
- 0,
- 0,
- },
- {
- 1921,
- 2875,
- 4409,
- 2674,
- 5386,
- 0,
- },
- {
- 2744,
- 1814,
- 4751,
- 2674,
- 5386,
- 0,
- },
- {
- 1705,
- 2560,
- 3907,
- 2674,
- 5386,
- 0,
- },
- {
- 1705,
- 2484,
- 3835,
- 2304,
- 3766,
- 5773,
- },
- {
- 1748,
- 2594,
- 3743,
- 2138,
- 3604,
- 5902,
- },
- {
- 1566,
- 2379,
- 3461,
- 2097,
- 3559,
- 5812,
- },
- {
- 1484,
- 2150,
- 3667,
- 3031,
- 1888,
- 6356,
- },
- {
- 1458,
- 2072,
- 3172,
- 3059,
- 1849,
- 6889,
- },
- {
- 1349,
- 1898,
- 2779,
- 3059,
- 1849,
- 6889,
- },
- {
- 1683,
- 1257,
- 2637,
- 1863,
- 3090,
- 4618,
- },
- {
- 1722,
- 1277,
- 2617,
- 2377,
- 1560,
- 3702,
- },
- {
- 1716,
- 1273,
- 2592,
- 2211,
- 1456,
- 3502,
- },
- {
- 1703,
- 1267,
- 2611,
- 1921,
- 2928,
- 1318,
- },
- {
- 1810,
- 2762,
- 5263,
- 2691,
- 5343,
- 0,
- },
- {
- 2009,
- 3016,
- 5701,
- 3461,
- 6844,
- 0,
- },
- {
- 1976,
- 3100,
- 5500,
- 2885,
- 5089,
- 8081,
- },
- {
- 1998,
- 2983,
- 5453,
- 4405,
- 2603,
- 8552,
- },
- {
- 2029,
- 3080,
- 6320,
- 5091,
- 2693,
- 9277,
- },
- {
- 1937,
- 2965,
- 5576,
- 2854,
- 5416,
- 9381,
- },
- {
- 1456,
- 2084,
- 3307,
- 3035,
- 1886,
- 7026,
- },
- {
- 1390,
- 1994,
- 3397,
- 1941,
- 3172,
- 7061,
- },
- {
- 1701,
- 1265,
- 3033,
- 1910,
- 3100,
- 4730,
- },
- {
- 1671,
- 1249,
- 2871,
- 2920,
- 1796,
- 4638,
- },
- {
- 1611,
- 2574,
- 1220,
- 1759,
- 2963,
- 4978,
- },
- {
- 1611,
- 2574,
- 1220,
- 2265,
- 1505,
- 3397,
- }
- };
diff --git a/lib_com/rom_com.h b/lib_com/rom_com.h
index 8a8ff7dd03e7d60d834f94ab6d6054f0f247d6f2..f0fd09295643106981d0fd4da3182bf1d6f4cef8 100644
--- a/lib_com/rom_com.h
+++ b/lib_com/rom_com.h
@@ -47,21 +47,17 @@
#define MINSFTAB 7
#define MAXSFTAB 25
#define INTERP_EXP 0
+
typedef struct
{
- Word32 fin_fx; /* input frequency Q0 */
- Word32 fout_fx; /* output frequency Q0 */
- Word16 fac_num_fx; /* numerator of resampling factor Q0 */
-
- Word16 fac_den_fx; /* denominator of resampling factor Q0 */
- Word16 lg_out; /* denominator of resampling factor Q15 */
-
+ Word32 fin_fx; /* input frequency Q0 */
+ Word32 fout_fx; /* output frequency Q0 */
+ Word16 fac_num_fx; /* numerator of resampling factor Q0 */
+ Word16 fac_den_fx; /* denominator of resampling factor Q0 */
+ Word16 lg_out; /* denominator of resampling factor Q15 */
const Word16 *filter_fx; /* resampling filter coefficients Q14 */
-
- Word16 filt_len_fx; /* number of filter coeff. Q0 */
- UWord16 flags_fx; /* flags from config. table Q0 */
- // UNS_Word16 flags_fx; /* flags from config. table Q0 */
-
+ Word16 filt_len_fx; /* number of filter coeff. Q0 */
+ UWord16 flags_fx; /* flags from config. table Q0 */
} Resampling_cfg;
typedef struct
@@ -70,27 +66,24 @@ typedef struct
Word16 bw; // Q0
const Word16 *band_width; // Q0
Word32 L_qint;
-
Word16 eref_fx;
Word16 eref;
-
Word16 bit_alloc_weight_fx;
Word16 bit_alloc_weight;
-
Word16 gqlevs; // Q0
Word16 Ngq; // Q0
Word16 p2a_bands; // Q0
-
Word16 p2a_th;
-
Word16 pd_thresh;
-
Word16 ld_slope;
-
Word16 ni_coef;
} Xcore_Config;
+/*-----------------------------------------------------------------*
+ * LP filters tables
+ *-----------------------------------------------------------------*/
+
extern const Word16 filter_LP15_180H_fx[]; // Q14 /* Sincfilt.m: N=180*2+1, Fmin=0, Fmax=1/15, hann( N )' */
extern const Word16 filter_LP3_90H_fx[]; // Q14 /* Sincfilt.m: N=90*2+1, Fmin=0, Fmax=1/3, hann( N )' */
extern const Word16 filter_LP12_180H_13b_fx[]; // Q13/* Sincfilt.m: N=180*2+1, Fmin=0, Fmax=1/12, hann( N )' */
@@ -156,7 +149,6 @@ extern const Word16 inv_N_fx[32]; // Q15
extern const Word16 band_len_harm[]; // Q0
/* PVQ tables */
-
extern const Word32 thren_fx[39]; // Q8
/* Band structure */
@@ -169,8 +161,6 @@ extern const Word16 h_high_fx[5]; // Q15
extern const Word16 sincos_t_fx[161]; // Q15
extern const Word16 sincos_t_ext_fx[]; // Q15
extern const Word32 crit_bands_fx[];
-extern const float sincos_t_ext[]; // fft_rel dep
-extern const Word16 sincos_t_rad3_fx[]; // Q15
extern const Word16 fft256_read_indexes[]; /* FFT Q0*/
extern const Word16 inter4_2_fx[];
extern const Word16 pitch_inter4_1[UP_SAMP * L_INTERPOL1 + 1]; /*1Q14*/
@@ -336,17 +326,14 @@ extern const Word16 hq_swb_bwe_nb_bits[]; // Q0
/*----------------------------------------------------------------------------------*
* ISF quantization (AMR-WB IO mode)
*----------------------------------------------------------------------------------*/
-extern const Word16 Indirect_dico1[SIZE_BK1]; // Q0
-
-extern const Word16 mean_isf_amr_wb_fx[M]; /*Qlog2(2.56)*/ /* Mean ISF vector (only in AMR-WB IO mode) */
+extern const Word16 Indirect_dico1[SIZE_BK1]; // Q0
+extern const Word16 mean_isf_amr_wb_fx[M]; /*Qlog2(2.56)*/ /* Mean ISF vector (only in AMR-WB IO mode) */
extern const Word16 mean_isf_noise_amr_wb_fx[]; /*Qlog2(2.56)*/ /* Mean ISF vector for SID frame (only in AMR-WB IO mode) */
-
-extern const Word16 gaus_dico_fx[]; // Q12
-extern const Word16 gaus_dico_swb_fx[]; // Q15
+extern const Word16 gaus_dico_fx[]; // Q12
+extern const Word16 gaus_dico_swb_fx[]; // Q15
extern const Word16 dico1_isf_fx[]; /* ISF codebook - common 1st stage, 1st split (only in AMR-WB IO mode) Qlog2(2.56)*/
-
extern const Word16 dico2_isf_fx[]; /* ISF codebook - common 1st stage, 2nd split (only in AMR-WB IO mode) Qlog2(2.56)*/
extern const Word16 dico21_isf_46b_fx[]; /* ISF codebook - 46b, 2nd stage, 1st split (only in AMR-WB IO mode) Qlog2(2.56)*/
@@ -356,9 +343,7 @@ extern const Word16 dico24_isf_46b_fx[]; /* ISF codebook - 46b, 2nd stage, 4th s
extern const Word16 dico25_isf_46b_fx[]; /* ISF codebook - 46b, 2nd stage, 5th split (only in AMR-WB IO mode) Qlog2(2.56)*/
extern const Word16 dico21_isf_36b_fx[]; /* ISF codebook - 36b, 2nd stage, 1st split (only in AMR-WB IO mode) Qlog2(2.56)*/
-
extern const Word16 dico22_isf_36b_fx[]; /* ISF codebook - 36b, 2nd stage, 2nd split (only in AMR-WB IO mode) Qlog2(2.56)*/
-
extern const Word16 dico23_isf_36b_fx[]; /* ISF codebook - 36b, 2nd stage, 3rd split (only in AMR-WB IO mode) Qlog2(2.56)*/
extern const Word16 dico1_ns_28b_fx[]; /*Qlog2(2.56)*/ /* ISF codebook for SID frames - 28b, 1st split Qlog2(2.56)*/
@@ -1126,13 +1111,6 @@ extern const Word16 CLDFB80_32[320]; // Q.5
extern const Word16 CLDFB80_40[400]; // Q.5
extern const Word16 CLDFB80_60[600]; // Q.5
extern const Word16 CLDFB80_30[300]; // Q.5
-extern const Word16 LDQMF_10_enc_fx[100];
-extern const Word16 LDQMF_16_enc_fx[160];
-extern const Word16 LDQMF_20_enc_fx[200];
-extern const Word16 LDQMF_30_enc_fx[300];
-extern const Word16 LDQMF_32_enc_fx[320];
-extern const Word16 LDQMF_40_enc_fx[400];
-extern const Word16 LDQMF_60_enc_fx[600];
extern const Word16 rRotVectr_10[]; // Q(sqrt(1.0/16.00))
extern const Word16 iRotVectr_10[]; // Q(sqrt(1.0/16.00))
@@ -1497,6 +1475,7 @@ extern const Word16 FFT_W256[]; // Q15
extern const Word16 FFT_W512[]; // Q15
extern const Word16 Gamma_19661_Tbl_fx[]; // Q15
extern const Word16 Gamma_29491_Tbl[]; // Q15
+
/*---------------------------------------------------------------------*
* NB post-filter tables
*---------------------------------------------------------------------*/
@@ -1587,4 +1566,69 @@ extern const Word16 sin_scale_tbl_800[800]; // Q15
extern const Word16 scales_ivas_fx[][MAX_NO_SCALES * 2]; // Q11
extern const Word16 scales_p_ivas_fx[][MAX_NO_SCALES * 2]; // Q11
+/*------------------------------------------------------------------------------*
+ * FFT transform tables
+ *------------------------------------------------------------------------------*/
+
+extern const Word16 w_fft64_fx[32]; // Q15
+extern const Word16 w_fft32_fx[16]; // Q15
+extern const Word16 w_fft16_fx[8]; // Q15
+extern const Word16 w_fft8_fx[8]; // Q15
+extern const Word16 w_fft128_fx[64]; // Q15
+extern const Word16 w_fft256_fx[128]; // Q15
+extern const Word16 w_fft512_fx[256]; // Q15
+extern const Word16 w_fft4_fx[2]; // Q15
+
+extern const Word16 FFT_RotVector_960_fx[1860]; // Q15
+extern const Word16 FFT_RotVector_640_fx[1240]; // Q15
+extern const Word16 FFT_RotVector_600_fx[1140]; // Q15
+extern const Word16 FFT_RotVector_400_fx[760]; // Q15
+extern const Word16 FFT_RotVector_256_fx[448]; // Q15
+extern const Word16 FFT_RotVector_32_fx[40]; // Q15
+
+extern const Word16 sincos_t_rad3_fx[T_SIN_PI_2 + 1]; // Q15
+
+extern const Word16 cos_twiddle_table_25_5_5[25]; // Q15
+extern const Word16 sin_twiddle_table_25_5_5[25]; // Q15
+extern const Word16 cos_twiddle_table_16_8_2[16]; // Q15
+extern const Word16 sin_twiddle_table_16_8_2[16]; // Q15
+
+extern const Word32 CLDFB80_10_fx[100]; // Q30
+extern const Word32 CLDFB80_16_fx[160]; // Q30
+extern const Word32 CLDFB80_20_fx[200]; // Q30
+extern const Word32 CLDFB80_30_fx[300]; // Q30
+extern const Word32 CLDFB80_32_fx[320]; // Q30
+extern const Word32 CLDFB80_40_fx[400]; // Q30
+extern const Word32 CLDFB80_60_fx[600]; // Q30
+
+/*5ms delay*/
+extern const Word32 LDQMF_10_fx[100]; // Q30
+extern const Word32 LDQMF_16_fx[160]; // Q30
+extern const Word32 LDQMF_20_fx[200]; // Q30
+extern const Word32 LDQMF_30_fx[300]; // Q30
+extern const Word32 LDQMF_32_fx[320]; // Q30
+extern const Word32 LDQMF_40_fx[400]; // Q30
+extern const Word32 LDQMF_60_fx[600]; // Q30
+
+extern const Word32 rot_vec_delay_re_LDQMF_fx[60]; // Q31
+extern const Word32 rot_vec_delay_im_LDQMF_fx[60]; // Q31
+
+extern const Word32 rot_vec_ana_re_L10_fx[5]; // Q29
+extern const Word32 rot_vec_ana_im_L10_fx[5]; // Q29
+extern const Word32 rot_vec_ana_re_L16_fx[8]; // Q29
+extern const Word32 rot_vec_ana_im_L16_fx[8]; // Q29
+extern const Word32 rot_vec_ana_re_L20_fx[10]; // Q29
+extern const Word32 rot_vec_ana_im_L20_fx[10]; // Q29
+extern const Word32 rot_vec_ana_re_L30_fx[15]; // Q29
+extern const Word32 rot_vec_ana_im_L30_fx[15]; // Q29
+extern const Word32 rot_vec_ana_re_L32_fx[16]; // Q29
+extern const Word32 rot_vec_ana_im_L32_fx[16]; // Q29
+extern const Word32 rot_vec_ana_re_L40_fx[20]; // Q29
+extern const Word32 rot_vec_ana_im_L40_fx[20]; // Q29
+extern const Word32 rot_vec_ana_re_L60_fx[30]; // Q29
+extern const Word32 rot_vec_ana_im_L60_fx[30]; // Q29
+
+extern const Word16 LP_assym_window_fx[]; /* Assymetric window for LP analysis @12.8kHz (Q15) */
+extern const Word16 LP_assym_window_16k_fx[]; /* Assymetric window for LP analysis @16kHz (Q15) */
+
#endif
diff --git a/lib_com/rom_com_fx.c b/lib_com/rom_com_fx.c
index 49f50e1622ba4a26b851bc236695c6e4b472078d..489ac5e5d3696d9ef39f7c8636e14d503b1b8e74 100644
--- a/lib_com/rom_com_fx.c
+++ b/lib_com/rom_com_fx.c
@@ -31,19 +31,31149 @@
*******************************************************************************************************/
/*====================================================================================
- 3GPP TS26.258 Aug 24, 2023. IVAS Codec Version IVAS-FL-1.0
+ EVS Codec 3GPP TS26.443 Nov 04, 2021. Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0
====================================================================================*/
-/*====================================================================================
- EVS Codec 3GPP TS26.443 Nov 04, 2021. Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0
- ====================================================================================*/
+#include
+#include "options.h"
+#include "cnst.h"
+#include "rom_com.h"
+#include "prot_fx.h"
+#include "basop_util.h"
+#include "wmc_auto.h"
+
+/* clang-format off */
+#define SHC(x) ( (Word16) x )
+#define W16(x) ( (Word16) x )
+
+/*----------------------------------------------------------------------------------*
+ * Table of bitrates
+ *----------------------------------------------------------------------------------*/
+
+const Word32 brate_tbl[SIZE_BRATE_TBL] = // Q0
+{
+ ACELP_7k20, ACELP_8k00, ACELP_9k60, ACELP_13k20, ACELP_16k40, ACELP_24k40,
+ ACELP_32k, ACELP_48k, ACELP_64k, HQ_96k, HQ_128k
+};
+
+const Word32 brate_intermed_tbl[SIZE_BRATE_INTERMED_TBL] = // Q0
+{
+ ACELP_5k00, ACELP_6k15, ACELP_7k20, ACELP_8k00, ACELP_9k60, ACELP_11k60, ACELP_12k15, ACELP_12k85, ACELP_13k20,
+ ACELP_14k80, ACELP_16k40, ACELP_22k60, ACELP_24k40, ACELP_29k00, ACELP_29k20, ACELP_30k20,
+ ACELP_30k40, ACELP_32k, ACELP_48k, ACELP_64k, HQ_96k, HQ_128k
+};
+
+const Word16 bit_rates_div50[] = /* bit rate values / 50 to Fit in a Word16 */
+{
+ ACELP_5k00 / 50, ACELP_6k15 / 50, ACELP_7k20 / 50, ACELP_8k00 / 50, ACELP_9k60 / 50, ACELP_11k60 / 50, ACELP_12k15 / 50,
+ ACELP_12k85 / 50, ACELP_13k20 / 50, ACELP_14k80 / 50, ACELP_16k40 / 50, ACELP_22k60 / 50,
+ ACELP_24k40 / 50, ACELP_29k00 / 50, ACELP_29k20 / 50, ACELP_30k20 / 50, ACELP_30k40 / 50,
+ ACELP_32k / 50, ACELP_48k / 50, ACELP_64k / 50, HQ_96k / 50, HQ_128k / 50
+};
+
+const Word16 bit_rates_16k_div50[] = /* bit rate values / 50 to Fit in a Word16 */
+{
+ ACELP_8k00 / 50, ACELP_14k80 / 50, ACELP_22k60 / 50, ACELP_24k40 / 50, ACELP_29k00 / 50,
+ ACELP_29k20 / 50, ACELP_30k20 / 50, ACELP_30k40 / 50, ACELP_32k / 50, ACELP_48k / 50, ACELP_64k / 50
+};
+
+/*----------------------------------------------------------------------------------*
+ * Frame size and mode configuration tables
+ *----------------------------------------------------------------------------------*/
+
+const FrameSizeParams FrameSizeConfig[FRAME_SIZE_NB] =
+{
+ /* bits, net bits, trans_bits, trans_mode, band_bits, band_mode_min, band_mode_max, reserved_bits */
+ { FRAME_0, FRAME_0, 0, {0,0}, 0, 0, 0, 0}, /* 0 kbps ZERO_FRAME*/
+ { FRAME_2_4, FRAME_2_4-2, 1, {1,1}, 1, NB, WB, 0}, /* 2.4kbps VBR(SID)*/
+ { FRAME_7_2, FRAME_7_2-1, 0, {0,1}, 1, NB, WB, 0}, /* 7.2kbps VBR/CBR*/
+ { FRAME_8, FRAME_8-1, 0, {0,1}, 1, NB, WB, 0}, /* 8 kbps VBR/CBR*/
+ { FRAME_9_6, FRAME_9_6-2, 0, {0,1}, 2, NB, SWB, 0}, /* 9.6kbps CBR*/
+ { FRAME_13_2, FRAME_13_2-2, 0, {0,1}, 2, NB, SWB, 0}, /* 13.2kbps CBR*/
+ { FRAME_16_4, FRAME_16_4-3, 0, {0,1}, 2, NB, FB, 1}, /* 16.4kbps CBR*/
+ { FRAME_24_4, FRAME_24_4-3, 0, {0,1}, 2, NB, FB, 1}, /* 24.4kbps CBR*/
+ { FRAME_32, FRAME_32-3, 0, {0,1}, 2, WB, FB, 1}, /* 32 kbps CBR*/
+ { FRAME_48, FRAME_48-3, 0, {0,1}, 2, WB, FB, 1}, /* 48 kbps CBR*/
+ { FRAME_64, FRAME_64-3, 0, {0,1}, 2, WB, FB, 1}, /* 64 kbps CBR*/
+ { FRAME_96, FRAME_96-3, 0, {0,1}, 2, WB, FB, 1}, /* 96 kbps CBR*/
+ { FRAME_128, FRAME_128-3, 0, {0,1}, 2, WB, FB, 1} /*128 kbps CBR*/
+};
+
+
+/*----------------------------------------------------------------------------------*
+ * Conversion of ACELP signaling parameters (ACELP internal Fs, coder type, bandwidth, sharpening flag) to index
+ * (to be consulted with the decision matrix)
+ *
+ * - in order to retrieve the index, each section in this table starts with the bitrate
+ * - the second value in each section corresponds to the number of bits
+ * - the other values represent indices created by combining different parameters into a single value through the macro SIG2IND()
+ *----------------------------------------------------------------------------------*/
+
+const Word32 acelp_sig_tbl[MAX_ACELP_SIG] = // Q0
+{
+ /* GENERIC UNVOICED VOICED TRANSITION AUDIO INACTIVE */
+ ACELP_7k20, 4,
+ SIG2IND(GENERIC, NB, 1, 0), SIG2IND(UNVOICED, NB, 0, 0), SIG2IND(VOICED, NB, 1, 0), SIG2IND(TRANSITION, NB, 1, 0), SIG2IND(AUDIO, NB, 0, 0), SIG2IND(INACTIVE, NB, 0, 0),
+ SIG2IND(GENERIC, WB, 1, 0), SIG2IND(UNVOICED, WB, 0, 0), SIG2IND(VOICED, WB, 1, 0), SIG2IND(TRANSITION, WB, 1, 0), SIG2IND(AUDIO, WB, 0, 0), SIG2IND(INACTIVE, WB, 0, 0),
+ SIG2IND(GENERIC, NB, 0, 0),
+ SIG2IND(GENERIC, WB, 0, 0),
+ SIG2IND(LR_MDCT, NB, 0, 0),
+
+ ACELP_8k00, 4,
+ SIG2IND(GENERIC, NB, 1, 0), SIG2IND(UNVOICED, NB, 0, 0), SIG2IND(VOICED, NB, 1, 0), SIG2IND(TRANSITION, NB, 1, 0), SIG2IND(AUDIO, NB, 0, 0), SIG2IND(INACTIVE, NB, 0, 0),
+ SIG2IND(GENERIC, WB, 1, 0), SIG2IND(UNVOICED, WB, 0, 0), SIG2IND(VOICED, WB, 1, 0), SIG2IND(TRANSITION, WB, 1, 0), SIG2IND(AUDIO, WB, 0, 0), SIG2IND(INACTIVE, WB, 0, 0),
+ SIG2IND(GENERIC, NB, 0, 0),
+ SIG2IND(GENERIC, WB, 0, 0),
+ SIG2IND(LR_MDCT, NB, 0, 0),
+
+ ACELP_13k20, 5,
+ SIG2IND(GENERIC, NB, 1, 0), SIG2IND(VOICED, NB, 1, 0), SIG2IND(TRANSITION, NB, 0, 0), SIG2IND(AUDIO, NB, 0, 0), SIG2IND(INACTIVE, NB, 0, 0),
+ SIG2IND(GENERIC, WB, 1, 0), SIG2IND(VOICED, WB, 1, 0), SIG2IND(TRANSITION, WB, 0, 0), SIG2IND(AUDIO, WB, 0, 0), SIG2IND(INACTIVE, WB, 0, 0),
+ SIG2IND(GENERIC, SWB, 1, 0), SIG2IND(VOICED, SWB, 1, 0), SIG2IND(TRANSITION, SWB, 0, 0), SIG2IND(AUDIO, SWB, 0, 0), SIG2IND(INACTIVE, SWB, 0, 0),
+ SIG2IND(GENERIC, NB, 0, 0), SIG2IND(VOICED, NB, 0, 0),
+ SIG2IND(GENERIC, WB, 0, 0), SIG2IND(VOICED, WB, 0, 0),
+ SIG2IND(GENERIC, SWB, 0, 0), SIG2IND(VOICED, SWB, 0, 0),
+ SIG2IND(GENERIC, WB, 1, 1), SIG2IND(UNVOICED, WB, 0, 1), SIG2IND(VOICED, WB, 1, 1), SIG2IND(INACTIVE, WB, 0, 1),
+ SIG2IND(GENERIC, SWB, 1, 1), SIG2IND(UNVOICED, SWB, 0, 1), SIG2IND(VOICED, SWB, 1, 1), SIG2IND(INACTIVE, SWB, 0, 1),
+ SIG2IND(LR_MDCT, NB, 0, 0),
+ SIG2IND(LR_MDCT, WB, 0, 0),
+ SIG2IND(LR_MDCT, SWB, 0, 0),
+
+ ACELP_32k, 4,
+ SIG2IND(GENERIC, WB, 1, 0), SIG2IND(TRANSITION, WB, 1, 0), SIG2IND(INACTIVE, WB, 0, 0),
+ SIG2IND(GENERIC, SWB, 1, 0), SIG2IND(TRANSITION, SWB, 1, 0), SIG2IND(INACTIVE, SWB, 0, 0),
+ SIG2IND(GENERIC, FB, 1, 0), SIG2IND(TRANSITION, FB, 1, 0), SIG2IND(INACTIVE, FB, 0, 0),
+ SIG2IND(GENERIC, WB, 0, 0), SIG2IND(TRANSITION, WB, 0, 0),
+ SIG2IND(GENERIC, SWB, 0, 0), SIG2IND(TRANSITION, SWB, 0, 0),
+ SIG2IND(GENERIC, FB, 0, 0), SIG2IND(TRANSITION, FB, 0, 0),
+
+ ACELP_64k, 4,
+ SIG2IND(GENERIC, WB, 0, 0), SIG2IND(TRANSITION, WB, 0, 0), SIG2IND(INACTIVE, WB, 0, 0),
+ SIG2IND(GENERIC, SWB, 1, 0), SIG2IND(TRANSITION, SWB, 1, 0), SIG2IND(INACTIVE, SWB, 0, 0),
+ SIG2IND(GENERIC, FB, 1, 0), SIG2IND(TRANSITION, FB, 1, 0), SIG2IND(INACTIVE, FB, 0, 0),
+ SIG2IND(GENERIC, SWB, 0, 0), SIG2IND(TRANSITION, SWB, 0, 0),
+ SIG2IND(GENERIC, FB, 0, 0), SIG2IND(TRANSITION, FB, 0, 0),
+};
+
+/*----------------------------------------------------------------------------------*
+ * ACELP bit allocation tables
+ *----------------------------------------------------------------------------------*/
+
+/* bit allocation table for end-frame LSF quantizer */
+const Word16 LSF_bits_tbl[] = // Q0
+{
+ /* IC UC VC GC TC AC */
+ 22, 31, 24, 29, 24, 22, /* ACELP_5k00 */
+ 22, 31, 24, 29, 24, 22, /* ACELP_6k15 */
+ 22, 37, 31, 29, 31, 22, /* ACELP_7k20 */
+ 22, 40, 36, 33, 34, 22, /* ACELP_8k00 */
+ 27, 40, 34, 35, 37, 27, /* ACELP_9k60 */
+ 31, 0, 37, 37, 40, 31, /* ACELP_11k60 */
+ 31, 0, 39, 39, 41, 31, /* ACELP_12k15 */
+ 31, 0, 38, 38, 40, 31, /* ACELP_12k85 */
+ 31, 0, 38, 38, 40, 31, /* ACELP_13k20 */
+ 31, 0, 37, 42, 42, 31, /* ACELP_14k80 */
+ 31, 0, 43, 40, 40, 31, /* ACELP_16k40 */
+ 31, 0, 42, 40, 40, 31, /* ACELP_22k60 */
+ 31, 0, 46, 41, 41, 31, /* ACELP_24k40 */
+ 41, 0, 0, 41, 41, 0, /* ACELP_29k00 */
+ 41, 0, 0, 41, 41, 0, /* ACELP_29k20 */
+ 41, 0, 0, 41, 41, 0, /* ACELP_30k20 */
+ 41, 0, 0, 41, 41, 0, /* ACELP_30k40 */
+ 41, 0, 0, 41, 41, 0, /* ACELP_32k */
+ 41, 0, 0, 41, 41, 0, /* ACELP_48k */
+ 41, 0, 0, 41, 41, 0, /* ACELP_64k */
+};
+
+/* bit allocation table for mid-frame LSF quantizer */
+const Word16 mid_LSF_bits_tbl[] = // Q0
+{
+ /* IC UC VC GC TC AC */
+ 2, 5, 1, 2, 2, 2, /* ACELP_5k00 */
+ 2, 5, 1, 2, 2, 2, /* ACELP_6k15 */
+ 2, 5, 4, 5, 5, 2, /* ACELP_7k20 */
+ 2, 5, 4, 5, 5, 2, /* ACELP_8k00 */
+ 2, 5, 4, 5, 5, 2, /* ACELP_9k60 */
+ 2, 5, 4, 5, 5, 2, /* ACELP_11k60 */
+ 2, 5, 5, 5, 5, 2, /* ACELP_12k15 */
+ 2, 5, 5, 5, 5, 2, /* ACELP_12k85 */
+ 2, 5, 5, 5, 5, 2, /* ACELP_13k20 */
+ 4, 0, 5, 5, 5, 4, /* ACELP_14k80 */
+ 4, 0, 5, 5, 5, 4, /* ACELP_16k40 */
+ 5, 0, 5, 5, 5, 5, /* ACELP_22k60 */
+ 5, 0, 5, 5, 5, 5, /* ACELP_24k40 */
+ 5, 0, 0, 5, 5, 5, /* ACELP_29k00 */
+ 5, 0, 0, 5, 5, 5, /* ACELP_29k20 */
+ 5, 0, 0, 5, 5, 5, /* ACELP_30k20 */
+ 5, 0, 0, 5, 5, 5, /* ACELP_30k40 */
+ 5, 0, 0, 5, 5, 5, /* ACELP_32k */
+ 5, 0, 0, 5, 5, 5, /* ACELP_48k */
+ 5, 0, 0, 5, 5, 5, /* ACELP_64k */
+};
+
+
+/* bit allocation table for scaled innovation energy prediction */
+const Word16 Es_pred_bits_tbl[] = // Q0
+{
+/* UC VC GC TC */
+ 0, 0, 0, 4, /* ACELP_5k00 */
+ 0, 0, 0, 4, /* ACELP_6k15 */
+ 0, 0, 0, 4, /* ACELP_7k20 */
+ 0, 0, 0, 4, /* ACELP_8k00 */
+ 0, 5, 5, 5, /* ACELP_9k60 */
+ 0, 5, 4, 4, /* ACELP_11k60 */
+ 0, 5, 5, 5, /* ACELP_12k15 */
+ 0, 5, 4, 5, /* ACELP_12k85 */
+ 0, 5, 4, 4, /* ACELP_13k20 */
+ 0, 5, 5, 5, /* ACELP_14k80 */
+ 0, 5, 5, 5, /* ACELP_16k40 */
+ 0, 5, 5, 5, /* ACELP_22k60 */
+ 0, 5, 5, 5, /* ACELP_24k40 */
+ 0, 0, 5, 5, /* ACELP_29k00 */
+ 0, 0, 5, 5, /* ACELP_29k20 */
+ 0, 0, 5, 5, /* ACELP_30k20 */
+ 0, 0, 5, 5, /* ACELP_30k40 */
+ 0, 0, 5, 5, /* ACELP_32k */
+ 0, 0, 5, 5, /* ACELP_48k */
+ 0, 0, 5, 5, /* ACELP_64k */
+};
+
+/* bit allocation table for gain quantizer (ACELP@12.8kHz) */
+/* the 4 values allocated correspond to 4 subframes */
+const Word16 gain_bits_tbl[] = // Q0
+{
+/* UC VC GC TC0_0 TC0_64 TC0_128 TC0_192 TC64 TC128 TC192 */
+ 6,6,6,6, 7,6,6,6, 7,6,6,6, 5,5,5,5, 5,5,6,5, 5,3,6,6, 5,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,10, /* ACELP_5k00 */
+ 6,6,6,6, 7,6,6,6, 7,6,6,6, 5,5,5,5, 5,5,6,5, 5,3,6,6, 5,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,10, /* ACELP_6k15 */
+ 7,7,7,7, 7,6,6,6, 6,6,6,6, 5,5,5,5, 5,5,6,5, 5,3,6,6, 5,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,10, /* ACELP_7k20 */
+ 7,7,7,7, 8,7,6,6, 8,7,6,6, 5,5,5,5, 5,6,5,5, 5,3,6,6, 5,3,3,6, 3,5,5,5, 3,3,6,6, 3,3,3,14, /* ACELP_8k00 */
+ 7,7,7,7, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,3,6,6, 6,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,10, /* ACELP_9k60 */
+ 7,7,7,7, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,3,6,6, 6,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,13, /* ACELP_11k60 */
+ 7,7,7,7, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,3,6,6, 6,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,14, /* ACELP_12k15 */
+ 7,7,7,7, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,3,6,6, 6,3,3,6, 3,6,6,6, 3,3,6,5, 3,3,3,14, /* ACELP_12k85 */
+ 7,7,7,7, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,3,6,6, 6,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,15, /* ACELP_13k20 */
+ 7,7,7,7, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,3,6,6, 6,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,15, /* ACELP_14k80 */
+ 7,7,7,7, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,3,6,6, 6,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,15, /* ACELP_16k40 */
+ 7,7,7,7, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,3,6,6, 6,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,14, /* ACELP_22k60 */
+ 7,7,7,7, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,6,6,6, 6,3,6,6, 6,3,3,6, 3,6,6,6, 3,3,6,6, 3,3,3,15, /* ACELP_24k40 */
+};
+
+
+/* bit allocation table for gain gain quantizer (ACELP@16kHz) */
+/* the 5 values allocated correspond to 5 subframes */
+const Word16 gain_bits_16kHz_tbl[] = // Q0
+{
+ /* IC GC TC0 TC64 TC128 TC192 TC256 */
+ 0,0,0,0,0, 6,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0, 0, /* ACELP_8k00 */
+ 0,0,0,0,0, 6,6,6,6,6, 6,6,6,6,6, 3,6,6,6,6, 3,3,6,6,6, 3,3,3,6,6, 3,3,3,3,15, /* ACELP_14k80 */
+ 6,6,6,6,6, 6,6,6,6,6, 6,6,6,6,6, 3,6,6,6,6, 3,3,6,6,6, 3,3,3,6,6, 3,3,3,3,15, /* ACELP_22k60 */
+ 6,6,6,6,6, 6,6,6,6,6, 6,6,6,6,6, 3,6,6,6,6, 3,3,6,6,6, 3,3,3,6,6, 3,3,3,3,16, /* ACELP_24k40 */
+ 6,6,6,6,6, 6,6,6,6,6, 6,6,6,6,6, 3,6,6,6,6, 3,3,6,6,6, 3,3,3,6,6, 3,3,3,3,14, /* ACELP_29k00 */
+ 6,6,6,6,6, 6,6,6,6,6, 6,6,6,6,6, 3,6,6,6,6, 3,3,6,6,6, 3,3,3,6,6, 3,3,3,3,14, /* ACELP_29k20 */
+ 6,6,6,6,6, 6,6,6,6,6, 6,6,6,6,6, 3,6,6,6,6, 3,3,6,6,6, 3,3,3,6,6, 3,3,3,3,14, /* ACELP_30k20 */
+ 6,6,6,6,6, 6,6,6,6,6, 6,6,6,6,6, 3,6,6,6,6, 3,3,6,6,6, 3,3,3,6,6, 3,3,3,3,14, /* ACELP_30k40 */
+ 6,6,6,6,6, 6,6,6,6,6, 6,6,6,6,6, 3,6,6,6,6, 3,3,6,6,6, 3,3,3,6,6, 3,3,3,3,14, /* ACELP_32k */
+ 12,12,12,12,12, 12,12,12,12,12, 12,12,12,12,12, 6,12,12,12,12, 6,6,12,12,12, 6,6,6,12,12, 6,6,6,6,12, /* ACELP_48k */
+ 12,12,12,12,12, 12,12,12,12,12, 12,12,12,12,12, 6,12,12,12,12, 6,6,12,12,12, 6,6,6,12,12, 6,6,6,6,12 /* ACELP_64k */
+};
+
+/* bit allocation table for adaptive codebook (pitch) (ACELP@12.8kHz) */
+/* the 4 values correspond to 4 subframes */
+const Word16 ACB_bits_tbl[] = // Q0
+{
+/* UC VC GC TC0_0 TC0_64 TC0_128 TC0_192 TC64 TC128 TC192 */
+ 0,0,0,0, 9,5,5,5, 8,5, 8,5, 6,5,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,8, /* ACELP_5k00 */
+ 0,0,0,0, 9,5,5,5, 8,5, 8,5, 6,5,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,8, /* ACELP_6k15 */
+ 0,0,0,0, 9,5,5,5, 8,5, 8,5, 6,5,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,8, /* ACELP_7k20 */
+ 0,0,0,0, 10,5,5,5, 9,5, 8,5, 6,5,6,6, 0,7,6,6, 0,0,7,5, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_8k00 */
+ 0,0,0,0, 10,5,5,5, 10,6, 9,6, 6,5,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_9k60 */
+ 0,0,0,0, 10,5,5,5, 10,6, 9,6, 6,5,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_11k60 */
+ 0,0,0,0, 10,5,5,5, 10,6, 9,6, 6,6,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_12k15 */
+ 0,0,0,0, 10,5,5,5, 10,6, 9,6, 6,5,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_12k85 */
+ 0,0,0,0, 10,5,5,5, 10,6, 9,6, 6,5,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_13k20 */
+ 0,0,0,0, 10,5,5,5, 10,6,10,6, 6,6,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_14k80 */
+ 0,0,0,0, 10,5,5,5, 10,6,10,6, 6,6,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_16k40 */
+ 0,0,0,0, 10,5,5,5, 10,6,10,6, 6,6,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_22k60 */
+ 0,0,0,0, 10,5,5,5, 10,6,10,6, 6,6,6,6, 0,7,6,6, 0,0,7,6, 0,0,0,7, 0,0,9,6, 0,0,5,9, 0,0,0,9, /* ACELP_24k40 */
+};
+
+/* bit allocation table for adaptive codebook (pitch) (ACELP@16kHz) */
+/* the 5 values correspond to 5 subframes */
+const Word16 ACB_bits_16kHz_tbl[] = // Q0
+{
+ /* IC GC TC0 TC64 TC128 TC192 TC256 */
+ 0,0, 0,0,0, 9,0, 0,0,0, 0,0, 0,0,0, 0,0, 0,0,0, 0,0, 0,0,0, 0,0,0, 0,0, 0,0,0,0, 0, /* ACELP_8k00 */
+ 0,0, 0,0,0, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10, /* ACELP_14k80 */
+ 10,6,10,6,6, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10, /* ACELP_22k60 */
+ 10,6,10,6,6, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10, /* ACELP_24k40 */
+ 10,6,10,6,6, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10, /* ACELP_29k00 */
+ 10,6,10,6,6, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10, /* ACELP_29k20 */
+ 10,6,10,6,6, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10, /* ACELP_30k20 */
+ 10,6,10,6,6, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10, /* ACELP_30k40 */
+ 10,6,10,6,6, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10, /* ACELP_32k */
+ 10,6,10,6,6, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10, /* ACELP_48k */
+ 10,6,10,6,6, 10,6,10,6,6, 6,8,10,6,6, 0,6,10,6,6, 0,0,10,6,6, 0,0,0,10,6, 0,0,0,0,10 /* ACELP_64k */
+};
+
+/* bit allocation table for algebraic (fixed) codebook (innovation) (ACELP@12.8kHz) */
+/* the 4 values correspond to 4 subframes */
+const Word16 FCB_bits_tbl[] = // Q0
+{
+/* UC VC GC TC0_0 TC0_64 TC0_128 TC0_192 TC64 TC128 TC192 */
+ 8,8,8,8, 12,12,12,20, 7, 7, 0, 7, 12, 7,12,12, 12,12, 7,12, 12,12,12,12, 12,12,20,12, 12,12,12,12, 12,12,12,12, 12,12,12,20, /* ACELP_5k00 */
+ 10,10,10,10, 12,12,12,20, 12, 7,12, 7, 12, 7,12,12, 12,12, 7,12, 12,12,12,12, 12,12,20,12, 12,12,12,12, 12,12,12,12, 12,12,12,20, /* ACELP_6k15 */
+ 13,13,13,13, 12,12,12,20, 12,12,12,20, 12, 7,12,12, 12,12, 7,12, 12,12,12,12, 12,12,20,12, 12,12,12,12, 12,12,12,12, 12,12,12,20, /* ACELP_7k20 */
+ 13,13,13,13, 12,20,12,20, 12,20,12,20, 20,12,12,12, 20,12,12,12, 20,12,20,12, 20,12,20,20, 20,12,12,20, 20,12,20,12, 12,20,12,20, /* ACELP_8k00 */
+ 13,13,13,13, 20,28,20,28, 20,20,20,28, 20,20,20,20, 20,20,20,20, 20,20,28,20, 20,28,20,28, 20,28,20,20, 20,20,20,28, 20,28,20,28, /* ACELP_9k60 */
+ 0, 0, 0, 0, 28,36,28,36, 28,28,28,36, 28,28,28,28, 28,28,28,28, 28,28,36,28, 28,36,28,36, 28,36,28,28, 28,28,28,36, 28,36,28,36, /* ACELP_11k60 */
+ 0, 0, 0, 0, 28,36,36,36, 28,36,28,36, 36,28,28,28, 36,28,28,28, 36,28,36,28, 36,36,28,43, 28,36,28,36, 28,36,28,36, 28,36,36,36, /* ACELP_12k15 */
+ 0, 0, 0, 0, 36,36,36,43, 36,36,36,36, 36,36,28,36, 36,28,36,36, 36,36,36,36, 36,36,43,43, 36,36,36,36, 36,36,36,43, 36,36,36,43, /* ACELP_12k85 */
+ 0, 0, 0, 0, 36,43,36,43, 36,36,36,43, 36,36,36,36, 36,36,36,36, 36,36,43,36, 36,43,43,43, 36,43,36,36, 43,36,43,36, 36,43,36,43, /* ACELP_13k20 */
+ 0, 0, 0, 0, 43,50,43,50, 43,43,43,43, 43,43,43,43, 43,43,43,43, 43,43,50,43, 43,50,50,50, 43,43,43,50, 50,43,50,43, 43,50,43,50, /* ACELP_14k80 */
+ 0, 0, 0, 0, 50,56,50,56, 50,50,50,56, 56,50,50,50, 56,50,50,50, 56,50,56,56, 56,56,56,56, 50,56,50,56, 50,56,56,56, 50,56,56,56, /* ACELP_16k40 */
+ 0, 0, 0, 0, 83,83,83,87, 78,83,83,83, 83,78,83,83, 83,78,83,87, 83,87,83,87, 83,87,87,92, 87,83,87,83, 87,83,87,87, 83,87,87,87, /* ACELP_22k60 */
+ 0, 0, 0, 0, 92,92,92,92, 87,92,92,92, 92,87,92,92, 92,87,92,92, 92,92,92,92, 92,92,92,92, 92,92,92,92, 92,92,92,92, 92,92,92,92, /* ACELP_24k40 */
+};
+
+/* bit allocation table for algebraic (fixed) codebook (innovation) (ACELP@16kHz) */
+/* the 5 values correspond to 5 subframes */
+const Word16 FCB_bits_16kHz_tbl[] = // Q0
+{
+ /* IC GC TC0 TC64 TC128 TC192 TC256 */
+ 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ACELP_8k00 */
+ 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ACELP_14k80 */
+ 0, 0, 0, 0, 0, 62,56,56,56,62, 62,56,56,56,56, 56,56,56,56,73, 62,56,62,62,62, 56,62,62,62,73, 62,62,62,62,68, /* ACELP_22k60 */
+ 0, 0, 0, 0, 0, 68,68,68,73,73, 68,68,68,68,73, 68,73,68,73,73, 73,73,73,73,73, 73,78,73,73,78, 73,78,73,73,78, /* ACELP_24k40 */
+ 12,12,12,12,12, 36,28,28,36,36, 36,28,28,36,36, 36,28,28,36,36, 36,28,28,36,36, 36,28,28,36,36, 36,28,28,36,36, /* ACELP_29k00 */
+ 12,12,12,12,12, 36,28,28,36,36, 36,28,28,36,36, 36,28,28,36,36, 36,28,28,36,36, 36,28,28,36,36, 36,28,28,36,36, /* ACELP_29k20 */
+ 12,12,12,12,12, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, /* ACELP_30k20 */
+ 12,12,12,12,12, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, /* ACELP_30k40 */
+ 12,12,12,12,12, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, /* ACELP_32k */
+ 12,12,12,12,12, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, /* ACELP_48k */
+ 12,12,12,12,12, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36, 36,36,36,36,36 /* ACELP_64k */
+};
+
+/* bit allocation table for AVQ bits in active segments (ACELP@16kHz) */
+const Word16 AVQ_bits_16kHz_tbl[] = // Q0
+{
+ /* IC GC TC0 TC64 TC128 TC192 TC256 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ACELP_8k00 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ACELP_14k80 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ACELP_22k60 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ACELP_24k40 */
+ 78, 78, 78, 78, 78, 48, 48, 48, 48, 49, 48, 49, 49, 48, 49, 50, 50, 51, 52, 52, 50, 54, 53, 54, 54, 55, 55, 55, 55, 54, 52, 56, 56, 56, 56, /* ACELP_29k00 */
+ 79, 79, 79, 79, 78, 49, 49, 49, 49, 49, 50, 49, 49, 50, 49, 52, 52, 51, 52, 52, 54, 54, 53, 54, 54, 56, 55, 55, 56, 56, 56, 56, 56, 56, 56, /* ACELP_29k20 */
+ 78, 78, 78, 78, 78, 50, 50, 50, 50, 49, 51, 50, 50, 50, 50, 53, 53, 53, 52, 52, 55, 55, 55, 54, 54, 57, 57, 56, 56, 56, 57, 57, 57, 57, 56, /* ACELP_30k20 */
+ 79, 79, 79, 79, 78, 51, 51, 51, 50, 50, 51, 51, 51, 51, 51, 54, 54, 53, 53, 53, 56, 56, 56, 55, 54, 58, 57, 57, 57, 57, 58, 58, 58, 57, 57, /* ACELP_30k40 */
+ 86, 85, 85, 85, 85, 57, 57, 57, 57, 57, 58, 58, 57, 57, 57, 60, 60, 60, 60, 59, 62, 62, 62, 62, 61, 64, 64, 64, 63, 63, 64, 64, 64, 64, 64, /* ACELP_32k */
+ 143,142,142,142,142, 116,115,115,115,115, 116,116,115,115,115, 119,119,118,118,118, 121,121,121,121,121, 124,124,123,123,123, 126,126,126,126,126, /* ACELP_48k */
+ 207,206,206,206,206, 180,179,179,179,179, 180,180,179,179,179, 183,183,182,182,182, 185,185,185,185,185, 188,188,187,187,187, 190,190,190,190,190 /* ACELP_64k */
+};
+
+/* bit allocation table for reserved bits (ACELP@12.8kHz) */
+const Word16 reserved_bits_tbl[] = // Q0
+{
+/* UC VC GC TC0_0 TC0_64 TC0_128 TC0_192 TC64 TC128 TC192 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ACELP_5k00 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ACELP_6k15 */
+ 1, 0, 0, 0, 0, 2, 4, 0, 3, 0, /* ACELP_7k20 */
+ 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, /* ACELP_8k00 */
+ 46, 0, 0, 0, 1, 2, 4, 1, 4, 0, /* ACELP_9k60 */
+ 0, 0, 0, 0, 1, 3, 6, 2, 6, 0, /* ACELP_11k60 */
+ 0, 0, 0, 0, 2, 4, 0, 3, 7, 0, /* ACELP_12k15 */
+ 0, 0, 0, 0, 1, 3, 0, 2, 0, 0, /* ACELP_12k85 */
+ 0, 0, 0, 0, 1, 4, 1, 3, 0, 0, /* ACELP_13k20 */
+ 0, 0, 0, 0, 2, 5, 2, 4, 1, 1, /* ACELP_14k80 */
+ 0, 0, 0, 0, 2, 0, 5, 5, 3, 3, /* ACELP_16k40 */
+ 0, 0, 2, 2, 0, 1, 3, 0, 0, 1, /* ACELP_22k60 */
+ 0, 0, 1, 1, 3, 8, 19, 7, 11, 11, /* ACELP_24k40 */
+};
+
+/* NRG mode */
+const UWord8 ACELP_NRG_MODE[RATE_MODE_MAX][BANDWIDTH_MODE_MAX][ACELP_MODE_MAX+RF_MODE_MAX] = // Q0
+{
+ {{0,0,1,1,0,0,0,0},{2,2,1,1,0,0,0,0}},
+ {{1,1,1,1,0,0,0,0},{1,1,1,1,1,1,1,0}},
+};
+
+/* NRG bits : (0/2/3 bits) */
+const UWord8 ACELP_NRG_BITS[3] = { 0, 3, 4 }; // Q0
+
+/* LTP MODE*/
+const UWord8 ACELP_LTP_MODE[RATE_MODE_MAX][BANDWIDTH_MODE_MAX][ACELP_MODE_MAX+RF_MODE_MAX] = // Q0
+{
+ {{0,0,1,2,0,0,0,0},{0,0,1,2,0,0,0,0}},
+ {{4,4,3,4,0,0,0,0},{4,4,3,4,8,0,9,0}},
+};
+
+/* LTP bits */
+const UWord8 ACELP_LTP_BITS_SFR[8+RF_MODE_MAX][5] = // Q0
+{
+ {0,0,0,0,0},
+ {8,4,4,4,4},
+ {8,5,8,5,5},
+ {9,6,6,6,6},
+ {9,6,9,6,6},
+ {8,5,5,5,5},
+ {8,5,8,5,5},
+ {8,0,0,0,0},
+ {8,5,5,5,5}, /* All-pred mode in RF, rf_frame_type = 0 */
+ {8,4,4,4,0}, /* Gen-pred mode in RF, rf_frame_type = 2 */
+};
+
+/* LTF modes (0 - LOW_PASS (LP filtering), 1 - FULL_BAND (no filtering), 2 - NORMAL_OPERATION (adaptive)) */
+/* Mode 2 ACELP: INACTIVE,UNVOICED,VOICED,GENERIC */
+const UWord8 ACELP_LTF_MODE[RATE_MODE_MAX][BANDWIDTH_MODE_MAX][ACELP_MODE_MAX+RF_MODE_MAX] = // Q0
+{
+ {{1,1,1,0,0,0,0,0},{1,1,1,0,0,0,0,0}},
+ {{0,0,2,0,0,0,0,0},{0,0,2,0,1,1,1,0}},
+};
+
+/* LTF bits */
+const UWord8 ACELP_LTF_BITS[4] = { 0, 0, 4, 0 }; // Q0
+
+/* GAINS ELEMENT */
+/* 5 modes: (EVS: 5b/subframe), (AMRWB: 7b/subframe),(AMRWB: 6b/subframe),(UC: 5b/subframe) */
+const UWord8 ACELP_GAINS_MODE[RATE_MODE_MAX][BANDWIDTH_MODE_MAX][ACELP_MODE_MAX+RF_MODE_MAX] = // Q0
+{
+ {{6,6,1,1,0,0,0,0},{7,7,1,1,0,0,0,0}},
+ {{2,2,3,3,0,0,0,0},{2,2,3,3,3,2,1,0}},
+};
+
+/* gains bits */
+const UWord8 ACELP_GAINS_BITS[10] = // Q0
+{
+ 0, /* skip sub-frame wise gain coding*/
+ 5,
+ 6,
+ 7,
+ 6,
+ 7,
+ 6, /* UC */
+ 7, /* GUNVOICED UV (5b ICB/2b Gaussian) */
+ 4, /* GNELP UV */
+ 5 /* GNELP UV */
+};
+
+/* BPF modes (0 - no filtering, 1 - filtering, 2 - adaptive) */
+const UWord8 ACELP_BPF_MODE[RATE_MODE_MAX][BANDWIDTH_MODE_MAX][ACELP_MODE_MAX+RF_MODE_MAX] = // Q0
+{
+ {{1,1,1,1,0,0,0,0},{1,1,1,1,0,0,0,0}},
+ {{1,1,2,2,0,0,0,0},{1,1,2,2,1,1,1,1}},
+};
+
+/* BPF bits */
+const UWord8 ACELP_BPF_BITS[3] = { 0, 0, 2 }; // Q0
+const Word16 ACELP_CDK_BITS[ACELP_FIXED_CDK_NB] =
+{
+ 7, 10, 12, 15, 17, 20, 24, 26, 28, 30, 32, 34, 36, 40, 43, 46,
+ 47, 49, 50, 53, 55, 56, 58, 59, 61, 62, 65, 68, 70, 73, 75, 78, 80, 83,
+ 85, 87, 89, 92, 94, 96, 98
+};
+
+/*----------------------------------------------------------------------------------*
+ * Perceptual critical bands
+ *----------------------------------------------------------------------------------*/
+
+const Word32 crit_bands_fx[] =//Q0
+{
+ 100, 200, 300, 400, 510, 630, 770, 920, 1080, 1270, 1480,
+ 1720, 2000, 2320, 2700, 3150, 3700, 4400, 5300, 6350, 7700,
+ 9500, 12000, 15500, 40000
+};
+
+
+const Word16 crit_bins_corr_fx[CRIT_NOIS_BAND] =
+{//Q15
+ /*.9f, .9f, .85f, .8f, .775f, .75f, .725f , .7f , .675f, .65f, .625f , .60f, .6f, .6f, .6f, .6f, .6f, .6f, .6f, .6f, .6f, .6f, .6f*/
+ 29491, 29491, 27853, 26214, 25395, 24576, 23577 , 22938, 22118, 21299, 20480,
+ 19661, 19661, 19661, 19661, 19661, 19661, 19661, 19661, 19661, 19661, 19661, 19661
+};
+const Word16 crit_bins[CRIT_NOIS_BAND] = // Q0
+{
+ 4, 4, 4, 4, 4, 5, 6, 6, 6, 8, 8, 10, 11, 13, 15, 18, 22, 16, 16, 20, 20, 20, 16
+};
+
+
+const Word16 crit_bands_loc_fx[CRIT_NOIS_BAND] =
+{//Q0
+ 100, 200, 300, 400, 510, 630, 770, 920, 1080, 1270, 1480, 1720,
+ 2000, 2320, 2700, 3150, 3700, 4100, 4500, 5000, 5500, 6000, 6375
+};
+
+const Word16 inv_tbl_fx[146] =//Q15
+{
+ 0, 32767, 16384, 10923, 8192, 6554, 5462, 4681,
+ 4096, 3641, 3277, 2979, 2731, 2521, 2341, 2185,
+ 2048, 1928, 1820, 1725, 1638, 1560, 1489, 1425,
+ 1365, 1311, 1260, 1214, 1170, 1130, 1092, 1057,
+ 1024, 993, 964, 936, 910, 886, 862, 840,
+ 819, 799, 780, 762, 745, 728, 712, 697,
+ 683, 669, 655, 643, 630, 618, 607, 596,
+ 585, 575, 565, 555, 546, 537, 529, 520,
+ 512, 504, 496, 489, 482, 475, 468, 462,
+ 455, 449, 443, 437, 431, 426, 420, 415,
+ 410, 405, 400, 395, 390, 386, 381, 377,
+ 372, 368, 364, 360, 356, 352, 349, 345,
+ 341, 338, 334, 331, 328, 324, 321, 318,
+ 315, 312, 309, 306, 303, 301, 298, 295,
+ 293, 290, 287, 285, 282, 280, 278, 275,
+ 273, 271, 269, 266, 264, 262, 260, 258,
+ 256, 254, 252, 250, 248, 246, 245, 243,
+ 241, 239, 237, 236, 234, 232, 231, 229,
+ 228, 226
+};
+
+
+const Word16 hvq_bwe_fac_fx[16] = /* Q15 */
+{
+ 16384, 17408, 18432, 19456,
+ 20480, 21504, 22528, 23552,
+ 24576, 25600, 26624, 27648,
+ 28672, 29696, 30720, 31744
+};
+
+const Word16 sqac_headroom_fx[146] = /* Q0 */
+{
+ 0 /*not used */, 0, 0, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4
+};
+
+const Word16 inv_N_fx[32] = /* Q15 */
+{
+ 0, 1056, 2113, 3170,
+ 4227, 5284, 6341, 7398,
+ 8455, 9512, 10569, 11626,
+ 12683, 13740, 14797, 15854,
+ 16912, 17969, 19026, 20083,
+ 21140, 22197, 23254, 24311,
+ 25368, 26425, 27482, 28539,
+ 29596, 30653, 31710, 32767
+};
+
+const Word16 band_len_harm[SFM_N_HARM_FB] =
+{
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 16, 16, 16, 16, 16, 16, 32, 32, 32, 48, 48, 48, 48, 64, 64, 64, 96
+};
+
+const Word32 thren_fx[39] = /* Q8 */
+{
+ 28215802, 19951584, 14107901,
+ 9975792, 7053951, 4987896,
+ 3526975, 2493948, 1763488,
+ 1246974, 881744, 623487,
+ 440872, 311744, 220436,
+ 155872, 110218, 77936,
+ 55109, 38968, 27554,
+ 19484, 13777, 9742,
+ 6889, 4871, 3444,
+ 2435, 1722, 1218,
+ 861, 609, 431,
+ 304, 215, 152,
+ 108, 76, 54
+};
+
+const Word16 dicnlg2[40] = // Q0
+{
+ 34, 33, 32, 31, 30, 29, 28, 27, 26, 25,
+ 24, 23, 22, 21, 20, 19, 18, 17, 16, 15,
+ 14, 13, 12, 11, 10, 9, 8, 7, 6, 5,
+ 4, 3, 2, 1, 0, -1, -2, -3, -4, -5
+};
+
+/*----------------------------------------------------------------------------------*
+ * LD music post-filter
+ *----------------------------------------------------------------------------------*/
+
+const Word16 mfreq_loc_LD_fx[] = { 100, 200, 300, 400, 510, 630, 770, 920, 1080, 1270, 1480,//Q0
+ 1720, 2000, 2320, 2700, 3150, 3700, 4400, 5300, (6400 - BIN_16kdct_fx)
+};
+
+const Word16 mfreq_bindiv_LD[] = {10, 10, 10, 10, 11, 12, 14, 15, 16, 19, 21, 24, 28, 32, 38, 45, 55, 70, 90, 110}; // Q0
+const Word16 sc_qnoise_fx[] = { 3277, 3277, 3277, 3277, 3277, 3277, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2185, 2185, 2185, 2185, 2185 };//Q15
+const Word16 inv_mfreq_bindiv_LD_fx[] = { 3277, 3277, 3277, 3277, 2979, 2731, 2341, 2185, 2048, 1725, 1560, 1365, 1170, 1024, 862, 728, 596, 468, 364, 298 }; /*Q15 */
+
+const Word16 inv_mfreq_bindiv_LD_M1_fx[] = { 3641, 3641, 3641, 3641, 3277, 2979, 2521, 2341, 2185, 1820, 1638, 1425, 1214, 1057, 886, 745, 607, 475, 368, 301 }; /*Q15 */
+
+const Word16 post_dct_wind_fx[OFFSET2] = /*Q15 */
+{
+ 32767, 32766, 32759, 32748, 32733, 32713, 32689, 32660,
+ 32627, 32590, 32548, 32502, 32452, 32397, 32338, 32274,
+ 32207, 32135, 32059, 31979, 31894, 31805, 31712, 31615,
+ 31514, 31409, 31300, 31187, 31070, 30949, 30823, 30695,
+ 30562, 30425, 30285, 30141, 29993, 29841, 29686, 29527,
+ 29365, 29200, 29030, 28858, 28682, 28503, 28320, 28134,
+ 27945, 27753, 27558, 27360, 27159, 26955, 26749, 26539,
+ 26327, 26112, 25894, 25674, 25452, 25226, 24999, 24769,
+ 24537, 24303, 24067, 23828, 23588, 23345, 23101, 22855,
+ 22607, 22358, 22107, 21854, 21600, 21345, 21088, 20830,
+ 20570, 20310, 20049, 19786, 19523, 19258, 18993, 18728,
+ 18461, 18195, 17927, 17659, 17391, 17123, 16854, 16586,
+ 16317, 16048, 15779, 15511, 15243, 14975, 14707, 14440,
+ 14173, 13907, 13642, 13377, 13114, 12851, 12589, 12328,
+ 12068, 11809, 11552, 11296, 11041, 10787, 10536, 10285,
+ 10037, 9790, 9545, 9301, 9060, 8820, 8583, 8348,
+ 8115, 7884, 7655, 7429, 7205, 6983, 6765, 6548,
+ 6335, 6124, 5916, 5710, 5508, 5308, 5112, 4918,
+ 4728, 4540, 4356, 4175, 3998, 3824, 3653, 3485,
+ 3321, 3161, 3004, 2851, 2701, 2555, 2413, 2274,
+ 2139, 2009, 1882, 1758, 1639, 1524, 1413, 1306,
+ 1203, 1104, 1009, 918, 831, 749, 671, 597,
+ 527, 461, 400, 343, 291, 242, 199, 159,
+ 124, 93, 67, 45, 27, 14, 5, 1
+};
+
+const Word16 MAX_SNR_SNR1_tab_FX[MBANDS_GN_LD] = { 16815, 16815, 16815, 16815, 16815, 16815, 16815, 16815, 16815, 16815, 16815, 16815, 16815, 16815, 16815, 16815, 17096, 17096, 17096, 17096 };//Q14
+
+const Word16 INV_MAX_SNR_tab_FX[MBANDS_GN_LD] = { 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 1425, 1425, 1425, 1425 };//Q15
+
+const Word16 wind_sss_fx[LEN_WIN_SSS] = /*window for subsampling*/
+{//Q15
+ 2621, 2627, 2645, 2675, 2717, 2771, 2836, 2914,
+ 3003, 3103, 3216, 3340, 3475, 3621, 3779, 3948,
+ 4127, 4318, 4519, 4730, 4952, 5184, 5426, 5677,
+ 5938, 6209, 6488, 6777, 7074, 7379, 7693, 8015,
+ 8344, 8681, 9025, 9375, 9733, 10097, 10466, 10842,
+ 11223, 11609, 12000, 12395, 12795, 13198, 13605, 14016,
+ 14429, 14845, 15263, 15683, 16105, 16527, 16951, 17376,
+ 17800, 18225, 18649, 19072, 19495, 19916, 20335, 20752,
+ 21166, 21578, 21987, 22392, 22794, 23191, 23585, 23973,
+ 24357, 24735, 25108, 25474, 25835, 26189, 26537, 26877,
+ 27210, 27536, 27853, 28163, 28464, 28757, 29041, 29316,
+ 29582, 29838, 30085, 30322, 30549, 30765, 30972, 31167,
+ 31352, 31526, 31690, 31842, 31983, 32112, 32230, 32337,
+ 32432, 32515, 32586, 32646, 32694, 32730, 32754, 32766,
+ 32767, 32096, 30111, 26894, 22575, 17333, 11380, 4962
+};
+/*----------------------------------------------------------------------------------*
+ * Low-pass FIR filter for low-frequency post-filtering @ 8kHz
+ * fir1(240,(3900/32000),hanning(241))*5
+ *----------------------------------------------------------------------------------*/
+
+const Word16 filter5_39s320_120_fx[121] = /* Q15 */
+{
+ 19968, 19480, 18061, 15834, 12993, 9779, 6458, 3290,
+ 506, -1713, -3253, -4075, -4212, -3762, -2873, -1720,
+ -488, 654, 1568, 2160, 2389, 2263, 1838, 1201,
+ 460, -275, -903, -1348, -1566, -1546, -1312, -914,
+ -422, 90, 547, 891, 1083, 1108, 975, 716,
+ 376, 9, -331, -599, -762, -805, -732, -562,
+ -325, -61, 192, 399, 533, 582, 546, 435,
+ 272, 83, -103, -259, -366, -413, -398, -328,
+ -218, -86, 46, 161, 243, 283, 280, 238,
+ 166, 77, -14, -94, -153, -185, -188, -163,
+ -119, -62, -3, 50, 90, 113, 117, 104,
+ 78, 44, 9, -23, -47, -62, -65, -58,
+ -45, -27, -8, 9, 21, 28, 30, 27,
+ 20, 13, 5, -2, -7, -9, -9, -8,
+ -6, -3, -1, 0, 1, 1, 1, 0,
+ 0
+
+};
+
+
+/*----------------------------------------------------------------------------------*
+ * LP analysis windows
+ *----------------------------------------------------------------------------------*/
+const Word16 Assym_window_W16fx[L_LP] = /*Q15*/
+{
+ 2621, 2624, 2630, 2640, 2655, 2674, 2698, 2725,
+ 2757, 2792, 2833, 2877, 2925, 2978, 3034, 3095,
+ 3160, 3229, 3302, 3379, 3460, 3545, 3634, 3727,
+ 3824, 3925, 4029, 4138, 4250, 4366, 4486, 4609,
+ 4737, 4867, 5002, 5140, 5281, 5426, 5575, 5727,
+ 5882, 6040, 6202, 6367, 6535, 6707, 6881, 7059,
+ 7239, 7422, 7609, 7798, 7990, 8184, 8382, 8581,
+ 8784, 8989, 9196, 9406, 9618, 9832, 10049, 10268,
+ 10489, 10711, 10936, 11163, 11391, 11622, 11854, 12087,
+ 12322, 12559, 12797, 13037, 13278, 13520, 13763, 14007,
+ 14253, 14499, 14746, 14994, 15243, 15493, 15743, 15994,
+ 16245, 16496, 16748, 17000, 17253, 17505, 17758, 18010,
+ 18263, 18515, 18767, 19019, 19270, 19521, 19772, 20022,
+ 20271, 20519, 20767, 21014, 21260, 21504, 21748, 21991,
+ 22232, 22473, 22711, 22949, 23185, 23419, 23652, 23883,
+ 24113, 24340, 24566, 24790, 25012, 25231, 25449, 25664,
+ 25878, 26089, 26297, 26503, 26707, 26908, 27107, 27303,
+ 27496, 27687, 27874, 28059, 28241, 28420, 28596, 28769,
+ 28939, 29105, 29269, 29429, 29586, 29739, 29889, 30036,
+ 30179, 30319, 30455, 30588, 30717, 30842, 30964, 31082,
+ 31196, 31306, 31413, 31516, 31615, 31709, 31800, 31888,
+ 31971, 32050, 32125, 32196, 32263, 32325, 32384, 32439,
+ 32489, 32535, 32577, 32615, 32649, 32679, 32704, 32725,
+ 32742, 32755, 32763, 32767, 32767, 32758, 32741, 32715,
+ 32681, 32638, 32587, 32527, 32458, 32381, 32296, 32203,
+ 32101, 31991, 31873, 31746, 31612, 31470, 31320, 31162,
+ 30996, 30823, 30642, 30454, 30259, 30056, 29847, 29630,
+ 29407, 29177, 28940, 28697, 28448, 28193, 27931, 27664,
+ 27391, 27113, 26829, 26540, 26246, 25947, 25643, 25335,
+ 25022, 24706, 24385, 24060, 23732, 23401, 23066, 22728,
+ 22387, 22043, 21697, 21349, 20999, 20646, 20292, 19937,
+ 19580, 19223, 18864, 18505, 18145, 17785, 17425, 17065,
+ 16705, 16346, 15988, 15631, 15275, 14920, 14567, 14215,
+ 13866, 13519, 13174, 12832, 12492, 12156, 11823, 11493,
+ 11166, 10844, 10525, 10210, 9900, 9594, 9292, 8996,
+ 8704, 8418, 8137, 7861, 7591, 7327, 7068, 6816,
+ 6570, 6330, 6097, 5870, 5650, 5437, 5231, 5032,
+ 4840, 4656, 4479, 4310, 4148, 3994, 3848, 3709,
+ 3579, 3457, 3343, 3237, 3139, 3050, 2969, 2896,
+ 2832, 2776, 2729, 2690, 2660, 2639, 2626, 2621
+};
+
+const Word16 assym_window_16k_fx[L_LP_16k] = /*Q15*/
+{
+ 2621, 2623, 2627, 2634, 2643, 2655, 2670, 2688,
+ 2708, 2731, 2757, 2785, 2816, 2849, 2886, 2925,
+ 2966, 3011, 3058, 3107, 3159, 3214, 3271, 3331,
+ 3394, 3459, 3527, 3597, 3670, 3745, 3823, 3903,
+ 3985, 4071, 4158, 4248, 4341, 4436, 4533, 4632,
+ 4734, 4839, 4945, 5054, 5165, 5279, 5394, 5512,
+ 5632, 5754, 5879, 6005, 6134, 6264, 6397, 6531,
+ 6668, 6807, 6947, 7090, 7234, 7381, 7529, 7679,
+ 7831, 7984, 8140, 8297, 8455, 8616, 8778, 8941,
+ 9107, 9273, 9442, 9611, 9782, 9955, 10129, 10304,
+ 10481, 10659, 10838, 11019, 11200, 11383, 11567, 11752,
+ 11938, 12125, 12313, 12502, 12693, 12883, 13075, 13268,
+ 13461, 13655, 13850, 14046, 14242, 14439, 14637, 14835,
+ 15033, 15232, 15432, 15631, 15832, 16032, 16233, 16434,
+ 16635, 16837, 17039, 17240, 17442, 17644, 17846, 18048,
+ 18250, 18452, 18653, 18855, 19056, 19257, 19458, 19658,
+ 19858, 20058, 20257, 20456, 20654, 20852, 21049, 21245,
+ 21441, 21637, 21831, 22025, 22218, 22410, 22602, 22792,
+ 22982, 23170, 23358, 23545, 23730, 23915, 24098, 24280,
+ 24461, 24641, 24820, 24997, 25173, 25348, 25521, 25693,
+ 25863, 26032, 26200, 26366, 26530, 26693, 26854, 27014,
+ 27171, 27328, 27482, 27635, 27786, 27935, 28082, 28227,
+ 28371, 28513, 28652, 28790, 28926, 29059, 29191, 29320,
+ 29448, 29573, 29697, 29818, 29937, 30053, 30168, 30280,
+ 30390, 30498, 30603, 30706, 30807, 30905, 31002, 31095,
+ 31186, 31275, 31362, 31446, 31527, 31606, 31683, 31757,
+ 31828, 31897, 31963, 32027, 32088, 32147, 32203, 32257,
+ 32307, 32356, 32401, 32444, 32484, 32522, 32557, 32589,
+ 32619, 32646, 32670, 32692, 32711, 32727, 32741, 32751,
+ 32760, 32765, 32767, 32767, 32762, 32751, 32734, 32712,
+ 32685, 32652, 32614, 32570, 32521, 32466, 32406, 32341,
+ 32270, 32194, 32112, 32026, 31934, 31837, 31735, 31627,
+ 31515, 31398, 31275, 31148, 31016, 30878, 30737, 30590,
+ 30438, 30282, 30122, 29957, 29787, 29613, 29434, 29252,
+ 29065, 28874, 28679, 28480, 28277, 28070, 27859, 27644,
+ 27426, 27205, 26980, 26751, 26520, 26285, 26047, 25805,
+ 25561, 25314, 25065, 24812, 24557, 24300, 24040, 23777,
+ 23513, 23246, 22978, 22707, 22435, 22161, 21885, 21608,
+ 21329, 21049, 20768, 20485, 20202, 19918, 19632, 19347,
+ 19060, 18773, 18486, 18198, 17911, 17623, 17335, 17047,
+ 16760, 16473, 16186, 15900, 15614, 15330, 15046, 14763,
+ 14481, 14200, 13921, 13643, 13367, 13092, 12818, 12547,
+ 12277, 12010, 11744, 11481, 11220, 10961, 10705, 10451,
+ 10200, 9951, 9706, 9463, 9223, 8987, 8754, 8523,
+ 8297, 8073, 7854, 7637, 7425, 7216, 7011, 6810,
+ 6613, 6420, 6231, 6046, 5865, 5689, 5517, 5350,
+ 5187, 5028, 4875, 4726, 4581, 4442, 4307, 4177,
+ 4052, 3932, 3818, 3708, 3603, 3503, 3409, 3320,
+ 3236, 3157, 3084, 3016, 2953, 2895, 2844, 2797,
+ 2756, 2720, 2690, 2665, 2646, 2632, 2624, 2621
+};
+
+const Word16 lag_window_8k[2][16] = /* LAGW_STRONG Q15*/
+{
+ /* h */ { 32728, 32619, 32438, 32187, 31867, 31480, 31029, 30517, 29946, 29321, 28645, 27923, 27158, 26356, 25521, 24658 },
+ /* l */ { 11904, 17280, 30720, 25856, 24192, 28992, 24384, 7360, 19456, 14720, 22080, 12928, 31040, 27328, 22080, 5184 }
+};
+const Word16 lag_window_12k8[NUM_LAGW_STRENGTHS][2][16] =
+{//Q15
+ /* LAGW_WEAK */
+ {
+ /* h */ { 32763, 32758, 32750, 32739, 32725, 32707, 32687, 32663, 32637, 32607, 32574, 32538, 32498, 32456, 32411, 32362 },
+ /* l */ { 4736, 13312, 16896, 15360, 8896, 30464, 14528, 27008, 2496, 6720, 7296, 4480, 31424, 22976, 12160, 32384 }
+},
+/* LAGW_MEDIUM */
+{
+ /* h */ { 32758, 32739, 32707, 32663, 32607, 32538, 32456, 32362, 32257, 32139, 32009, 31867, 31714, 31549, 31374, 31187 },
+ /* l */ { 13312, 15360, 30464, 27008, 6720, 4480, 22976, 32384, 3520, 5888, 11200, 24192, 17472, 29376, 576, 3136 }
+},
+/* LAGW_STRONG */
+{
+ /* h */ { 32750, 32707, 32637, 32538, 32411, 32257, 32075, 31867, 31633, 31374, 31089, 30780, 30449, 30094, 29718, 29321 },
+ /* l */ { 16896, 30464, 2496, 4480, 12160, 3520, 24256, 24192, 20736, 576, 18240, 31488, 128, 16704, 11520, 14720 }
+}
+};
+const Word16 lag_window_16k[NUM_LAGW_STRENGTHS][2][16] =
+{//Q15
+ /* LAGW_WEAK */
+ {
+ /* h */ { 32763, 32760, 32755, 32748, 32739, 32728, 32715, 32700, 32682, 32663, 32642, 32619, 32594, 32567, 32538, 32507 },
+ /* l */ { 23360, 22272, 20672, 18304, 15360, 11904, 8000, 3648, 31808, 27008, 22080, 17280, 12608, 8256, 4480, 1344 }
+},
+/* LAGW_MEDIUM */
+{
+ /* h */ { 32760, 32748, 32728, 32700, 32663, 32619, 32567, 32507, 32438, 32362, 32279, 32187, 32088, 31981, 31867, 31746 },
+ /* l */ { 22272, 18304, 11904, 3648, 27008, 17280, 8256, 1344, 30720, 32384, 8256, 25856, 21824, 31360, 24192, 3072 }
+},
+/* LAGW_STRONG */
+{
+ /* h */ { 32755, 32728, 32682, 32619, 32538, 32438, 32322, 32187, 32036, 31867, 31682, 31480, 31263, 31029, 30780, 30517 },
+ /* l */ { 20672, 11904, 31808, 17280, 4480, 30720, 2944, 25856, 8320, 24192, 16896, 28992, 5824, 24384, 31488, 7360 }
+}
+};
+const Word16 lag_window_25k6[NUM_LAGW_STRENGTHS][2][16] =
+{//Q15
+ /* LAGW_WEAK */
+ {
+ /* h */ { 32764, 32763, 32761, 32758, 32754, 32750, 32745, 32739, 32732, 32725, 32716, 32707, 32698, 32687, 32676, 32663 },
+ /* l */ { 10752, 4736, 5568, 13312, 28096, 16896, 12672, 15360, 25024, 8896, 32576, 30464, 2624, 14528, 832, 27008 }
+},
+/* LAGW_MEDIUM */
+{
+ /* h */ { 32763, 32758, 32750, 32739, 32725, 32707, 32687, 32663, 32637, 32607, 32574, 32538, 32498, 32456, 32411, 32362 },
+ /* l */ { 4736, 13312, 16896, 15360, 8896, 30464, 14528, 27008, 2496, 6720, 7296, 4480, 31424, 22976, 12160, 32384 }
+},
+/* LAGW_STRONG */
+{
+ /* h */ { 32761, 32750, 32732, 32707, 32676, 32637, 32591, 32538, 32478, 32411, 32337, 32257, 32169, 32075, 31975, 31867 },
+ /* l */ { 5568, 16896, 25024, 30464, 832, 2496, 3328, 4480, 7040, 12160, 21440, 3520, 25728, 24256, 1216, 24192 }
+}
+};
+const Word16 lag_window_32k[NUM_LAGW_STRENGTHS][2][16] =
+{//Q15
+ /* LAGW_WEAK */
+ {
+ /* h */ { 32764, 32763, 32762, 32760, 32758, 32755, 32752, 32748, 32744, 32739, 32734, 32728, 32722, 32715, 32707, 32700 },
+ /* l */ { 15424, 23360, 14720, 22272, 13312, 20672, 11328, 18304, 8704, 15360, 5504, 11904, 1792, 8000, 30464, 3648 }
+},
+/* LAGW_MEDIUM */
+{
+ /* h */ { 32763, 32760, 32755, 32748, 32739, 32728, 32715, 32700, 32682, 32663, 32642, 32619, 32594, 32567, 32538, 32507 },
+ /* l */ { 23360, 22272, 20672, 18304, 15360, 11904, 8000, 3648, 31808, 27008, 22080, 17280, 12608, 8256, 4480, 1344 }
+},
+/* LAGW_STRONG */
+{
+ /* h */ { 32762, 32755, 32744, 32728, 32707, 32682, 32653, 32619, 32581, 32538, 32490, 32438, 32382, 32322, 32257, 32187 },
+ /* l */ { 14720, 20672, 8704, 11904, 30464, 31808, 16384, 17280, 2240, 4480, 24704, 30720, 23168, 2944, 3520, 25856 }
+}
+};
+const Word16 lag_window_48k[2][16] = /* LAGW_STRONG */
+{//Q15
+ /* h */ { 32763, 32760, 32755, 32748, 32739, 32728, 32715, 32700, 32682, 32663, 32642, 32619, 32594, 32567, 32538, 32507 },
+ /* l */ { 23360, 22272, 20672, 18304, 15360, 11904, 8000, 3648, 31808, 27008, 22080, 17280, 12608, 8256, 4480, 1344 }
+};
+
+/* 32 bit declarations */
+const Word32 lag_window_8k_32[16] = /* LAGW_STRONG */
+{//Q31
+ 2144886016, 2137753344, 2125918208, 2109458944, 2088484096, 2063131264, 2033565312, 1999976832, 1962579968, 1921610496, 1877322880, 1829987584, 1779888768, 1727321472, 1672588416, 1615997056
+};
+
+const Word32 lag_window_12k8_32[NUM_LAGW_STRENGTHS][16] =
+{//Q31
+ /* LAGW_WEAK */
+ {
+ 2147165440, 2146854912, 2146337792, 2145613824, 2144683392, 2143546880, 2142204288, 2140656384, 2138903424, 2136945792, 2134784256, 2132419328, 2129851776, 2127082368, 2124111616, 2120940800
+},
+/* LAGW_MEDIUM */
+{
+ 2146854912, 2145613824, 2143546880, 2140656384, 2136945792, 2132419328, 2127082368, 2120940800, 2114001792, 2106273280, 2097764224, 2088484096, 2078443648, 2067654016, 2056127616, 2043877504
+},
+/* LAGW_STRONG */
+{
+ 2146337792, 2143546880, 2138903424, 2132419328, 2124111616, 2114001792, 2102115712, 2088484096, 2073141760, 2056127616, 2037485184, 2017261056, 1995505920, 1972273792, 1947621888, 1921610496
+}
+};
+
+const Word32 lag_window_16k_32[NUM_LAGW_STRENGTHS][16] =
+{//Q31
+ /* LAGW_WEAK */
+ {
+ 2147202688, 2147003904, 2146673024, 2146209536, 2145613824, 2144886016, 2144026240, 2143034496, 2141911168, 2140656384, 2139270272, 2137753344, 2136105600, 2134327424, 2132419328, 2130381440
+},
+/* LAGW_MEDIUM */
+{
+ 2147003904, 2146209536, 2144886016, 2143034496, 2140656384, 2137753344, 2134327424, 2130381440, 2125918208, 2120940800, 2115453056, 2109458944, 2102962816, 2095969536, 2088484096, 2080512000
+},
+/* LAGW_STRONG */
+{
+ 2146673024, 2144886016, 2141911168, 2137753344, 2132419328, 2125918208, 2118260480, 2109458944, 2099527936, 2088484096, 2076345344, 2063131264, 2048863616, 2033565312, 2017261056, 1999976832
+}
+};
+const Word32 lag_window_25k6_32[NUM_LAGW_STRENGTHS][16] =
+{//Q31
+ /* LAGW_WEAK */
+ {
+ 2147243008, 2147165440, 2147036032, 2146854912, 2146622336, 2146337792, 2146001664, 2145613824, 2145174400, 2144683392, 2144140928, 2143546880, 2142901376, 2142204288, 2141456000, 2140656384
+},
+/* LAGW_MEDIUM */
+{
+ 2147165440, 2146854912, 2146337792, 2145613824, 2144683392, 2143546880, 2142204288, 2140656384, 2138903424, 2136945792, 2134784256, 2132419328, 2129851776, 2127082368, 2124111616, 2120940800
+},
+/* LAGW_STRONG */
+{
+ 2147036032, 2146337792, 2145174400, 2143546880, 2141456000, 2138903424, 2135890432, 2132419328, 2128492288, 2124111616, 2119280512, 2114001792, 2108279040, 2102115712, 2095516032, 2088484096
+}
+};
+const Word32 lag_window_32k_32[NUM_LAGW_STRENGTHS][16] =
+{//Q31
+ /* LAGW_WEAK */
+ {
+ 2147252352, 2147202688, 2147119872, 2147003904, 2146854912, 2146673024, 2146457728, 2146209536, 2145928192, 2145613824, 2145266432, 2144886016, 2144472576, 2144026240, 2143546880, 2143034496
+},
+/* LAGW_MEDIUM */
+{
+ 2147202688, 2147003904, 2146673024, 2146209536, 2145613824, 2144886016, 2144026240, 2143034496, 2141911168, 2140656384, 2139270272, 2137753344, 2136105600, 2134327424, 2132419328, 2130381440
+},
+/* LAGW_STRONG */
+{
+ 2147119872, 2146673024, 2145928192, 2144886016, 2143546880, 2141911168, 2139979776, 2137753344, 2135232896, 2132419328, 2129314048, 2125918208, 2122233088, 2118260480, 2114001792, 2109458944
+}
+};
+const Word32 lag_window_48k_32[16] = /* LAGW_STRONG */
+{//Q31
+ 2147202688, 2147003904, 2146673024, 2146209536, 2145613824, 2144886016, 2144026240, 2143034496, 2141911168, 2140656384, 2139270272, 2137753344, 2136105600, 2134327424, 2132419328, 2130381440
+};
+/*----------------------------------------------------------------------------------*
+ * LP analysis - grid of points for evaluating Chebyshev polynomials
+ *----------------------------------------------------------------------------------*/
+
+const Word16 grid50_fx[(GRID50_POINTS - 1) / 2 - 1] =
+{//Q15
+ 32703, 32510, 32188, 31739, 31164, 30467,
+ 29649, 28715, 27667, 26510, 25248, 23887,
+ 22431, 20887, 19261, 17558, 15786, 13952,
+ 12063, 10126, 8149, 6140, 4107, 2058
+};
+
+const Word16 grid40_fx[(GRID40_POINTS - 1) / 2 - 1] =
+{//Q15
+ 32667, 32365, 31863, 31164, 30274, 29197,
+ 27939, 26510, 24917, 23170, 21281, 19261,
+ 17121, 14876, 12540, 10126, 7650, 5126,
+ 2571
+};
+
+/*----------------------------------------------------------------------------------*
+ * Sinus & Cosinus - table for the FFT and IFFT of 256 points,
+ * dimension of the table = 161
+ *----------------------------------------------------------------------------------*/
+const Word16 sincos_t_fx[161] =
+{
+ /*Q15 */
+ 0,
+ 804, 1607, 2410, 3211, 4011,
+ 4808, 5602, 6392, 7179, 7961,
+ 8739, 9512, 10278, 11039, 11793,
+ 12539, 13278, 14010, 14732, 15446,
+ 16151, 16846, 17530, 18204, 18868,
+ 19519, 20159, 20787, 21403, 22005,
+ 22594, 23170, 23732, 24279, 24812,
+ 25330, 25832, 26319, 26790, 27245,
+ 27684, 28106, 28511, 28898, 29269,
+ 29621, 29956, 30273, 30572, 30852,
+ 31114, 31357, 31581, 31785, 31971,
+ 32138, 32285, 32413, 32521, 32610,
+ 32679, 32728, 32758, 32767, 32758,
+ 32728, 32679, 32610, 32521, 32413,
+ 32285, 32138, 31971, 31785, 31581,
+ 31357, 31114, 30852, 30572, 30273,
+ 29956, 29621, 29269, 28898, 28511,
+ 28106, 27684, 27245, 26790, 26319,
+ 25832, 25330, 24812, 24279, 23732,
+ 23170, 22594, 22005, 21403, 20787,
+ 20159, 19519, 18868, 18204, 17530,
+ 16846, 16151, 15446, 14732, 14010,
+ 13278, 12539, 11793, 11039, 10278,
+ 9512, 8739, 7961, 7179, 6392,
+ 5602, 4808, 4011, 3211, 2410,
+ 1607, 804, 0, -804, -1607,
+ -2410, -3211, -4011, -4808, -5602,
+ -6392, -7179, -7961, -8739, -9512,
+ -10278, -11039, -11793, -12539, -13278,
+ -14010, -14732, -15446, -16151, -16846,
+ -17530, -18204, -18868, -19519, -20159,
+ -20787, -21403, -22005, -22594, -23170,
+};
+
+
+/*----------------------------------------------------------------------------------*
+ * Sinus & Cosinus - table for the FFT and IFFT of 1024 points, value range [0 ... sin(-5pi/4)]
+ * dimension of the table = 641=4*256*(5/8)+1
+ *----------------------------------------------------------------------------------*/
+
+const Word16 sincos_t_ext_fx[641] =
+{//Q15
+ 0, 201, 402, 603, 804, 1005, 1206, 1407,
+ 1608, 1809, 2009, 2210, 2411, 2611, 2811, 3012,
+ 3212, 3412, 3612, 3812, 4011, 4211, 4410, 4609,
+ 4808, 5007, 5205, 5404, 5602, 5800, 5998, 6195,
+ 6393, 6590, 6787, 6983, 7180, 7376, 7571, 7767,
+ 7962, 8157, 8351, 8546, 8740, 8933, 9127, 9319,
+ 9512, 9704, 9896, 10088, 10279, 10469, 10660, 10850,
+ 11039, 11228, 11417, 11605, 11793, 11980, 12167, 12354,
+ 12540, 12725, 12910, 13095, 13279, 13463, 13646, 13828,
+ 14010, 14192, 14373, 14553, 14733, 14912, 15091, 15269,
+ 15447, 15624, 15800, 15976, 16151, 16326, 16500, 16673,
+ 16846, 17018, 17190, 17361, 17531, 17700, 17869, 18037,
+ 18205, 18372, 18538, 18703, 18868, 19032, 19195, 19358,
+ 19520, 19681, 19841, 20001, 20160, 20318, 20475, 20632,
+ 20788, 20943, 21097, 21251, 21403, 21555, 21706, 21856,
+ 22006, 22154, 22302, 22449, 22595, 22740, 22884, 23028,
+ 23170, 23312, 23453, 23593, 23732, 23870, 24008, 24144,
+ 24279, 24414, 24548, 24680, 24812, 24943, 25073, 25202,
+ 25330, 25457, 25583, 25708, 25833, 25956, 26078, 26199,
+ 26320, 26439, 26557, 26674, 26791, 26906, 27020, 27133,
+ 27246, 27357, 27467, 27576, 27684, 27791, 27897, 28002,
+ 28106, 28209, 28311, 28411, 28511, 28610, 28707, 28803,
+ 28899, 28993, 29086, 29178, 29269, 29359, 29448, 29535,
+ 29622, 29707, 29792, 29875, 29957, 30038, 30118, 30196,
+ 30274, 30350, 30425, 30499, 30572, 30644, 30715, 30784,
+ 30853, 30920, 30986, 31050, 31114, 31177, 31238, 31298,
+ 31357, 31415, 31471, 31527, 31581, 31634, 31686, 31737,
+ 31786, 31834, 31881, 31927, 31972, 32015, 32058, 32099,
+ 32138, 32177, 32214, 32251, 32286, 32319, 32352, 32383,
+ 32413, 32442, 32470, 32496, 32522, 32546, 32568, 32590,
+ 32610, 32629, 32647, 32664, 32679, 32693, 32706, 32718,
+ 32729, 32738, 32746, 32753, 32758, 32762, 32766, 32767,
+ 32767, 32767, 32766, 32762, 32758, 32753, 32746, 32738,
+ 32729, 32718, 32706, 32693, 32679, 32664, 32647, 32629,
+ 32610, 32590, 32568, 32546, 32522, 32496, 32470, 32442,
+ 32413, 32383, 32352, 32319, 32286, 32251, 32214, 32177,
+ 32138, 32099, 32058, 32015, 31972, 31927, 31881, 31834,
+ 31786, 31737, 31686, 31634, 31581, 31527, 31471, 31415,
+ 31357, 31298, 31238, 31177, 31114, 31050, 30986, 30920,
+ 30853, 30784, 30715, 30644, 30572, 30499, 30425, 30350,
+ 30274, 30196, 30118, 30038, 29957, 29875, 29792, 29707,
+ 29622, 29535, 29448, 29359, 29269, 29178, 29086, 28993,
+ 28899, 28803, 28707, 28610, 28511, 28411, 28311, 28209,
+ 28106, 28002, 27897, 27791, 27684, 27576, 27467, 27357,
+ 27246, 27133, 27020, 26906, 26791, 26674, 26557, 26439,
+ 26320, 26199, 26078, 25956, 25833, 25708, 25583, 25457,
+ 25330, 25202, 25073, 24943, 24812, 24680, 24548, 24414,
+ 24279, 24144, 24008, 23870, 23732, 23593, 23453, 23312,
+ 23170, 23028, 22884, 22740, 22595, 22449, 22302, 22154,
+ 22006, 21856, 21706, 21555, 21403, 21251, 21097, 20943,
+ 20788, 20632, 20475, 20318, 20160, 20001, 19841, 19681,
+ 19520, 19358, 19195, 19032, 18868, 18703, 18538, 18372,
+ 18205, 18037, 17869, 17700, 17531, 17361, 17190, 17018,
+ 16846, 16673, 16500, 16326, 16151, 15976, 15800, 15624,
+ 15447, 15269, 15091, 14912, 14733, 14553, 14373, 14192,
+ 14010, 13828, 13646, 13463, 13279, 13095, 12910, 12725,
+ 12540, 12354, 12167, 11980, 11793, 11605, 11417, 11228,
+ 11039, 10850, 10660, 10469, 10279, 10088, 9896, 9704,
+ 9512, 9319, 9127, 8933, 8740, 8546, 8351, 8157,
+ 7962, 7767, 7571, 7376, 7180, 6983, 6787, 6590,
+ 6393, 6195, 5998, 5800, 5602, 5404, 5205, 5007,
+ 4808, 4609, 4410, 4211, 4011, 3812, 3612, 3412,
+ 3212, 3012, 2811, 2611, 2411, 2210, 2009, 1809,
+ 1608, 1407, 1206, 1005, 804, 603, 402, 201,
+ 0, -201, -402, -603, -804, -1005, -1206, -1407,
+ -1608, -1809, -2009, -2210, -2411, -2611, -2811, -3012,
+ -3212, -3412, -3612, -3812, -4011, -4211, -4410, -4609,
+ -4808, -5007, -5205, -5404, -5602, -5800, -5998, -6195,
+ -6393, -6590, -6787, -6983, -7180, -7376, -7571, -7767,
+ -7962, -8157, -8351, -8546, -8740, -8933, -9127, -9319,
+ -9512, -9704, -9896, -10088, -10279, -10469, -10660, -10850,
+ -11039, -11228, -11417, -11605, -11793, -11980, -12167, -12354,
+ -12540, -12725, -12910, -13095, -13279, -13463, -13646, -13828,
+ -14010, -14192, -14373, -14553, -14733, -14912, -15091, -15269,
+ -15447, -15624, -15800, -15976, -16151, -16326, -16500, -16673,
+ -16846, -17018, -17190, -17361, -17531, -17700, -17869, -18037,
+ -18205, -18372, -18538, -18703, -18868, -19032, -19195, -19358,
+ -19520, -19681, -19841, -20001, -20160, -20318, -20475, -20632,
+ -20788, -20943, -21097, -21251, -21403, -21555, -21706, -21856,
+ -22006, -22154, -22302, -22449, -22595, -22740, -22884, -23028,
+ -23028
+};/*Q15*/
+
+
+const Word16 Asr_LP16_fx[21] =
+{
+ /*Q15 */
+ 0, 110, 0, -428, 0, 1153, 0, -2832,
+ 0, 10199, 16384, 10199, 0, -2832, 0, 1153,
+ 0, -428, 0, 110, 0
+};
+
+const Word16 Asr_LP32_fx[41] =
+{
+ /*Q15 */
+ 0, 24, 55, 58, 0, -113, -214, -198,
+ 0, 323, 576, 510, 0, -795, -1416, -1280,
+ 0, 2337, 5099, 7334, 8192, 7334, 5099, 2337,
+ 0, -1280, -1416, -795, 0, 510, 576, 323,
+ 0, -198, -214, -113, 0, 58, 55, 24,
+ 0
+};
+
+const Word16 Asr_LP48_fx[61] =
+{
+ /*Q17 */
+ 0, 38, 93, 146, 167, 123, 0, -192,
+ -408, -571, -592, -407, 0, 564, 1143, 1537,
+ 1546, 1035, 0, -1391, -2801, -3776, -3843, -2635,
+ 0, 3919, 8679, 13599, 17887, 20809, 21845, 20809,
+ 17887, 13599, 8679, 3919, 0, -2635, -3843, -3776,
+ -2801, -1391, 0, 1035, 1546, 1537, 1143, 564,
+ 0, -407, -592, -571, -408, -192, 0, 123,
+ 167, 146, 93, 38, 0
+};
+
+const Word16 fft256_read_indexes[]= // Q0
+{
+ 0, 128, 64, 192, 32, 160, 96, 224, 16, 144, 80, 208, 48, 176, 112, 240,
+ 8, 136, 72, 200, 40, 168, 104, 232, 24, 152, 88, 216, 56, 184, 120, 248,
+ 4, 132, 68, 196, 36, 164, 100, 228, 20, 148, 84, 212, 52, 180, 116, 244,
+ 12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252,
+ 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82, 210, 50, 178, 114, 242,
+ 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250,
+ 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86, 214, 54, 182, 118, 246,
+ 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254,
+ 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81, 209, 49, 177, 113, 241,
+ 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249,
+ 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85, 213, 53, 181, 117, 245,
+ 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253,
+ 3, 131, 67, 195, 35, 163, 99, 227, 19, 147, 83, 211, 51, 179, 115, 243,
+ 11, 139, 75, 203, 43, 171, 107, 235, 27, 155, 91, 219, 59, 187, 123, 251,
+ 7, 135, 71, 199, 39, 167, 103, 231, 23, 151, 87, 215, 55, 183, 119, 247,
+ 15, 143, 79, 207, 47, 175, 111, 239, 31, 159, 95, 223, 63, 191, 127, 255
+};
+
+
+/*----------------------------------------------------------------------------------*
+ * Sinus & Cosinus - table for the DCT-IV based 2
+ *----------------------------------------------------------------------------------*/
+
+const Word16 sin_table256_fx[] =
+{//Q15
+ 101, 302, 503, 704, 905, 1106, 1307, 1507, 1708,
+ 1909, 2110, 2310, 2511, 2711, 2912, 3112, 3312, 3512,
+ 3712, 3911, 4111, 4310, 4510, 4709, 4907, 5106, 5305,
+ 5503, 5701, 5899, 6097, 6294, 6491, 6688, 6885, 7081,
+ 7278, 7473, 7669, 7864, 8059, 8254, 8449, 8643, 8836,
+ 9030, 9223, 9416, 9608, 9800, 9992, 10183, 10374, 10565,
+ 10755, 10945, 11134, 11323, 11511, 11699, 11887, 12074, 12261,
+ 12447, 12633, 12818, 13003, 13187, 13371, 13554, 13737, 13919,
+ 14101, 14282, 14463, 14643, 14823, 15002, 15180, 15358, 15535,
+ 15712, 15888, 16064, 16239, 16413, 16587, 16760, 16932, 17104,
+ 17275, 17446, 17616, 17785, 17953, 18121, 18288, 18455, 18621,
+ 18786, 18950, 19114, 19277, 19439, 19601, 19761, 19921, 20081,
+ 20239, 20397, 20554, 20710, 20865, 21020, 21174, 21327, 21479,
+ 21631, 21781, 21931, 22080, 22228, 22375, 22522, 22668, 22812,
+ 22956, 23099, 23241, 23383, 23523, 23663, 23801, 23939, 24076,
+ 24212, 24347, 24481, 24614, 24746, 24878, 25008, 25138, 25266,
+ 25394, 25520, 25646, 25771, 25894, 26017, 26139, 26259, 26379,
+ 26498, 26616, 26733, 26848, 26963, 27077, 27190, 27301, 27412,
+ 27522, 27630, 27738, 27844, 27950, 28054, 28158, 28260, 28361,
+ 28461, 28560, 28658, 28755, 28851, 28946, 29040, 29132, 29224,
+ 29314, 29404, 29492, 29579, 29665, 29750, 29833, 29916, 29997,
+ 30078, 30157, 30235, 30312, 30388, 30462, 30536, 30608, 30680,
+ 30750, 30819, 30886, 30953, 31018, 31082, 31146, 31207, 31268,
+ 31328, 31386, 31443, 31499, 31554, 31608, 31660, 31711, 31761,
+ 31810, 31858, 31904, 31950, 31994, 32037, 32078, 32119, 32158,
+ 32196, 32233, 32268, 32303, 32336, 32368, 32398, 32428, 32456,
+ 32483, 32509, 32534, 32557, 32579, 32600, 32620, 32638, 32656,
+ 32672, 32686, 32700, 32712, 32723, 32733, 32742, 32749, 32756,
+ 32760, 32764, 32767, 32767
+};
+/*----------------------------------------------------------------------------------*
+ * 1/4 resolution interpolation filter (-3 dB at 0.913*fs/2)
+ *----------------------------------------------------------------------------------*/
+
+const Word16 inter4_2_fx[] =
+{//evs table , some mismatch in values compared to float is observed
+ 0, 1, 2, 1,
+ -2, -7, -10, -7,
+ 4, 19, 28, 22,
+ -2, -33, -55, -49,
+ -10, 47, 91, 92,
+ 38, -52, -133, -153,
+ -88, 43, 175, 231,
+ 165, -9, -209, -325,
+ -275, -60, 226, 431,
+ 424, 175, -213, -544,
+ -619, -355, 153, 656,
+ 871, 626, -16, -762,
+ -1207, -1044, -249, 853,
+ 1699, 1749, 780, -923,
+ -2598, -3267, -2147, 968,
+ 5531, 10359, 14031, 15401,
+ 14031, 10359, 5531, 968,
+ -2147, -3267, -2598, -923,
+ 780, 1749, 1699, 853,
+ -249, -1044, -1207, -762,
+ -16, 626, 871, 656,
+ 153, -355, -619, -544,
+ -213, 175, 424, 431,
+ 226, -60, -275, -325,
+ -209, -9, 165, 231,
+ 175, 43, -88, -153,
+ -133, -52, 38, 92,
+ 91, 47, -10, -49,
+ -55, -33, -2, 22,
+ 28, 19, 4, -7,
+ -10, -7, -2, 1,
+ 2, 1, 0, 0
+};
+
+/* 1/4 resolution interpolation filter (-3 dB at 0.856*fs/2) */
+const Word32 L_pitch_inter4_2[PIT_FIR_SIZE2] = { /* Q31 */
+ 2018634624, 1839083520, 1357785216, 724904576, 126856152, -281447072,
+ -428193216, -340524320, -121030032, 102233104, 229241728, 222704784,
+ 111802296, -32603096, -136805440, -158183648, -99851544, -2110976,
+ 82091856, 114123720, 86026048, 19988778, -46544560, -81104016,
+ -71266392, -27977416, 22982370, 55621972, 56517476, 29680372,
+ -7827578, -36105644, -42638288, -27414776, -1138166, 21646636,
+ 30326764, 22885734, 5570572, -11516955, -20066088, -17396766,
+ -6833293, 5003637, 12101070, 11944304, 6107443, -1346472, -6427418,
+ -7219840, -4389456, -249108, 2823941, 3633542, 2471753, 556198,
+ -895500, -1327144, -932007, -285615, 135291, 210453, 103079, 15032, 0
+};
+const Word16 pitch_inter4_2[PIT_FIR_SIZE2] =
+{
+ /* cut-off frequency at 0.94*fs/2 */
+ 30802/*0.940000f Q15*/,
+ 28062/*0.856390f Q15*/, 20718/*0.632268f Q15*/, 11061/*0.337560f Q15*/, 1936/*0.059072f Q15*/,
+ -4295/*-0.131059f Q15*/, -6534/*-0.199393f Q15*/, -5196/*-0.158569f Q15*/, -1847/*-0.056359f Q15*/,
+ 1560/*0.047606f Q15*/, 3498/*0.106749f Q15*/, 3398/*0.1037059f Q15*/, 1706/*0.052062f Q15*/,
+ -497/*-0.015182f Q15*/, -2087/*-0.063705f Q15*/, -2414/*-0.073660f Q15*/, -1524/*-0.046497f Q15*/,
+ -32/*-0.000983f Q15*/, 1253/*0.038227f Q15*/, 1741/*0.053143f Q15*/, 1313/*0.040059f Q15*/,
+ 305/*0.009308f Q15*/, -710/*-0.021674f Q15*/, -1238/*-0.037767f Q15*/, -1087/*-0.033186f Q15*/,
+ -427/*-0.013028f Q15*/, 351/*0.010702f Q15*/, 849/*0.025901f Q15*/, 862/*0.026318f Q15*/,
+ 453/*0.013821f Q15*/, -119/*-0.003645f Q15*/, -551/*-0.016813f Q15*/, -651/*-0.019855f Q15*/,
+ -418/*-0.012766f Q15*/, -17/*-0.000530f Q15*/, 330/*0.010080f Q15*/, 463/*0.014122f Q15*/,
+ 349/*0.010657f Q15*/, 85/*0.002594f Q15*/, -176/*-0.005363f Q15*/, -306/*-0.009344f Q15*/,
+ -265/*-0.008101f Q15*/, -104/*-0.003182f Q15*/, 76/*0.002330f Q15*/, 185/*0.005635f Q15*/,
+ 182/*0.005562f Q15*/, 93/*0.002844f Q15*/, -21/*-0.000627f Q15*/, -98/*-0.002993f Q15*/,
+ -110/*-0.003362f Q15*/, -67/*-0.002044f Q15*/, -4/*-0.000116f Q15*/, 43/*0.001315f Q15*/,
+ 55/*0.001692f Q15*/, 38/*0.001151f Q15*/, 8/*0.000259f Q15*/, -14/*-0.000417f Q15*/,
+ -20/*-0.000618f Q15*/, -14/*-0.000434f Q15*/, -4/*-0.000133f Q15*/, 2/*0.000063f Q15*/,
+ 3/*0.000098f Q15*/, 2/*0.000048f Q15*/, 0/*0.000007f Q15*/, 0/*0.000000f Q15*/
+};
+/* 1/4 resolution interpolation filter (-3 dB at 0.791*fs/2) */
+const Word32 L_pitch_inter4_1[UP_SAMP * L_INTERPOL1 + 1] = /* Q31 */
+{
+ 1932735283, 1758701061, 1298905484, 711630983, 180298432, -162768528,
+ -280712608, -226956816, -100446400, 9592809, 59676424, 55065776,
+ 26996016, 4138201, -3373696, -1617055, 0
+};
+/* 1/4 resolution interpolation filter (-3 dB at 0.791*fs/2) */
+const Word16 pitch_inter4_1[UP_SAMP * L_INTERPOL1 + 1] =
+{
+ 29491/*0.900000F Q15*/,
+ 26836/*0.818959F Q15*/, 19820/* 0.604850F Q15*/, 10859/* 0.331379F Q15*/, 2751/* 0.083958F Q15*/,
+ -2484/*-0.075795F Q15*/, -4283/* -0.130717F Q15*/, -3463/*-0.105685F Q15*/, -1533/*-0.046774F Q15*/,
+ 146/*0.004467F Q15*/, 911/* 0.027789F Q15*/, 840/* 0.025642F Q15*/, 412/* 0.012571F Q15*/,
+ 63/*0.001927F Q15*/, -51/* -0.001571F Q15*/, -25/*-0.000753F Q15*/, 0/* 0.000000f Q15*/
+};
+
+/*----------------------------------------------------------------------------------*
+ * 1/6 resolution interpolation filter (-3 dB at 0.95*fs/2)
+ *----------------------------------------------------------------------------------*/
+
+/* 1/6 resolution interpolation filter (-3 dB at 0.95*fs/2) */
+const Word16 pitch_inter6_2[PIT_FIR_SIZE6_2] =
+{
+ 31129/*0.949986374119862f Q15*/,
+ 29854/*0.911081104469830f Q15*/,
+ 26218/*0.800115099292852f Q15*/,
+ 20753/*0.633320673120883f Q15*/,
+ 14240/*0.434558462154083f Q15*/,
+ 7575/*0.231177017786780f Q15*/,
+ 1618/*0.049378173063717f Q15*/,
+ -2950/*-0.090039611811170f Q15*/,
+ -5727/*-0.174782560924477f Q15*/,
+ -6635/*-0.202477516286360f Q15*/,
+ -5905/*-0.180218293244902f Q15*/,
+ -4012/*-0.122429229978978f Q15*/,
+ -1558/*-0.047552067127379f Q15*/,
+ 843/*0.025733669494145f Q15*/,
+ 2687/*0.081995376731897f Q15*/,
+ 3656/*0.111581381838187f Q15*/,
+ 3663/*0.111781798292302f Q15*/,
+ 2834/*0.086499988914996f Q15*/,
+ 1462/*0.044629684447068f Q15*/,
+ -79/*-0.002416435594242f Q15*/,
+ -1423/*-0.043440027386915f Q15*/,
+ -2289/*-0.069857782812169f Q15*/,
+ -2533/*-0.077293683967992f Q15*/,
+ -2166/*-0.066098268486336f Q15*/,
+ -1336/*-0.040782649068098f Q15*/,
+ -282/*-0.008590773415008f Q15*/,
+ 734/*0.022397654632128f Q15*/,
+ 1480/*0.045171360007974f Q15*/,
+ 1811/*0.055274128677739f Q15*/,
+ 1690/*0.051578034020076f Q15*/,
+ 1187/*0.036232016917169f Q15*/,
+ 454/*0.013869500422767f Q15*/,
+ -317/*-0.009680698856947f Q15*/,
+ -945/*-0.028843394410080f Q15*/,
+ -1296/*-0.039560663181280f Q15*/,
+ -1314/*-0.040095747151623f Q15*/,
+ -1023/*-0.031231107680685f Q15*/,
+ -520/*-0.015866154815425f Q15*/,
+ 60/*0.001841532922707f Q15*/,
+ 575/*0.017553701334759f Q15*/,
+ 910/*0.027778555138199f Q15*/,
+ 1003/*0.030612329573745f Q15*/,
+ 853/*0.026046143652186f Q15*/,
+ 518/*0.015803012695681f Q15*/,
+ 91/*0.002782973481834f Q15*/,
+ -319/*-0.009720124055079f Q15*/,
+ -617/*-0.018826488463900f Q15*/,
+ -744/*-0.022710487805852f Q15*/,
+ -686/*-0.020936374578238f Q15*/,
+ -473/*-0.014436620433404f Q15*/,
+ -169/*-0.005169079181373f Q15*/,
+ 145/*0.004437651243491f Q15*/,
+ 397/*0.012100372954920f Q15*/,
+ 531/*0.016207075406240f Q15*/,
+ 529/*0.016135389123271f Q15*/,
+ 403/*0.012306629559665f Q15*/,
+ 196/*0.005986734945567f Q15*/,
+ -36/*-0.001094950878591f Q15*/,
+ -236/*-0.007200842219958f Q15*/,
+ -360/*-0.010998212848124f Q15*/,
+ -388/*-0.011835179448280f Q15*/,
+ -322/*-0.009826566540474f Q15*/,
+ -188/*-0.005747665080695f Q15*/,
+ -26/*-0.000780600030751f Q15*/,
+ 125/*0.003810613287985f Q15*/,
+ 229/*0.006990479233404f Q15*/,
+ 268/*0.008174249796791f Q15*/,
+ 240/*0.007317375965949f Q15*/,
+ 159/*0.004864690818765f Q15*/,
+ 52/*0.001587005259212f Q15*/,
+ -54/*-0.001642504305841f Q15*/,
+ -133/*-0.004070609517416f Q15*/,
+ -171/*-0.005230670504649f Q15*/,
+ -164/*-0.005019147682711f Q15*/,
+ -120/*-0.003673879223241f Q15*/,
+ -55/*-0.001671460853812f Q15*/,
+ 14/*0.000420750005150f Q15*/,
+ 69/*0.002095384947391f Q15*/,
+ 99/*0.003020513665060f Q15*/,
+ 101/*0.003095468528243f Q15*/,
+ 80/*0.002441025550729f Q15*/,
+ 44/*0.001335514431569f Q15*/,
+ 4/*0.000120805384516f Q15*/,
+ -29/*-0.000893340757369f Q15*/,
+ -49/*-0.001501610712267f Q15*/,
+ -54/*-0.001636887611783f Q15*/,
+ -45/*-0.001362571776250f Q15*/,
+ -27/*-0.000832126175863f Q15*/,
+ -8/*-0.000232033375863f Q15*/,
+ 9/*0.000273627139471f Q15*/,
+ 19/*0.000582092683087f Q15*/,
+ 22/*0.000666445711949f Q15*/,
+ 19/*0.000566088888178f Q15*/,
+ 12/*0.000360374058147f Q15*/,
+ 4/*0.000136306914913f Q15*/,
+ -1/*-0.000038864994777f Q15*/,
+ -4/*-0.000132755824518f Q15*/,
+ -5/*-0.000148377158880f Q15*/,
+ -4/*-0.000112937171810f Q15*/,
+ -2/*-0.000061132514471f Q15*/,
+ -1/*-0.000019974224468f Q15*/,
+ 0/*-0.000000460344975f Q15*/,
+ 0/*0.000001976848453f Q15*/
+};
+
+
+/*----------------------------------------------------------------------------------*
+ * Low-pass FIR filter for low-frequency post-filtering @ 16kHz
+ * response : -6dB @ 50Hz, -3dB @ 500Hz, -6dB @ 6.4kHz)
+ * L_FILT=15 @ 16kHz (1+4x15=61 coef)
+ * L_FILT=12 @ 12.8kHz (1+5x12=61 coef)
+ * filter parameters: fs/2=32000, fc=6400, gain=5.0, n=61
+ *----------------------------------------------------------------------------------*/
+
+const Word16 filter_LP12_180H_fx[] = /* Sincfilt.m: N=180*2+1, Fmin=0, Fmax=1/12, hann( N )' */
+{//Q14
+ 16384, 16196, 15641, 14741, 13533, 12067,
+ 10402, 8604, 6742, 4887, 3105, 1459,
+ 0, -1230, -2202, -2900, -3322, -3478,
+ -3392, -3095, -2628, -2037, -1371, -676,
+ 0, 618, 1143, 1550, 1822, 1954,
+ 1946, 1811, 1565, 1233, 842, 421,
+ 0, -394, -736, -1008, -1196, -1294,
+ -1299, -1217, -1059, -839, -576, -290,
+ 0, 274, 514, 707, 842, 913,
+ 920, 865, 755, 600, 413, 208,
+ 0, -197, -371, -511, -609, -662,
+ -667, -627, -548, -436, -300, -151,
+ 0, 143, 270, 371, 443, 481,
+ 485, 456, 398, 316, 217, 109,
+ 0, -104, -195, -268, -319, -346,
+ -348, -326, -284, -225, -155, -78,
+ 0, 73, 137, 189, 224, 242,
+ 243, 227, 198, 156, 107, 54,
+ 0, -50, -94, -128, -151, -163,
+ -163, -152, -131, -103, -70, -35,
+ 0, 32, 60, 82, 96, 103,
+ 102, 95, 81, 64, 43, 21,
+ 0, -19, -36, -48, -56, -59,
+ -58, -53, -45, -35, -23, -11,
+ 0, 10, 18, 24, 28, 29,
+ 28, 25, 21, 16, 10, 5,
+ 0, -4, -7, -9, -10, -10,
+ -9, -8, -6, -5, -3, -1,
+ 0, 1, 1, 2, 2, 1,
+ 1, 1, 0, 0, 0, 0,
+ 0
+};
+const Word16 filter_LP12_180H_13b_fx[] = /*Q13 Sincfilt.m: N=180*2+1, Fmin=0, Fmax=1/12, hann( N )*/
+{//Q13
+ 8192, 8098, 7820, 7370, 6766, 6033,
+ 5201, 4302, 3371, 2443, 1553, 729,
+ 0, -615, -1101, -1450, -1661, -1739,
+ -1696, -1547, -1314, -1019, -685, -338,
+ 0, 309, 571, 775, 911, 977,
+ 973, 905, 783, 616, 421, 210,
+ 0, -197, -368, -504, -598, -647,
+ -649, -608, -529, -420, -288, -145,
+ 0, 137, 257, 353, 421, 457,
+ 460, 432, 377, 300, 206, 104,
+ 0, -99, -185, -255, -305, -331,
+ -333, -314, -274, -218, -150, -76,
+ 0, 72, 135, 186, 221, 240,
+ 242, 228, 199, 158, 109, 55,
+ 0, -52, -97, -134, -159, -173,
+ -174, -163, -142, -113, -77, -39,
+ 0, 37, 69, 94, 112, 121,
+ 121, 114, 99, 78, 53, 27,
+ 0, -25, -47, -64, -76, -81,
+ -81, -76, -66, -52, -35, -18,
+ 0, 16, 30, 41, 48, 52,
+ 51, 47, 41, 32, 21, 11,
+ 0, -10, -18, -24, -28, -30,
+ -29, -27, -23, -17, -12, -6,
+ 0, 5, 9, 12, 14, 14,
+ 14, 13, 10, 8, 5, 2,
+ 0, -2, -4, -5, -5, -5,
+ -5, -4, -3, -2, -1, -1,
+ 0, 0, 1, 1, 1, 1,
+ 0, 0, 0, 0, 0, 0,
+ 0
+};
+
+const Word16 filter_LP15_180H_fx[] = /* Sincfilt.m: N=180*2+1, Fmin=0, Fmax=1/15, hann( N )' */
+{//Q14
+ 16384, 16263, 15904, 15317, 14516, 13524,
+ 12366, 11073, 9678, 8216, 6723, 5236,
+ 3790, 2416, 1144, 0, -997, -1831,
+ -2492, -2976, -3285, -3425, -3408, -3248,
+ -2966, -2583, -2123, -1610, -1070, -526,
+ 0, 487, 919, 1281, 1564, 1761,
+ 1869, 1891, 1830, 1695, 1496, 1244,
+ 954, 641, 318, 0, -300, -569,
+ -799, -982, -1113, -1188, -1209, -1176,
+ -1094, -969, -809, -623, -420, -209,
+ 0, 198, 377, 531, 653, 741,
+ 793, 807, 786, 732, 649, 543,
+ 418, 282, 140, 0, -133, -253,
+ -356, -438, -497, -531, -540, -526,
+ -489, -433, -362, -278, -187, -93,
+ 0, 88, 167, 234, 288, 325,
+ 347, 352, 342, 317, 280, 233,
+ 179, 120, 59, 0, -56, -105,
+ -147, -180, -203, -215, -217, -210,
+ -194, -170, -141, -107, -72, -35,
+ 0, 33, 61, 85, 103, 116,
+ 122, 122, 117, 107, 93, 76,
+ 58, 38, 19, 0, -17, -31,
+ -43, -51, -57, -59, -58, -55,
+ -49, -42, -34, -25, -16, -8,
+ 0, 7, 12, 16, 19, 20,
+ 21, 20, 18, 16, 13, 10,
+ 7, 4, 2, 0, -1, -2,
+ -3, -3, -3, -3, -2, -2,
+ -1, -1, 0, 0, 0, 0,
+ 0
+};
+
+const Word16 filter_LP15_180H_13b_fx[6 * 31] = /*Q13 Sincfilt.m: N=180*2+1, Fmin=0, Fmax=1/12, hann( N )'*/
+{//Q13
+ 8192, 8132, 7952, 7658, 7258, 6762,
+ 6183, 5536, 4839, 4108, 3362, 2618,
+ 1895, 1208, 572, 0, -498, -915,
+ -1246, -1488, -1643, -1713, -1704, -1624,
+ -1483, -1291, -1061, -805, -535, -263,
+ 0, 244, 459, 640, 782, 880,
+ 935, 945, 915, 848, 748, 622,
+ 477, 320, 159, 0, -150, -285,
+ -400, -491, -556, -594, -604, -588,
+ -547, -485, -405, -312, -210, -104,
+ 0, 99, 189, 265, 327, 371,
+ 396, 404, 393, 366, 325, 271,
+ 209, 141, 70, 0, -66, -127,
+ -178, -219, -248, -266, -270, -263,
+ -245, -217, -181, -139, -94, -46,
+ 0, 44, 83, 117, 144, 163,
+ 173, 176, 171, 158, 140, 116,
+ 89, 60, 30, 0, -28, -53,
+ -74, -90, -101, -108, -109, -105,
+ -97, -85, -70, -54, -36, -18,
+ 0, 16, 31, 43, 52, 58,
+ 61, 61, 58, 53, 47, 38,
+ 29, 19, 9, 0, -8, -16,
+ -21, -26, -28, -29, -29, -27,
+ -25, -21, -17, -13, -8, -4,
+ 0, 3, 6, 8, 10, 10,
+ 10, 10, 9, 8, 6, 5,
+ 3, 2, 1, 0, -1, -1,
+ -1, -2, -2, -1, -1, -1,
+ -1, 0, 0, 0, 0, 0,
+ 0
+};
+
+const Word16 filter_LP24_90H_fx[] =
+{//Q14
+
+ 10240, 10208, 10111, 9951, 9731,
+ 9452, 9119, 8734, 8304, 7834,
+ 7328, 6794, 6237, 5664, 5081,
+ 4495, 3913, 3339, 2780, 2241,
+ 1727, 1242, 791, 376, 0,
+ -335, -629, -880, -1089, -1256,
+ -1383, -1471, -1523, -1540, -1527,
+ -1487, -1422, -1337, -1235, -1119,
+ -994, -862, -727, -592, -460,
+ -333, -212, -101, 0, 90,
+ 167, 232, 285, 325, 354,
+ 371, 378, 376, 366, 349,
+ 326, 299, 269, 236, 203,
+ 171, 139, 109, 81, 56,
+ 34, 15, 0, -12, -21,
+ -27, -30, -31, -31, -29,
+ -26, -22, -18, -14, -10,
+ -7, -4, -2, -1, 0,
+ 0, 0, 0, 0, 0,
+ 0,
+ 0
+
+};
+
+const Word16 filter_LP24_90H_13b_fx[] =
+{//Q13
+
+ 5120, 5104, 5056, 4976, 4865,
+ 4726, 4559, 4367, 4152, 3917,
+ 3664, 3397, 3119, 2832, 2541,
+ 2248, 1956, 1669, 1390, 1120,
+ 863, 621, 396, 188, 0,
+ -168, -315, -440, -545, -628,
+ -691, -735, -761, -770, -764,
+ -743, -711, -668, -617, -560,
+ -497, -431, -364, -296, -230,
+ -166, -106, -51, 0, 45,
+ 84, 116, 143, 163, 177,
+ 186, 189, 188, 183, 174,
+ 163, 149, 134, 118, 102,
+ 85, 69, 54, 40, 28,
+ 17, 8, 0, -6, -10,
+ -13, -15, -16, -15, -14,
+ -13, -11, -9, -7, -5,
+ -3, -2, -1, 0, 0,
+ 0, 0, 0, 0, 0,
+ 0,
+ 0
+};
+
+const Word16 filter_LP3_90H_fx[] = /* Sincfilt.m: N=90*2+1, Fmin=0, Fmax=1/3, hann( N )' */
+{//Q14
+ 16384, 13545, 6766, 0, -3371, -2689,
+ 0, 1907, 1661, 0, -1314, -1187,
+ 0, 990, 911, 0, -783, -729,
+ 0, 638, 598, 0, -529, -499,
+ 0, 445, 421, 0, -377, -357,
+ 0, 321, 305, 0, -274, -260,
+ 0, 234, 221, 0, -199, -188,
+ 0, 169, 159, 0, -142, -134,
+ 0, 119, 112, 0, -99, -93,
+ 0, 81, 76, 0, -66, -61,
+ 0, 52, 48, 0, -41, -37,
+ 0, 31, 28, 0, -23, -20,
+ 0, 16, 14, 0, -10, -9,
+ 0, 6, 5, 0, -3, -2,
+ 0, 1, 1, 0, 0, 0,
+ 0
+};
+
+const Word16 filter_LP15_360H_13b_fx[] = /* Sincfilt.m: N=360*2+1, Fmin=0, Fmax=1/15, hann( N )' */
+{//Q13
+
+ 8192, 8132, 7954, 7662, 7265, 6772, 6196, 5552,
+ 4857, 4127, 3381, 2636, 1911, 1220, 579, 0,
+ -506, -931, -1269, -1519, -1681, -1757, -1752, -1674,
+ -1533, -1339, -1104, -840, -560, -276, 0, 258,
+ 488, 682, 836, 946, 1008, 1024, 996, 927,
+ 821, 687, 529, 357, 178, 0, -170, -325,
+ -458, -567, -646, -694, -710, -696, -652, -581,
+ -489, -379, -257, -129, 0, 124, 238, 338,
+ 420, 481, 518, 533, 523, 492, 440, 372,
+ 289, 197, 99, 0, -96, -184, -262, -326,
+ -374, -405, -417, -410, -386, -346, -293, -228,
+ -156, -78, 0, 76, 147, 209, 260, 299,
+ 324, 334, 329, 310, 279, 236, 184, 125,
+ 63, 0, -62, -119, -169, -211, -243, -263,
+ -271, -268, -252, -227, -192, -150, -102, -52,
+ 0, 50, 97, 138, 173, 198, 215, 222,
+ 219, 207, 186, 157, 123, 84, 42, 0,
+ -41, -80, -113, -142, -163, -176, -182, -180,
+ -170, -152, -129, -101, -69, -35, 0, 34,
+ 65, 93, 116, 133, 144, 149, 147, 139,
+ 125, 106, 82, 56, 28, 0, -28, -53,
+ -76, -95, -109, -118, -121, -120, -113, -101,
+ -86, -67, -46, -23, 0, 22, 43, 61,
+ 77, 88, 95, 98, 97, 91, 82, 69,
+ 54, 37, 19, 0, -18, -35, -49, -61,
+ -70, -76, -78, -77, -73, -65, -55, -43,
+ -29, -15, 0, 14, 27, 39, 48, 55,
+ 60, 62, 61, 57, 51, 43, 33, 23,
+ 11, 0, -11, -21, -30, -37, -43, -46,
+ -48, -47, -44, -39, -33, -26, -17, -9,
+ 0, 8, 16, 23, 28, 32, 35, 36,
+ 35, 33, 29, 25, 19, 13, 6, 0,
+ -6, -12, -17, -21, -24, -25, -26, -25,
+ -24, -21, -18, -14, -9, -5, 0, 4,
+ 8, 12, 14, 16, 18, 18, 17, 16,
+ 14, 12, 9, 6, 3, 0, -3, -6,
+ -8, -10, -11, -11, -12, -11, -10, -9,
+ -8, -6, -4, -2, 0, 2, 3, 5,
+ 6, 6, 7, 7, 7, 6, 5, 4,
+ 3, 2, 1, 0, -1, -2, -3, -3,
+ -3, -3, -3, -3, -3, -3, -2, -2,
+ -1, 0, 0, 0, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0
+
+};
+
+static const Word16 filter_LP30_300K_fx[LFE_PLC_FDEL + 1] =
+{//Q14
+16395,16364,16273,16123,15913,15646,15323,14947,14520,14045,13524,12963,12363,11730,11067,10379,9669,
+8943,8205,7460,6712,5965,5225,4495,3779,3082,2408,1759,1140,552,0,-515,-991,-1426,-1819,-2169,-2475,
+-2736,-2953,-3126,-3257,-3345,-3392,-3400,-3371,-3307,-3210,-3083,-2928,-2749,-2547,-2327,-2091,-1842,
+-1584,-1319,-1051,-782,-515,-254,0,244,476,695,897,1083,1249,1397,1523,1628,1712,1774,1815,1834,1833,
+1811,1771,1712,1637,1546,1442,1325,1197,1060,916,767,614,459,304,150,0,-145,-285,-417,-541,-655,-758,
+-850,-930,-997,-1051,-1092,-1119,-1134,-1136,-1125,-1102,-1068,-1023,-968,-904,-832,-753,-668,-578,
+-484,-388,-290,-192,-95,0,92,181,266,345,418,484,543,594,638,672,699,717,727,728,721,707,685,656,621,580,
+534,483,428,371,311,249,186,123,61,0,-59,-116,-170,-220,-267,-309,-347,-379,-407,-429,-445,-456,-462,-463,
+-458,-448,-434,-416,-393,-367,-337,-305,-270,-233,-195,-156,-117,-77,-38,0,37,72,106,137,166,192,215,234,251,
+264,274,280,283,283,280,274,264,253,238,222,204,184,162,140,117,93,69,46,22,0,-21,-42,-62,-80,-97,-112,-125,-136,
+-146,-153,-158,-161,-163,-162,-160,-156,-150,-143,-135,-125,-114,-103,-91,-78,-65,-51,-38,-25,-12,0,11,23,33,43,
+52,59,66,72,76,80,82,84,84,83,82,79,76,72,67,62,57,51,44,38,31,25,18,12,5,0,-5,-10,-15,-19,-23,-27,-29,-32,-34,
+-35,-36,-36,-36,-35,-34,-33,-31,-29,-27,-24,-22,-19,-17,-14,-11,-9,-6,-4,-2,0
+
+};
+
+const Resampling_cfg resampling_cfg_tbl[] =
+{
+ /* fin fout up.fact. den.fac. len.out filter coefs. filter length/2 filter mem./2 flags */
+ { 8000, 12800, 8, 5, 256, /*filter5_39s320_120,*/ filter5_39s320_120_fx, 15, RS_INV_FAC },
+ { 12800, 8000, 5, 8, 160, /*filter5_39s320_120,*/ filter5_39s320_120_fx, L_FILT_UP8k, RS_INV_FAC },
+ { 16000, 8000, 6, 12, 160, /*filter_LP12_180H,*/ filter_LP12_180H_fx, 180 / 6, 0 },
+ { 12800, 16000, 15, 12, 320, /*filter_LP15_180H,*/ filter_LP15_180H_fx, L_FILT_UP16k, 0 },
+ { 12800, 32000, 15, 6, 640, /*filter_LP15_180H,*/ filter_LP15_180H_fx, L_FILT_UP32k, 0 },
+ { 12800, 48000, 15, 4, 960, /*filter_LP15_180H,*/ filter_LP15_180H_fx, L_FILT_UP48k, 0 },
+
+ { 16000, 12800, 12, 15, 256, /*filter_LP15_180H,*/ filter_LP15_180H_fx, L_FILT16k, 0, },
+ { 16000, 32000, 12, 6, 640, /*filter_LP12_180H, */ filter_LP12_180H_fx, L_FILT16k, 0, },
+ { 16000, 48000, 12, 4, 960, /*filter_LP12_180H,*/ filter_LP12_180H_fx, L_FILT16k, 0, },
+
+ { 32000, 12800, 6, 15, 256, /*filter_LP15_180H,*/ filter_LP15_180H_13b_fx, L_FILT32k, 0, },
+ { 32000, 16000, 6, 12, 320, /*filter_LP12_180H,*/ filter_LP12_180H_13b_fx, L_FILT32k, 0, },
+ { 32000, 25600, 12, 15, 512, /*filter_LP15_360H,*/ filter_LP15_360H_13b_fx, L_FILT32k, 0, },
+ { 32000, 48000, 3, 2, 960, /*filter_LP3_90H,*/ filter_LP3_90H_fx, L_FILT32k, 0, },
+
+ { 48000, 12800, 4, 15, 256, /*filter_LP15_180H,*/ filter_LP15_180H_13b_fx, L_FILT48k, 0, },
+ { 48000, 16000, 4, 12, 320, /*filter_LP12_180H,*/ filter_LP12_180H_13b_fx, L_FILT48k, 0, },
+ { 48000, 25600, 8, 15, 512, /*filter_LP15_360H,*/ filter_LP15_360H_13b_fx, L_FILT48k, 0, },
+ { 48000, 32000, 2, 3, 640, /*filter_LP3_90H,*/ filter_LP3_90H_fx, L_FILT48k, 0, },
+
+ /* configs with NB 4kHz low-pass */
+ { 16000, 12800, 12, 15, 256, /*filter_LP24_90H,*/ filter_LP24_90H_fx, L_FILT16k, 0, },
+ { 32000, 12800, 6, 15, 256, /*filter_LP24_90H,*/ filter_LP24_90H_13b_fx, L_FILT32k, 0, },
+ { 48000, 12800, 4, 15, 256, /*filter_LP24_90H,*/ filter_LP24_90H_13b_fx, L_FILT48k, 0, },
+
+ /* entry for LFE PLC */
+ { 1600, 48000, 30, 1, 960, /*filter_LP30_300K,*/ filter_LP30_300K_fx, LFE_PLC_FDEL / 30, 0, },
+ { 0, 0, 0, 0, 0, /* 0, */ 0, 0, 0, } /* trailing entry (just to calculate the length of this table) */
+};
+
+//den fac value for last entry is calculated as den.fac = (num.fac*fin)/fout
+//lg_out value for last entry is calculated as = fout/50 = ((fin/50)*num.fac)/den.fac
+//filter_LP30_300K_fx has been calculated with Q14
+
+/*----------------------------------------------------------------------------------*
+ * LSP interpolation coefficients
+ *----------------------------------------------------------------------------------*/
+
+
+const Word16 interpol_frac2_fx[NB_SUBFR] = {//Q15
+ 16384, 16384, 32767, 32767
+};
+
+const Word16 interpol_frac2_mid_fx[NB_SUBFR * 3] = {//Q15
+ 8191, 24575, 0,
+ 8191, 24575, 0,
+ 0, 8191, 24575,
+ 0, 8191, 24575
+};/*Q15*/
+
+
+const Word16 interpol_frac_12k8_fx[NB_SUBFR] = {//Q15
+ 8191, 16383, 24575, 32767
+};
+
+const Word16 interpol_frac_fx[NB_SUBFR] = { 8192, 16384, 24576,32767 };/*Q15*/
+
+const Word16 interpol_isp_amr_wb_fx[] = { 14746, 26214, 31457, 32767 };/*Q15*/
+
+const Word16 interpol_frac_16k_fx[NB_SUBFR16k] = { 6554, 13107, 19661, 26214, 32767 };//Q15
+
+const Word16 interpol_frac_mid_fx[NB_SUBFR * 3] = { 16384, 16384, 0,//Q15
+ 0, 32767, 0,
+ 0, 16384, 16384,
+ 0, 0, 32767
+};/*Q15*/
+
+const Word16 interpol_frac_mid_16k_fx[NB_SUBFR16k * 3] = { 18022, 14746, 0,//Q15
+ 4915, 27853, 0,
+ 0, 24576, 8192,
+ 0, 11469, 21299,
+ 0, 0, 32767
+};
+
+const Word16 interpol_frac_mid_relaxprev_12k8_fx[NB_SUBFR * 3] = { 0, 22938, 9830,//Q15
+ 0, 0, 32767,
+ 0, 0, 32767,
+ 0, 0, 32767
+};/*Q15*/
+
+const Word16 interpol_frac_mid_FEC_fx[NB_SUBFR * 3] = { 8192, 18022, 6554,//Q15
+ 0, 22938, 9830,
+ 0, 14746, 18022,
+ 0, 0, 32767
+};/*Q15*/
+
+const Word16 interpol_frac_mid_relaxprev_pred_12k8_fx[NB_SUBFR * 3] = { 4915, 22938, 4915,//Q15
+ 1638, 21299, 9830,
+ 0, 16384, 16384,
+ 0, 0, 32767
+};
+
+const Word16 interpol_frac_mid_relaxprev_16k_fx[NB_SUBFR16k * 3] = { 0, 22938, 9830,//Q15
+ 0, 0, 32767,
+ 0, 0, 32767,
+ 0, 0, 32767,
+ 0, 0, 32767
+};/*Q15*/
+
+const Word16 interpol_frac_mid_16k_FEC_fx[NB_SUBFR16k * 3] = { 13107, 13107, 6554,//Q15
+ 0, 26214, 6554,
+ 0, 21299, 11469,
+ 0, 4915, 27853,
+ 0, 0, 32767
+};/*Q15*/
+
+const Word16 interpol_frac_mid_relaxprev_pred_16k_fx[NB_SUBFR16k * 3] = { 4915, 22938, 4915,//Q15
+ 1638, 21299, 9830,
+ 0, 16384, 16384,
+ 0, 4915, 27853,
+ 0, 0, 32767
+};/*Q15*/
+
+/*----------------------------------------------------------------------------------*
+ * Innovative codebook
+ *----------------------------------------------------------------------------------*/
+
+/* Innovative codebook config */
+const PulseConfig PulseConfTable[] =
+{
+ /* Design rules:
+ * ---> "fixed" + "tried-pair-pos"*2 = pulses & 0xfe
+ * ---> tracks with pulses % 3 == 0, have always TRACKPOS_FIXED_FIRST */
+ /* bits,iter,alp,pulses,fixed,tried-pair-pos,codetrack */
+ { 7, 4, 16384/*2.0f Q13*/, 1, 0, {8}, TRACKPOS_FREE_ONE }, /* 7 bits, 1 pulses, 4 tracks, 1000 free track */
+ { 10, 4, 16384/*2.0f Q13*/, 2, 0, {8}, TRACKPOS_FIXED_EVEN }, /* 10 bits, 2 pulses, 4 tracks 1010 (used only even tracks designed for NB) */
+ { 12, 4, 16384/*2.0f Q13*/, 2, 0, {8}, TRACKPOS_FIXED_TWO }, /* 12 bits, 2 pulses, 2 tracks 11 used all tracks ala AMR-WB 6.6 */
+ { 15, 4, 16384/*2.0f Q13*/, 3, 0, {8}, TRACKPOS_FIXED_FIRST }, /* 15 bits, 3 pulses, 4 tracks 1110 fixed track to first ? */
+ { 17, 6, 16384/*2.0f Q13*/, 3, 0, {8}, TRACKPOS_FREE_THREE }, /* 17 bits, 3 pulses, 4 tracks (used all tracks) - 1110, 1101, 1011, 0111 */
+ { 20, 4, 16384/*2.0f Q13*/, 4, 0, {4, 8}, TRACKPOS_FIXED_FIRST }, /* 20 bits, 4 pulses, 4 tracks 1111 */
+ { 24, 4, 16384/*2.0f Q13*/, 5, 0, {4, 8}, TRACKPOS_FIXED_FIRST }, /* 24 bits, 5 pulses, 4 tracks 2111 fixed track to first */
+ { 26, 4, 16384/*2.0f Q13*/, 5, 0, {4, 8}, TRACKPOS_FREE_ONE }, /* 26 bits, 5 pulses, 4 tracks 2111 one free track ? */
+ { 28, 4, 12288/*1.5f Q13*/, 6, 0, {4, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 28 bits, 6 pulses, 4 tracks 2211 */
+ { 30, 4, 12288/*1.5f Q13*/, 6, 0, {4, 8, 8}, TRACKPOS_FIXED_TWO }, /* 30 bits, 6 pulses, 4 tracks 2211 free consecutive track positions ? */
+ { 32, 4, 12288/*1.5f Q13*/, 7, 0, {4, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 32 bits, 6 pulses, 4 tracks 2221 fixed ?*/
+ { 34, 4, 12288/*1.5f Q13*/, 7, 0, {4, 8, 8}, TRACKPOS_FREE_THREE }, /* 34 bits, 6 pulses, 4 tracks 2221 free track positions ? */
+ { 36, 4, 8192/*1.0f Q13*/, 8, 2, {4, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 36 bits, 8 pulses, 4 tracks 2222 */
+ { 40, 4, 8192/*1.0f Q13*/, 9, 2, {4, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 40 bits, 9 pulses, 4 tracks 3222 fixed ?*/
+ { 43, 4, 8192/*1.0f Q13*/, 10, 2, {4, 6, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 44 bits, 10 pulses, 4 tracks 3322 */
+ { 46, 4, 8192/*1.0f Q13*/, 10, 2, {4, 6, 8, 8}, TRACKPOS_FIXED_TWO }, /* 46 bits, 10 pulses, 4 tracks 3322 free consecutive tracks ? */
+ { 47, 4, 8192/*1.0f Q13*/, 11, 2, {4, 6, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 47 bits, 10 pulses, 4 tracks 3332 fixed ? */
+ { 49, 4, 8192/*1.0f Q13*/, 11, 2, {4, 6, 8, 8}, TRACKPOS_FREE_THREE }, /* 49 bits, 10 pulses, 4 tracks 3332 free three track positions ? */
+ { 50, 4, 8192/*1.0f Q13*/, 12, 4, {4, 6, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 50 bits, 12 pulses, 4 tracks 3333 */
+ { 53, 4, 8192/*1.0f Q13*/, 13, 4, {4, 6, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 53 bits, 13 pulses, 4 tracks 4333 fixed ? */
+ { 55, 4, 8192/*1.0f Q13*/, 13, 4, {4, 6, 8, 8}, TRACKPOS_FREE_ONE }, /* 55 bits, 13 pulses, 4 tracks 4333 free one ? */
+ { 56, 4, 8192/*1.0f Q13*/, 14, 4, {4, 6, 6, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 56 bits, 14 pulses, 4 tracks 4433 fixed ?!?! */
+ { 58, 4, 8192/*1.0f Q13*/, 14, 4, {4, 6, 6, 8, 8}, TRACKPOS_FIXED_TWO }, /* 58 bits, 14 pulses, 4 tracks 4433 free consecutive ? */
+ { 59, 4, 8192/*1.0f Q13*/, 15, 4, {4, 6, 6, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 59 bits, 15 pulses, 4 tracks 4443 fixed ? */
+ { 61, 4, 8192/*1.0f Q13*/, 15, 4, {4, 6, 6, 8, 8}, TRACKPOS_FREE_THREE }, /* 61 bits, 15 pulses, 4 tracks 4443 free ? */
+ { 62, 3, 6554/*0.8f Q13*/, 16, 4, {4, 4, 6, 6, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 62 bits, 16 pulses, 4 tracks 4444 */
+ { 65, 3, 6554/*0.8f Q13*/, 17, 4, {4, 4, 6, 6, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 65 bits, 17 pulses, 4 tracks 5444 fixed ?*/
+ { 68, 3, 6144/*0.75f Q13*/, 18, 4, {2, 3, 4, 5, 6, 7, 8}, TRACKPOS_FIXED_FIRST }, /* 68 bits, 18 pulses, 4 tracks 5544 */
+ { 70, 3, 6144/*0.75f Q13*/, 19, 4, {2, 3, 4, 5, 6, 7, 8}, TRACKPOS_FIXED_FIRST }, /* 70 bits, 19 pulses, 4 tracks 5554 fixed ? */
+ { 73, 3, 6144/*0.75f Q13*/, 20, 4, {2, 3, 4, 5, 6, 7, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 73 bits, 20 pulses, 4 tracks 5555 fixed ? */
+ { 75, 3, 6144/*0.75f Q13*/, 21, 4, {2, 3, 4, 5, 6, 7, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 75 bits, 21 pulses, 4 tracks 6555 fixed ? */
+ { 78, 3, 6144/*0.75f Q13*/, 22, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 78 bits, 22 pulses, 4 tracks 6655 fixed ? */
+ { 80, 3, 6144/*0.75f Q13*/, 23, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8}, TRACKPOS_FIXED_FIRST }, /* 80 bits, 23 pulses, 4 tracks 6665 fixed ? */
+ { 83, 2, 2458/*0.30f Q13*/, 24, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8, 8}, TRACKPOS_FIXED_FIRST}, /* 83 bits, 24 pulses, 4 tracks 6666 */
+ { 85, 2, 2458/*0.30f Q13*/, 25, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8, 8}, TRACKPOS_FIXED_FIRST}, /* 85 bits, 25 pulses, 4 tracks 7666 */
+ { 87, 2, 2048/*0.25f Q13*/, 26, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8, 8, 8}, TRACKPOS_FIXED_FIRST}, /* 87 bits, 26 pulses, 4 tracks 7766 */
+ { 89, 2, 2048/*0.25f Q13*/, 27, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8, 8, 8}, TRACKPOS_FIXED_FIRST}, /* 89 bits, 27 pulses, 4 tracks 7776 */
+ { 92, 2, 2048/*0.25f Q13*/, 28, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8, 8, 8, 8}, TRACKPOS_FIXED_FIRST}, /* 92 bits, 28 pulses, 4 tracks 7777 */
+ { 94, 2, 2048/*0.25f Q13*/, 29, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8, 8, 8, 8}, TRACKPOS_FIXED_FIRST}, /* 94 bits, 29 pulses, 4 tracks 8777 */
+ { 96, 1, 1638/*0.20f Q13*/, 30, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8, 8, 8, 8, 8}, TRACKPOS_FIXED_FIRST}, /* 96 bits, 30 pulses, 4 tracks 8877 */
+ { 98, 1, 1638/*0.20f Q13*/, 31, 4, {2, 3, 4, 5, 6, 7, 8, 8, 8, 8, 8, 8, 8}, TRACKPOS_FIXED_FIRST}, /* 98 bits, 31 pulses, 4 tracks 8887 */
+};
+
+
+/* Number of pulses & positions to the number of unique states that can be achieved with those pulses */
+const UWord32 pulsestostates[17][9] =
+{
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ { 2, 2, 2, 2, 2, 2, 2, 2, 2},
+ { 4, 8, 12, 16, 20, 24, 28, 32, 36},
+ { 6, 18, 38, 66, 102, 146, 198, 258, 326},
+ { 8, 32, 88, 192, 360, 608, 952, 1408, 1992},
+ { 10, 50, 170, 450, 1002, 1970, 3530, 5890, 9290},
+ { 12, 72, 292, 912, 2364, 5336, 10836, 20256, 35436},
+ { 14, 98, 462, 1666, 4942, 12642, 28814, 59906, 115598},
+ { 16, 128, 688, 2816, 9424, 27008, 68464, 157184, 332688},
+ { 18, 162, 978, 4482, 16722, 53154, 148626, 374274, 864146},
+ { 20, 200, 1340, 6800, 28004, 97880, 299660, 822560, 2060980},
+ { 22, 242, 1782, 9922, 44726, 170610, 568150, 1690370, 4573910},
+ { 24, 288, 2312, 14016, 68664, 284000, 1022760, 3281280, 9545560},
+ { 26, 338, 2938, 19266, 101946, 454610, 1761370, 6065410, 18892250},
+ { 28, 392, 3668, 25872, 147084, 703640, 2919620, 10746400, 35704060},
+ { 30, 450, 4510, 34050, 207006, 1057730, 4680990, 18347010, 64797470},
+ { 32, 512, 5472, 44032, 285088, 1549824, 7288544, 30316544, 113461024},
+};
+
+/*----------------------------------------------------------------------------------*
+ * Gain quantization table for memory-less gain quantizer
+ *----------------------------------------------------------------------------------*/
+
+const Word16 gain_qua_mless_7b_fx[128*2] =
+{//Q14
+ 419, 28,
+ 1499, 607,
+ 1586, 322,
+ 1632, 144,
+ 1686, 229,
+ 1745, 495,
+ 2182, 409,
+ 2515, 716,
+ 2772, 824,
+ 3069, 1069,
+ 3211, 936,
+ 3218, 89,
+ 3477, 1244,
+ 3755, 272,
+ 3865, 549,
+ 3881, 348,
+ 4171, 181,
+ 4414, 627,
+ 4419, 472,
+ 4909, 1429,
+ 5238, 404,
+ 5241, 1651,
+ 5721, 85,
+ 5833, 250,
+ 5846, 693,
+ 5897, 325,
+ 6036, 544,
+ 6088, 779,
+ 6459, 1889,
+ 6650, 157,
+ 6678, 462,
+ 6798, 879,
+ 6922, 993,
+ 6929, 1130,
+ 7352, 620,
+ 7461, 386,
+ 7864, 232,
+ 7999, 314,
+ 8136, 536,
+ 8398, 712,
+ 8680, 459,
+ 8797, 1276,
+ 9046, 806,
+ 9198, 86,
+ 9434, 398,
+ 9730, 587,
+ 9735, 267,
+ 9742, 175,
+ 9917, 917,
+ 10042, 509,
+ 10053, 655,
+ 10132, 1030,
+ 10238, 339,
+ 10694, 1560,
+ 10817, 447,
+ 10964, 723,
+ 11405, 1149,
+ 11526, 549,
+ 11582, 386,
+ 11602, 791,
+ 11618, 286,
+ 11883, 862,
+ 11954, 607,
+ 12057, 214,
+ 12104, 496,
+ 12170, 1397,
+ 12437, 668,
+ 12616, 335,
+ 12668, 952,
+ 12684, 435,
+ 12983, 112,
+ 13235, 742,
+ 13399, 549,
+ 13525, 380,
+ 13527, 270,
+ 13625, 1044,
+ 13733, 482,
+ 13820, 617,
+ 14036, 817,
+ 14041, 1257,
+ 14295, 425,
+ 14346, 684,
+ 14367, 319,
+ 14416, 199,
+ 14644, 898,
+ 14944, 518,
+ 15090, 364,
+ 15154, 578,
+ 15309, 462,
+ 15360, 1933,
+ 15362, 756,
+ 15381, 262,
+ 15566, 1127,
+ 15699, 639,
+ 15804, 410,
+ 16081, 316,
+ 16161, 993,
+ 16359, 701,
+ 16451, 828,
+ 16500, 543,
+ 16540, 491,
+ 16617, 1729,
+ 16630, 196,
+ 16749, 369,
+ 16959, 1530,
+ 17028, 442,
+ 17139, 603,
+ 17369, 898,
+ 17393, 268,
+ 17972, 763,
+ 17985, 1361,
+ 18016, 333,
+ 18032, 667,
+ 18234, 406,
+ 18270, 105,
+ 18299, 554,
+ 18342, 488,
+ 18747, 1207,
+ 19027, 1073,
+ 19530, 216,
+ 19566, 963,
+ 19751, 835,
+ 19794, 615,
+ 19810, 298,
+ 19988, 710,
+ 19990, 449,
+ 20005, 374,
+ 20149, 531,
+};
+
+const Word16 gain_qua_mless_6b_stereo_fx[64 * 2] =
+{//Q14
+ 570, 695,
+ 932, 535,
+ 972, 913,
+ 1305, 165,
+ 1503, 343,
+ 1942, 2102,
+ 2763, 440,
+ 2957, 1204,
+ 3163, 621,
+ 3232, 760,
+ 4215, 255,
+ 4415, 533,
+ 4884, 873,
+ 5395, 429,
+ 5601, 664,
+ 5724, 1615,
+ 6847, 1057,
+ 6849, 535,
+ 6889, 3303,
+ 7086, 335,
+ 7135, 766,
+ 8267, 616,
+ 8601, 907,
+ 8690, 442,
+ 9501, 1264,
+ 9517, 728,
+ 10050, 73,
+ 10243, 514,
+ 10723, 861,
+ 10884, 641,
+ 11005, 339,
+ 11919, 1623,
+ 11976, 1037,
+ 12219, 564,
+ 12286, 770,
+ 12858, 413,
+ 12944, 8191,
+ 13347, 684,
+ 13751, 502,
+ 13802, 873,
+ 13812, 1207,
+ 14417, 615,
+ 14633, 392,
+ 15119, 732,
+ 15214, 521,
+ 15247, 976,
+ 15509, 290,
+ 15936, 1440,
+ 16101, 603,
+ 16157, 448,
+ 16277, 799,
+ 16358, 2544,
+ 16863, 4652,
+ 17010, 1093,
+ 17073, 350,
+ 17348, 659,
+ 17583, 509,
+ 17853, 854,
+ 19087, 1756,
+ 19109, 405,
+ 19348, 727,
+ 19553, 566,
+ 19553, 1240,
+ 19659, 953
+};
+
+const Word16 gain_qua_mless_6b_fx[64 * 2] =
+{//Q14
+ 1676, 71,
+ 2128, 198,
+ 2318, 491,
+ 2348, 339,
+ 2798, 625,
+ 2893, 785,
+ 3911, 1099,
+ 4779, 244,
+ 4781, 427,
+ 5115, 935,
+ 5294, 1509,
+ 5767, 114,
+ 6018, 543,
+ 6152, 335,
+ 6205, 675,
+ 6234, 1822,
+ 6740, 1251,
+ 7034, 802,
+ 7782, 434,
+ 8005, 230,
+ 9232, 622,
+ 9337, 336,
+ 9388, 520,
+ 9770, 1038,
+ 9865, 734,
+ 10224, 879,
+ 10617, 118,
+ 10776, 426,
+ 11518, 249,
+ 11708, 1399,
+ 12044, 587,
+ 12270, 501,
+ 12277, 348,
+ 12498, 684,
+ 13020, 786,
+ 13097, 1196,
+ 13530, 422,
+ 13818, 917,
+ 14123, 290,
+ 14500, 1039,
+ 14538, 636,
+ 14636, 556,
+ 14667, 484,
+ 14931, 362,
+ 15055, 210,
+ 15653, 1594,
+ 15830, 1874,
+ 15868, 717,
+ 15897, 828,
+ 16153, 434,
+ 16540, 294,
+ 16874, 608,
+ 16936, 513,
+ 17182, 373,
+ 17644, 1337,
+ 17696, 126,
+ 18342, 1122,
+ 18461, 944,
+ 18991, 242,
+ 19114, 795,
+ 19187, 674,
+ 19256, 449,
+ 19485, 557,
+ 19515, 344,
+};
+
+const Word16 gain_qua_mless_5b_fx[32 * 2] =
+{//Q14
+ 2695, 109,
+ 3444, 271,
+ 3529, 433,
+ 4284, 801,
+ 4365, 607,
+ 4935, 1089,
+ 6896, 1407,
+ 7722, 324,
+ 7913, 146,
+ 8090, 468,
+ 9049, 913,
+ 9499, 600,
+ 9894, 741,
+ 9942, 1840,
+ 11906, 382,
+ 12008, 1103,
+ 12349, 243,
+ 12429, 501,
+ 13687, 630,
+ 13974, 896,
+ 14510, 748,
+ 15160, 322,
+ 15424, 428,
+ 15679, 541,
+ 15832, 1574,
+ 15999, 1281,
+ 17223, 211,
+ 17719, 1029,
+ 18185, 649,
+ 18432, 818,
+ 18638, 353,
+ 18889, 493,
+};
+
+const Word16 E_ROM_qua_gain5b_const[NB_QUA_GAIN5B * 2]=
+{//Q0
+ 1774,577,
+ 2090,1805,
+ 2103,3371,
+ 3908,1116,
+ 4834,2500,
+ 6030,4763,
+ 6838,1334,
+ 7490,2033,
+ 8585,3036,
+ 9845,1575,
+ 10437,2320,
+ 10649,3739,
+ 11298,945,
+ 12108,1920,
+ 12310,5108,
+ 12391,2758,
+ 12659,1237,
+ 13729,1557,
+ 13798,2201,
+ 13972,3275,
+ 14881,993,
+ 15175,1776,
+ 15409,16190,
+ 15551,2395,
+ 15879,4048,
+ 16341,1335,
+ 16988,2918,
+ 18317,7449,
+ 18368,2026,
+ 19114,1364,
+ 19991,4472,
+ 20644,2790,
+};
+
+const Word16 E_ROM_qua_gain6b_const[NB_QUA_GAIN6B * 2] =
+{//Q0
+ 0,2758,
+ 143,3562,
+ 397,2146,
+ 544,4306,
+ 952,1726,
+ 1236,724,
+ 1779,3158,
+ 1820,5448,
+ 1975,2473,
+ 2121,1343,
+ 3049,3912,
+ 3081,1885,
+ 3289,8261,
+ 3416,2843,
+ 3495,2204,
+ 3831,3386,
+ 4295,4590,
+ 4300,2476,
+ 4345,1545,
+ 4913,1122,
+ 5198,2080,
+ 5200,3079,
+ 5448,3714,
+ 5482,2689,
+ 5546,1817,
+ 5783,17318,
+ 5934,6236,
+ 6156,2320,
+ 6481,4225,
+ 6828,3351,
+ 6832,5045,
+ 6888,2895,
+ 7186,2559,
+ 7214,1663,
+ 7373,2052,
+ 7906,3819,
+ 8192,1372,
+ 8452,3063,
+ 8464,2354,
+ 9021,4468,
+ 9037,2715,
+ 9175,1874,
+ 9219,3463,
+ 9831,2155,
+ 10523,5383,
+ 10557,9061,
+ 10618,3093,
+ 10633,3949,
+ 10890,2465,
+ 11141,1654,
+ 12132,2790,
+ 12180,3477,
+ 12376,2079,
+ 12494,4560,
+ 14430,2468,
+ 14573,3914,
+ 14576,3111,
+ 15043,1827,
+ 15207,1329,
+ 16073,6155,
+ 17519,4719,
+ 18345,2148,
+ 18554,2784,
+ 18576,3563,
+};
+
+const Word16 E_ROM_qua_gain7b_const[NB_QUA_GAIN7B * 2] =
+{//Q0
+ 123,2777,
+ 369,2102,
+ 404,4368,
+ 693,3486,
+ 1107,719,
+ 1222,1679,
+ 1657,1293,
+ 1667,5547,
+ 1805,2425,
+ 2369,3075,
+ 2489,12063,
+ 2681,1901,
+ 2693,3984,
+ 3031,7547,
+ 3248,990,
+ 3466,2672,
+ 3674,2165,
+ 3718,1513,
+ 3844,3456,
+ 4120,4656,
+ 4748,2967,
+ 4821,19622,
+ 4855,2400,
+ 4912,1776,
+ 5245,3860,
+ 5312,6282,
+ 5500,1176,
+ 5713,2056,
+ 5872,3287,
+ 5960,2662,
+ 6170,9756,
+ 6364,5021,
+ 6545,1476,
+ 6788,2283,
+ 6796,4163,
+ 7038,2949,
+ 7216,1831,
+ 7274,3516,
+ 7707,2510,
+ 8123,5762,
+ 8361,4485,
+ 8376,2110,
+ 8594,3135,
+ 8611,3755,
+ 8634,1570,
+ 8636,2748,
+ 8683,8222,
+ 9274,335,
+ 9512,2404,
+ 9640,5020,
+ 9690,1893,
+ 9778,3361,
+ 9808,15435,
+ 9936,4029,
+ 10194,2767,
+ 10306,6510,
+ 10325,1252,
+ 10686,2186,
+ 10844,32767,
+ 10913,4453,
+ 10968,3078,
+ 11044,1666,
+ 11076,3609,
+ 11398,2509,
+ 11423,5160,
+ 11848,1994,
+ 11997,2823,
+ 12002,3880,
+ 12084,7573,
+ 12129,3325,
+ 12214,5867,
+ 12331,1496,
+ 12450,4245,
+ 12458,2283,
+ 12768,901,
+ 12896,4741,
+ 12898,1811,
+ 12902,2569,
+ 12983,2959,
+ 13173,3331,
+ 13413,2059,
+ 13416,3734,
+ 13429,10641,
+ 13448,1148,
+ 13615,5340,
+ 13674,1425,
+ 13779,2332,
+ 13847,4264,
+ 13909,2657,
+ 13958,6488,
+ 14047,3085,
+ 14130,1648,
+ 14547,1915,
+ 14554,3684,
+ 14749,2739,
+ 14868,5017,
+ 14875,2216,
+ 14898,3197,
+ 14988,1085,
+ 15026,4246,
+ 15375,7971,
+ 15421,1446,
+ 15548,2462,
+ 15722,5920,
+ 15882,3449,
+ 15960,1782,
+ 15994,2863,
+ 16365,3977,
+ 16419,4754,
+ 16472,2162,
+ 17378,3101,
+ 17410,2550,
+ 17743,1339,
+ 17856,5485,
+ 17979,1982,
+ 17996,3628,
+ 18041,7110,
+ 18242,4381,
+ 18602,22207,
+ 19373,12827,
+ 19533,2777,
+ 19640,1678,
+ 19728,2272,
+ 19795,8861,
+ 20065,3275,
+ 20133,4881,
+ 20198,3947,
+ 20290,6128,
+};
+
+/*----------------------------------------------------------------------------------*
+ * MA predicition coefficients for gain quantizer
+ *----------------------------------------------------------------------------------*/
+
+const Word16 pred_gain_fx[GAIN_PRED_ORDER] = { 8192, 6554, 4915, 3277 };//Q14
+
+/*----------------------------------------------------------------------------------*
+ * 6-bit gain quantization table (only for AMR-WB IO mode)
+ *----------------------------------------------------------------------------------*/
+
+const Word16 t_qua_gain6b_fx[64 * 2] =
+{//Q14
+ 1566, 1332,
+ 1577, 3557,
+ 3071, 6490,
+ 4193, 10163,
+ 4496, 2534,
+ 5019, 4488,
+ 5586, 15614,
+ 5725, 1422,
+ 6453, 580,
+ 6724, 6831,
+ 7657, 3527,
+ 8072, 2099,
+ 8232, 5319,
+ 8827, 8775,
+ 9740, 2868,
+ 9856, 1465,
+ 10087, 12488,
+ 10241, 4453,
+ 10859, 6618,
+ 11321, 3587,
+ 11417, 1800,
+ 11643, 2428,
+ 11718, 988,
+ 12312, 5093,
+ 12523, 8413,
+ 12574, 26214,
+ 12601, 3396,
+ 13172, 1623,
+ 13285, 2423,
+ 13418, 6087,
+ 13459, 12810,
+ 13656, 3607,
+ 14111, 4521,
+ 14144, 1229,
+ 14425, 1871,
+ 14431, 7234,
+ 14445, 2834,
+ 14628, 10036,
+ 14860, 17496,
+ 15161, 3629,
+ 15209, 5819,
+ 15299, 2256,
+ 15518, 4722,
+ 15663, 1060,
+ 15759, 7972,
+ 15939, 11964,
+ 16020, 2996,
+ 16086, 1707,
+ 16521, 4254,
+ 16576, 6224,
+ 16894, 2380,
+ 16906, 681,
+ 17213, 8406,
+ 17610, 3418,
+ 17895, 5269,
+ 18168, 11748,
+ 18230, 1575,
+ 18607, 32767,
+ 18728, 21684,
+ 19137, 2543,
+ 19422, 6577,
+ 19446, 4097,
+ 19450, 9056,
+ 20371, 14885
+};
+
+
+/*----------------------------------------------------------------------------------*
+ * 7-bit gain quantization table (only for AMR-WB IO mode)
+ *----------------------------------------------------------------------------------*/
+
+const Word16 t_qua_gain7b_fx[128 * 2] =
+{//Q14
+ 204, 441,
+ 464, 1977,
+ 869, 1077,
+ 1072, 3062,
+ 1281, 4759,
+ 1647, 1539,
+ 1845, 7020,
+ 1853, 634,
+ 1995, 2336,
+ 2351, 15400,
+ 2661, 1165,
+ 2702, 3900,
+ 2710, 10133,
+ 3195, 1752,
+ 3498, 2624,
+ 3663, 849,
+ 3984, 5697,
+ 4214, 3399,
+ 4415, 1304,
+ 4695, 2056,
+ 5376, 4558,
+ 5386, 676,
+ 5518, 23554,
+ 5567, 7794,
+ 5644, 3061,
+ 5672, 1513,
+ 5957, 2338,
+ 6533, 1060,
+ 6804, 5998,
+ 6820, 1767,
+ 6937, 3837,
+ 7277, 414,
+ 7305, 2665,
+ 7466, 11304,
+ 7942, 794,
+ 8007, 1982,
+ 8007, 1366,
+ 8326, 3105,
+ 8336, 4810,
+ 8708, 7954,
+ 8989, 2279,
+ 9031, 1055,
+ 9247, 3568,
+ 9283, 1631,
+ 9654, 6311,
+ 9811, 2605,
+ 10120, 683,
+ 10143, 4179,
+ 10245, 1946,
+ 10335, 1218,
+ 10468, 9960,
+ 10651, 3000,
+ 10951, 1530,
+ 10969, 5290,
+ 11203, 2305,
+ 11325, 3562,
+ 11771, 6754,
+ 11839, 1849,
+ 11941, 4495,
+ 11954, 1298,
+ 11975, 15223,
+ 11977, 883,
+ 11986, 2842,
+ 12438, 2141,
+ 12593, 3665,
+ 12636, 8367,
+ 12658, 1594,
+ 12886, 2628,
+ 12984, 4942,
+ 13146, 1115,
+ 13224, 524,
+ 13341, 3163,
+ 13399, 1923,
+ 13549, 5961,
+ 13606, 1401,
+ 13655, 2399,
+ 13782, 3909,
+ 13868, 10923,
+ 14226, 1723,
+ 14232, 2939,
+ 14278, 7528,
+ 14439, 4598,
+ 14451, 984,
+ 14458, 2265,
+ 14792, 1403,
+ 14818, 3445,
+ 14899, 5709,
+ 15017, 15362,
+ 15048, 1946,
+ 15069, 2655,
+ 15405, 9591,
+ 15405, 4079,
+ 15570, 7183,
+ 15687, 2286,
+ 15691, 1624,
+ 15699, 3068,
+ 15772, 5149,
+ 15868, 1205,
+ 15970, 696,
+ 16249, 3584,
+ 16338, 1917,
+ 16424, 2560,
+ 16483, 4438,
+ 16529, 6410,
+ 16620, 11966,
+ 16839, 8780,
+ 17030, 3050,
+ 17033, 18325,
+ 17092, 1568,
+ 17123, 5197,
+ 17351, 2113,
+ 17374, 980,
+ 17566, 26214,
+ 17609, 3912,
+ 17639, 32767,
+ 18151, 7871,
+ 18197, 2516,
+ 18202, 5649,
+ 18679, 3283,
+ 18930, 1370,
+ 19271, 13757,
+ 19317, 4120,
+ 19460, 1973,
+ 19654, 10018,
+ 19764, 6792,
+ 19912, 5135,
+ 20040, 2841,
+ 21234, 19833
+};
+
+/*----------------------------------------------------------------------------------*
+ * Quantization table for scaled innovation energy prediciton
+ *----------------------------------------------------------------------------------*/
+
+const Word16 Es_pred_qua_5b_fx[32] =
+{//Q8
+ -2048,
+ -525,
+ 642,
+ 1688,
+ 2547,
+ 3326,
+ 4026,
+ 4647,
+ 5211,
+ 5740,
+ 6221,
+ 6661,
+ 7067,
+ 7447,
+ 7815,
+ 8170,
+ 8518,
+ 8865,
+ 9204,
+ 9551,
+ 9912,
+ 10284,
+ 10669,
+ 11077,
+ 11509,
+ 11976,
+ 12486,
+ 13049,
+ 13695,
+ 14434,
+ 15354,
+ 16640,
+};
+
+const Word16 Es_pred_qua_4b_fx[16] =
+{//Q8
+ -2048,
+ -36,
+ 1828,
+ 3284,
+ 4584,
+ 5742,
+ 6821,
+ 7834,
+ /*8779, */
+ 8778,
+ 9701,
+ 10610,
+ 11524,
+ 12487,
+ 13560,
+ 14862,
+ 16640
+};
+
+const Word16 Es_pred_qua_3b_fx[8] =
+{
+ 1521/* 5.9422f Q8*/,
+ 3909/*15.2711f Q8*/,
+ 5987/*23.3857f Q8*/,
+ 7816/*30.5310f Q8*/,
+ 9477/*37.0190f Q8*/,
+ 11124/*43.4539f Q8*/,
+ 12863/*50.2442f Q8*/,
+ 15031/*58.7164f Q8*/
+};
+
+const Word16 Es_pred_qua_4b_no_ltp_fx[16] =
+{
+ -1280/*-5.f Q8*/,
+ 0/* 0.f Q8*/,
+ 1280/* 5.f Q8*/,
+ 2560/*10.f Q8*/,
+ 3840/*15.f Q8*/,
+ 5120/*20.f Q8*/,
+ 6400/*25.f Q8*/,
+ 7680/*30.f Q8*/,
+ 8960/*35.f Q8*/,
+ 10240/*40.f Q8*/,
+ 11520/*45.f Q8*/,
+ 12800/*50.f Q8*/,
+ 14080/*55.f Q8*/,
+ 15360/*60.f Q8*/,
+ 16640/*65.f Q8*/,
+ 17920/*70.f Q8*/
+};
+/*----------------------------------------------------------------------------------*
+ * Gain estimation constants (for gain quantizer at 7.2 and 8.0 kbps)
+ *----------------------------------------------------------------------------------*/
+
+const Word16 b_1sfr_fx[2] = /*Q12 */
+{
+ 9697, -920
+};
+
+const Word16 b_2sfr_fx[4] = /*Q12 */
+{
+ -1, 70, 3763, 542
+};
+
+const Word16 b_3sfr_fx[6] =//Q12
+{
+ -478, 110, 553, 3264, 92, 730
+};
+
+const Word16 b_4sfr_fx[8] =//Q12
+{
+ -381, 65, -271, 836, 3246, 34, 143, 650
+};
+
+/*----------------------------------------------------------------------------------*
+ * Gain codebooks (for gain quantizer at 7.2 and 8.0 kbps)
+ *----------------------------------------------------------------------------------*/
+
+const Word16 gp_gamma_3sfr_7b_fx[2 * 128] = //Q14/Q9
+{
+ 141, 207,
+ 268, 836,
+ 355, 385,
+ 470, 124,
+ 944, 265,
+ 1202, 503,
+ 1308, 640,
+ 1384, 150,
+ 1399, 75,
+ 1534, 323,
+ 1835, 1252,
+ 1872, 216,
+ 2297, 443,
+ 2495, 122,
+ 2697, 358,
+ 2849, 181,
+ 2920, 274,
+ 2937, 552,
+ 3353, 2982,
+ 3666, 394,
+ 3759, 1755,
+ 3790, 972,
+ 3838, 225,
+ 3929, 758,
+ 3973, 143,
+ 4075, 313,
+ 4329, 471,
+ 4689, 625,
+ 4938, 178,
+ 5073, 266,
+ 5216, 379,
+ 5519, 520,
+ 6089, 321,
+ 6149, 221,
+ 6247, 432,
+ 6254, 1083,
+ 6556, 131,
+ 6751, 733,
+ 6773, 587,
+ 7140, 17402,
+ 7257, 366,
+ 7295, 269,
+ 7314, 483,
+ 8121, 204,
+ 8214, 1515,
+ 8332, 538,
+ 8386, 842,
+ 8483, 314,
+ 8484, 660,
+ 8503, 395,
+ 9079, 455,
+ 9543, 249,
+ 9687, 1056,
+ 9724, 11493,
+ 9727, 336,
+ 9862, 603,
+ 10141, 158,
+ 10278, 498,
+ 10347, 393,
+ 10380, 751,
+ 10899, 287,
+ 11239, 564,
+ 11377, 210,
+ 11389, 437,
+ 11531, 926,
+ 11565, 339,
+ 11594, 684,
+ 11635, 7228,
+ 12176, 509,
+ 12240, 1235,
+ 12467, 381,
+ 12631, 254,
+ 12758, 809,
+ 12877, 458,
+ 12881, 620,
+ 13160, 313,
+ 13243, 1692,
+ 13441, 533,
+ 13620, 420,
+ 13855, 718,
+ 13895, 998,
+ 14047, 354,
+ 14150, 199,
+ 14170, 586,
+ 14358, 477,
+ 14770, 280,
+ 14777, 143,
+ 14810, 397,
+ 14965, 857,
+ 14984, 655,
+ 15112, 524,
+ 15406, 330,
+ 15535, 442,
+ 15599, 1120,
+ 15635, 4946,
+ 15823, 582,
+ 15891, 736,
+ 16161, 374,
+ 16216, 229,
+ 16265, 493,
+ 16607, 638,
+ 16610, 2511,
+ 16905, 803,
+ 16906, 433,
+ 16911, 310,
+ 16924, 1415,
+ 17161, 543,
+ 17656, 951,
+ 17694, 680,
+ 17736, 375,
+ 17982, 479,
+ 18345, 287,
+ 18372, 586,
+ 18469, 3627,
+ 18649, 183,
+ 18898, 2002,
+ 18925, 403,
+ 18959, 712,
+ 19244, 857,
+ 19306, 245,
+ 19447, 1203,
+ 19455, 334,
+ 19458, 526,
+ 19600, 455,
+ 19699, 623,
+ 19724, 1583,
+ 19788, 1001,
+ 20031, 749,
+};
+
+const Word16 gp_gamma_4sfr_7b_fx[2 * 128] = /*Q14/Q9 */
+{
+ 101, 174,
+ 228, 542,
+ 400, 269,
+ 735, 418,
+ 799, 111,
+ 1146, 802,
+ 1250, 345,
+ 1291, 1138,
+ 1327, 224,
+ 1478, 1705,
+ 1557, 491,
+ 1947, 295,
+ 1988, 639,
+ 2343, 386,
+ 2386, 213,
+ 2541, 133,
+ 2904, 2881,
+ 3198, 455,
+ 3204, 736,
+ 3219, 276,
+ 3463, 549,
+ 3709, 343,
+ 3741, 177,
+ 4431, 226,
+ 4480, 927,
+ 4516, 396,
+ 4547, 622,
+ 4900, 290,
+ 5011, 503,
+ 5601, 742,
+ 5616, 173,
+ 5688, 428,
+ 5975, 337,
+ 6196, 5865,
+ 6293, 253,
+ 6294, 580,
+ 6305, 1053,
+ 6792, 480,
+ 6951, 391,
+ 7151, 212,
+ 7298, 671,
+ 7475, 317,
+ 7757, 534,
+ 7917, 856,
+ 8195, 1449,
+ 8198, 437,
+ 8228, 261,
+ 8434, 154,
+ 8493, 622,
+ 8552, 358,
+ 9324, 493,
+ 9373, 744,
+ 9391, 217,
+ 9410, 296,
+ 9711, 14146,
+ 9711, 405,
+ 9724, 598,
+ 10128, 1140,
+ 10248, 8800,
+ 10391, 344,
+ 10530, 883,
+ 10541, 542,
+ 10559, 257,
+ 10772, 441,
+ 11075, 664,
+ 11463, 304,
+ 11510, 196,
+ 11551, 2230,
+ 11574, 501,
+ 11611, 391,
+ 12154, 784,
+ 12205, 576,
+ 12304, 133,
+ 12413, 343,
+ 12457, 84,
+ 12468, 445,
+ 12734, 247,
+ 12970, 639,
+ 13072, 1411,
+ 13142, 983,
+ 13159, 499,
+ 13356, 386,
+ 13460, 298,
+ 13838, 710,
+ 13850, 550,
+ 13930, 429,
+ 14446, 343,
+ 14449, 170,
+ 14511, 467,
+ 14530, 857,
+ 14697, 623,
+ 14770, 4569,
+ 14833, 229,
+ 15086, 512,
+ 15112, 387,
+ 15527, 574,
+ 15552, 1126,
+ 15573, 764,
+ 15662, 291,
+ 15677, 442,
+ 16056, 648,
+ 16200, 508,
+ 16322, 369,
+ 16719, 586,
+ 16832, 936,
+ 16835, 450,
+ 16969, 702,
+ 17188, 315,
+ 17425, 538,
+ 17680, 395,
+ 17808, 209,
+ 17855, 791,
+ 18054, 1861,
+ 18122, 471,
+ 18273, 632,
+ 18425, 3478,
+ 18630, 1239,
+ 18947, 143,
+ 18948, 2576,
+ 19051, 264,
+ 19068, 349,
+ 19112, 502,
+ 19303, 1530,
+ 19502, 836,
+ 19558, 422,
+ 19571, 692,
+ 19667, 1014,
+ 19685, 569
+};
+
+const Word16 gp_gamma_1sfr_8b_fx[2 * 256] = /*Q14/Q9 */
+{
+ 305, 152,
+ 333, 37,
+ 352, 556,
+ 573, 82,
+ 652, 12,
+ 694, 207,
+ 808, 389,
+ 915, 776,
+ 986, 1089,
+ 987, 1583,
+ 1055, 60,
+ 1202, 2779,
+ 1205, 20,
+ 1346, 127,
+ 1432, 332,
+ 1689, 6554,
+ 1715, 261,
+ 1820, 49,
+ 2041, 698,
+ 2179, 4032,
+ 2199, 100,
+ 2272, 1303,
+ 2317, 461,
+ 2340, 175,
+ 2562, 26,
+ 2574, 14814,
+ 2657, 2101,
+ 2732, 66,
+ 2818, 9,
+ 2836, 296,
+ 2929, 938,
+ 3479, 130,
+ 3510, 220,
+ 3651, 3154,
+ 3667, 717,
+ 3720, 384,
+ 3783, 530,
+ 3811, 10744,
+ 3883, 5385,
+ 3941, 1609,
+ 3964, 46,
+ 4120, 80,
+ 4402, 15,
+ 4440, 1181,
+ 4485, 173,
+ 4740, 311,
+ 4848, 31,
+ 5125, 7642,
+ 5147, 110,
+ 5167, 908,
+ 5237, 252,
+ 5323, 623,
+ 5376, 2514,
+ 5590, 7,
+ 5595, 4475,
+ 5634, 64,
+ 5654, 461,
+ 5822, 22,
+ 5893, 140,
+ 5905, 1810,
+ 6177, 367,
+ 6268, 201,
+ 6352, 1092,
+ 6567, 752,
+ 6626, 50,
+ 6734, 95,
+ 6758, 295,
+ 6882, 3085,
+ 6962, 1363,
+ 7274, 540,
+ 7413, 166,
+ 7635, 2120,
+ 7642, 38,
+ 7671, 393,
+ 7730, 227,
+ 7860, 75,
+ 7980, 115,
+ 8011, 955,
+ 8092, 3687,
+ 8120, 17,
+ 8146, 5902,
+ 8453, 672,
+ 8524, 1602,
+ 8583, 58,
+ 8679, 275,
+ 8873, 332,
+ 8920, 454,
+ 8969, 9712,
+ 9129, 2566,
+ 9159, 196,
+ 9193, 1127,
+ 9219, 142,
+ 9300, 9,
+ 9302, 828,
+ 9409, 91,
+ 9736, 26,
+ 9872, 574,
+ 10066, 246,
+ 10131, 1352,
+ 10154, 1971,
+ 10196, 399,
+ 10238, 15785,
+ 10255, 4254,
+ 10401, 67,
+ 10439, 43,
+ 10511, 116,
+ 10531, 7399,
+ 10706, 998,
+ 10798, 722,
+ 10845, 171,
+ 10848, 304,
+ 10876, 2981,
+ 11069, 28204,
+ 11139, 507,
+ 11280, 12,
+ 11427, 388,
+ 11459, 214,
+ 11647, 1174,
+ 11710, 5061,
+ 11742, 1614,
+ 11793, 806,
+ 11816, 82,
+ 11890, 132,
+ 11996, 2301,
+ 12000, 603,
+ 12060, 55,
+ 12232, 256,
+ 12299, 33,
+ 12438, 338,
+ 12452, 458,
+ 12627, 3563,
+ 12646, 9489,
+ 12665, 934,
+ 12801, 1329,
+ 12802, 190,
+ 12877, 683,
+ 12941, 103,
+ 13038, 1890,
+ 13209, 6209,
+ 13222, 12674,
+ 13318, 21,
+ 13374, 283,
+ 13385, 149,
+ 13391, 383,
+ 13453, 545,
+ 13564, 1064,
+ 13596, 2561,
+ 13771, 810,
+ 13834, 1481,
+ 13874, 69,
+ 14027, 226,
+ 14093, 4429,
+ 14147, 7,
+ 14171, 609,
+ 14185, 47,
+ 14223, 3051,
+ 14273, 434,
+ 14321, 314,
+ 14415, 120,
+ 14443, 1252,
+ 14500, 173,
+ 14557, 933,
+ 14616, 1696,
+ 14639, 8229,
+ 14724, 89,
+ 14837, 703,
+ 14902, 2072,
+ 14917, 366,
+ 15000, 487,
+ 15009, 30,
+ 15095, 256,
+ 15138, 1119,
+ 15228, 3580,
+ 15371, 1386,
+ 15387, 5525,
+ 15398, 17932,
+ 15462, 149,
+ 15471, 791,
+ 15551, 569,
+ 15554, 2467,
+ 15559, 201,
+ 15616, 14,
+ 15664, 319,
+ 15798, 401,
+ 15811, 974,
+ 15874, 41,
+ 15929, 1649,
+ 15945, 79,
+ 16046, 111,
+ 16225, 647,
+ 16230, 1240,
+ 16297, 4110,
+ 16328, 10499,
+ 16331, 278,
+ 16355, 3003,
+ 16383, 455,
+ 16404, 169,
+ 16435, 2172,
+ 16438, 850,
+ 16745, 7090,
+ 16776, 354,
+ 16801, 1063,
+ 16803, 62,
+ 16812, 223,
+ 16927, 530,
+ 16951, 721,
+ 17039, 1447,
+ 17208, 1837,
+ 17233, 135,
+ 17371, 4642,
+ 17570, 406,
+ 17608, 267,
+ 17696, 906,
+ 17702, 2529,
+ 17705, 23239,
+ 17709, 1209,
+ 17745, 592,
+ 17800, 92,
+ 17858, 35,
+ 17860, 3360,
+ 17866, 9,
+ 17978, 184,
+ 18035, 321,
+ 18255, 754,
+ 18274, 480,
+ 18320, 18,
+ 18406, 55,
+ 18582, 13017,
+ 18677, 1516,
+ 18726, 1998,
+ 18904, 25,
+ 18914, 6103,
+ 19020, 8567,
+ 19022, 1116,
+ 19025, 349,
+ 19147, 239,
+ 19224, 604,
+ 19251, 160,
+ 19270, 4870,
+ 19358, 3789,
+ 19394, 126,
+ 19394, 103,
+ 19433, 72,
+ 19444, 46,
+ 19448, 2842,
+ 19489, 430,
+ 19575, 815,
+ 19628, 1306,
+ 19631, 972,
+ 19637, 202,
+ 19642, 289,
+ 19660, 527,
+ 19717, 1697,
+ 19731, 2263,
+ 19754, 676,
+ 19854, 382,
+};
+
+const Word16 gp_gamma_1sfr_7b_fx[2 * 128] = /*Q14/Q9 */
+{
+ 350, 85,
+ 428, 24,
+ 438, 681,
+ 642, 195,
+ 1071, 2012,
+ 1080, 402,
+ 1148, 1236,
+ 1159, 62,
+ 1424, 12,
+ 1662, 134,
+ 1985, 299,
+ 2100, 34,
+ 2163, 3168,
+ 2219, 538,
+ 2393, 6580,
+ 2499, 967,
+ 2882, 221,
+ 2974, 12743,
+ 3251, 98,
+ 3294, 51,
+ 3586, 1560,
+ 3711, 411,
+ 3721, 700,
+ 3862, 21,
+ 3947, 169,
+ 4001, 2249,
+ 4198, 4632,
+ 4372, 8,
+ 4993, 70,
+ 5022, 265,
+ 5568, 1194,
+ 5664, 495,
+ 5698, 115,
+ 5885, 854,
+ 6115, 2990,
+ 6266, 153,
+ 6376, 39,
+ 6432, 16,
+ 6601, 345,
+ 7108, 1957,
+ 7231, 660,
+ 7491, 202,
+ 7687, 93,
+ 8054, 3882,
+ 8108, 9624,
+ 8186, 1424,
+ 8243, 59,
+ 8354, 935,
+ 8358, 6401,
+ 8383, 439,
+ 8794, 285,
+ 8940, 124,
+ 9643, 25,
+ 9643, 581,
+ 9670, 2709,
+ 10065, 160,
+ 10218, 9,
+ 10240, 1728,
+ 10249, 80,
+ 10418, 1113,
+ 10497, 373,
+ 10650, 236,
+ 11095, 44,
+ 11095, 756,
+ 11284, 4978,
+ 11290, 16722,
+ 11815, 2299,
+ 11882, 482,
+ 12059, 114,
+ 12332, 8550,
+ 12363, 1394,
+ 12392, 186,
+ 12517, 336,
+ 12549, 3413,
+ 12694, 953,
+ 13096, 614,
+ 13185, 71,
+ 13247, 262,
+ 13479, 1914,
+ 13791, 14,
+ 13805, 30,
+ 14064, 138,
+ 14182, 420,
+ 14212, 1175,
+ 14477, 765,
+ 14605, 2745,
+ 14612, 6324,
+ 14730, 4199,
+ 14833, 301,
+ 14842, 203,
+ 14910, 12790,
+ 15171, 100,
+ 15191, 1625,
+ 15289, 532,
+ 15405, 52,
+ 15550, 985,
+ 16096, 357,
+ 16175, 2113,
+ 16284, 232,
+ 16333, 669,
+ 16363, 22999,
+ 16396, 156,
+ 16443, 1270,
+ 16455, 3482,
+ 16543, 8,
+ 16650, 5425,
+ 16878, 452,
+ 16989, 84,
+ 17024, 9676,
+ 17194, 876,
+ 17730, 20,
+ 17780, 1442,
+ 17864, 38,
+ 17874, 254,
+ 17929, 526,
+ 18011, 2403,
+ 18751, 7153,
+ 18786, 117,
+ 18820, 4420,
+ 19002, 63,
+ 19099, 401,
+ 19111, 183,
+ 19197, 776,
+ 19202, 2953,
+ 19236, 1052,
+ 19255, 301,
+ 19354, 1760,
+ 19432, 593,
+};
+
+const Word16 gp_gamma_1sfr_6b_fx[2 * 64] = /*Q14/Q9 */
+{
+ 436, 182,
+ 473, 63,
+ 962, 16,
+ 992, 647,
+ 1258, 1582,
+ 1447, 351,
+ 1711, 125,
+ 1809, 46,
+ 2569, 4173,
+ 2607, 957,
+ 2826, 251,
+ 2904, 12481,
+ 3248, 26,
+ 3594, 2254,
+ 3664, 78,
+ 3715, 483,
+ 4232, 8,
+ 4681, 188,
+ 5066, 6623,
+ 5232, 1273,
+ 6232, 695,
+ 6234, 49,
+ 6238, 113,
+ 6312, 318,
+ 7012, 17,
+ 7327, 3183,
+ 8008, 1739,
+ 8692, 446,
+ 8769, 163,
+ 8923, 1019,
+ 9094, 81,
+ 10358, 286,
+ 10491, 28,
+ 10612, 9788,
+ 10715, 760,
+ 11045, 4822,
+ 11319, 2403,
+ 11684, 56,
+ 12314, 108,
+ 12460, 556,
+ 12580, 9,
+ 12716, 213,
+ 12821, 1336,
+ 14202, 374,
+ 14325, 16971,
+ 14612, 838,
+ 14625, 3285,
+ 14668, 6231,
+ 14919, 39,
+ 15131, 137,
+ 15476, 1847,
+ 16056, 255,
+ 16277, 494,
+ 16290, 66,
+ 16582, 1048,
+ 16859, 17,
+ 17220, 8723,
+ 17443, 4295,
+ 18069, 2499,
+ 18212, 176,
+ 18499, 91,
+ 18517, 1445,
+ 18522, 332,
+ 18596, 663,
+};
+
+const Word16 gp_gamma_2sfr_7b_fx[2 * 128] = /*Q14/Q9 */
+{
+ 99, 1224,
+ 156, 243,
+ 168, 579,
+ 290, 355,
+ 437, 441,
+ 475, 187,
+ 734, 738,
+ 930, 93,
+ 1133, 153,
+ 1136, 298,
+ 1490, 508,
+ 1946, 401,
+ 1978, 16790,
+ 2098, 224,
+ 2117, 962,
+ 2407, 119,
+ 2686, 339,
+ 2929, 555,
+ 3404, 271,
+ 3465, 171,
+ 3469, 422,
+ 3714, 663,
+ 4436, 494,
+ 4494, 332,
+ 4571, 220,
+ 4583, 2182,
+ 4997, 848,
+ 5346, 380,
+ 5419, 108,
+ 5570, 579,
+ 5758, 266,
+ 5875, 442,
+ 5927, 170,
+ 6204, 3338,
+ 6394, 6435,
+ 6515, 328,
+ 6638, 730,
+ 6687, 1472,
+ 7045, 1056,
+ 7101, 498,
+ 7123, 210,
+ 7163, 9668,
+ 7345, 386,
+ 7598, 280,
+ 7853, 627,
+ 8462, 442,
+ 8648, 331,
+ 8822, 236,
+ 8887, 551,
+ 8953, 906,
+ 9317, 136,
+ 9587, 386,
+ 9651, 691,
+ 9796, 286,
+ 9852, 489,
+ 10005, 1215,
+ 10041, 192,
+ 10623, 576,
+ 10758, 329,
+ 10840, 425,
+ 10944, 792,
+ 11038, 257,
+ 11190, 1870,
+ 11541, 501,
+ 11729, 642,
+ 11873, 367,
+ 12064, 163,
+ 12332, 216,
+ 12339, 1100,
+ 12339, 295,
+ 12478, 444,
+ 12561, 568,
+ 12665, 845,
+ 13257, 396,
+ 13317, 677,
+ 13411, 511,
+ 13709, 324,
+ 13710, 1547,
+ 13711, 246,
+ 14054, 991,
+ 14112, 447,
+ 14246, 580,
+ 14355, 748,
+ 14394, 175,
+ 14453, 99,
+ 14604, 363,
+ 14887, 491,
+ 15074, 282,
+ 15110, 637,
+ 15242, 1292,
+ 15351, 413,
+ 15430, 843,
+ 15700, 541,
+ 15776, 204,
+ 15964, 335,
+ 15992, 688,
+ 16077, 453,
+ 16315, 4617,
+ 16406, 1032,
+ 16549, 595,
+ 16666, 384,
+ 16850, 776,
+ 16851, 482,
+ 16916, 253,
+ 17234, 309,
+ 17307, 2128,
+ 17469, 546,
+ 17666, 643,
+ 17699, 421,
+ 17852, 882,
+ 17870, 146,
+ 18146, 1244,
+ 18457, 489,
+ 18478, 346,
+ 18588, 723,
+ 18826, 208,
+ 19011, 1731,
+ 19042, 586,
+ 19286, 281,
+ 19428, 944,
+ 19446, 382,
+ 19555, 444,
+ 19689, 792,
+ 19755, 1111,
+ 19762, 527,
+ 19769, 1405,
+ 19774, 657,
+ 19780, 2675,
+};
+
+const Word16 gp_gamma_2sfr_6b_fx[2 * 64] = /*Q14/Q9 */
+{
+ 185, 306,
+ 435, 519,
+ 458, 145,
+ 1000, 211,
+ 1217, 394,
+ 1241, 751,
+ 1788, 93,
+ 2026, 1234,
+ 2162, 265,
+ 2397, 158,
+ 2617, 472,
+ 3324, 340,
+ 3391, 623,
+ 3835, 207,
+ 4503, 17210,
+ 4628, 407,
+ 4939, 897,
+ 5102, 275,
+ 5300, 120,
+ 5560, 511,
+ 6309, 1909,
+ 6571, 335,
+ 6770, 205,
+ 6990, 642,
+ 7085, 5087,
+ 7500, 428,
+ 8357, 827,
+ 8452, 261,
+ 9079, 537,
+ 9289, 354,
+ 9854, 1176,
+ 9864, 165,
+ 10436, 8580,
+ 10549, 437,
+ 10615, 677,
+ 11010, 282,
+ 11940, 530,
+ 12183, 367,
+ 12475, 920,
+ 12865, 225,
+ 13359, 618,
+ 13431, 441,
+ 13521, 1623,
+ 14177, 341,
+ 14299, 130,
+ 14452, 775,
+ 14799, 508,
+ 15250, 276,
+ 15715, 1130,
+ 15757, 660,
+ 15879, 422,
+ 16355, 3256,
+ 16439, 187,
+ 16751, 562,
+ 16906, 331,
+ 17178, 827,
+ 17889, 471,
+ 18219, 2175,
+ 18786, 248,
+ 18985, 1354,
+ 19067, 703,
+ 19220, 384,
+ 19349, 954,
+ 19422, 553,
+};
+const Word16 gp_gamma_3sfr_6b_fx[2 * 64] = /*Q14/Q9 */
+{
+ 195, 150,
+ 817, 288,
+ 1152, 616,
+ 1366, 188,
+ 1377, 410,
+ 1526, 902,
+ 1570, 98,
+ 2258, 238,
+ 2489, 518,
+ 2935, 338,
+ 3142, 161,
+ 3456, 1705,
+ 3990, 432,
+ 4159, 709,
+ 4187, 270,
+ 4374, 1236,
+ 5283, 526,
+ 5431, 131,
+ 5507, 356,
+ 5762, 211,
+ 6792, 620,
+ 6842, 446,
+ 6969, 304,
+ 7671, 807,
+ 8362, 245,
+ 8448, 530,
+ 8610, 380,
+ 9314, 1088,
+ 9828, 170,
+ 9921, 7010,
+ 10026, 459,
+ 10193, 312,
+ 10261, 658,
+ 11554, 394,
+ 11739, 882,
+ 11791, 542,
+ 11985, 4329,
+ 11996, 246,
+ 12762, 13441,
+ 12844, 1512,
+ 13131, 465,
+ 13135, 339,
+ 13215, 740,
+ 14138, 608,
+ 14524, 417,
+ 14780, 1030,
+ 14823, 283,
+ 15016, 171,
+ 15264, 527,
+ 15823, 2706,
+ 15943, 699,
+ 15959, 360,
+ 16350, 473,
+ 17211, 573,
+ 17366, 901,
+ 17517, 238,
+ 17799, 414,
+ 18069, 1415,
+ 18630, 1920,
+ 18887, 634,
+ 19018, 318,
+ 19304, 495,
+ 19400, 1114,
+ 19413, 767,
+};
+
+
+const Word16 gp_gamma_4sfr_6b_fx[2 * 64] = /*Q14/Q9 */
+{
+ 153, 141,
+ 282, 501,
+ 399, 239,
+ 783, 369,
+ 1110, 744,
+ 1430, 183,
+ 1440, 1748,
+ 1524, 1091,
+ 1602, 296,
+ 1828, 99,
+ 2000, 439,
+ 2678, 228,
+ 2815, 600,
+ 3084, 347,
+ 3861, 477,
+ 4154, 163,
+ 4214, 285,
+ 4428, 733,
+ 4976, 384,
+ 5482, 566,
+ 5552, 234,
+ 6158, 929,
+ 6536, 470,
+ 6560, 326,
+ 7288, 173,
+ 7429, 663,
+ 7447, 10616,
+ 7871, 407,
+ 8457, 266,
+ 8559, 550,
+ 8679, 1421,
+ 9457, 356,
+ 9533, 785,
+ 9854, 471,
+ 10584, 5781,
+ 10792, 3815,
+ 10813, 206,
+ 10829, 302,
+ 10986, 606,
+ 11380, 433,
+ 11468, 1073,
+ 12485, 356,
+ 12726, 520,
+ 12783, 721,
+ 13554, 259,
+ 13763, 139,
+ 13884, 430,
+ 14060, 2592,
+ 14266, 599,
+ 14332, 925,
+ 14997, 337,
+ 15355, 485,
+ 15526, 712,
+ 16440, 587,
+ 16504, 395,
+ 16626, 204,
+ 17228, 1287,
+ 17563, 805,
+ 17629, 517,
+ 18159, 1814,
+ 18320, 303,
+ 19228, 437,
+ 19263, 636,
+ 19417, 989,
+};
+
+
+
+/*----------------------------------------------------------------------------------*
+ * Transition coding - gain quantization table
+ *----------------------------------------------------------------------------------*/
+const Word16 tbl_gain_code_tc_fx[N_GAIN_CODE_TC] = /*q13 */
+{
+ 2966,
+ 5930,
+ 7924,
+ 9712,
+ 11566,
+ 13754,
+ 16993,
+ 27280
+};
+const Word16 tbl_gain_code_tc_quant_mean[N_GAIN_CODE_TC - 1] =
+{
+ 4448, 6927, 8818, 10639,
+ 12660, 15374, 22136
+}; /* Q13 */
+/*-----------------------------------------------------------------*
+ * Transition coding - gain quantization table for g_trans
+ *-----------------------------------------------------------------*/
+const Word16 tbl_gain_trans_tc_fx[N_GAIN_TC] =
+{
+ 4588, 11109, 19212, 29862,/*<- Q7
+Q4 ->*/ 5536, 8184, 13115, 24000
+};
+/*-----------------------------------------------------------------*
+ * Transition coding - table of prototype glottal impulses
+ *-----------------------------------------------------------------*/
+
+const Word16 Glottal_cdbk_fx[L_IMPULSE*NUM_IMPULSE] = /*Q13*/
+{
+ /* impulse 0 */
+ -715, -1690, -2903, -1742, -1295, -4266,
+ -4893, 1725, 8192, 5812, -628, -1956,
+ 581, 936, -81, 831, 1517,
+
+ /* impulse 1 */
+ -2168, -1356, -404, -2715, -4469, -2164,
+ -2180, -8058, -9140, 1163, 10343, 6677,
+ -1758, -2839, 377, 326, -490,
+
+ /* impulse 2 */
+ 360, 561, 4184, 2533, -3326, -2549,
+ 2059, -2112, -9542, -6134, 1307, 124,
+ -3421, -1465, 475, -886, -1262,
+
+ /* impulse 3 */
+ -1294, -715, -184, -1544, -1638, -219,
+ -3503, -9409, -7955, -1407, -285, -2494,
+ 305, 4658, 3289, 116, 1488,
+
+ /* impulse 4 */
+ 837, 2523, 2444, 2679, 5962, 6935,
+ -924, -9907, -7565, 643, 1350, -2577,
+ -2100, -277, -1546, -2279, -882,
+
+ /* impulse 5 */
+ -418, -886, -48, -494, -2368, -2060,
+ -1233, -5271,-10430, -6955, 3301, 7578,
+ 2599, -1665, -461, 735, -181,
+
+ /* impulse 6 */
+ -467, -1865, -1455, -127, -1881, -3776,
+ 822, 8335, 8192, 863, -2762, -375,
+ 757, -558, -285, 653, 150,
+
+ /* impulse 7 */
+ 1087, 471, -618, 706, 1546, -1605,
+ -3256, 2396, 8060, 5189, -99, -37,
+ 1105, -668, -1434, -59, -81
+};
+
+/*----------------------------------------------------------------------------------*
+ * AMR-WB IO WB BWE - deemphasis
+ *----------------------------------------------------------------------------------*/
+const Word16 deem_tab_fx[56] =
+{//Q15
+ 20668, 20625, 20583, 20541, 20501, 20462, 20423, 20385,
+ 20348, 20313, 20277, 20243, 20210, 20177, 20146, 20115,
+ 20085, 20055, 20027, 19999, 19972, 19946, 19921, 19896,
+ 19873, 19850, 19827, 19806, 19785, 19766, 19746, 19728,
+ 19710, 19693, 19677, 19662, 19647, 19633, 19620, 19607,
+ 19596, 19585, 19574, 19565, 19556, 19548, 19540, 19533,
+ 19527, 19522, 19518, 19514, 19510, 19508, 19506, 19505
+};
+
+
+const Word16 filt_hp_fx[56] =
+{//Q15
+ 53, 153, 274, 415, 578, 765, 978, 1217, 1483, 1778, 2102,
+ 2457, 2843, 3261, 3710, 4192, 4706, 5252, 5829, 6438, 7077,
+ 7746, 8443, 9168, 9918, 10693, 11489, 12306, 13141, 13992,
+ 14856, 15732, 16615, 17504, 18395, 19287, 20174, 21056, 21928,
+ 22787, 23631, 24456, 25260, 26039, 26791, 27512, 28201, 28853,
+ 29468, 30043, 30574, 31061, 31502, 31894, 32237, 32529
+};
+
+/* table of values exp(-j*w*i) */
+
+const Word16 exp_tab_q_fx[34] = /*Q14 */
+{
+ 16384, -16068, 15137, -13622,
+ 11585, -9101, 6270, -3195,
+ 0, 3196, -6269, 9102,
+ -11584, 13623, -15136, 16069,
+ -16383, 0, -3195, 6270,
+ -9101, 11585, -13622, 15137,
+ -16068, 16384, -16068, 15137,
+ -13622, 11585, -9101, 6270,
+ -3195, 0
+};
+
+
+const Word16 exp_tab_p_fx[34] = /*Q14 */
+{
+ 16384, -11584, 0, 11585,
+ -16383, 11585, 0, -11584,
+ 16384, -11584, 0, 11585,
+ -16383, 11585, 0, -11584,
+ 16384, 0, -11584, 16384,
+ -11584, 0, 11585, -16383,
+ 11585, 0, -11584, 16384,
+ -11584, 0, 11585, -16383,
+ 11585, 0
+};
+/* gains for 23k85 mode */
+
+const Word16 HP_gain_fx[16] =
+{//Q15
+ 3624, 4673, 5597, 6479, 7425, 8378, 9324, 10264,
+ 11210, 12206, 13391, 14844, 16770, 19655, 24289, 32728
+};
+/* band-pass 6-8kHz filter */
+
+const Word16 fir_6k_7k_fx[31] =
+{//Q15
+ -32, 47, 32, -27, -369,
+ 1122, -1421, 0, 3798, -8880,
+ 12349, -10984, 3548, 7766, -18001,
+ 22118, -18001, 7766, 3548, -10984,
+ 12349, -8880, 3798, 0, -1421,
+ 1122, -369, -27, 32, 47,
+ -32
+};
+const Word16 no_lead_fx[][MAX_NO_SCALES * 2] =
+{//Q0
+ { 1, 0, 0, 1, 0, 0, }, /* 14 */
+ { 2, 0, 0, 1, 0, 0, }, /* 15 */
+ { 4, 2, 0, 1, 0, 0, }, /* 18 */
+ { 4, 2, 0, 2, 0, 0, }, /* 19 */
+ { 7, 5, 2, 5, 4, 2, }, /* 25 */
+ { 8, 8, 3, 8, 6, 2, }, /* 28 */ /* mode UV WB*/
+ { 4, 2, 0, 1, 0, 0, }, /* 18 */
+ { 4, 0, 0, 2, 1, 0, }, /* 19 */
+ { 9, 8, 8, 2, 2, 1, }, /* 24 */
+ { 8, 5, 2, 5, 2, 1, }, /* 25 */
+ { 18, 16, 8, 5, 5, 1, }, /* 29 */
+ { 24, 21, 10, 8, 8, 2, }, /* 32 */ /* mode UV NB*/
+
+ { 2, 0, 0, 2, 0, 0, }, /* 17 */
+ { 4, 2, 0, 1, 0, 0, }, /* 18 */
+ { 7, 5, 2, 2, 0, 0, }, /* 21 */
+ { 5, 2, 1, 4, 1, 0, }, /* 22 */
+ { 8, 5, 2, 5, 2, 0, }, /* 25 */
+ { 8, 7, 4, 5, 3, 2, },
+ { 8, 8, 4, 6, 5, 2, },
+ { 13, 8, 5, 6, 5, 2, },
+ { 13, 8, 5, 8, 6, 2, },
+ { 13, 8, 5, 11, 8, 2, }, /* 30 */
+ { 24, 21, 8, 9, 8, 2, }, /* 32 */
+ { 23, 18, 8, 13, 11, 3, },
+ { 23, 21, 8, 17, 13, 4, }, /* 34 */
+ { 31, 31, 17, 26, 25, 9, }, /* 37 */ /* mode V WB*/
+ { 2, 0, 0, 2, 2, 0, }, /* 17 */
+ { 4, 2, 0, 1, 0, 0, }, /* 18 */
+ { 7, 5, 2, 2, 2, 0, }, /* 22 */
+ { 8, 7, 2, 2, 2, 0, }, /* 23 */
+ { 11, 8, 2, 2, 2, 0, }, /* 24 */
+ { 13, 13, 9, 2, 2, 0, }, /* 25 */
+ { 13, 11, 7, 5, 2, 0, }, /* 27 */
+ { 18, 14, 9, 5, 5, 2, }, /* 29 */
+ { 31, 31, 14, 11, 11, 5, }, /* 34 */
+ { 31, 31, 27, 24, 21, 14, }, /* 37 */ /* mode V NB */
+ { 5, 4, 0, 0, 0, 0, }, /* 12 (11.883) */
+ { 2, 0, 0, 2, 0, 0, }, /* 16 (15.826) */
+ { 4, 2, 0, 2, 0, 0, }, /* 19 (18.572) */
+ { 5, 4, 0, 2, 0, 0, }, /* 20 (19.796) */
+ { 7, 5, 2, 2, 0, 0, }, /* 21 (20.910) */
+ { 8, 7, 2, 2, 0, 0, }, /* 22 (21.776) */
+ { 5, 5, 2, 4, 2, 0, }, /* 23 (22.959) */
+ { 8, 8, 5, 4, 2, 0, }, /* 25 (24.992) */
+ { 8, 8, 7, 5, 2, 0, }, /* 26 (25.904) */
+ { 13, 9, 8, 5, 2, 0, }, /* 27 (26.829) */
+ { 13, 11, 8, 5, 5, 1, }, /* 28 (27.989) */
+ { 13, 9, 8, 8, 5, 2, }, /* 29 (28.984) */
+ { 22, 16, 10, 6, 5, 2, }, /* 30 (29.980) */
+ { 21, 14, 10, 8, 7, 2, }, /* 31 (30.966) */
+ { 24, 21, 10, 8, 8, 2, }, /* 32 (31.995) */ /* G WB*/
+
+ { 5, 4, 1, 0, 0, 0, }, /* 12 (11.925) */
+ { 2, 0, 0, 2, 0, 0, }, /* 16 (15.826) */
+ { 5, 4, 1, 1, 0, 0, }, /* 19 (18.745) */
+ { 5, 4, 1, 2, 0, 0, }, /* 20 (19.838) */
+ { 7, 5, 2, 2, 0, 0, }, /* 21 (20.910) */
+ { 8, 5, 2, 2, 1, 0, }, /* 22 (21.985) */
+ { 9, 8, 5, 2, 1, 0, }, /* 23 (22.815) */
+ { 14, 13, 8, 2, 2, 0, }, /* 25 (24.996) */
+ { 13, 8, 7, 4, 2, 0, }, /* 26 (25.993) */
+ { 13, 9, 8, 5, 2, 2, }, /* 27 (26.954) */
+ { 18, 13, 8, 5, 2, 2, }, /* 28 (27.992) */
+ { 21, 13, 11, 5, 3, 2, }, /* 29 (28.996) */
+ { 22, 21, 13, 5, 5, 2, }, /* 30 (29.988) */
+ { 23, 21, 17, 7, 5, 2, }, /* 31 (30.962) */
+ { 27, 23, 21, 8, 5, 2, }, /* 32 (31.987) */ /* G NB*/
+ { 2, 0, 0, 2, 0, 0, }, /* 17 */
+ { 4, 2, 0, 1, 0, 0, }, /* 18 */
+ { 4, 1, 0, 4, 0, 0, }, /* 21 */
+ { 5, 2, 0, 4, 1, 0, }, /* 22 */
+ { 8, 5, 2, 4, 0, 0, }, /* 24 */
+ { 8, 5, 2, 5, 2, 0, }, /* 25 */
+ { 14, 10, 5, 5, 5, 1, }, /* 28 */
+ { 14, 10, 5, 8, 8, 4, }, /* 30 */
+ { 13, 10, 5, 13, 8, 8, },
+ { 23, 21, 8, 8, 8, 4, },
+ { 23, 18, 5, 13, 8, 8, }, /* 33 */
+ /* mode T WB */
+ { 2, 0, 0, 2, 2, 0, }, /* 17 */
+ { 4, 2, 0, 1, 0, 0, }, /* 18 */
+ { 7, 5, 2, 2, 2, 0, }, /* 22 */
+ { 8, 7, 4, 2, 2, 0, }, /* 23 */
+ { 11, 8, 5, 2, 2, 0, }, /* 24 */
+ { 18, 8, 5, 2, 2, 0, }, /* 25 */
+ { 16, 8, 5, 5, 5, 2, }, /* 28 */
+ { 28, 23, 8, 5, 5, 5, }, /* 31 */
+ { 31, 31, 8, 5, 5, 7, }, /* 32 */ /* mode T NB */
+
+ { 18, 18, 11, 9, 6, 5, }, /* 31 */
+ { 24, 23, 13, 9, 6, 5, }, /* 32 */ /* mode G 16k */
+
+ { 24, 23, 13, 9, 6, 5, }, /* 32 (31.998) */
+ { 36, 31, 18, 9, 6, 5, }, /* 33 (32.983) */ /* T 16k */
+
+ { 2, 0, 0, 2, 2, 0, }, /* 17 */
+ { 7, 5, 2, 2, 0, 0, }, /* 21 */
+ { 7, 5, 2, 2, 2, 0, }, /* 22 */
+ { 9, 8, 3, 4, 2, 0, }, /* 25 */
+ { 11, 9, 8, 4, 2, 0, }, /* 26 */
+ { 48, 48, 34, 13, 11, 9 }, /* 36 */ /* mode AUDIO_WB 36 + 4 + 1 */
+
+ { 22, 10, 3, 0, 0, 0 }, /* 17 */
+ { 6, 6, 2, 2, 0, 0 }, /* 21 */
+ { 6, 6, 2, 2, 2, 0 }, /* 22 */
+ { 23, 10, 3, 2, 2, 0 }, /* 26 */
+ { 32, 16, 3, 2, 2, 0 }, /* 27 */ /* AUDIO_NB */
+ { 39, 30, 12, 2, 2, 0 }, /* 28 */ /* AUDIO_NB */
+ { 11, 9, 8, 4, 2, 0, }, /* 26 */
+ { 48, 48, 48, 13, 9, 8 }, /* 36 */ /* mode AUDIO_WB 16k 15-36 + 4 + 1*/
+ { 8, 7, 2, 2, 0, 0, }, /* 22 (21.776) */
+ { 13, 13, 5, 5, 5, 0, }, /* 28 (27.994) */
+ { 18, 17, 5, 5, 5, 1, }, /* 29 (28.996) */
+ { 17, 13, 5, 8, 6, 2, }, /* 30 (29.991) */
+ { 23, 21, 8, 9, 8, 3, }, /* 32 (31.992) */
+ { 31, 29, 16, 8, 8, 3, }, /* 33 (32.993) */
+ { 31, 25, 16, 12, 8, 8, }, /* 34 (33.968) */
+ { 46, 48, 18, 18, 18, 12, }, /* 37 (36.995) */ /* VOICED 16k */
+ { 14, 12, 9, 2, 2, 0, }, /* 25 (24.980) */
+ { 15, 13, 3, 2, 2, 0, }, /* 25 (24.974) */
+ { 17, 3, 0, 2, 2, 1, }, /* 25 (24.852) */
+ { 13, 10, 3, 2, 2, 2, }, /* 25 (24.994) */
+ { 14, 13, 8, 2, 2, 0, }, /* 25 (24.996) */
+ { 7, 3, 0, 5, 3, 1, }, /* 25 (24.671) */
+ { 4, 3, 2, 6, 6, 5, }, /* 25 (24.936) */
+ { 4, 2, 0, 9, 9, 3, }, /* 25 (24.955) */
+ { 4, 2, 0, 9, 8, 2, }, /* 25 (24.853) */
+ { 4, 2, 0, 9, 7, 6, }, /* 25 (24.881) */
+ { 6, 3, 0, 6, 3, 2, }, /* 25 (24.939) */
+ { 3, 2, 0, 9, 8, 5, }, /* 25 (24.996) */
+ { 2, 2, 0, 15, 3, 3, }, /* 25 (24.310) */
+ { 4, 2, 0, 9, 9, 3, }, /* 25 (24.955) */
+ { 4, 4, 2, 7, 6, 3, }, /* 25 (24.984) */
+ { 3, 2, 0, 9, 7, 6, }, /* 25 (24.866) */
+
+};
+
+const Word16 no_lead_p_fx[][MAX_NO_SCALES * 2] = // Q0
+{
+
+ { 2, 1, 0, 0, 0, 0, }, /* 9 (8.464) */
+ { 4, 2, 0, 2, 0, 0, }, /* 19 (18.572) */
+ { 5, 5, 2, 4, 2, 0, }, /* 23 (22.959) */
+ { 8, 5, 2, 4, 0, 0, }, /* 24 (23.949) */
+ { 8, 8, 5, 4, 2, 0, }, /* 25 (24.992) */
+ { 13, 11, 5, 5, 2, 0, }, /* 27 (26.902) */
+ { 11, 10, 5, 6, 5, 2, }, /* 28 (27.996) */
+ { 14, 13, 5, 7, 5, 2, }, /* 29 (28.937) */
+ { 16, 13, 5, 8, 7, 2, }, /* 30 (29.954) */
+ { 21, 21, 5, 8, 5, 2, }, /* 31 (30.978) */
+ { 24, 21, 5, 8, 8, 4, }, /* 32 (31.978) */
+ { 32, 23, 5, 13, 11, 5, }, /* 34 (33.975) */
+ { 36, 31, 8, 16, 13, 5, }, /* 35 (34.975) */
+ { 45, 35, 16, 18, 13, 5, }, /* 36 (35.889) */
+ { 45, 35, 16, 38, 31, 8, }, /* 39 (38.488) */ /* V WB*/ /* 14 */
+
+ { 2, 0, 0, 0, 0, 0, }, /* 8 (7.913) */
+ { 4, 2, 0, 2, 0, 0, }, /* 19 (18.572) */
+ { 8, 7, 2, 2, 2, 0, }, /* 23 (22.773) */
+ { 13, 11, 5, 2, 1, 0, }, /* 24 (23.999) */
+ { 8, 8, 5, 4, 2, 0, }, /* 25 (24.992) */
+ { 13, 11, 5, 5, 2, 1, }, /* 27 (26.962) */
+ { 13, 11, 5, 5, 5, 2, }, /* 28 (27.835) */
+ { 14, 13, 5, 7, 5, 2, }, /* 29 (28.937) */
+ { 23, 21, 5, 5, 5, 2, }, /* 30 (29.969) */
+ { 23, 18, 5, 8, 5, 2, }, /* 31 (30.952) */
+ { 24, 21, 5, 8, 8, 4, }, /* 32 (31.978) */
+ { 43, 41, 13, 9, 8, 5, }, /* 34 (33.992) */
+ { 43, 36, 13, 13, 10, 5, }, /* 35 (35.000) */
+ { 43, 40, 13, 17, 13, 9, }, /* 36 (35.980) */
+ { 43, 42, 13, 31, 30, 18, }, /* 39 (38.512) */ /* V NB*/ /* 29 */
+
+ { 2, 0, 0, 1, 0, 0, }, /* 15 (14.733) */
+ { 5, 4, 1, 1, 0, 0, }, /* 19 (18.745) */
+ { 8, 7, 2, 2, 0, 0, }, /* 22 (21.776) */
+ { 10, 9, 5, 2, 0, 0, }, /* 23 (22.791) */
+ { 14, 13, 8, 2, 0, 0, }, /* 24 (23.999) */
+ { 14, 13, 8, 2, 2, 0, }, /* 25 (24.996) */
+ { 18, 17, 13, 2, 2, 0, }, /* 26 (25.934) */
+ { 14, 13, 8, 5, 4, 0, }, /* 28 (27.969) */
+ { 18, 17, 13, 5, 4, 2, }, /* 29 (28.996) */
+ { 22, 21, 13, 5, 5, 2, }, /* 30 (29.988) */
+ { 31, 23, 21, 5, 5, 2, }, /* 31 (30.931) */
+ { 27, 23, 21, 8, 5, 2, }, /* 32 (31.987) */
+ { 31, 23, 21, 9, 8, 5, }, /* 33 (32.982) */
+ { 32, 31, 24, 11, 8, 5, }, /* 34 (33.967) */
+ { 32, 32, 28, 13, 11, 8, }, /* 35 (34.994) */ /* G WB*/ /* 44 */
+
+ { 2, 0, 0, 1, 0, 0, }, /* 15 (14.733) */
+ { 5, 4, 2, 1, 0, 0, }, /* 19 (18.792) */
+ { 8, 5, 2, 2, 1, 0, }, /* 22 (21.985) */
+ { 8, 7, 2, 2, 2, 0, }, /* 23 (22.773) */
+ { 13, 11, 2, 2, 1, 0, }, /* 24 (23.932) */
+ { 16, 13, 2, 2, 2, 0, }, /* 25 (24.955) */
+ { 21, 17, 2, 2, 2, 0, }, /* 26 (25.991) */
+ { 13, 12, 2, 5, 5, 2, }, /* 28 (27.979) */
+ { 18, 16, 2, 5, 5, 2, }, /* 29 (28.878) */
+ { 23, 21, 2, 5, 5, 2, }, /* 30 (29.954) */
+ { 32, 28, 2, 5, 5, 2, }, /* 31 (30.893) */
+ { 38, 31, 2, 7, 5, 2, }, /* 32 (31.963) */
+ { 33, 31, 2, 8, 8, 4, }, /* 33 (32.997) */
+ { 42, 31, 2, 9, 9, 8, }, /* 34 (33.986) */
+ { 42, 31, 2, 13, 11, 9, }, /* 35 (34.952) */ /* G NB*/ /* 59 */
+
+ { 7, 5, 2, 2, 0, 0, }, /* 21 (20.910) */
+ { 8, 8, 5, 4, 2, 0, }, /* 25 (24.992) */
+ { 13, 8, 5, 4, 2, 0, }, /* 26 */
+ { 13, 8, 5, 8, 6, 2, }, /* 29 */
+ { 13, 8, 5, 9, 8, 5, }, /* 30 */
+ { 48, 48, 48, 36, 36, 28 }, /* 40 */ /* mode 7 AUDIO_WB */ /* 65*/
+
+ { 7, 5, 2, 2, 0, 0 }, /* 21 */
+ { 13, 13, 9, 2, 2, 0 }, /* 25 */
+ { 18, 18, 9, 2, 2, 0 }, /* 26 */
+ { 24, 23, 10, 5, 4, 2 }, /* 30 */
+ { 31, 31, 12, 5, 5, 2 }, /* 31 */ /*AUDIO_NB */ /* 70 */
+ { 43, 34, 12, 5, 5, 4 }, /* 32 */ /*AUDIO_NB */ /* 71 */
+ { 13, 8, 5, 9, 8, 5, }, /* 30 */
+ { 48, 48, 45, 45, 31, 25 }, /* 40 */ /* mode AUDIO_WB 16k */ /* 73*/
+
+ { 2, 0, 0, 2, 2, 0, }, /* 17 (16.823) */
+ { 7, 5, 2, 2, 0, 0, }, /* 21 (20.910) */
+ { 7, 5, 2, 2, 2, 0, }, /* 22 (21.907) */
+ { 13, 11, 10, 2, 2, 0, }, /* 25 (24.863) */
+ { 18, 18, 10, 2, 2, 0, }, /* 26 (25.921) */
+ { 13, 9, 9, 5, 2, 0, }, /* 27 (26.837) */
+ { 40, 28, 25, 18, 17, 2, }, /* 36 (35.998) */ /* INACTIVE NB*/ /* 80*/
+
+ { 18, 17, 11, 0, 0, 0, }, /* 17 (16.932) */
+ { 7, 5, 2, 2, 0, 0, }, /* 21 (20.910) */
+ { 8, 5, 2, 2, 1, 0, }, /* 22 (21.985) */
+ { 13, 13, 9, 2, 2, 0, }, /* 25 (24.845) */
+ { 18, 18, 12, 2, 2, 0, }, /* 26 (25.999) */
+ { 23, 23, 16, 2, 2, 0, }, /* 27 (26.981) */
+ { 36, 32, 24, 17, 13, 13, }, /* 36 (35.929) */ /* INACTIVE WB */ /* 87 */
+
+ { 2, 2, 0, 2, 0, 0, }, /* 17 (16.823) */
+ { 7, 5, 2, 2, 0, 0, }, /* 21 (20.910) */
+ { 8, 5, 2, 2, 1, 0, }, /* 22 (21.985) */
+ { 13, 13, 9, 2, 2, 0, }, /* 25 (24.845) */
+ { 18, 17, 13, 2, 2, 0, }, /* 26 (25.934) */
+ { 23, 22, 17, 2, 2, 0, }, /* 27 (26.914) */
+ { 34, 32, 24, 16, 16, 13, }, /* 36 (35.915) */ /* INACTIVE WB 16k*/ /* 94 */
+
+ { 4, 2, 0, 1, 0, 0, }, /* 18 (17.479) */
+ { 5, 4, 0, 1, 0, 0, }, /* 19 (18.703) */
+ { 8, 7, 2, 2, 0, 0, }, /* 22 (21.776) */
+ { 10, 9, 5, 2, 0, 0, }, /* 23 (22.791) */
+ { 15, 13, 5, 2, 0, 0, }, /* 24 (23.999) */
+ { 18, 16, 8, 5, 5, 1, }, /* 29 (28.966) */
+ { 42, 32, 31, 5, 5, 2, }, /* 32 (31.990) */ /* UNVOICED NB*/ /* 100 */
+
+ { 1, 0, 0, 1, 0, 0, }, /* 14 (13.640) */
+ { 2, 0, 0, 1, 0, 0, }, /* 15 (14.733) */
+ { 4, 2, 0, 1, 0, 0, }, /* 18 (17.479) */
+ { 4, 2, 0, 2, 0, 0, }, /* 19 (18.572) */
+ { 5, 4, 0, 2, 0, 0, }, /* 20 (19.796) */
+ { 8, 8, 5, 4, 2, 0, }, /* 25 (24.992) */
+ { 11, 10, 5, 6, 5, 2, }, /* 28 (27.996) */ /* UNVOICED WB */ /* 106 */
+ { 9, 3, 0, 4, 0, 0, }, /* 24 (23.818) */
+ { 18, 13, 10, 8, 3, 0, }, /* 30 (29.992) */
+ { 24, 18, 10, 9, 3, 0, }, /* 31 (30.998) */
+ { 32, 25, 10, 9, 3, 0, }, /* 32 (31.987) */
+ { 42, 31, 10, 12, 3, 2, }, /* 34 (33.994) */
+ { 44, 32, 27, 15, 3, 2, }, /* 35 (35.000) */
+ { 44, 32, 25, 19, 3, 2, }, /* 36 (35.994) */
+ { 48, 39, 32, 35, 15, 3, }, /* 39 (38.301) */ /* VOICED 16k */
+ { 11, 10, 5, 4, 2, 0, }, /* 26 (25.917) */ /* 107 */
+ { 23, 23, 17, 8, 7, 2, }, /* 32 (31.980) */
+ { 32, 31, 18, 9, 7, 5, }, /* 33 (32.990) */
+ { 31, 31, 18, 11, 9, 8, }, /* 34 (33.974) */
+ { 32, 32, 20, 13, 12, 8, }, /* 35 (34.989) */
+ { 32, 32, 23, 18, 17, 8, }, /* 36 (35.988) */
+ { 32, 32, 23, 23, 22, 10, }, /* 37 (36.989) */ /* GENERIC 16k*/ /* 113 */
+
+ { 2, 0, 0, 2, 0, 0, }, /* 16 (15.826) */ /* 114 */
+ { 7, 5, 2, 2, 0, 0, }, /* 21 (20.910) */
+ { 14, 13, 8, 2, 0, 0, }, /* 24 (23.999) */
+ { 8, 8, 5, 4, 2, 0, }, /* 25 (24.992) */
+ { 11, 10, 5, 4, 2, 0, }, /* 26 (25.917) */
+ { 16, 13, 8, 4, 2, 0, }, /* 27 (26.883) */
+ { 13, 13, 8, 5, 4, 2, }, /* 28 (27.901) */
+ { 23, 18, 13, 5, 5, 2, }, /* 30 (29.916) */
+ { 23, 23, 13, 7, 5, 2, }, /* 31 (30.993) */
+ { 23, 23, 17, 8, 7, 2, }, /* 32 (31.980) */
+ { 32, 31, 24, 8, 7, 2, }, /* 33 (32.958) */
+ { 42, 32, 31, 9, 9, 4, }, /* 34 (33.987) */
+ { 40, 32, 29, 12, 9, 9, }, /* 35 (34.994) */
+ { 40, 32, 31, 17, 11, 11, }, /* 36 (35.968) */
+ { 41, 32, 31, 20, 18, 13, }, /* 37 (36.971) */ /* GENERIC 12.8k MA*/ /* 128 */
+
+ { 11, 10, 5, 4, 2, 0, }, /* 26 (25.917) */ /* 129 */
+ { 23, 23, 17, 8, 7, 2, }, /* 32 (31.980) */
+ { 31, 31, 18, 9, 8, 2, }, /* 33 (32.995) */
+ { 48, 32, 24, 9, 8, 3, }, /* 34 (33.993) */
+ { 48, 32, 28, 11, 10, 3, }, /* 35 (34.992) */
+ { 48, 37, 32, 16, 12, 4, }, /* 36 (35.997) */
+ { 48, 37, 32, 18, 17, 12, }, /* 37 (36.961) */ /* AUDIO 16k */
+};
+
+/*----------------------------------------------------------------------------------*
+ * Enhacer - 2.0 - 6.4 kHz impulse response with phase dispersion in freq. domain
+ *----------------------------------------------------------------------------------*/
+const Word16 low_H[64] = /* (1Q14) */
+{
+ 16388, 16380, 16386, 16381, 16382, 16382, 16381, 16383, 16385, 10265,
+ 10154, 9894, 14051, 16342, -531, 13216, 16372, 15509, 9406, 15948,
+ 4726, 14593, 10404, 9795, -16337, -1815, -10624, 12646, 14555, -12684,
+ 11388, 8175, 16382, -14198, 11781, 10378, 7515, 10423, -12473, 16284,
+ -1200, -13137, 12658, -7446, 15683, -3764, -13419, -5281, 521, -9686,
+ -16375, -1219, 8435, -13059, -12862, -12775, -1, 2, 0, -3,
+ -1, -1, -2, 1
+};
+
+const Word16 low_H16k[80] = /* (1Q14) */
+{
+ 16388, 16380, 16386, 16381, 16382, 16382, 16381, 16383, 16385, 10265,
+ 10154, 9894, 14051, 16342, -531, 13216, 16372, 15509, 9406, 15948,
+ 4726, 14593, 10404, 9795, -16337, -1815, -10624, 12646, 14555, -12684,
+ 11388, 8175, -4121, -13408, 10605, -12308, 16358, 4699, 7640, -7360,
+ 16382, -14639, -14494, 15695, -907, -10815, -12489, 9416, 15857,
+ -14198, 11781, 10378, 7515, 10423, -12473, 16284, -1200, -13137, 12658,
+ -7446, 15683, -3764, -13419, -5281, 521, -9686, -16375, -1219, 8435,
+ -13059, -12862, -12775, -1, 2, 0, -3, -1, -1, -2, 1
+};
+/*----------------------------------------------------------------------------------*
+ * Enhancer - 3.2 - 6.4 kHz impulse response with phase dispersion in freq. domain
+ *----------------------------------------------------------------------------------*/
+
+const Word16 mid_H[64] = /* (1Q14) */
+{
+ 16382, 16381, 16384, 16384, 16385, 16387, 16386, 16382, 16387, 16382,
+ 16385, 16385, 16385, 16384, 16382, 16388, 14847, 9629, 13248, 14486,
+ 10995, 642, 13817, 13779, 6468, 8664, 11634, 9780, -14636, -982,
+ 11746, -722, 16385, -16366, -11423, 16354, 7362, 13147, -11538, -13904,
+ -15052, -8862, 8811, -16371, -12146, 7660, -9638, -13254, -6923, 3,
+ -5, -2, -6, 1, 6, 5, -8, -2, 3, -5,
+ 0, -2, -4, 3
+};
+
+const Word16 mid_H16k[80] = /* (1Q14) */
+{
+ 16382, 16381, 16384, 16384, 16385, 16387, 16386, 16382, 16387, 16382,
+ 16385, 16385, 16385, 16384, 16382, 16388, 14847, 9629, 13248, 14486,
+ 10995, 642, 13817, 13779, 6468, 8664, 11634, 9780, -14636, -982,
+ 11746, -722, 108, -16195, -13199, -13289, 5114, 12941, 7110, 8873,
+ 16385, -13774, -14761, 10047, -15566, -9584, 9707, 2483, 16383,
+ -16366, -11423, 16354, 7362, 13147, -11538, -13904, -15052, -8862,
+ 8811, -16371, -12146, 7660, -9638, -13254, -6923, 3, -5, -2, -6,
+ 1, 6, 5, -8, -2, 3, -5, 0, -2, -4, 3
+};
+
+/*-------------------------------------------------------------------*
+ * Low-pass FIR filter for low-freq post-filtering
+ * response : 0dB @ 50Hz, -6dB @ 500Hz, -45dB @ 1kHz)
+ * filter parameters: fs/2=8000, fc=500, gain=1.0, n=16
+ *-------------------------------------------------------------------*/
+
+/*-------------------------------------------------------------------*
+ * Bass post-filter
+ *-------------------------------------------------------------------*/
+
+/* For bass post filter */
+const Word16 filt_lp_fx[1 + L_FILT] =
+{
+ 2892/*0.088250f Q15*/, 2831/*0.086410f Q15*/, 2657/*0.081074f Q15*/, 2384/*0.072768f Q15*/,
+ 2041/*0.062294f Q15*/, 1659/*0.050623f Q15*/, 1271/*0.038774f Q15*/, 907/*0.027692f Q15*/,
+ 594/*0.018130f Q15*/, 347/*0.010578f Q15*/, 171/*0.005221f Q15*/, 64/*0.001946f Q15*/,
+ 13/*0.000385f Q15*/
+};
+
+const Word16 filt_lp_16kHz_fx[1 + L_FILT16k] =
+{
+ 2340/*0.071410f Q15*/, 2308/*0.070433f Q15*/, 2214/*0.067568f Q15*/, 2064/*0.062999f Q15*/,
+ 1868/*0.057020f Q15*/, 1639/*0.050005f Q15*/, 1389/*0.042378f Q15*/, 1133/*0.034577f Q15*/,
+ 885/*0.027022f Q15*/, 658/*0.020078f Q15*/, 460/*0.014031f Q15*/, 297/*0.009070f Q15*/,
+ 173/*0.005276f Q15*/, 86/*0.002625f Q15*/, 33/*0.000999f Q15*/, 7/*0.000205f Q15*/
+};
+
+/*-------------------------------------------------------------------*
+ * Pulse indexing tables for ACELP innovation coding
+ *-------------------------------------------------------------------*/
+
+const Word32 PI_select_table[23][8] = // Q0
+{
+ {1, 0, 0, 0, 0, 0, 0, 0},
+ {1, 1, 0, 0, 0, 0, 0, 0},
+ {1, 2, 1, 0, 0, 0, 0, 0},
+ {1, 3, 3, 1, 0, 0, 0, 0},
+ {1, 4, 6, 4, 1, 0, 0, 0},
+ {1, 5, 10, 10, 5, 1, 0, 0},
+ {1, 6, 15, 20, 15, 6, 1, 0},
+ {1, 7, 21, 35, 35, 21, 7, 1},
+ {1, 8, 28, 56, 70, 56, 28, 8},
+ {1, 9, 36, 84, 126, 126, 84, 36},
+ {1, 10, 45, 120, 210, 252, 210, 120},
+ {1, 11, 55, 165, 330, 462, 462, 330},
+ {1, 12, 66, 220, 495, 792, 924, 792},
+ {1, 13, 78, 286, 715, 1287, 1716, 1716},
+ {1, 14, 91, 364, 1001, 2002, 3003, 3432},
+ {1, 15, 105, 455, 1365, 3003, 5005, 6435},
+ {1, 16, 120, 560, 1820, 4368, 8008, 11440},
+ {1, 17, 136, 680, 2380, 6188, 12376, 19448},
+ {1, 18, 153, 816, 3060, 8568, 18564, 31824},
+ {1, 19, 171, 969, 3876, 11628, 27132, 50388},
+ {1, 20, 190, 1140, 4845, 15504, 38760, 77520},
+ {1, 21, 210, 1330, 5985, 20349, 54264, 116280},
+ {1, 22, 231, 1540, 7315, 26334, 74613, 1705444}
+};
+
+const Word32 PI_offset[8][8] = // Q0
+{
+ /* for 0p(0). */
+ {0x00000,0x00000,0x00000,0x00000,0x00000,0x00000,0x00000,0x00000},
+ /* for 1p(1). */
+ {0x00000,0x00000,0x00000,0x00000,0x00000,0x00000,0x00000,0x00000},
+ /* for 2p(2,1). */
+ {0x00000,0x00000,0x00000,0x00000,0x00000,0x00000,0x00000,0x00000},
+ /* for 3p(3,2,1). */
+ {0x00000,0x00000,0x01180,0x01540,0x00000,0x00000,0x00000,0x00000},
+ /* for 4p(4,3,2,1). */
+ {0x00000,0x00000,0x071C0,0x0A640,0x0ABE0,0x00000,0x00000,0x00000},
+ /* for 5p(5,4,3,2,1). */
+ {0x00000,0x00000,0x22200,0x3E900,0x45200,0x45980,0x00000,0x00000},
+ /* for 6p(6,5,4,3,2,1). */
+ {0x00000,0x00000,0x07d200,0x127c00,0x16ed80,0x179c80,0x17a5e0,0x00000},
+ /* for 7p(7,6,5,4,3,2,1). */
+ {0x00000,0x00000,0x165800,0x454400,0x654200,0x6E2500,0x6F2B80,0x6F36C0}
+};
+
+const Word16 PI_factor[7] = {0,0,120,560,1820,4368,8008}; // Q0
+
+/* ACELP pulse coding */
+const Word16 hi_to_low_tmpl[10] = { 0, 0, 0, 3, 9, 5, 3, 1, 8, 8 }; // Q0
+const UWord16 low_len[10] = { 0, 0, 8, 5, 7,11,13,15,16,16 }; // Q0
+const UWord16 low_mask[10] = { 0, 0, 255,31,127,2047,8191,32767,65535,65535 }; // Q0
+const UWord16 indx_fact[10] = { 0, 0,2,172,345,140,190,223,463,1732 }; // Q0
+const Word16 index_len[3] = { 0, 5, 9 }; // Q0
+const Word16 index_mask_ACELP[3] = { 0, 31, 511 }; // Q0
+
+
+/*------------------------------------------------------------------------------*
+ * EDCT tables
+ *------------------------------------------------------------------------------*/
+
+//Fix
+const Word16 edct_table_80_fx[80] = /*Q16 */
+{
+ 21911, 21903, 21886, 21860, 21827, 21784, 21734, 21675,
+ 21608, 21532, 21448, 21356, 21255, 21147, 21030, 20905,
+ 20772, 20631, 20482, 20325, 20161, 19988, 19808, 19621,
+ 19425, 19222, 19012, 18795, 18570, 18338, 18099, 17853,
+ 17600, 17340, 17074, 16801, 16522, 16236, 15944, 15646,
+ 15341, 15031, 14715, 14394, 14067, 13734, 13396, 13053,
+ 12705, 12352, 11994, 11632, 11265, 10894, 10519, 10139,
+ 9756, 9369, 8978, 8584, 8186, 7786, 7382, 6975,
+ 6566, 6155, 5741, 5324, 4906, 4486, 4064, 3640,
+ 3215, 2789, 2362, 1934, 1505, 1075, 645, 215
+};
+
+const Word16 edct_table_100_fx[] =
+{/*Q16 */
+ 20723, 20718, 20708, 20692, 20672, 20646, 20616, 20580,
+ 20539, 20493, 20442, 20386, 20325, 20259, 20188, 20112,
+ 20031, 19946, 19855, 19759, 19658, 19553, 19443, 19328,
+ 19208, 19083, 18954, 18820, 18681, 18538, 18390, 18238,
+ 18081, 17920, 17754, 17584, 17410, 17231, 17048, 16861,
+ 16670, 16474, 16275, 16071, 15864, 15652, 15437, 15218,
+ 14995, 14768, 14538, 14304, 14067, 13826, 13582, 13335,
+ 13084, 12830, 12573, 12312, 12049, 11783, 11513, 11241,
+ 10966, 10689, 10409, 10126, 9841, 9553, 9263, 8971,
+ 8676, 8379, 8081, 7780, 7477, 7173, 6867, 6559,
+ 6249, 5938, 5625, 5311, 4996, 4679, 4362, 4043,
+ 3723, 3403, 3081, 2759, 2436, 2112, 1788, 1464,
+ 1139, 814, 488, 163
+};
+
+const Word16 edct_table_120_fx[120] = /*Q16 */
+{
+ 19800, 19797, 19790, 19780, 19766, 19749, 19729, 19705,
+ 19678, 19648, 19614, 19576, 19536, 19492, 19445, 19394,
+ 19340, 19283, 19223, 19159, 19092, 19021, 18948, 18871,
+ 18791, 18708, 18621, 18531, 18438, 18342, 18243, 18141,
+ 18035, 17927, 17815, 17701, 17583, 17462, 17339, 17212,
+ 17082, 16950, 16815, 16676, 16535, 16391, 16244, 16095,
+ 15942, 15787, 15629, 15469, 15306, 15140, 14972, 14801,
+ 14628, 14452, 14273, 14092, 13909, 13723, 13535, 13345,
+ 13152, 12958, 12761, 12561, 12360, 12156, 11951, 11743,
+ 11533, 11322, 11108, 10893, 10675, 10456, 10235, 10012,
+ 9788, 9562, 9334, 9104, 8874, 8641, 8407, 8172,
+ 7935, 7697, 7457, 7217, 6975, 6732, 6487, 6242,
+ 5995, 5748, 5499, 5250, 4999, 4748, 4496, 4243,
+ 3990, 3736, 3481, 3225, 2969, 2713, 2456, 2199,
+ 1941, 1683, 1424, 1166, 907, 648, 389, 130
+};
+
+const Word16 edct_table_320_fx[320] = /*Q16 */
+{
+ 15495, 15495, 15494, 15493, 15491, 15489, 15487, 15484,
+ 15481, 15478, 15474, 15470, 15466, 15461, 15456, 15450,
+ 15444, 15438, 15431, 15424, 15417, 15409, 15401, 15392,
+ 15383, 15374, 15364, 15354, 15344, 15333, 15322, 15310,
+ 15298, 15286, 15273, 15260, 15247, 15233, 15219, 15205,
+ 15190, 15175, 15159, 15143, 15127, 15110, 15093, 15076,
+ 15058, 15040, 15021, 15002, 14983, 14964, 14944, 14924,
+ 14903, 14882, 14860, 14839, 14817, 14794, 14771, 14748,
+ 14725, 14701, 14677, 14652, 14627, 14602, 14576, 14550,
+ 14524, 14497, 14470, 14443, 14415, 14387, 14359, 14330,
+ 14301, 14271, 14242, 14212, 14181, 14150, 14119, 14088,
+ 14056, 14024, 13991, 13958, 13925, 13891, 13858, 13823,
+ 13789, 13754, 13719, 13683, 13647, 13611, 13575, 13538,
+ 13501, 13463, 13425, 13387, 13349, 13310, 13271, 13231,
+ 13192, 13152, 13111, 13071, 13030, 12988, 12947, 12905,
+ 12862, 12820, 12777, 12734, 12690, 12647, 12602, 12558,
+ 12513, 12468, 12423, 12377, 12331, 12285, 12239, 12192,
+ 12145, 12098, 12050, 12002, 11954, 11905, 11856, 11807,
+ 11758, 11708, 11658, 11608, 11557, 11507, 11455, 11404,
+ 11352, 11301, 11248, 11196, 11143, 11090, 11037, 10983,
+ 10930, 10876, 10821, 10767, 10712, 10657, 10601, 10546,
+ 10490, 10434, 10378, 10321, 10264, 10207, 10150, 10092,
+ 10034, 9976, 9918, 9859, 9800, 9741, 9682, 9623,
+ 9563, 9503, 9443, 9382, 9322, 9261, 9200, 9138,
+ 9077, 9015, 8953, 8891, 8829, 8766, 8703, 8640,
+ 8577, 8513, 8450, 8386, 8322, 8258, 8193, 8129,
+ 8064, 7999, 7933, 7868, 7802, 7737, 7671, 7604,
+ 7538, 7471, 7405, 7338, 7271, 7203, 7136, 7068,
+ 7001, 6933, 6865, 6796, 6728, 6659, 6591, 6522,
+ 6453, 6383, 6314, 6244, 6175, 6105, 6035, 5965,
+ 5895, 5824, 5754, 5683, 5612, 5541, 5470, 5399,
+ 5327, 5256, 5184, 5113, 5041, 4969, 4897, 4824,
+ 4752, 4680, 4607, 4534, 4462, 4389, 4316, 4243,
+ 4169, 4096, 4023, 3949, 3876, 3802, 3728, 3654,
+ 3580, 3506, 3432, 3358, 3284, 3209, 3135, 3060,
+ 2986, 2911, 2836, 2761, 2687, 2612, 2537, 2462,
+ 2386, 2311, 2236, 2161, 2085, 2010, 1934, 1859,
+ 1783, 1708, 1632, 1557, 1481, 1405, 1329, 1254,
+ 1178, 1102, 1026, 950, 874, 798, 722, 646,
+ 570, 494, 418, 342, 266, 190, 114, 38
+};
+
+const Word16 edct_table_480_fx[480] = /*Q16 */
+{
+ 14001, 14001, 14001, 14000, 14000, 13999, 13998, 13997,
+ 13996, 13995, 13993, 13991, 13990, 13988, 13986, 13983,
+ 13981, 13978, 13976, 13973, 13970, 13967, 13963, 13960,
+ 13956, 13953, 13949, 13945, 13940, 13936, 13932, 13927,
+ 13922, 13917, 13912, 13907, 13902, 13896, 13890, 13885,
+ 13879, 13872, 13866, 13860, 13853, 13846, 13840, 13833,
+ 13825, 13818, 13811, 13803, 13795, 13787, 13779, 13771,
+ 13763, 13754, 13746, 13737, 13728, 13719, 13709, 13700,
+ 13691, 13681, 13671, 13661, 13651, 13641, 13630, 13620,
+ 13609, 13598, 13587, 13576, 13565, 13553, 13542, 13530,
+ 13518, 13506, 13494, 13482, 13469, 13457, 13444, 13431,
+ 13418, 13405, 13392, 13378, 13365, 13351, 13337, 13323,
+ 13309, 13295, 13280, 13266, 13251, 13236, 13221, 13206,
+ 13191, 13175, 13160, 13144, 13128, 13112, 13096, 13080,
+ 13063, 13047, 13030, 13013, 12996, 12979, 12962, 12944,
+ 12927, 12909, 12891, 12873, 12855, 12837, 12819, 12800,
+ 12782, 12763, 12744, 12725, 12706, 12686, 12667, 12647,
+ 12628, 12608, 12588, 12568, 12547, 12527, 12506, 12486,
+ 12465, 12444, 12423, 12402, 12380, 12359, 12337, 12316,
+ 12294, 12272, 12250, 12227, 12205, 12182, 12160, 12137,
+ 12114, 12091, 12068, 12045, 12021, 11998, 11974, 11950,
+ 11926, 11902, 11878, 11854, 11829, 11804, 11780, 11755,
+ 11730, 11705, 11680, 11654, 11629, 11603, 11578, 11552,
+ 11526, 11500, 11474, 11447, 11421, 11394, 11368, 11341,
+ 11314, 11287, 11260, 11232, 11205, 11177, 11150, 11122,
+ 11094, 11066, 11038, 11010, 10981, 10953, 10924, 10895,
+ 10867, 10838, 10809, 10779, 10750, 10721, 10691, 10662,
+ 10632, 10602, 10572, 10542, 10512, 10481, 10451, 10420,
+ 10390, 10359, 10328, 10297, 10266, 10235, 10203, 10172,
+ 10140, 10109, 10077, 10045, 10013, 9981, 9949, 9917,
+ 9884, 9852, 9819, 9786, 9754, 9721, 9688, 9654,
+ 9621, 9588, 9554, 9521, 9487, 9454, 9420, 9386,
+ 9352, 9318, 9283, 9249, 9214, 9180, 9145, 9111,
+ 9076, 9041, 9006, 8971, 8935, 8900, 8865, 8829,
+ 8794, 8758, 8722, 8686, 8650, 8614, 8578, 8542,
+ 8505, 8469, 8432, 8396, 8359, 8322, 8285, 8248,
+ 8211, 8174, 8137, 8099, 8062, 8025, 7987, 7949,
+ 7912, 7874, 7836, 7798, 7760, 7721, 7683, 7645,
+ 7606, 7568, 7529, 7491, 7452, 7413, 7374, 7335,
+ 7296, 7257, 7218, 7178, 7139, 7100, 7060, 7020,
+ 6981, 6941, 6901, 6861, 6821, 6781, 6741, 6701,
+ 6661, 6620, 6580, 6539, 6499, 6458, 6418, 6377,
+ 6336, 6295, 6254, 6213, 6172, 6131, 6090, 6048,
+ 6007, 5966, 5924, 5883, 5841, 5799, 5758, 5716,
+ 5674, 5632, 5590, 5548, 5506, 5464, 5422, 5379,
+ 5337, 5295, 5252, 5210, 5167, 5124, 5082, 5039,
+ 4996, 4953, 4911, 4868, 4825, 4782, 4738, 4695,
+ 4652, 4609, 4566, 4522, 4479, 4435, 4392, 4348,
+ 4305, 4261, 4218, 4174, 4130, 4086, 4042, 3999,
+ 3955, 3911, 3867, 3823, 3778, 3734, 3690, 3646,
+ 3602, 3557, 3513, 3469, 3424, 3380, 3335, 3291,
+ 3246, 3202, 3157, 3112, 3068, 3023, 2978, 2933,
+ 2889, 2844, 2799, 2754, 2709, 2664, 2619, 2574,
+ 2529, 2484, 2439, 2394, 2349, 2303, 2258, 2213,
+ 2168, 2122, 2077, 2032, 1986, 1941, 1896, 1850,
+ 1805, 1759, 1714, 1668, 1623, 1577, 1532, 1486,
+ 1441, 1395, 1350, 1304, 1258, 1213, 1167, 1121,
+ 1076, 1030, 984, 939, 893, 847, 801, 756,
+ 710, 664, 618, 573, 527, 481, 435, 389,
+ 344, 298, 252, 206, 160, 115, 69, 23
+};
+
+const Word16 edct_table_600_fx[] =/*Q16 */
+{
+ 26483, 26483, 26483, 26482, 26481, 26481, 26479, 26478,
+ 26477, 26475, 26473, 26471, 26469, 26467, 26464, 26461,
+ 26459, 26455, 26452, 26449, 26445, 26441, 26437, 26433,
+ 26429, 26424, 26420, 26415, 26410, 26404, 26399, 26393,
+ 26387, 26381, 26375, 26369, 26362, 26356, 26349, 26342,
+ 26335, 26327, 26320, 26312, 26304, 26296, 26287, 26279,
+ 26270, 26261, 26252, 26243, 26234, 26224, 26214, 26204,
+ 26194, 26184, 26173, 26163, 26152, 26141, 26130, 26118,
+ 26107, 26095, 26083, 26071, 26059, 26046, 26033, 26021,
+ 26008, 25994, 25981, 25968, 25954, 25940, 25926, 25912,
+ 25897, 25883, 25868, 25853, 25838, 25823, 25807, 25791,
+ 25776, 25760, 25743, 25727, 25711, 25694, 25677, 25660,
+ 25643, 25625, 25608, 25590, 25572, 25554, 25535, 25517,
+ 25498, 25480, 25461, 25441, 25422, 25403, 25383, 25363,
+ 25343, 25323, 25302, 25282, 25261, 25240, 25219, 25198,
+ 25176, 25155, 25133, 25111, 25089, 25067, 25044, 25022,
+ 24999, 24976, 24953, 24929, 24906, 24882, 24858, 24834,
+ 24810, 24786, 24761, 24737, 24712, 24687, 24662, 24636,
+ 24611, 24585, 24559, 24533, 24507, 24481, 24454, 24427,
+ 24401, 24373, 24346, 24319, 24291, 24264, 24236, 24208,
+ 24180, 24151, 24123, 24094, 24065, 24036, 24007, 23978,
+ 23948, 23918, 23888, 23858, 23828, 23798, 23767, 23737,
+ 23706, 23675, 23644, 23612, 23581, 23549, 23518, 23486,
+ 23453, 23421, 23389, 23356, 23323, 23290, 23257, 23224,
+ 23191, 23157, 23123, 23090, 23056, 23021, 22987, 22953,
+ 22918, 22883, 22848, 22813, 22778, 22742, 22707, 22671,
+ 22635, 22599, 22563, 22526, 22490, 22453, 22416, 22379,
+ 22342, 22305, 22267, 22230, 22192, 22154, 22116, 22078,
+ 22039, 22001, 21962, 21923, 21884, 21845, 21806, 21766,
+ 21727, 21687, 21647, 21607, 21567, 21527, 21486, 21446,
+ 21405, 21364, 21323, 21282, 21241, 21199, 21157, 21116,
+ 21074, 21032, 20989, 20947, 20905, 20862, 20819, 20776,
+ 20733, 20690, 20647, 20603, 20560, 20516, 20472, 20428,
+ 20384, 20339, 20295, 20250, 20205, 20161, 20116, 20070,
+ 20025, 19980, 19934, 19888, 19842, 19796, 19750, 19704,
+ 19658, 19611, 19565, 19518, 19471, 19424, 19377, 19329,
+ 19282, 19234, 19186, 19139, 19091, 19042, 18994, 18946,
+ 18897, 18849, 18800, 18751, 18702, 18653, 18604, 18554,
+ 18505, 18455, 18405, 18355, 18305, 18255, 18205, 18154,
+ 18104, 18053, 18002, 17951, 17900, 17849, 17798, 17747,
+ 17695, 17643, 17592, 17540, 17488, 17436, 17383, 17331,
+ 17278, 17226, 17173, 17120, 17067, 17014, 16961, 16908,
+ 16854, 16801, 16747, 16693, 16640, 16586, 16531, 16477,
+ 16423, 16368, 16314, 16259, 16204, 16149, 16094, 16039,
+ 15984, 15929, 15873, 15818, 15762, 15706, 15650, 15595,
+ 15538, 15482, 15426, 15370, 15313, 15256, 15200, 15143,
+ 15086, 15029, 14972, 14914, 14857, 14800, 14742, 14684,
+ 14627, 14569, 14511, 14453, 14395, 14336, 14278, 14220,
+ 14161, 14103, 14044, 13985, 13926, 13867, 13808, 13749,
+ 13689, 13630, 13570, 13511, 13451, 13391, 13332, 13272,
+ 13212, 13151, 13091, 13031, 12971, 12910, 12849, 12789,
+ 12728, 12667, 12606, 12545, 12484, 12423, 12362, 12300,
+ 12239, 12177, 12116, 12054, 11992, 11930, 11868, 11806,
+ 11744, 11682, 11620, 11558, 11495, 11433, 11370, 11307,
+ 11245, 11182, 11119, 11056, 10993, 10930, 10867, 10803,
+ 10740, 10677, 10613, 10550, 10486, 10422, 10358, 10295,
+ 10231, 10167, 10103, 10039, 9974, 9910, 9846, 9781,
+ 9717, 9652, 9588, 9523, 9458, 9394, 9329, 9264,
+ 9199, 9134, 9069, 9003, 8938, 8873, 8808, 8742,
+ 8677, 8611, 8546, 8480, 8414, 8348, 8283, 8217,
+ 8151, 8085, 8019, 7953, 7886, 7820, 7754, 7688,
+ 7621, 7555, 7488, 7422, 7355, 7289, 7222, 7155,
+ 7088, 7022, 6955, 6888, 6821, 6754, 6687, 6620,
+ 6553, 6485, 6418, 6351, 6283, 6216, 6149, 6081,
+ 6014, 5946, 5879, 5811, 5743, 5676, 5608, 5540,
+ 5472, 5404, 5337, 5269, 5201, 5133, 5065, 4997,
+ 4928, 4860, 4792, 4724, 4656, 4587, 4519, 4451,
+ 4382, 4314, 4246, 4177, 4109, 4040, 3972, 3903,
+ 3834, 3766, 3697, 3629, 3560, 3491, 3422, 3354,
+ 3285, 3216, 3147, 3078, 3009, 2941, 2872, 2803,
+ 2734, 2665, 2596, 2527, 2458, 2389, 2320, 2251,
+ 2182, 2112, 2043, 1974, 1905, 1836, 1767, 1697,
+ 1628, 1559, 1490, 1421, 1351, 1282, 1213, 1144,
+ 1074, 1005, 936, 867, 797, 728, 659, 589,
+ 520, 451, 381, 312, 243, 173, 104, 35
+};
+
+const Word16 edct_table_128_fx[128] = /*Q16 */
+{
+ 19483, 19480, 19474, 19466, 19454, 19439, 19422, 19401,
+ 19378, 19351, 19322, 19290, 19255, 19217, 19176, 19132,
+ 19086, 19036, 18984, 18928, 18870, 18809, 18746, 18679,
+ 18610, 18537, 18462, 18385, 18304, 18221, 18135, 18046,
+ 17954, 17860, 17763, 17664, 17561, 17457, 17349, 17239,
+ 17126, 17011, 16893, 16773, 16650, 16524, 16396, 16266,
+ 16133, 15998, 15860, 15720, 15578, 15433, 15286, 15137,
+ 14985, 14831, 14675, 14516, 14356, 14193, 14028, 13861,
+ 13692, 13521, 13348, 13173, 12996, 12816, 12635, 12452,
+ 12268, 12081, 11892, 11702, 11510, 11316, 11121, 10924,
+ 10725, 10524, 10322, 10119, 9914, 9707, 9499, 9290,
+ 9079, 8867, 8653, 8438, 8222, 8005, 7786, 7566,
+ 7345, 7123, 6900, 6676, 6451, 6225, 5998, 5770,
+ 5541, 5312, 5081, 4850, 4618, 4385, 4152, 3918,
+ 3684, 3449, 3213, 2977, 2741, 2504, 2266, 2029,
+ 1791, 1552, 1314, 1075, 837, 598, 359, 120
+};
+
+const Word16 edct_table_160_fx[160] = /*Q16 */
+{
+ 18426, 18425, 18421, 18416, 18409, 18400, 18389, 18377,
+ 18362, 18346, 18329, 18309, 18288, 18265, 18240, 18214,
+ 18185, 18155, 18123, 18090, 18055, 18018, 17979, 17938,
+ 17896, 17852, 17806, 17759, 17710, 17659, 17607, 17552,
+ 17497, 17439, 17380, 17319, 17256, 17192, 17126, 17058,
+ 16989, 16918, 16846, 16772, 16696, 16619, 16540, 16459,
+ 16377, 16293, 16208, 16121, 16033, 15943, 15851, 15758,
+ 15664, 15568, 15470, 15371, 15271, 15169, 15065, 14960,
+ 14854, 14746, 14637, 14527, 14415, 14301, 14186, 14070,
+ 13953, 13834, 13714, 13592, 13469, 13345, 13220, 13093,
+ 12965, 12836, 12706, 12574, 12441, 12307, 12172, 12036,
+ 11898, 11759, 11620, 11479, 11337, 11193, 11049, 10904,
+ 10758, 10610, 10462, 10312, 10162, 10011, 9858, 9705,
+ 9551, 9395, 9239, 9082, 8925, 8766, 8606, 8446,
+ 8285, 8123, 7960, 7797, 7632, 7467, 7301, 7135,
+ 6968, 6800, 6632, 6463, 6293, 6122, 5952, 5780,
+ 5608, 5435, 5262, 5089, 4915, 4740, 4565, 4389,
+ 4214, 4037, 3861, 3684, 3506, 3328, 3150, 2972,
+ 2793, 2614, 2435, 2256, 2076, 1896, 1716, 1536,
+ 1356, 1175, 994, 814, 633, 452, 271, 90
+};
+
+const Word16 edct_table_40_fx[40] = /*Q16 */
+{
+ 26049, 26009, 25928, 25808, 25648, 25448, 25210, 24932,
+ 24616, 24262, 23870, 23442, 22977, 22477, 21943, 21375,
+ 20773, 20140, 19475, 18781, 18058, 17306, 16528, 15725,
+ 14897, 14047, 13174, 12282, 11370, 10441, 9496, 8536,
+ 7563, 6578, 5584, 4580, 3570, 2554, 1534, 512
+};
+
+const Word16 edct_table_20_fx[20] = /*Q16 */
+{
+ 30939, 30749, 30368, 29801, 29049, 28119, 27015, 25745,
+ 24316, 22737, 21018, 19169, 17202, 15129, 12963, 10717,
+ 8405, 6041, 3639, 1216
+};
+
+
+const Word16 edct_table_64_fx[] =/*Q16 */
+{
+ 23167, 23153, 23125, 23083, 23027, 22958, 22874, 22777,
+ 22666, 22542, 22403, 22252, 22087, 21908, 21717, 21512,
+ 21295, 21064, 20821, 20565, 20297, 20017, 19725, 19420,
+ 19105, 18777, 18438, 18089, 17728, 17356, 16975, 16582,
+ 16180, 15769, 15347, 14917, 14477, 14029, 13572, 13107,
+ 12634, 12154, 11666, 11171, 10670, 10162, 9648, 9128,
+ 8603, 8072, 7537, 6997, 6453, 5905, 5353, 4798,
+ 4241, 3681, 3118, 2554, 1988, 1421, 853, 284
+};
+
+
+const Word16 edct_table_200_fx[] =/*Q16 */
+{
+ 17427, 17426, 17423, 17420, 17416, 17411, 17404, 17397,
+ 17388, 17378, 17368, 17356, 17343, 17329, 17314, 17298,
+ 17281, 17262, 17243, 17223, 17201, 17179, 17155, 17131,
+ 17105, 17079, 17051, 17022, 16992, 16961, 16929, 16896,
+ 16862, 16827, 16791, 16754, 16716, 16676, 16636, 16595,
+ 16553, 16509, 16465, 16420, 16373, 16326, 16278, 16228,
+ 16178, 16126, 16074, 16021, 15966, 15911, 15855, 15797,
+ 15739, 15680, 15620, 15558, 15496, 15433, 15369, 15304,
+ 15238, 15171, 15103, 15035, 14965, 14894, 14823, 14751,
+ 14677, 14603, 14528, 14452, 14375, 14297, 14218, 14139,
+ 14058, 13977, 13895, 13812, 13728, 13643, 13558, 13471,
+ 13384, 13296, 13207, 13117, 13027, 12935, 12843, 12750,
+ 12657, 12562, 12467, 12371, 12274, 12177, 12078, 11979,
+ 11880, 11779, 11678, 11576, 11473, 11370, 11266, 11161,
+ 11055, 10949, 10843, 10735, 10627, 10518, 10409, 10299,
+ 10188, 10076, 9964, 9852, 9739, 9625, 9510, 9395,
+ 9280, 9164, 9047, 8930, 8812, 8694, 8575, 8455,
+ 8335, 8215, 8094, 7973, 7851, 7728, 7605, 7482,
+ 7358, 7234, 7109, 6984, 6858, 6732, 6606, 6479,
+ 6352, 6224, 6096, 5967, 5839, 5710, 5580, 5450,
+ 5320, 5190, 5059, 4928, 4796, 4664, 4532, 4400,
+ 4268, 4135, 4002, 3868, 3735, 3601, 3467, 3333,
+ 3198, 3064, 2929, 2794, 2659, 2523, 2388, 2252,
+ 2116, 1980, 1844, 1708, 1572, 1436, 1299, 1163,
+ 1026, 889, 753, 616, 479, 342, 205, 68
+};
+
+const Word16 edct_table_240_fx[] =/*Q16 */
+{
+ 16650, 16650, 16648, 16646, 16643, 16640, 16635, 16630,
+ 16625, 16618, 16611, 16603, 16595, 16585, 16575, 16565,
+ 16553, 16541, 16528, 16515, 16501, 16486, 16470, 16454,
+ 16437, 16419, 16401, 16381, 16362, 16341, 16320, 16298,
+ 16275, 16252, 16228, 16203, 16178, 16151, 16125, 16097,
+ 16069, 16040, 16010, 15980, 15949, 15918, 15885, 15852,
+ 15819, 15784, 15749, 15713, 15677, 15640, 15602, 15564,
+ 15525, 15485, 15445, 15404, 15362, 15320, 15277, 15233,
+ 15189, 15144, 15098, 15052, 15005, 14957, 14909, 14860,
+ 14811, 14761, 14710, 14659, 14607, 14554, 14501, 14447,
+ 14392, 14337, 14282, 14225, 14168, 14111, 14053, 13994,
+ 13934, 13874, 13814, 13753, 13691, 13629, 13566, 13502,
+ 13438, 13374, 13309, 13243, 13176, 13109, 13042, 12974,
+ 12905, 12836, 12767, 12696, 12626, 12554, 12482, 12410,
+ 12337, 12264, 12190, 12115, 12040, 11965, 11889, 11812,
+ 11735, 11657, 11579, 11501, 11422, 11342, 11262, 11182,
+ 11101, 11019, 10937, 10855, 10772, 10689, 10605, 10521,
+ 10436, 10351, 10265, 10179, 10093, 10006, 9919, 9831,
+ 9743, 9654, 9565, 9476, 9386, 9296, 9205, 9114,
+ 9023, 8931, 8839, 8746, 8653, 8560, 8466, 8372,
+ 8278, 8183, 8088, 7993, 7897, 7801, 7704, 7608,
+ 7511, 7413, 7315, 7217, 7119, 7020, 6921, 6822,
+ 6723, 6623, 6523, 6422, 6321, 6221, 6119, 6018,
+ 5916, 5814, 5712, 5609, 5507, 5404, 5300, 5197,
+ 5093, 4990, 4885, 4781, 4677, 4572, 4467, 4362,
+ 4257, 4151, 4046, 3940, 3834, 3728, 3622, 3515,
+ 3408, 3302, 3195, 3088, 2981, 2873, 2766, 2658,
+ 2551, 2443, 2335, 2227, 2119, 2011, 1903, 1795,
+ 1686, 1578, 1469, 1361, 1252, 1143, 1035, 926,
+ 817, 708, 599, 490, 381, 272, 163, 54
+};
+
+const Word16 edct_table_256_fx[] =/*Q16 */
+{
+ 16384, 16383, 16382, 16380, 16378, 16375, 16371, 16367,
+ 16362, 16356, 16350, 16343, 16336, 16328, 16319, 16310,
+ 16300, 16290, 16278, 16267, 16254, 16242, 16228, 16214,
+ 16199, 16184, 16168, 16151, 16134, 16116, 16098, 16079,
+ 16059, 16039, 16018, 15997, 15975, 15952, 15929, 15905,
+ 15881, 15856, 15830, 15804, 15777, 15750, 15722, 15693,
+ 15664, 15634, 15604, 15573, 15541, 15509, 15476, 15443,
+ 15409, 15375, 15340, 15304, 15268, 15231, 15194, 15156,
+ 15117, 15078, 15039, 14999, 14958, 14917, 14875, 14832,
+ 14789, 14746, 14702, 14657, 14612, 14566, 14520, 14473,
+ 14426, 14378, 14329, 14280, 14231, 14181, 14130, 14079,
+ 14027, 13975, 13922, 13869, 13815, 13761, 13706, 13651,
+ 13595, 13538, 13481, 13424, 13366, 13308, 13249, 13190,
+ 13130, 13069, 13008, 12947, 12885, 12823, 12760, 12697,
+ 12633, 12569, 12504, 12439, 12373, 12307, 12240, 12173,
+ 12106, 12038, 11969, 11901, 11831, 11762, 11691, 11621,
+ 11550, 11478, 11406, 11334, 11261, 11188, 11114, 11040,
+ 10965, 10891, 10815, 10740, 10663, 10587, 10510, 10433,
+ 10355, 10277, 10198, 10119, 10040, 9961, 9881, 9800,
+ 9719, 9638, 9557, 9475, 9393, 9310, 9227, 9144,
+ 9061, 8977, 8892, 8808, 8723, 8638, 8552, 8466,
+ 8380, 8293, 8206, 8119, 8032, 7944, 7856, 7768,
+ 7679, 7590, 7501, 7411, 7321, 7231, 7141, 7050,
+ 6960, 6868, 6777, 6685, 6593, 6501, 6409, 6316,
+ 6223, 6130, 6037, 5943, 5850, 5756, 5661, 5567,
+ 5472, 5377, 5282, 5187, 5092, 4996, 4900, 4804,
+ 4708, 4611, 4515, 4418, 4321, 4224, 4127, 4030,
+ 3932, 3835, 3737, 3639, 3541, 3442, 3344, 3246,
+ 3147, 3048, 2949, 2851, 2751, 2652, 2553, 2454,
+ 2354, 2255, 2155, 2055, 1956, 1856, 1756, 1656,
+ 1556, 1456, 1356, 1255, 1155, 1055, 954, 854,
+ 754, 653, 553, 452, 352, 251, 151, 50
+};
+
+const Word16 edct_table_400_fx[] =/*Q16 */
+{
+ 29308, 29308, 29307, 29306, 29304, 29302, 29299, 29296,
+ 29292, 29288, 29284, 29279, 29273, 29267, 29261, 29254,
+ 29247, 29239, 29231, 29223, 29214, 29204, 29194, 29184,
+ 29173, 29162, 29150, 29138, 29125, 29112, 29099, 29085,
+ 29070, 29055, 29040, 29024, 29008, 28991, 28974, 28957,
+ 28939, 28920, 28901, 28882, 28862, 28842, 28821, 28800,
+ 28779, 28757, 28734, 28711, 28688, 28664, 28640, 28615,
+ 28590, 28565, 28539, 28512, 28485, 28458, 28430, 28402,
+ 28373, 28344, 28315, 28285, 28255, 28224, 28192, 28161,
+ 28129, 28096, 28063, 28030, 27996, 27962, 27927, 27892,
+ 27856, 27820, 27784, 27747, 27710, 27672, 27634, 27595,
+ 27556, 27517, 27477, 27437, 27396, 27355, 27313, 27272,
+ 27229, 27186, 27143, 27100, 27055, 27011, 26966, 26921,
+ 26875, 26829, 26782, 26736, 26688, 26640, 26592, 26544,
+ 26495, 26445, 26395, 26345, 26294, 26243, 26192, 26140,
+ 26088, 26035, 25982, 25929, 25875, 25821, 25766, 25711,
+ 25655, 25600, 25543, 25487, 25430, 25372, 25315, 25256,
+ 25198, 25139, 25079, 25020, 24960, 24899, 24838, 24777,
+ 24715, 24653, 24591, 24528, 24465, 24401, 24337, 24273,
+ 24208, 24143, 24078, 24012, 23946, 23879, 23812, 23745,
+ 23677, 23609, 23541, 23472, 23403, 23334, 23264, 23194,
+ 23123, 23052, 22981, 22909, 22837, 22765, 22692, 22619,
+ 22546, 22472, 22398, 22324, 22249, 22174, 22098, 22023,
+ 21947, 21870, 21793, 21716, 21639, 21561, 21483, 21404,
+ 21326, 21246, 21167, 21087, 21007, 20927, 20846, 20765,
+ 20684, 20602, 20520, 20437, 20355, 20272, 20189, 20105,
+ 20021, 19937, 19852, 19768, 19682, 19597, 19511, 19425,
+ 19339, 19252, 19165, 19078, 18991, 18903, 18815, 18726,
+ 18638, 18549, 18459, 18370, 18280, 18190, 18100, 18009,
+ 17918, 17827, 17735, 17643, 17551, 17459, 17366, 17274,
+ 17181, 17087, 16994, 16900, 16805, 16711, 16616, 16521,
+ 16426, 16331, 16235, 16139, 16043, 15946, 15850, 15753,
+ 15656, 15558, 15461, 15363, 15265, 15166, 15068, 14969,
+ 14870, 14770, 14671, 14571, 14471, 14371, 14271, 14170,
+ 14069, 13968, 13867, 13765, 13663, 13562, 13459, 13357,
+ 13254, 13152, 13049, 12946, 12842, 12739, 12635, 12531,
+ 12427, 12323, 12218, 12113, 12008, 11903, 11798, 11693,
+ 11587, 11481, 11375, 11269, 11163, 11056, 10950, 10843,
+ 10736, 10628, 10521, 10414, 10306, 10198, 10090, 9982,
+ 9874, 9765, 9657, 9548, 9439, 9330, 9221, 9112,
+ 9002, 8892, 8783, 8673, 8563, 8453, 8342, 8232,
+ 8122, 8011, 7900, 7789, 7678, 7567, 7456, 7344,
+ 7233, 7121, 7010, 6898, 6786, 6674, 6562, 6450,
+ 6337, 6225, 6112, 6000, 5887, 5774, 5661, 5548,
+ 5435, 5322, 5209, 5096, 4982, 4869, 4755, 4642,
+ 4528, 4414, 4300, 4187, 4073, 3959, 3845, 3730,
+ 3616, 3502, 3388, 3273, 3159, 3044, 2930, 2815,
+ 2701, 2586, 2472, 2357, 2242, 2127, 2013, 1898,
+ 1783, 1668, 1553, 1438, 1323, 1208, 1093, 978,
+ 863, 748, 633, 518, 403, 288, 173, 58
+};
+
+const Word16 edct_table_320_16fx[320] =/*Q16 */
+{
+ 7747, 7747, 7747, 7746, 7746, 7745, 7744, 7742,
+ 7741, 7739, 7737, 7735, 7733, 7730, 7728, 7725,
+ 7722, 7719, 7716, 7712, 7708, 7704, 7700, 7696,
+ 7692, 7687, 7682, 7677, 7672, 7666, 7661, 7655,
+ 7649, 7643, 7637, 7630, 7623, 7617, 7610, 7602,
+ 7595, 7587, 7580, 7572, 7563, 7555, 7547, 7538,
+ 7529, 7520, 7511, 7501, 7492, 7482, 7472, 7462,
+ 7451, 7441, 7430, 7419, 7408, 7397, 7386, 7374,
+ 7362, 7350, 7338, 7326, 7314, 7301, 7288, 7275,
+ 7262, 7249, 7235, 7221, 7208, 7194, 7179, 7165,
+ 7150, 7136, 7121, 7106, 7091, 7075, 7060, 7044,
+ 7028, 7012, 6995, 6979, 6962, 6946, 6929, 6912,
+ 6894, 6877, 6859, 6842, 6824, 6806, 6787, 6769,
+ 6750, 6732, 6713, 6694, 6674, 6655, 6635, 6616,
+ 6596, 6576, 6556, 6535, 6515, 6494, 6473, 6452,
+ 6431, 6410, 6388, 6367, 6345, 6323, 6301, 6279,
+ 6257, 6234, 6211, 6189, 6166, 6143, 6119, 6096,
+ 6072, 6049, 6025, 6001, 5977, 5953, 5928, 5904,
+ 5879, 5854, 5829, 5804, 5779, 5753, 5728, 5702,
+ 5676, 5650, 5624, 5598, 5572, 5545, 5518, 5492,
+ 5465, 5438, 5411, 5383, 5356, 5328, 5301, 5273,
+ 5245, 5217, 5189, 5160, 5132, 5104, 5075, 5046,
+ 5017, 4988, 4959, 4930, 4900, 4871, 4841, 4811,
+ 4781, 4751, 4721, 4691, 4661, 4630, 4600, 4569,
+ 4538, 4508, 4477, 4446, 4414, 4383, 4352, 4320,
+ 4288, 4257, 4225, 4193, 4161, 4129, 4097, 4064,
+ 4032, 3999, 3967, 3934, 3901, 3868, 3835, 3802,
+ 3769, 3736, 3702, 3669, 3635, 3602, 3568, 3534,
+ 3500, 3466, 3432, 3398, 3364, 3330, 3295, 3261,
+ 3226, 3192, 3157, 3122, 3087, 3052, 3017, 2982,
+ 2947, 2912, 2877, 2841, 2806, 2771, 2735, 2699,
+ 2664, 2628, 2592, 2556, 2520, 2484, 2448, 2412,
+ 2376, 2340, 2304, 2267, 2231, 2194, 2158, 2121,
+ 2085, 2048, 2011, 1975, 1938, 1901, 1864, 1827,
+ 1790, 1753, 1716, 1679, 1642, 1605, 1567, 1530,
+ 1493, 1455, 1418, 1381, 1343, 1306, 1268, 1231,
+ 1193, 1156, 1118, 1080, 1043, 1005, 967, 930,
+ 892, 854, 816, 778, 740, 703, 665, 627,
+ 589, 551, 513, 475, 437, 399, 361, 323,
+ 285, 247, 209, 171, 133, 95, 57, 19
+};
+const Word16 edct_table_128_16fx[128] = /*Q15 */
+{
+ 9742, 9740, 9737, 9733, 9727, 9720, 9711, 9701,
+ 9689, 9676, 9661, 9645, 9627, 9608, 9588, 9566,
+ 9543, 9518, 9492, 9464, 9435, 9405, 9373, 9339,
+ 9305, 9269, 9231, 9192, 9152, 9110, 9067, 9023,
+ 8977, 8930, 8882, 8832, 8781, 8728, 8675, 8619,
+ 8563, 8505, 8447, 8386, 8325, 8262, 8198, 8133,
+ 8067, 7999, 7930, 7860, 7789, 7717, 7643, 7568,
+ 7492, 7415, 7337, 7258, 7178, 7097, 7014, 6931,
+ 6846, 6761, 6674, 6586, 6498, 6408, 6318, 6226,
+ 6134, 6040, 5946, 5851, 5755, 5658, 5560, 5462,
+ 5362, 5262, 5161, 5059, 4957, 4854, 4750, 4645,
+ 4539, 4433, 4327, 4219, 4111, 4002, 3893, 3783,
+ 3673, 3562, 3450, 3338, 3226, 3113, 2999, 2885,
+ 2771, 2656, 2541, 2425, 2309, 2193, 2076, 1959,
+ 1842, 1724, 1607, 1489, 1370, 1252, 1133, 1014,
+ 895, 776, 657, 538, 418, 299, 179, 60
+};
+const Word16 edct_table_160_16fx[160] =//Q15
+{
+ 9213, 9212, 9211, 9208, 9204, 9200, 9195, 9188,
+ 9181, 9173, 9164, 9155, 9144, 9132, 9120, 9107,
+ 9093, 9078, 9062, 9045, 9027, 9009, 8989, 8969,
+ 8948, 8926, 8903, 8880, 8855, 8830, 8803, 8776,
+ 8748, 8719, 8690, 8659, 8628, 8596, 8563, 8529,
+ 8495, 8459, 8423, 8386, 8348, 8309, 8270, 8230,
+ 8188, 8147, 8104, 8061, 8016, 7971, 7926, 7879,
+ 7832, 7784, 7735, 7686, 7635, 7584, 7533, 7480,
+ 7427, 7373, 7319, 7263, 7207, 7151, 7093, 7035,
+ 6976, 6917, 6857, 6796, 6735, 6673, 6610, 6547,
+ 6483, 6418, 6353, 6287, 6221, 6154, 6086, 6018,
+ 5949, 5880, 5810, 5739, 5668, 5597, 5525, 5452,
+ 5379, 5305, 5231, 5156, 5081, 5005, 4929, 4852,
+ 4775, 4698, 4620, 4541, 4462, 4383, 4303, 4223,
+ 4142, 4061, 3980, 3898, 3816, 3734, 3651, 3568,
+ 3484, 3400, 3316, 3231, 3146, 3061, 2976, 2890,
+ 2804, 2718, 2631, 2544, 2457, 2370, 2282, 2195,
+ 2107, 2019, 1930, 1842, 1753, 1664, 1575, 1486,
+ 1397, 1307, 1218, 1128, 1038, 948, 858, 768,
+ 678, 588, 497, 407, 317, 226, 136, 45
+};
+
+
+/*----------------------------------------------------------------------------------*
+ * Mean ISF vector for active signal (only for AMR-WB IO mode)
+ *----------------------------------------------------------------------------------*/
+
+const Word16 mean_isf_amr_wb_fx[M] =/*Qlog2(2.56)*/
+{
+ 738, 1326, 2336, 3578, 4596, 5662, 6711, 7730,
+ 8750, 9753,10705, 11728, 12833, 13971,15043, 4037
+};/*1.28f Q1*/
+
+/*----------------------------------------------------------------------------------*
+ * Mean ISF vector for SID frames (only in AMR-WB IO mode)
+ *----------------------------------------------------------------------------------*/
+
+const Word16 mean_isf_noise_amr_wb_fx[M] =/*Qlog2(2.56)*/
+{
+ 478, 1100, 2213, 3267, 4219, 5222, 6198, 7240,
+ 8229, 9153,10098, 11108, 12144, 13184,14165, 3803
+};/*14Q1*1.28*/
+
+/* ISF codebook - common 1st stage, 1st split (only in AMR-WB IO mode) */
+/*------------------------------------------------------*
+ * Indirection for 1st stage 1st split of 46 bit cb. :
+ The transmitted_index = indirect_dico1[found_index];
+ *------------------------------------------------------*/
+const Word16 Indirect_dico1[SIZE_BK1] = // Q0
+{
+ 2, 6, 18, 22, 34, 35, 38, 50,
+ 66, 67, 70, 82, 98, 99, 102, 130,
+ 131, 134, 146, 150, 162, 178, 194, 198,
+ 210, 226, 230, 242, 0, 1, 3, 4,
+ 5, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 19, 20, 21, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 36, 37, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59,
+ 60, 61, 62, 63, 64, 65, 68, 69,
+ 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 80, 81, 83, 84, 85, 86, 87,
+ 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 97, 100, 101, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 127, 128, 129, 132,
+ 133, 135, 136, 137, 138, 139, 140, 141,
+ 142, 143, 144, 145, 147, 148, 149, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 163, 164, 165, 166, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193,
+ 195, 196, 197, 199, 200, 201, 202, 203,
+ 204, 205, 206, 207, 208, 209, 211, 212,
+ 213, 214, 215, 216, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 227, 228, 229,
+ 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 243, 244, 245, 246, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255
+};
+
+/*----------------------------------------------------------------------------------*
+ * Initial LSF memory
+ *----------------------------------------------------------------------------------*/
+
+const Word16 lsf_init_fx[16] = /*14Q1*1.28*/
+{
+ 960, 1920, 2880, 3840, 4800, 5760, 6720, 7680, 8640, 9600, 10560, 11520, 12480, 13440, 14400, 15360
+};
+
+/*----------------------------------------------------------------------------------*
+ * Gaussian codebook
+ *----------------------------------------------------------------------------------*/
+
+/*table in Q12*/
+const Word16 gaus_dico_fx[190] =
+{
+ -399, -125, 523, -466, 305, -658, -809, 47,
+ -141, -171, -583, -259, 296, 1334, -285, -401,
+ -478, -418, 140, -540, 177, -1089, 130, -292,
+ 143, 492, -310, -862, -320, 388, 546, 84,
+ -1202, 107, 108, 340, 239, -130, 930, 342,
+ 153, -264, -763, -113, 387, -535, 83, -856,
+ -361, -421, 120, 396, -367, 640, 817, 222,
+ -1017, -82, -120, 890, 340, -384, 47, 339,
+ -505, -430, 161, 979, 890, -267, 104, 508,
+ -150, -194, 442, 193, 413, -24, 395, -43,
+ -217, 69, -398, 167, 116, -936, -95, 1466,
+ -435, 461, 862, -136, -94, 1311, -371, 68,
+ 134, -296, -156, -564, -48, -487, 647, 315,
+ 513, -101, -685, -318, -344, -644, -66, 851,
+ 414, -29, 509, 414, 502, 399, 557, 649,
+ -299, 750, 546, -756, -12, -365, 593, -707,
+ 394, -131, -375, -62, -914, -256, -424, 64,
+ 464, -1140, 280, 91, -83, -288, -550, 389,
+ 52, -1228, 6, -430, 74, 205, -478, -148,
+ -592, 282, -73, 1212, 42, 580, -334, 484,
+ -765, 443, 649, 271, -739, 375, 613, -460,
+ -208, 235, -120, -49, -311, 605, 875, 521,
+ 202, -506, -548, -1088, -43, -221, 673, -245,
+ -27, 469, 353, 53, 744, 275
+};
+
+const Word16 gaus_dico_swb_fx[256] =
+{
+ /*Q15 */
+ 709, 11759, -5333, -2701, 2397, -18, -4286, 2368,
+ -4576, -1584, -900, -940, 3676, 5441, -44, 2234,
+ -5698, 3082, -2671, 1666, -640, -3343, -1005, -1689,
+ 2048, 281, -3935, -3723, 5628, 385, -746, -3243,
+ -3332, -7228, -1748, -206, -5474, 2554, 2861, 3168,
+ 5039, 588, -508, -8167, 6549, -3433, 2187, -3666,
+ -5874, 2767, 8370, 1038, 6434, 6279, 625, 4030,
+ -1031, 1823, 9896, -1395, 2712, -1110, -742, 6142,
+ -4456, -10487, -144, -5104, 1968, -312, 6176, 2173,
+ 2334, -240, 2712, 7460, 2219, -3116, -56, 2770,
+ 5577, -1225, 770, 3557, 2246, 2322, 3077, 41,
+ 992, -4971, 441, -5039, 4913, 3811, 1142, -1283,
+ -6578, 4171, -1473, -3793, -5008, 1984, -1138, -1185,
+ 5646, 1014, -5118, 7141, 2656, -7241, -3538, 2337,
+ 7239, -504, -943, -10129, 702, -3811, -302, 2435,
+ 5090, 3744, 2335, -3904, -1401, -1662, -7256, 6484,
+ -6864, -5428, 1954, -7316, -1420, -1542, 5442, 311,
+ 3698, -1343, -2974, 8756, 324, -1903, 2580, 2635,
+ 4236, -1851, 3147, -772, -708, -3830, 2601, -1889,
+ -3444, -762, 3939, 3206, -7406, -837, -1167, -438,
+ 3707, -1015, -7472, 1849, 4277, 1459, -3047, -3760,
+ 740, -7134, -3753, -3092, 209, -12121, 1398, 2266,
+ 2505, -7974, -1121, -3481, -5644, 1329, 4532, 958,
+ 5311, -4258, -3195, -1769, -3055, 4399, -15, 10182,
+ 4503, 1912, -1574, 5054, -3163, 4881, -5364, 1925,
+ -1205, -6432, 2305, -8917, -1422, 514, -3001, 3928,
+ 2321, 360, -355, 1477, -3492, -4570, 1913, 2772,
+ -1380, -5161, 3812, 2614, 2204, -3135, 1244, -3066,
+ -4446, -6389, 4899, -5250, 1372, 1999, 1122, 5312,
+ 1310, -1189, -3310, 6403, 3818, 7734, 1620, -8533,
+ 706, 7498, -4472, 1272, -949, 3203, -4427, -2855,
+ 4419, 2283, 6410, 2584, -3397, -3382, -2976, -48,
+};
+
+
+/*----------------------------------------------------------------------------------*
+ * CLDFB tables
+ *----------------------------------------------------------------------------------*/
+
+const Word16 freqTable[2] = {20, 40}; // Q0
+
+/* SNR: 109.44, PHASE: 3.500000000000000 */
+
+/* SNR: 109.44, PHASE: 3.500000000000000 */
+
+const Word32 CLDFB80_10_fx[100] = // q = 30
+{
+ 3584, -2501, -707, 157, -1170, -1038,
+-11, -1944, -1380, 1837, 14727, -9096,
+-1691, -267, 3897, -4705, 419, 4651,
+5275, -6639, -243747, -72521, -17071, 14831,
+-23632, -38285, 18452, -20885, -6245, -281515,
+-1070487, -153329, -20195, -4338, -209848, 194011,
+24972, -5106, -34468, 1151402, -2164680, -832327,
+376720, 1686598, 1844777, 1697325, 2356308, 3037447,
+3248821, 1779296, -1533240, -1713947, 833816, 2751563,
+2421812, 284255, -3540922, -6991555, -10248264, -14642952,
+20031906, 26043234, 34417552, 45928496, 60756732, 78698864,
+98151832, 116245496, 129823136, 136344976, 134601568, 122059576,
+95304000, 53433792, -3371365, -74987256, -160511088, -258343120,
+-366360320, -481533344, 599091264, 714631872, 823505600, 920768896,
+1001735168, 1062249792, 1100603392, 1116473216, 1114030976, 1091249536,
+1031959808, 939413760, 835792512, 727712064, 614651648, 499141824,
+382288320, 266885408, 148867680, 44714176
+};
+
+
+/* SNR: 292.49, PHASE: 2.000000000000000 */
+const Word32 CLDFB80_16_fx[160] = // q = 30
+{ 592, -824, -251, 104, 64, -2,
+-19, 2357, 3222, -18, -2, 75,
+37, -82, -596, 808, 2242, -3035,
+-755, 254, 126, -435, 107, -19350,
+26445, -100, 482, -149, -91, 247,
+2196, -3062, -344117, -158537, -67240, -47926,
+-21715, 16231, 6227, 48320, 46494, 5449,
+17932, -33783, -26258, -13467, -97911, -469416,
+-1317171, -563405, -199456, -118497, -43264, 11679,
+-61886, 64706, -248886, 55869, 3768, 67211,
+64791, 39611, 345778, 1796799, -2314105, -1658358,
+-815220, -115680, 761413, 1616443, 1931089, 1230669,
+1712206, 1949652, 2418775, 2970521, 3179526, 3272216,
+2739046, 1383591, -1186345, -2091284, -1594461, -20541,
+1561481, 2685864, 2822045, 2243697, 1007270, -1321111,
+-3774214, -5979353, -7970747, -10025660, -12576468, -15588057,
+19092548, 22464968, 26489252, 31480652, 37681832, 45115060,
+53868456, 63884792, 75139712, 87185504, 99355152, 110921760,
+121117896, 129158840, 134480400, 136595408, 135565040, 130704096,
+120827352, 105296200, 83827480, 56486836, 23319760, -15680647,
+-60454808, -110775264, -166285472, -226570624, -291114656, -359358976,
+-430528992, -503583200, 577127680, 650096768, 721690560, 790528896,
+855345280, 915113088, 968648896, 1014713216, 1052549440, 1081848192,
+1102232576, 1113723648, 1117499392, 1114694144, 1104247168, 1084392960,
+1047294336, 993703296, 933123072, 868665920, 802559168, 734628416,
+664562240, 593135168, 520952544, 448011680, 375024864, 302909728,
+230463232, 156264608, 85568040, 29877076
+};
+
+
+/* SNR: 89.77, PHASE: 1.500000000000000 */
+const Word32 CLDFB80_20_fx[200] = // q = 30
+{ 1767, -5032, -88, -196, 26, 203,
+-254, -755, -8, 5224, 7569, 3,
+161, -101, 462, -85, -115, 1651,
+-2694, 4755, 4946, -22236, -524, -658,
+65, 469, -402, -1021, 719, -9362,
+12273, -828, -312, 170, -1089, 201,
+407, -7058, 12038, -3893, -327043, -222151,
+-35479, -70712, -44739, -22286, -4950, 10391,
+-6975, 55398, 27635, -7373, 3144, -22481,
+-20586, -25326, -30793, 63871, -118589, -531211,
+-1262671, -706692, -140675, -191397, -107627, -49946,
+-20212, 30609, -145958, 302172, -516943, 139838,
+-27637, 62099, 52144, 58317, 81974, -160536,
+375017, 1963206, -2140127, -2009648, -925313, -652848,
+-36271, 664400, 1339893, 1799274, 1945125, 831665,
+1777056, 1828829, 2078398, 2585601, 2993432, 3154609,
+3289693, 3034094, 2356141, 1146722, -993260, -1911082,
+-2021484, -1182252, 157141, 1427332, 2466905, 2979250,
+2692828, 2193128, 1283653, -616499, -2589952, -4472529,
+-6187298, -7776617, -9380603, -11192438, -13438549, -15899665,
+18725886, 21392202, 24336266, 27874318, 32044188, 37006492,
+42749912, 49318540, 56747120, 64938688, 73960840, 83528888,
+93302528, 102923904, 112017456, 120184144, 127010856, 132191136,
+135478896, 136610544, 135791440, 132663544, 126439184, 116783968,
+103416816, 86239880, 65299188, 40633116, 12229525, -19893306,
+-55715672, -95119752, -137902624, -183892768, -232841840, -284483936,
+-338536576, -394642624, -452297696, -510956224, 569805312, 628294144,
+686151296, 742695360, 797209408, 849073920, 897777728, 942743488,
+983299712, 1018874944, 1049145600, 1073975296, 1093176448, 1106582656,
+1114420736, 1117424512, 1116238848, 1110577792, 1099271424, 1081958528,
+1052270720, 1010577920, 964128448, 914037760, 862118336, 809238464,
+755241024, 699830528, 643231744, 585949312, 528205504, 469954944,
+411440896, 353300032, 295721536, 237791168, 178588864, 119772248,
+66882256, 25081918
+};
+
+
+/* SNR: 89.29, PHASE: 0.833333333333333 */
+const Word32 CLDFB80_30_fx[300] = // q = 30
+{ -298, 3584, 1941, -855, -2501, -18,
+108, -707, 31, 15, 157, 303,
+46, -1170, 5206, 7621, -1038, 39,
+476, -11, -29, -11, -1944, 58,
+-3, -1380, -660, 1053, 1837, -2898,
+-12992, 14727, 8112, -3476, -9096, -22,
+265, -1691, 46, -32, -267, 593,
+210, 3897, 9064, -12976, -4705, -177,
+-1102, 419, 158, 60, 4651, -142,
+-11, 5275, 2753, -4425, -6639, 19639,
+-341195, -243747, -157895, -76329, -72521, -65719,
+-49275, -17071, -21325, -4817, 14831, 27866,
+-1522, -23632, 5019, -51348, -38285, -878,
+59536, 18452, -11251, -36822, -20885, -26546,
+-28596, -6245, -16613, -92408, -281515, -679650,
+-1089989, -1070487, -687312, -252030, -153329, -178007,
+-122647, -20195, -41359, -29533, -4338, 53191,
+-112253, -209848, 617831, -803951, 194011, 106901,
+-106999, 24972, 64775, 70954, -5106, 66493,
+77725, -34468, 24005, 399486, 1151402, 2091330,
+-1945866, -2164680, -1871142, -1133490, -832327, -560635,
+-144700, 376720, 793103, 1258629, 1686598, 1843272,
+1942367, 1844777, 286874, 1790714, 1697325, 1882734,
+2048236, 2356308, 2670961, 2960784, 3037447, 3187788,
+3282834, 3248821, 2972461, 2561469, 1779296, 779690,
+-670109, -1533240, -2023874, -2068454, -1713947, -979306,
+-79112, 833816, 1606493, 2311180, 2751563, 2948543,
+2758276, 2421812, 2144318, 1669907, 284255, -925661,
+-2240403, -3540922, -4767759, -5909822, -6991555, -8035796,
+-9103931, -10248264, -11549851, -13052389, -14642952, -16334399,
+18220558, 20031906, 21872604, 23814234, 26043234, 28516756,
+31295850, 34417552, 37909524, 41736344, 45928496, 50500180,
+55453996, 60756732, 66352956, 72392624, 78698864, 85151696,
+91671536, 98151832, 104484224, 110553528, 116245496, 121424144,
+125981624, 129823136, 132872256, 135069696, 136344976, 136548112,
+135995744, 134601568, 131846392, 127706624, 122059576, 114818808,
+105909512, 95304000, 83010216, 69049472, 53433792, 36159948,
+17222988, -3371365, -25594396, -49478012, -74987256, -102019216,
+-130543792, -160511088, -191851984, -224489536, -258343120, -293333280,
+-329374368, -366360320, -404158112, -442603456, -481533344, -520813312,
+560055680, 599091264, 637996480, 676579264, 714631872, 751940864,
+788293056, 823505600, 857424640, 889902848, 920768896, 949826944,
+976873792, 1001735168, 1024295104, 1044475456, 1062249792, 1077572608,
+1090377088, 1100603392, 1108260608, 1113474048, 1116473216, 1117510400,
+1116725248, 1114030976, 1109119488, 1101598848, 1091249536, 1078932736,
+1059134272, 1031959808, 1003169408, 972174976, 939413760, 905472960,
+870845632, 835792512, 800328576, 764335744, 727712064, 690466496,
+652724672, 614651648, 576357376, 537862912, 499141824, 460206112,
+421184800, 382288320, 343676096, 305305440, 266885408, 228014720,
+188521408, 148867680, 110353960, 74971128, 44714176, 18455688
+};
+
+
+const Word32 CLDFB80_32_fx[320] = // q = 30
+{
+ -1093, 2020, -1500, 75, -3259, -200,
+2, 86, -307, -6, -372, -406,
+686, 39, -1685, 4713, 6814, -1488,
+47, 778, -40, -130, 24, -872,
+225, -5, -116, -556, -123, -751,
+1334, -5815, -17696, 8208, -6989, 239,
+-11912, -669, 1, 206, -738, 0,
+-579, -811, 1617, 569, 3828, 10109,
+-14335, -4601, -628, -1935, 180, 186,
+-69, 2086, -538, 14, 408, 1524,
+585, 3601, -4502, 26170, -348871, -274413,
+-191283, -101650, -55023, -71745, -57839, -39470,
+-16489, -17154, -4618, 1542, 27531, -4838,
+-24078, -6041, -61576, -45939, -4350, 52992,
+-21467, -30551, -47624, -16879, -16327, -28526,
+-30774, 45781, -47861, -103961, -321282, -704888,
+-1065517, -1123685, -707166, -371532, -86309, -196314,
+-147630, -95796, -26567, -30201, -12085, -23646,
+30175, -133297, -186726, 644643, -823106, 165914,
+127129, -77847, 76139, 59764, 84597, 13696,
+44921, 72597, 82827, -180230, 163871, 385660,
+1272552, 2097220, -1940583, -2216918, -1963534, -1312195,
+-811283, -684818, -332127, 81208, 566324, 995811,
+1374732, 1743252, 1885233, 1944746, 1791356, 230889,
+1776037, 1693755, 1848743, 2021967, 2237951, 2554532,
+2866858, 3010232, 3111818, 3235821, 3289505, 3179984,
+2912034, 2438977, 1724392, 733947, -625866, -1486531,
+-1958890, -2094028, -1863598, -1255187, -454123, 425746,
+1212702, 1901282, 2517750, 2869908, 2908450, 2719155,
+2384774, 2140992, 1717492, 398307, -731735, -1939480,
+-3196994, -4359654, -5453402, -6492968, -7485701, -8462297,
+-9485345, -10586349, -11872517, -13293064, -14799378, -16391634,
+18159074, 19878216, 21572990, 23372214, 25384474, 27638258,
+30127980, 32911950, 36012916, 39421380, 43135868, 47172528,
+51552328, 56259572, 61272356, 66530936, 72196904, 78102488,
+84136944, 90243120, 96340328, 102334376, 108124720, 113633800,
+118743656, 123354504, 127384760, 130768192, 133428752, 135331936,
+136411184, 136532064, 136012736, 134791376, 132367184, 128735088,
+123803096, 117494272, 109734136, 100486232, 89749032, 77539936,
+63866580, 48743548, 32160198, 14114131, -5387419, -26313940,
+-48704924, -72531920, -97696000, -124178280, -151940320, -180929216,
+-211078752, -242327632, -274608448, -307853568, -341987136, -376916512,
+-412518528, -448658976, -485200704, -522047808, 558838528, 595432000,
+631934592, 668176768, 703995904, 739213504, 773652800, 807151808,
+839574912, 870801792, 900704320, 929133248, 955922048, 980906240,
+1003949120, 1024962240, 1043881152, 1060686784, 1075342592, 1087794688,
+1097989248, 1105913344, 1111637504, 1115325568, 1117191552, 1117410816,
+1116024960, 1112890624, 1107711872, 1100166016, 1090143104, 1078585600,
+1060024128, 1034545088, 1007817280, 979127552, 948772416, 917237312,
+884973248, 852271488, 819225472, 785777536, 751820160, 717295872,
+682246976, 646793792, 611070144, 575157504, 539069056, 502781984,
+466300064, 429718016, 393203360, 356913536, 320878656, 284927936,
+248740064, 212036736, 174863904, 137843808, 102263632, 69872776,
+42173520, 17586372
+};
+
+
+/* SNR: 81.55, PHASE: 0.500000000000000 */
+const Word32 CLDFB80_40_fx[400] = // q = 30
+{
+-4459, -419, -3627, 1424, -337, -2077,
+303, 18, 81, 159, -711, 9,
+12, -289, -782, 599, -26, 261,
+-439, 2799, 3758, -185, 230, -43,
+682, -21, -75, -29, -55, -1950,
+416, 56, 16, 233, 887, -479,
+680, -2718, -569, -16448, -33103, -1653,
+-16424, 6275, -1401, -7536, 1256, 82,
+202, 378, -1703, -5, -27, -665,
+-1194, 1295, -18, 118, -11445, 11396,
+-15922, 16043, 175, 78, -1655, 102,
+374, 132, 161, 4663, -995, -137,
+-67, -970, -4393, 2058, -3082, 11739,
+-993, 52507, -372470, -339964, -238020, -154668,
+-91227, -39704, -68193, -63466, -52270, -36721,
+-12972, -20431, -6925, 7426, -2361, 29241,
+920, -11369, 13936, -42084, -90219, 4460,
+-7456, 295, 60570, -36066, -9836, -23630,
+-40550, -22839, -11573, -27317, -28142, -21799,
+74247, -37443, -94761, -175261, -418504, -781461,
+-995765, -1274142, -822204, -644197, -320592, -79371,
+-211045, -170432, -131251, -90676, -8615, -38865,
+-25806, 10490, -21115, 43834, -93771, -212052,
+-80067, 687824, -841077, -28319, 196054, 89800,
+-98757, 81413, 22561, 71310, 76947, -1234,
+38817, 69237, 75947, 74313, -220677, 108139,
+388007, 614410, 1602908, 2104013, -1945962, -2345233,
+-2073811, -1788974, -1237042, -801097, -773094, -511061,
+-205272, 126459, 548962, 854332, 1215260, 1516757,
+1754373, 1867886, 1938796, 1938332, 1525725, 104199,
+1696967, 1687208, 1745905, 1910502, 2033618, 2194668,
+2472078, 2712787, 2937869, 3012596, 3095693, 3204093,
+3274808, 3283756, 3148592, 2939051, 2641685, 2031332,
+1549503, 597843, -490013, -1328870, -1713436, -2059616,
+-2084878, -1903964, -1464478, -873102, -195311, 513856,
+1135793, 1697317, 2228107, 2629045, 2909611, 2926214,
+2785543, 2569874, 2293850, 2134485, 1852516, 752397,
+-164140, -1082527, -2067571, -3082101, -4010647, -4913513,
+-5770452, -6592737, -7388101, -8166445, -8966356, -9806266,
+-10700961, -11733450, -12861255, -14030459, -15273330, -16566203,
+17977196, 19420796, 20683474, 22109952, 23560036, 25167814,
+26942868, 28845886, 30930688, 33206692, 35686848, 38368864,
+41237952, 44313740, 47594052, 51099240, 54815852, 58726668,
+62834600, 67067844, 71610536, 76321632, 81103048, 85964624,
+90855304, 95735248, 100552568, 105257896, 109812680, 114164760,
+118253480, 122029112, 125449296, 128468360, 131068744, 133194984,
+134844544, 135983552, 136548480, 136476080, 136056288, 135290432,
+133727152, 131405624, 128303264, 124356992, 119537688, 113797504,
+107116320, 99479544, 90889712, 81356080, 70886368, 59482072,
+47150368, 33884192, 19681098, 4546190, -11521655, -28482206,
+-46395036, -65246120, -84945856, -105504280, -126897840, -149107856,
+-172107808, -195862240, -220341504, -245510512, -271335616, -297782912,
+-324814976, -352387008, -380449280, -408931776, -437767552, -466890752,
+-496221408, -525752320, 555187200, 584450368, 613710272, 642840512,
+671780800, 700438528, 728721728, 756541312, 783807872, 810444608,
+836384512, 861566464, 885927424, 909395008, 931888896, 953321728,
+973609216, 992677120, 1010468928, 1026949632, 1042084096, 1055868544,
+1068286464, 1079312512, 1088916480, 1097072128, 1103772032, 1109042176,
+1112948608, 1115590912, 1117080960, 1117511680, 1116923264, 1115280512,
+1112471040, 1108330880, 1102691712, 1095455872, 1086748672, 1077537920,
+1062688064, 1042243712, 1021432192, 999408768, 976158720, 951869952,
+926793472, 901173760, 875200384, 848982208, 822546624, 795860992,
+768868224, 741522368, 713812928, 685772416, 657463808, 628958848,
+600314432, 571556608, 542686272, 513690592, 484561600, 455329056,
+426060320, 396846880, 367771776, 338869952, 310096864, 281325184,
+252379520, 223109248, 193485184, 163693120, 134192648, 105710896,
+79151352, 55383672, 34725716, 14899882
+};
+
+
+/* SNR: 85.15, PHASE: 0.166666666666667 */
+const Word32 CLDFB80_60_fx[600] = // q = 30
+{ -11638, 1767, -122, 1628, -5032, -196,
+161, -88, -3545, 137, -196, 21,
+36, 26, 132, -1128, 203, 12,
+-29, -254, -97, -286, -755, 689,
+-55, -8, 215, -1583, 5224, -169,
+-595, 7569, -1361, 190, 3, -67,
+788, 161, -43, -20, -101, -32,
+-10, 462, -3064, 321, -85, 24,
+12, -115, 151, -968, 1651, -22,
+-258, -2694, -28, 68, 4755, -32803,
+-51846, 4946, -596, 6086, -22236, -388,
+578, -524, -12974, 673, -658, 65,
+91, 65, 314, -2699, 469, 12,
+-69, -402, -518, -689, -1021, 1669,
+-23, 719, 449, -2322, -9362, 9537,
+-13566, 12273, 3730, -157, -828, 61,
+-1978, -312, 206, 462, 170, 84,
+41, -1089, 7330, -768, 201, -60,
+-41, 407, -660, 3231, -7058, 161,
+771, 12038, 198, -1291, -3893, 106546,
+-387363, -327043, -319712, -213953, -222151, -158504,
+-105319, -35479, -59682, -66733, -70712, -61610,
+-55171, -44739, -31711, -9900, -22286, -19252,
+-9917, -4950, 14172, 3111, 10391, 26566,
+4086, -6975, -13332, -9892, 55398, -89244,
+-120822, 27635, -30751, -9363, -7373, 2810,
+49557, 3144, -15960, 10651, -22481, -39335,
+-43081, -20586, -29742, -8098, -25326, -28071,
+-28128, -30793, -15878, 36414, 63871, -51035,
+-98423, -118589, -196780, -380753, -531211, -867079,
+-924260, -1262671, -1211187, -909700, -706692, -590140,
+-387713, -140675, -90592, -207147, -191397, -163116,
+-139419, -107627, -77449, 8620, -49946, -36329,
+-21446, -20212, 13295, -23389, 30609, 24765,
+-73159, -145958, -228347, -136170, 302172, 622362,
+-742756, -516943, 79533, 208728, 139838, 68780,
+-69177, -27637, 72365, 6204, 62099, 78720,
+81230, 52144, -15436, 27781, 58317, 71170,
+74613, 81974, 55368, -164496, -160536, 180918,
+362005, 375017, 795458, 1461875, 1963206, 2095155,
+-1983049, -2140127, -2301661, -2078197, -2009648, -1702455,
+-1336746, -925313, -815553, -803613, -652848, -461551,
+-265137, -36271, 196856, 518314, 664400, 915382,
+1166217, 1339893, 1585569, 1738976, 1799274, 1890535,
+1933937, 1945125, 1923994, 1665861, 831665, 77564,
+1488037, 1777056, 1688417, 1721975, 1828829, 1937199,
+2017937, 2078398, 2252451, 2437196, 2585601, 2754365,
+2909842, 2993432, 3016599, 3074266, 3154609, 3219375,
+3265044, 3289693, 3277126, 3189837, 3034094, 2902602,
+2709099, 2356141, 1938986, 1632226, 1146722, 418214,
+-305018, -993260, -1403823, -1653092, -1911082, -2083225,
+-2096449, -2021484, -1849083, -1552144, -1182252, -764155,
+-310625, 157141, 627282, 1032601, 1427332, 1788414,
+2142931, 2466905, 2666629, 2856089, 2979250, 2902477,
+2810289, 2692828, 2523008, 2330296, 2193128, 2132550,
+2001086, 1283653, 592123, -15236, -616499, -1241115,
+-1897102, -2589952, -3235046, -3852858, -4472529, -5058432,
+-5630304, -6187298, -6725206, -7257095, -7776617, -8297675,
+-8829816, -9380603, -9952123, -10548511, -11192438, -11919065,
+-12671172, -13438549, -14232061, -15062200, -15899665, -16802572,
+17739412, 18725886, 19625418, 20458448, 21392202, 22346532,
+23310144, 24336266, 25457146, 26639572, 27874318, 29180440,
+30570936, 32044188, 33604364, 35257056, 37006492, 38833420,
+40745368, 42749912, 44846596, 47032812, 49318540, 51704112,
+54183000, 56747120, 59397304, 62137772, 64938688, 67793344,
+70831448, 73960840, 77111768, 80298224, 83528888, 86778376,
+90039080, 93302528, 96541856, 99755032, 102923904, 106027616,
+109066040, 112017456, 114866184, 117592440, 120184144, 122624224,
+124905544, 127010856, 128931552, 130666344, 132191136, 133505016,
+134605360, 135478896, 136120576, 136498544, 136610544, 136390896,
+136106368, 135791440, 135081680, 134039064, 132663544, 130943336,
+128876128, 126439184, 123615464, 120403880, 116783968, 112750168,
+108296544, 103416816, 98114136, 92387688, 86239880, 79676032,
+72697184, 65299188, 57491652, 49271324, 40633116, 31582262,
+22113356, 12229525, 1933215, -8779568, -19893306, -31396530,
+-43338216, -55715672, -68469528, -81601800, -95119752, -109012544,
+-123274624, -137902624, -152887216, -168220960, -183892768, -199892672,
+-216212560, -232841840, -249770272, -266987040, -284483936, -302248800,
+-320270592, -338536576, -357031680, -375740448, -394642624, -413715328,
+-432939744, -452297696, -471766976, -491319872, -510956224, -530689568,
+550314688, 569805312, 589331520, 608841280, 628294144, 647679424,
+666974528, 686151296, 705180416, 724037376, 742695360, 761126400,
+779305216, 797209408, 814818048, 832112192, 849073920, 865685504,
+881927232, 897777728, 913213888, 928211072, 942743488, 956784768,
+970310720, 983299712, 995732352, 1007593856, 1018874944, 1029566592,
+1039655360, 1049145600, 1058033856, 1066312576, 1073975296, 1081012992,
+1087415680, 1093176448, 1098289920, 1102755712, 1106582656, 1109785856,
+1112388096, 1114420736, 1115916544, 1116907776, 1117424512, 1117484800,
+1117091968, 1116238848, 1114897920, 1113026048, 1110577792, 1107500160,
+1103739520, 1099271424, 1094099328, 1088271360, 1081958528, 1076012800,
+1066112832, 1052270720, 1038832960, 1024980800, 1010577920, 995613248,
+980113280, 964128448, 947737280, 931017344, 914037760, 896864896,
+879548544, 862118336, 844591360, 826968768, 809238464, 791384896,
+773390848, 755241024, 736928896, 718455680, 699830528, 681070912,
+662197568, 643231744, 624193216, 605096768, 585949312, 566752640,
+547506176, 528205504, 508844544, 489425088, 469954944, 450450944,
+430937408, 411440896, 391989376, 372605984, 353300032, 334067616,
+314888448, 295721536, 276517248, 257224080, 237791168, 218193616,
+198443888, 178588864, 158737840, 139063920, 119772248, 101121944,
+83411368, 66882256, 51724928, 38009000, 25081918, 11097560
+};
+
+
+/* 5ms delay prototype */
+const Word32 LDQMF_10_fx[] = // q = 30
+{
+ 136778, 68195, -70890, -226890, -352352, -420072,
+-436802, -444543, -506661, -672815, -980068, -1367880,
+-1747442, -2041059, -2171766, -2084001, -1756846, -1205000,
+-470033, 391658, -1352314, -2311012, -3225024, -4068760,
+-4825637, -5483931, -6033975, -6472204, -6808585, -7075060,
+-7325812, -7636335, -8074047, -8676456, -9424478, -10219283,
+-10865228, -11073811, -10475044, -8652076, 5180201, -339904,
+-8224782, -18673422, -31726070, -47229416, -64809980, -83846512,
+-103451368, -122477480, -139540384, -153063904, -161342016, -162639632,
+-155309920, -137908720, -109304704, -68777832, -16099735, 48410956,
+-123867744, -208812656, -301278944, -398795360, -498505440, -597277184,
+-691834048, -778907776, -855407232, -918606592, -966152640, -996390080,
+-1008509056, -1002265344, -978191040, -937540800, -882190336, -814525888,
+-737309056, -653527872, 566225280, 478344672, 392910464, 312395584,
+238918544, 174094816, 118926376, 73749168, 38239292, 11438051,
+-6809585, -17473586, -23179288, -24893300, -23497172, -19904868,
+-15070633, -9938406, -5364481, -2000462
+};
+
+
+const Word32 LDQMF_16_fx[] = // q = 30
+{
+135840, 119105, 61025, -23300, -120396, -217572,
+-303688, -369787, -411986, -431913, -436960, -439365,
+-455121, -500073, -585815, -716339, -910646, -1146410,
+-1392576, -1634245, -1852285, -2026746, -2138911, -2173116,
+-2118583, -1970211, -1728614, -1399460, -992562, -520340,
+3268, 562389, -1169900, -1774888, -2369781, -2945925,
+-3497147, -4018445, -4506032, -4956920, -5368526, -5738270,
+-6064626, -6347064, -6587229, -6790047, -6964112, -7121373,
+-7276728, -7449880, -7659373, -7920485, -8244154, -8633965,
+-9083566, -9574508, -10074442, -10534940, -10894573, -11076715,
+-10992408, -10543848, -9627864, -8139161, 5976364, 3037887,
+-760649, -5491840, -11209240, -17943616, -25700144, -34454400,
+-44150032, -54695840, -65964980, -77789648, -89960896, -102229872,
+-114308392, -125871952, -136561440, -145990880, -153753088, -159424128,
+-162577504, -162794960, -159676832, -152853360, -141995744, -126825840,
+-107126032, -82747424, -53617472, -19744928, 18775524, 61761592,
+-108947912, -159965984, -214394832, -271716064, -331337920, -392605120,
+-454808224, -517194272, -578978880, -639359104, -697528768, -752693376,
+-804086912, -850989824, -892747136, -928791232, -958536704, -981563328,
+-997684800, -1006698432, -1008520640, -1003187328, -990852800, -971782976,
+-946346880, -915003328, -878295040, -836832960, -791284544, -742359104,
+-690793664, -637338560, 582754624, 527645440, 472906400, 419190784,
+367113152, 317241312, 270082016, 226065808, 185534960, 148735312,
+115810224, 86800312, 61646000, 40190228, 22181636, 7245162,
+-4169367, -12156084, -17964338, -21866804, -24101958, -24886370,
+-24433336, -22962478, -20701850, -17885954, -14749119, -11519968,
+-8412224, -5619924, -3298610, -1524161
+};
+
+
+const Word32 LDQMF_20_fx[] = // q = 30
+{
+132095, 130054, 94118, 37811, -32619, -110471,
+-188997, -262715, -325880, -375095, -408842, -427924,
+-435582, -437285, -440062, -452482, -482692, -537287,
+-620381, -731564, -887814, -1074239, -1268925, -1466394,
+-1657422, -1832122, -1980124, -2091724, -2157946, -2171782,
+-2128230, -2024638, -1860817, -1638685, -1362085, -1036418,
+-668022, -263994, 167952, 619489, -1109006, -1594302,
+-2074063, -2544892, -3002259, -3443307, -3865450, -4266665,
+-4645248, -4999899, -5329217, -5631869, -5906959, -6153951,
+-6372928, -6565001, -6732690, -6880012, -7012401, -7136777,
+-7260809, -7394870, -7549043, -7731644, -7949919, -8208793,
+-8510223, -8852171, -9227619, -9624792, -10025312, -10404401,
+-10731825, -10971712, -11081824, -11015548, -10722771, -10150872,
+-9246198, -7954792, 6226194, 4006049, 1251053, -2079213,
+-6018496, -10592059, -15815707, -21694928, -28223572, -35382820,
+-43140436, -51449560, -60249600, -69462792, -78994976, -88734976,
+-98555328, -108312432, -117847120, -126986608, -135542896, -143318016,
+-150106768, -155693424, -159859744, -162387488, -163062224, -161676800,
+-158034768, -151954128, -143271408, -131843832, -117553208, -100308496,
+-80048728, -56744644, -30400730, -1056328, 31212950, 66296312,
+-104051416, -144280880, -186784688, -231313168, -277585056, -325290400,
+-374093504, -423635840, -473540064, -523412928, -572850304, -621440576,
+-668770368, -714429248, -758014656, -799138176, -837430848, -872549376,
+-904183040, -932063424, -955866112, -975368256, -990502784, -1001141248,
+-1007204608, -1008661952, -1005531712, -997881088, -985824192, -969518976,
+-949164608, -924995776, -897283008, -866326016, -832450624, -796003264,
+-757347840, -716859456, -674920448, -631918336, 588261568, 544170240,
+500187776, 456655456, 413899520, 372230592, 331939808, 293293792,
+256529792, 221851008, 189423392, 159373024, 131783696, 106697088,
+84113256, 63991576, 46252108, 30775584, 17400960, 5897692,
+-3242832, -10003035, -15315395, -19324048, -22161874, -23947232,
+-24790774, -24801182, -24088950, -22768174, -20956786, -18774960,
+-16343248, -13780261, -11200397, -8711802, -6413878, -4393110,
+-2713518, -1364255
+};
+
+
+const Word32 LDQMF_30_fx[] = // q = 30
+{
+ 121571, 136778, 125655, 101704, 68195, 26875,
+-20212, -70890, -123705, -176138, -226890, -274106,
+-316253, -352352, -381787, -404297, -420072, -429892,
+-434876, -436802, -437431, -439163, -444543, -456066,
+-476087, -506661, -549091, -604538, -672815, -752814,
+-858037, -980068, -1106184, -1235998, -1367880, -1498945,
+-1626464, -1747442, -1858910, -1957741, -2041059, -2106142,
+-2150372, -2171766, -2168618, -2139643, -2084001, -2001495,
+-1892255, -1756846, -1596236, -1411745, -1205000, -977797,
+-732072, -470033, -193708, 94399, 391658, 694989,
+-1028102, -1352314, -1674661, -1994503, -2311012, -2622127,
+-2927093, -3225024, -3515027, -3796480, -4068760, -4331384,
+-4583784, -4825637, -5056603, -5276176, -5483931, -5679645,
+-5863044, -6033975, -6192384, -6338348, -6472204, -6594554,
+-6706284, -6808585, -6902959, -6991107, -7075060, -7157331,
+-7239857, -7325812, -7418951, -7521577, -7636335, -7765375,
+-7910813, -8074047, -8256089, -8457071, -8676456, -8912695,
+-9163169, -9424478, -9691922, -9959316, -10219283, -10463412,
+-10682245, -10865228, -11000298, -11074417, -11073811, -10983892,
+-10789539, -10475044, -10024687, -9422374, -8652076, -7698111,
+6547450, 5180201, 3585185, 1749124, -339904, -2692689,
+-5318487, -8224782, -11417230, -14899579, -18673422, -22738288,
+-27091010, -31726070, -36635292, -41807760, -47229416, -52884028,
+-58751904, -64809980, -71032152, -77388632, -83846512, -90369776,
+-96918936, -103451368, -109921528, -116280640, -122477480, -128458624,
+-134165992, -139540384, -144523760, -149052944, -153063904, -156492352,
+-159273296, -161342016, -162634320, -163087360, -162639632, -161231616,
+-158806368, -155309920, -150691824, -144905568, -137908720, -129663752,
+-120138088, -109304704, -97142448, -83636416, -68777832, -52564528,
+-35001268, -16099735, 4121304, 25635912, 48410956, 72407360,
+-97584200, -123867744, -151213264, -179552912, -208812656, -238912112,
+-269764832, -301278944, -333357440, -365898336, -398795360, -431938528,
+-465214080, -498505440, -531693760, -564658432, -597277184, -629427584,
+-660987072, -691834048, -721848128, -750911168, -778907776, -805726528,
+-831260224, -855407232, -878071616, -899164800, -918606592, -936328128,
+-952202112, -966152640, -978197888, -988289792, -996390080, -1002471040,
+-1006513664, -1008509056, -1008457600, -1006369728, -1002265344, -996173888,
+-988133504, -978191040, -966401920, -952828672, -937540800, -920615360,
+-902135488, -882190336, -860873664, -838284672, -814525888, -789704064,
+-763927872, -737309056, -709960000, -681994880, -653527872, -624673024,
+595607552, 566225280, 536822976, 507495872, 478344672, 449466912,
+420958208, 392910464, 365412224, 338547584, 312395584, 287029856,
+262517344, 238918544, 216286160, 194665808, 174094816, 154602160,
+136208672, 118926376, 102759984, 87704592, 73749168, 60872400,
+49048000, 38239292, 28404982, 19492542, 11438051, 4150853,
+-1959299, -6809585, -10983833, -14524688, -17473586, -19875174,
+-21764768, -23179288, -24150308, -24711158, -24893300, -24729546,
+-24252922, -23497172, -22497182, -21287720, -19904868, -18383770,
+-16760795, -15070633, -13348427, -11626766, -9938406, -8313092,
+-6779951, -5364481, -4088471, -2966834, -2000462, -1134160
+};
+
+
+const Word32 LDQMF_32_fx[] = // q = 30
+{
+119697, 137151, 128520, 107723, 78400, 41836,
+-442, -46740, -95597, -145201, -193804, -240598,
+-283800, -322316, -355411, -382593, -403699, -418862,
+-428699, -434120, -436480, -437237, -438149, -441391,
+-449045, -463039, -485346, -517326, -560092, -614348,
+-679872, -755580, -854379, -968457, -1086190, -1207329,
+-1330799, -1454135, -1575271, -1691704, -1801098, -1900763,
+-1988263, -2061316, -2117677, -2155275, -2172543, -2168111,
+-2140952, -2090356, -2016155, -1918414, -1797519, -1654212,
+-1489464, -1304576, -1100939, -880095, -643755, -393648,
+-131597, 140303, 419876, 704520, -1017921, -1322020,
+-1624457, -1924758, -2222508, -2515835, -2804014, -3086295,
+-3361992, -3630425, -3891163, -4143616, -4387487, -4622276,
+-4847761, -5063642, -5269495, -5464963, -5649876, -5823971,
+-5987172, -6139337, -6280537, -6410931, -6530943, -6641149,
+-6742439, -6835855, -6922708, -7004445, -7082802, -7159902,
+-7237256, -7317480, -7403834, -7498178, -7602711, -7719257,
+-7849652, -7995245, -8157013, -8335469, -8530447, -8741283,
+-8966383, -9203373, -9449370, -9700315, -9951033, -10195449,
+-10426707, -10637019, -10818085, -10960053, -11052529, -11084311,
+-11043675, -10918394, -10695736, -10362793, -9906464, -9313511,
+-8570674, -7665161, 6586647, 5317833, 3849979, 2171972,
+273875, -1853535, -4218327, -6827112, -9685347, -12796811,
+-16163952, -19787344, -23665996, -27796800, -32174812, -36793016,
+-41642268, -46710992, -51985904, -57451192, -63088408, -68876552,
+-74792144, -80808992, -86898528, -93029584, -99168576, -105279432,
+-111323816, -117260928, -123048216, -128641440, -133992400, -139052160,
+-143773440, -148104208, -151991888, -155383600, -158225792, -160465072,
+-162048320, -162923104, -163038096, -162343200, -160789920, -158332016,
+-154925376, -150528912, -145104496, -138617152, -131035664, -122332640,
+-112485024, -101474136, -89286032, -75911456, -61346324, -45591780,
+-28653996, -10544916, 8718141, 29112362, 50609392, 73176464,
+-96780680, -121357544, -146873168, -173272304, -200494976, -228475968,
+-257145792, -286430368, -316251616, -346527296, -377172096, -408096800,
+-439210240, -470417824, -501623072, -532727936, -563632832, -594237184,
+-624439872, -654140096, -683237312, -711632192, -739226496, -765924288,
+-791632320, -816260416, -839722176, -861935360, -882823040, -902313408,
+-920341952, -936853184, -951735680, -964924736, -976443584, -986251200,
+-994314944, -1000609792, -1005117952, -1007828864, -1008739392, -1007854080,
+-1005185024, -1000751488, -994580096, -986704064, -977163328, -966004416,
+-953279168, -939044864, -923364608, -906306368, -887942656, -868349888,
+-847608448, -825801792, -803016512, -779341120, -754867072, -729686080,
+-703891520, -677576896, -650837184, -623766656, 596524928, 568982144,
+541414592, 513899552, 486520032, 459356832, 432489472, 405994688,
+379947008, 354417408, 329473600, 305178976, 281592608, 258768368,
+236754960, 215594992, 195325728, 175977920, 157575920, 140137536,
+123674336, 108191456, 93687496, 80154992, 67580128, 55943780,
+45219876, 35377480, 26377892, 18179138, 10724362, 3937154,
+-1793747, -6383129, -10375463, -13802420, -16701194, -19108980,
+-21056298, -22573612, -23687536, -24425978, -24814642, -24880884,
+-24650790, -24152456, -23413234, -22462376, -21328340, -20040900,
+-18629038, -17122794, -15550818, -13942058, -12323783, -10723672,
+-9166937, -7678115, -6278687, -4990172, -3829056, -2807491,
+-1918388, -1103400
+};
+
+
+const Word32 LDQMF_40_fx[] = // q = 30
+{
+113206, 137254, 134425, 123146, 105211, 81666,
+53560, 21302, -14069, -51499, -90644, -130324,
+-169687, -208133, -245093, -279677, -311296, -339564,
+-364227, -384972, -401866, -414904, -424383, -430758,
+-434462, -436342, -437086, -437526, -438798, -441921,
+-448029, -458055, -473038, -493889, -521096, -555299,
+-596905, -645667, -701531, -764070, -843495, -933719,
+-1026835, -1122239, -1219597, -1318430, -1417239, -1515133,
+-1610824, -1702996, -1790556, -1872015, -1946188, -2011806,
+-2067738, -2112859, -2146050, -2166539, -2173557, -2166437,
+-2144725, -2108000, -2056211, -1989295, -1907357, -1810628,
+-1699503, -1574446, -1436054, -1285028, -1122103, -948052,
+-763730, -570121, -367947, -158284, 57837, 279329,
+505114, 733496, -987128, -1230885, -1473412, -1714779,
+-1954662, -2192913, -2428356, -2660607, -2889345, -3114179,
+-3334742, -3550687, -3761781, -3967793, -4168400, -4363503,
+-4552806, -4736194, -4913551, -5084693, -5249383, -5407420,
+-5558753, -5703241, -5840790, -5971350, -6094838, -6211308,
+-6320774, -6423390, -6519396, -6609079, -6692852, -6771222,
+-6844809, -6914280, -6980363, -7043921, -7105964, -7167616,
+-7229469, -7292854, -7359781, -7431209, -7508135, -7591745,
+-7682927, -7782628, -7891680, -8010673, -8140087, -8280182,
+-8430924, -8592083, -8763179, -8943293, -9131195, -9325472,
+-9524332, -9725493, -9926142, -10123188, -10313198, -10492333,
+-10656603, -10801577, -10922158, -11013175, -11068951, -11083709,
+-11051345, -10965628, -10820070, -10607987, -10322919, -9958035,
+-9506509, -8961670, -8316717, -7565184, 6702942, 5718827,
+4609517, 3369113, 1992225, 473872, -1190731, -3005819,
+-4975066, -7101637, -9388180, -11836610, -14448347, -17224060,
+-20163764, -23266722, -26531342, -29955288, -33535422, -37267720,
+-41147260, -45168140, -49323552, -53606284, -58007508, -62517548,
+-67125584, -71820016, -76587808, -81415152, -86287160, -91187832,
+-96100320, -101006496, -105887512, -110723520, -115493552, -120176040,
+-124748632, -129188288, -133469680, -137567456, -141458352, -145116032,
+-148513808, -151624560, -154421360, -156876704, -158963328, -160653808,
+-161921024, -162738128, -163078752, -162916896, -162227280, -160985216,
+-159167008, -156749920, -153712208, -150033328, -145694224, -140676912,
+-134964928, -128543672, -121399776, -113521832, -104900488, -95527920,
+-85398544, -74508560, -62856444, -50442808, -37270156, -23343566,
+-8670189, 6740502, 22876916, 39724980, 57268860, 75490816,
+-94376496, -113883272, -134001320, -154702832, -175958544, -197737504,
+-220006032, -242729312, -265870144, -289389664, -313247648, -337401888,
+-361809024, -386424256, -411201216, -436093120, -461051360, -486026816,
+-510969600, -535829088, -560554240, -585093440, -609395008, -633407296,
+-657078592, -680357568, -703193408, -725535424, -747334272, -768541184,
+-789108672, -808990656, -828142272, -846520832, -864084928, -880795968,
+-896616960, -911514304, -925457216, -938417536, -950324992, -961141376,
+-970896128, -979566976, -987136576, -993587776, -998908288, -1003088128,
+-1006120192, -1008000960, -1008729280, -1008307648, -1006741504, -1004039168,
+-1000212096, -995274560, -989243584, -982139008, -973983296, -964801472,
+-954620608, -943470016, -931381312, -918388608, -904527488, -889835648,
+-874352128, -858117568, -841174400, -823565824, -805336512, -786531904,
+-767198144, -747382720, -727132672, -706495808, -685520512, -664254656,
+-642746560, -621047616, 599273536, 577248256, 555196416, 533150944,
+511154144, 489249568, 467478368, 445881248, 424498464, 403368608,
+382529632, 362017792, 341868224, 322114240, 302787552, 283917824,
+265532592, 247657504, 230315568, 213527440, 197311648, 181683920,
+166657488, 152242496, 138447232, 125276624, 112733328, 100817520,
+89526080, 78854768, 68795096, 59337532, 50469688, 42175888,
+34440516, 27241264, 20558124, 14361678, 8619497, 3303077,
+-1288525, -5070930, -8454926, -11459781, -14115485, -16433949,
+-18436136, -20138626, -21555150, -22702724, -23593500, -24242222,
+-24662498, -24867088, -24870766, -24686354, -24328404, -23811232,
+-23148884, -22356736, -21449164, -20441404, -19348716, -18185774,
+-16968062, -15710186, -14426756, -13132428, -11840736, -10565599,
+-9320040, -8115962, -6965903, -5879984, -4867950, -3939393,
+-3097321, -2346408, -1680052, -1007771
+};
+
+
+const Word32 LDQMF_60_fx[] = // q = 30
+{
+ 102336, 132095, 137435, 135349, 130054, 120487,
+108540, 94118, 77297, 58570, 37811, 15643,
+-7974, -32619, -57897, -84046, -110471, -136942,
+-163210, -188997, -214438, -239091, -262715, -285164,
+-306247, -325880, -343923, -360378, -375095, -388054,
+-399325, -408842, -416725, -423037, -427924, -431547,
+-434000, -435582, -436522, -437005, -437285, -437644,
+-438481, -440062, -442703, -446767, -452482, -460182,
+-470154, -482692, -497967, -516093, -537287, -561715,
+-589463, -620381, -654511, -691825, -731564, -775911,
+-829205, -887814, -949148, -1011179, -1074239, -1138341,
+-1203246, -1268925, -1334921, -1400802, -1466394, -1531260,
+-1595082, -1657422, -1717943, -1776350, -1832122, -1884921,
+-1934396, -1980124, -2021834, -2059138, -2091724, -2119241,
+-2141378, -2157946, -2168655, -2173353, -2171782, -2163852,
+-2149388, -2128230, -2100421, -2065896, -2024638, -1976676,
+-1922048, -1860817, -1793099, -1719008, -1638685, -1552286,
+-1460012, -1362085, -1258676, -1150050, -1036418, -918024,
+-795131, -668022, -536993, -402188, -263994, -122679,
+21420, 167952, 316690, 467104, 619489, 773430,
+-945239, -1109006, -1271451, -1433050, -1594302, -1754861,
+-1914784, -2074063, -2232363, -2389328, -2544892, -2698989,
+-2851488, -3002259, -3151251, -3298296, -3443307, -3586211,
+-3726943, -3865450, -4001599, -4135335, -4266665, -4395461,
+-4521664, -4645248, -4766175, -4884420, -4999899, -5112604,
+-5222404, -5329217, -5433113, -5533999, -5631869, -5726641,
+-5818340, -5906959, -5992421, -6074745, -6153951, -6230036,
+-6303010, -6372928, -6439843, -6503845, -6565001, -6623435,
+-6679269, -6732690, -6783804, -6832855, -6880012, -6925506,
+-6969547, -7012401, -7054336, -7095680, -7136777, -7177903,
+-7219120, -7260809, -7303731, -7348340, -7394870, -7443617,
+-7494881, -7549043, -7606393, -7667166, -7731644, -7800142,
+-7872827, -7949919, -8031501, -8117779, -8208793, -8304570,
+-8405066, -8510223, -8619935, -8734017, -8852171, -8974106,
+-9099397, -9227619, -9358364, -9490965, -9624792, -9759051,
+-9892867, -10025312, -10155439, -10282162, -10404401, -10520844,
+-10630426, -10731825, -10823502, -10903968, -10971712, -11025073,
+-11062346, -11081824, -11081759, -11060277, -11015548, -10945697,
+-10848751, -10722771, -10565739, -10375810, -10150872, -9888970,
+-9588053, -9246198, -8861297, -8431401, -7954792, -7429283,
+6854949, 6226194, 5542800, 4803353, 4006049, 3149248,
+2231398, 1251053, 206700, -902968, -2079213, -3323232,
+-4636016, -6018496, -7471561, -8995894, -10592059, -12260527,
+-14001671, -15815707, -17702624, -19662438, -21694928, -23799650,
+-25976100, -28223572, -30541232, -32928052, -35382820, -37904240,
+-40490688, -43140436, -45851544, -48621904, -51449560, -54331840,
+-57266136, -60249600, -63279032, -66351236, -69462792, -72609920,
+-75788648, -78994976, -82224448, -85472704, -88734976, -92006232,
+-95281520, -98555328, -101822272, -105076584, -108312432, -111523680,
+-114704032, -117847120, -120946376, -123995120, -126986608, -129913560,
+-132768248, -135542896, -138230992, -140825344, -143318016, -145701104,
+-147966688, -150106768, -152113232, -153978192, -155693424, -157250816,
+-158642336, -159859744, -160895152, -161740352, -162387488, -162828688,
+-163056176, -163062224, -162839296, -162379936, -161676800, -160722816,
+-159511024, -158034768, -156287280, -154262480, -151954128, -149356496,
+-146464032, -143271408, -139773568, -135965808, -131843832, -127403488,
+-122641048, -117553208, -112136840, -106389392, -100308496, -93892368,
+-87139520, -80048728, -72619504, -64851416, -56744644, -48299972,
+-39518100, -30400730, -20949652, -11167261, -1056328, 9379870,
+20137698, 31212950, 42601076, 54297248, 66296312, 78593112,
+-91185600, -104051416, -117194704, -130607064, -144280880, -158207776,
+-172378736, -186784688, -201415824, -216262032, -231313168, -246558128,
+-261985952, -277585056, -293343616, -309249600, -325290400, -341453376,
+-357725472, -374093504, -390543744, -407062432, -423635840, -440249504,
+-456889088, -473540064, -490187584, -506816896, -523412928, -539960640,
+-556444864, -572850304, -589161600, -605363456, -621440576, -637377600,
+-653159232, -668770368, -684195712, -699420352, -714429248, -729207616,
+-743740992, -758014656, -772014784, -785727168, -799138176, -812234496,
+-825002880, -837430848, -849505856, -861215872, -872549376, -883495616,
+-894043456, -904183040, -913905152, -923200640, -932063424, -940477696,
+-948417216, -955866112, -962841216, -969345024, -975368256, -980905536,
+-985952256, -990502784, -994553344, -998100544, -1001141248, -1003673344,
+-1005694720, -1007204608, -1008202304, -1008687808, -1008661952, -1008125952,
+-1007081664, -1005531712, -1003479040, -1000927424, -997881088, -994344832,
+-990323904, -985824192, -980852096, -975414528, -969518976, -963173312,
+-956385600, -949164608, -941519424, -933459776, -924995776, -916137728,
+-906896448, -897283008, -887308928, -876985984, -866326016, -855341824,
+-844045696, -832450624, -820569472, -808415936, -796003264, -783345088,
+-770455104, -757347840, -744036608, -730535808, -716859456, -703022272,
+-689038016, -674920448, -660685696, -646345600, -631918336, -617424704,
+602927232, 588261568, 573575488, 558872576, 544170240, 529480224,
+514815008, 500187776, 485610624, 471095904, 456655456, 442301536,
+428045760, 413899520, 399874240, 385981024, 372230592, 358633472,
+345199872, 331939808, 318862624, 305977728, 293293792, 280819232,
+268562016, 256529792, 244729552, 233167968, 221851008, 210784624,
+199973840, 189423392, 179137440, 169119664, 159373024, 149900064,
+140703152, 131783696, 123142424, 114780232, 106697088, 98892400,
+91364808, 84113256, 77135992, 70429688, 63991576, 57819020,
+51907328, 46252108, 40848248, 35691672, 30775584, 26091894,
+21637068, 17400960, 13374445, 9548629, 5897692, 2475272,
+-592184, -3242832, -5659970, -7917455, -10003035, -11926348,
+-13696880, -15315395, -16789184, -18123694, -19324048, -20394110,
+-21338122, -22161874, -22868630, -23462238, -23947232, -24327810,
+-24607834, -24790774, -24881324, -24883598, -24801182, -24638338,
+-24399474, -24088950, -23710470, -23268668, -22768174, -22213084,
+-21607820, -20956786, -20264828, -19536176, -18774960, -17986262,
+-17174228, -16343248, -15497611, -14641749, -13780261, -12916498,
+-12055168, -11200397, -10355588, -9525147, -8711802, -7920384,
+-7153632, -6413878, -5706099, -5031208, -4393110, -3792571,
+-3230785, -2713518, -2227977, -1784736, -1364255, -871387
+};
+
+const Word32 rot_vec_delay_re_LDQMF_fx[60] = // q = 31
+{
+ -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224,
+ 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224,
+ -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224,
+ 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224,
+ -1518500224, 1518500224, 1518500224, -1518500224
+};
+
+const Word32 rot_vec_delay_im_LDQMF_fx[60] = // q = 31
+{
+ -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224,
+ 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224,
+ -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224,
+ 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224, -1518500224, -1518500224, 1518500224, 1518500224,
+ -1518500224, -1518500224, 1518500224, 1518500224
+};
+
+const Word32 rot_vec_ana_re_L10_fx[5] = // q = 29
+{
+ 1517329536, 1424643840, 1192503936, 843633536, 412182400
+};
+
+const Word32 rot_vec_ana_im_L10_fx[5] = // q = 29
+{
+ -59616040, -525578848, -940094336, -1262586752, -1461488512
+};
+
+const Word32 rot_vec_ana_re_L16_fx[8] = // q = 29
+{
+ 1200118272, 1171310720, 1097490432, 981494080, 827779520, 642253888, 432046752, 205236304
+};
+
+const Word32 rot_vec_ana_im_L16_fx[8] = // q = 29
+{
+ -29461250, -263026624, -486484032, -691246144, -869444032, -1014229696, -1120039040, -1182806016
+};
+
+const Word32 rot_vec_ana_re_L20_fx[10] = // q = 29
+{
+ 1073534848, 1057019968, 1014477760, 946955776, 856116544, 744196864, 613952640, 468590848, 311690784, 147115888
+};
+
+const Word32 rot_vec_ana_im_L20_fx[10] = // q = 29
+{
+ -21081516, -188759824, -351790240, -506158400, -648063232, -774010624, -880899328, -966097344, -1027506880, -1063615744
+};
+
+const Word32 rot_vec_ana_re_L30_fx[15] = // q = 29
+{
+ 876631424, 870629568, 855088960, 830179840, 796175040, 753447232, 702464448, 643785344, 578052800, 505986944, 428377440, 346074528, 259979936, 171036960, 80220064
+};
+
+const Word32 rot_vec_ana_im_L30_fx[15] = // q = 29
+{
+ -11475734, -103045800, -193486880, -281808064, -367041728, -448253984, -524555072, -595109056, -659142848, -715955008, -764922944, -805510272, -837272192, -859860864, -873028672
+};
+
+const Word32 rot_vec_ana_re_L32_fx[16] = // q = 29
+{
+ 848803520, 843695296, 830461760, 809230464, 780205824, 743667392, 699967040, 649525568, 592828864, 530422880, 462908640, 390936320, 315199072, 236426304, 155376608, 72830544
+};
+
+const Word32 rot_vec_ana_im_L32_fx[16] = // q = 29
+{
+ -10416909, -93564040, -175810112, -256363024, -334447008, -409310112, -480231328, -546527616, -607560576, -662742400, -711541696, -753488384, -788178560, -815278208, -834526272, -845737344
+};
+
+const Word32 rot_vec_ana_re_L40_fx[20] = // q = 29
+{
+ 759213504, 756288320, 748700352, 736496320, 719751616, 698569408, 673080256, 643441344, 609835392, 572469632, 531574400, 487401824, 440224256, 390332576, 338034336,
+ 283652032, 227520896, 169987024, 111405128, 52136384
+};
+
+const Word32 rot_vec_ana_im_L40_fx[20] = // q = 29
+{
+ -7453801, -66998032, -126129192, -184482736, -241698864, -297424864, -351317120, -403043392, -452284768, -498737664, -542115648, -582151360, -618597888, -651230528,
+ -679848192, -704274304, -724358336, -739976448, -751032384, -757457984
+};
+
+const Word32 rot_vec_ana_re_L60_fx[30] = // q = 29
+{
+ 619911872, 618849920, 616091776, 611644992, 605521728, 597738752, 588317440, 577283520, 564667392, 550503488, 534830720, 517692032, 499134368, 479208608, 457969376, 435474880, 411786784,
+ 386970016, 361092576, 334225408, 306442144, 277818944, 248434272, 218368656, 187704512, 156525872, 124918216, 92968160, 60763288, 28391868
+};
+
+const Word32 rot_vec_ana_im_L60_fx[30] = // q = 29
+{
+ -4057371, -36495492, -68833576, -100983000, -132855632, -164364112, -195422080, -225944416, -255847456, -285049248, -313469728, -341030976, -367657536, -393276352, -417817216, -441212864,
+ -463399200, -484315392, -503904096, -522111616, -538888128, -554187520, -567967936, -580191616, -590825024, -599838976, -607208896, -612914432, -616940032, -619274624
+};
+
+
+/*!
+ * \brief CLDFB prototype filter
+ *
+ * cldfb bands: 10
+ * delay[ms]: 1.00
+ * abs. max Val: 1.04
+ * scale: 0.50
+ */
+const Word16 CLDFB80_10[] =//Q.5
+{
+ W16(0x0000), W16(0xfffc), W16(0xffdf), W16(0x0132), W16(0x23b5),
+ W16(0x0000), W16(0xffff), W16(0xfff3), W16(0x018d), W16(0x2a98),
+ W16(0x0000), W16(0x0000), W16(0x0006), W16(0x020d), W16(0x3116),
+ W16(0x0000), W16(0x0000), W16(0x001a), W16(0x02bd), W16(0x36e2),
+ W16(0x0000), W16(0x0000), W16(0x001c), W16(0x039f), W16(0x3bb5),
+ W16(0x0000), W16(0xffff), W16(0x001a), W16(0x04b1), W16(0x3f51),
+ W16(0x0000), W16(0x0000), W16(0x0024), W16(0x05da), W16(0x419a),
+ W16(0x0000), W16(0x0000), W16(0x002e), W16(0x06ee), W16(0x428c),
+ W16(0x0000), W16(0x0000), W16(0x0032), W16(0x07bd), W16(0x4267),
+ W16(0x0000), W16(0xfffc), W16(0x001b), W16(0x0820), W16(0x410b),
+ W16(0x0000), W16(0xfff0), W16(0xffe9), W16(0x0806), W16(0x3d82),
+ W16(0x0000), W16(0xfffe), W16(0xffe6), W16(0x0746), W16(0x37fe),
+ W16(0x0000), W16(0x0000), W16(0x000d), W16(0x05ae), W16(0x31d1),
+ W16(0x0000), W16(0x0000), W16(0x002a), W16(0x032f), W16(0x2b60),
+ W16(0x0000), W16(0xfffd), W16(0x0025), W16(0xffcd), W16(0x24a3),
+ W16(0x0000), W16(0x0003), W16(0x0004), W16(0xfb88), W16(0x1dc0),
+ W16(0x0000), W16(0x0000), W16(0xffca), W16(0xf66f), W16(0x16c9),
+ W16(0x0000), W16(0x0000), W16(0xff95), W16(0xf09a), W16(0x0fe8),
+ W16(0x0000), W16(0xffff), W16(0xff64), W16(0xea2a), W16(0x08e0),
+ W16(0x0000), W16(0x0012), W16(0xff21), W16(0xe34c), W16(0x02aa)
+};
+
+/*!
+ * \brief CLDFB prototype filter
+ *
+ * cldfb bands: 16
+ * delay[ms]: 1.00
+ * abs. max Val: 1.04
+ * scale: 0.50
+ */
+const Word16 CLDFB80_16[] =//Q.5
+{
+ W16(0x0000), W16(0xfffb), W16(0xffdd), W16(0x0123), W16(0x2266),
+ W16(0x0000), W16(0xfffe), W16(0xffe7), W16(0x0157), W16(0x26c0),
+ W16(0x0000), W16(0xffff), W16(0xfff4), W16(0x0194), W16(0x2b04),
+ W16(0x0000), W16(0xffff), W16(0xfffe), W16(0x01e0), W16(0x2f1f),
+ W16(0x0000), W16(0x0000), W16(0x000c), W16(0x023f), W16(0x32fc),
+ W16(0x0000), W16(0x0000), W16(0x0019), W16(0x02b0), W16(0x368c),
+ W16(0x0000), W16(0x0000), W16(0x001d), W16(0x0336), W16(0x39bc),
+ W16(0x0000), W16(0x0001), W16(0x0013), W16(0x03cf), W16(0x3c7b),
+ W16(0x0000), W16(0x0001), W16(0x001a), W16(0x047b), W16(0x3ebd),
+ W16(0x0000), W16(0x0000), W16(0x001e), W16(0x0532), W16(0x407c),
+ W16(0x0000), W16(0x0000), W16(0x0025), W16(0x05ec), W16(0x41b3),
+ W16(0x0000), W16(0xffff), W16(0x002d), W16(0x069d), W16(0x4262),
+ W16(0x0000), W16(0x0000), W16(0x0031), W16(0x0738), W16(0x429c),
+ W16(0x0000), W16(0x0000), W16(0x0032), W16(0x07b3), W16(0x4271),
+ W16(0x0000), W16(0xffff), W16(0x002a), W16(0x0804), W16(0x41d1),
+ W16(0x0000), W16(0xfff9), W16(0x0015), W16(0x0824), W16(0x40a3),
+ W16(0x0000), W16(0xffec), W16(0xffee), W16(0x0815), W16(0x3e6c),
+ W16(0x0000), W16(0xfff7), W16(0xffe0), W16(0x07ca), W16(0x3b3b),
+ W16(0x0000), W16(0xfffd), W16(0xffe8), W16(0x0734), W16(0x379e),
+ W16(0x0000), W16(0xfffe), W16(0x0000), W16(0x0647), W16(0x33c7),
+ W16(0x0000), W16(0xffff), W16(0x0018), W16(0x04ff), W16(0x2fd6),
+ W16(0x0000), W16(0x0000), W16(0x0029), W16(0x035e), W16(0x2bca),
+ W16(0x0000), W16(0xffff), W16(0x002b), W16(0x0164), W16(0x279c),
+ W16(0x0000), W16(0x0001), W16(0x0022), W16(0xff11), W16(0x235b),
+ W16(0x0000), W16(0xfffc), W16(0x000f), W16(0xfc66), W16(0x1f0d),
+ W16(0x0000), W16(0x0001), W16(0xffec), W16(0xf966), W16(0x1ab4),
+ W16(0x0000), W16(0x0000), W16(0xffc6), W16(0xf617), W16(0x165a),
+ W16(0x0000), W16(0x0001), W16(0xffa5), W16(0xf27f), W16(0x120e),
+ W16(0x0000), W16(0x0001), W16(0xff86), W16(0xeea6), W16(0x0dbd),
+ W16(0x0000), W16(0x0001), W16(0xff67), W16(0xea95), W16(0x0950),
+ W16(0x0000), W16(0x0005), W16(0xff40), W16(0xe657), W16(0x051a),
+ W16(0x0000), W16(0x001b), W16(0xff12), W16(0xe1fc), W16(0x01c8)
+};
+
+/*!
+ * \brief CLDFB prototype filter
+ *
+ * cldfb bands: 20
+ * delay[ms]: 1.00
+ * abs. max Val: 1.04
+ * scale: 0.50
+ */
+const Word16 CLDFB80_20[] =//Q.5
+{
+ W16(0x0000), W16(0xfffb), W16(0xffdf), W16(0x011e), W16(0x21f7),
+ W16(0x0000), W16(0xfffd), W16(0xffe1), W16(0x0146), W16(0x2573),
+ W16(0x0000), W16(0xffff), W16(0xfff2), W16(0x0173), W16(0x28e6),
+ W16(0x0000), W16(0xffff), W16(0xfff6), W16(0x01a9), W16(0x2c45),
+ W16(0x0000), W16(0xffff), W16(0xffff), W16(0x01e9), W16(0x2f84),
+ W16(0x0000), W16(0x0000), W16(0x000a), W16(0x0235), W16(0x329c),
+ W16(0x0000), W16(0x0000), W16(0x0014), W16(0x028c), W16(0x3583),
+ W16(0x0000), W16(0x0000), W16(0x001b), W16(0x02f1), W16(0x3831),
+ W16(0x0000), W16(0x0000), W16(0x001e), W16(0x0362), W16(0x3a9c),
+ W16(0x0000), W16(0x0001), W16(0x000d), W16(0x03df), W16(0x3cbb),
+ W16(0x0000), W16(0x0000), W16(0x001b), W16(0x0469), W16(0x3e89),
+ W16(0x0000), W16(0x0000), W16(0x001c), W16(0x04fb), W16(0x4004),
+ W16(0x0000), W16(0x0000), W16(0x0020), W16(0x0590), W16(0x4129),
+ W16(0x0000), W16(0x0000), W16(0x0027), W16(0x0622), W16(0x41f5),
+ W16(0x0000), W16(0x0000), W16(0x002e), W16(0x06ad), W16(0x426d),
+ W16(0x0000), W16(0x0000), W16(0x0030), W16(0x072a), W16(0x429b),
+ W16(0x0000), W16(0x0000), W16(0x0032), W16(0x0792), W16(0x4288),
+ W16(0x0000), W16(0x0001), W16(0x002e), W16(0x07e1), W16(0x4232),
+ W16(0x0000), W16(0xfffe), W16(0x0024), W16(0x0813), W16(0x4186),
+ W16(0x0000), W16(0xfff8), W16(0x0011), W16(0x0825), W16(0x407d),
+ W16(0x0000), W16(0xffed), W16(0xfff1), W16(0x0818), W16(0x3eb8),
+ W16(0x0000), W16(0xfff5), W16(0xffe3), W16(0x07e8), W16(0x3c3c),
+ W16(0x0000), W16(0xfffe), W16(0xffe1), W16(0x0789), W16(0x3977),
+ W16(0x0000), W16(0xfffd), W16(0xffee), W16(0x06f6), W16(0x367b),
+ W16(0x0000), W16(0xfffe), W16(0x0002), W16(0x062a), W16(0x3363),
+ W16(0x0000), W16(0xffff), W16(0x0016), W16(0x0524), W16(0x303c),
+ W16(0x0000), W16(0x0000), W16(0x0026), W16(0x03e4), W16(0x2d04),
+ W16(0x0000), W16(0x0000), W16(0x002d), W16(0x026c), W16(0x29b7),
+ W16(0x0000), W16(0xfffe), W16(0x0029), W16(0x00bb), W16(0x2657),
+ W16(0x0000), W16(0x0005), W16(0x0021), W16(0xfed0), W16(0x22ed),
+ W16(0x0000), W16(0xfff8), W16(0x0014), W16(0xfcae), W16(0x1f7c),
+ W16(0x0000), W16(0x0002), W16(0xfff7), W16(0xfa55), W16(0x1c03),
+ W16(0x0000), W16(0x0000), W16(0xffd8), W16(0xf7c8), W16(0x1886),
+ W16(0x0000), W16(0x0001), W16(0xffbc), W16(0xf50a), W16(0x150f),
+ W16(0x0000), W16(0x0001), W16(0xffa2), W16(0xf21f), W16(0x11a0),
+ W16(0x0000), W16(0x0001), W16(0xff89), W16(0xef0b), W16(0x0e2c),
+ W16(0x0000), W16(0x0001), W16(0xff71), W16(0xebd2), W16(0x0aa5),
+ W16(0x0000), W16(0xfffe), W16(0xff55), W16(0xe87a), W16(0x0724),
+ W16(0x0000), W16(0x0006), W16(0xff33), W16(0xe50a), W16(0x03fd),
+ W16(0x0000), W16(0x001e), W16(0xff0d), W16(0xe18b), W16(0x017f)
+};
+
+/*!
+ * \brief CLDFB prototype filter
+ *
+ * cldfb bands: 32
+ * delay[ms]: 1.00
+ * abs. max Val: 1.04
+ * scale: 0.50
+ */
+const Word16 CLDFB80_32[] =//Q.5
+{
+ W16(0x0000), W16(0xfffb), W16(0xffe2), W16(0x0115), W16(0x214f),
+ W16(0x0000), W16(0xfffc), W16(0xffde), W16(0x012f), W16(0x237e),
+ W16(0x0000), W16(0xfffd), W16(0xffe2), W16(0x0149), W16(0x25ab),
+ W16(0x0000), W16(0xfffe), W16(0xffec), W16(0x0165), W16(0x27d4),
+ W16(0x0000), W16(0xffff), W16(0xfff4), W16(0x0183), W16(0x29f6),
+ W16(0x0000), W16(0xffff), W16(0xfff6), W16(0x01a6), W16(0x2c10),
+ W16(0x0000), W16(0xffff), W16(0xfffb), W16(0x01cc), W16(0x2e1d),
+ W16(0x0000), W16(0xffff), W16(0x0001), W16(0x01f6), W16(0x301c),
+ W16(0x0000), W16(0x0000), W16(0x0009), W16(0x0226), W16(0x320b),
+ W16(0x0000), W16(0x0000), W16(0x000f), W16(0x025a), W16(0x33e7),
+ W16(0x0000), W16(0x0000), W16(0x0015), W16(0x0292), W16(0x35b0),
+ W16(0x0000), W16(0x0000), W16(0x001b), W16(0x02d0), W16(0x3761),
+ W16(0x0000), W16(0x0000), W16(0x001d), W16(0x0313), W16(0x38fa),
+ W16(0x0000), W16(0x0000), W16(0x001e), W16(0x035a), W16(0x3a77),
+ W16(0x0000), W16(0x0000), W16(0x001b), W16(0x03a7), W16(0x3bd7),
+ W16(0x0000), W16(0x0000), W16(0x0004), W16(0x03f7), W16(0x3d18),
+ W16(0x0000), W16(0xffff), W16(0x001b), W16(0x044e), W16(0x3e38),
+ W16(0x0000), W16(0xffff), W16(0x001a), W16(0x04a8), W16(0x3f39),
+ W16(0x0000), W16(0x0000), W16(0x001c), W16(0x0504), W16(0x4018),
+ W16(0x0000), W16(0x0001), W16(0x001f), W16(0x0561), W16(0x40d6),
+ W16(0x0000), W16(0x0000), W16(0x0022), W16(0x05be), W16(0x4172),
+ W16(0x0000), W16(0x0000), W16(0x0027), W16(0x0619), W16(0x41eb),
+ W16(0x0000), W16(0xffff), W16(0x002c), W16(0x0672), W16(0x4242),
+ W16(0x0000), W16(0x0000), W16(0x002e), W16(0x06c6), W16(0x427b),
+ W16(0x0000), W16(0x0000), W16(0x002f), W16(0x0714), W16(0x4297),
+ W16(0x0000), W16(0x0000), W16(0x0031), W16(0x075a), W16(0x429a),
+ W16(0x0000), W16(0x0000), W16(0x0032), W16(0x0798), W16(0x4285),
+ W16(0x0000), W16(0x0001), W16(0x0031), W16(0x07cb), W16(0x4255),
+ W16(0x0000), W16(0xffff), W16(0x002c), W16(0x07f4), W16(0x4206),
+ W16(0x0000), W16(0xfffe), W16(0x0025), W16(0x0811), W16(0x4193),
+ W16(0x0000), W16(0xfffb), W16(0x001a), W16(0x0821), W16(0x40fa),
+ W16(0x0000), W16(0xfff5), W16(0x000b), W16(0x0823), W16(0x404a),
+ W16(0x0000), W16(0xfff0), W16(0xfff6), W16(0x081b), W16(0x3f2f),
+ W16(0x0000), W16(0xffef), W16(0xffe9), W16(0x0809), W16(0x3daa),
+ W16(0x0000), W16(0xfff5), W16(0xffe2), W16(0x07e4), W16(0x3c12),
+ W16(0x0000), W16(0xfffa), W16(0xffe0), W16(0x07ac), W16(0x3a5c),
+ W16(0x0000), W16(0xffff), W16(0xffe4), W16(0x0761), W16(0x388d),
+ W16(0x0000), W16(0xfffd), W16(0xffed), W16(0x0701), W16(0x36ac),
+ W16(0x0000), W16(0xfffe), W16(0xfff9), W16(0x068a), W16(0x34c0),
+ W16(0x0000), W16(0xffff), W16(0x0006), W16(0x05fd), W16(0x32cd),
+ W16(0x0000), W16(0x0000), W16(0x0013), W16(0x0559), W16(0x30d4),
+ W16(0x0000), W16(0x0000), W16(0x001d), W16(0x049f), W16(0x2ed6),
+ W16(0x0000), W16(0x0000), W16(0x0026), W16(0x03cf), W16(0x2cd0),
+ W16(0x0000), W16(0x0000), W16(0x002c), W16(0x02e8), W16(0x2ac1),
+ W16(0x0000), W16(0x0000), W16(0x002c), W16(0x01eb), W16(0x28aa),
+ W16(0x0000), W16(0xfffe), W16(0x0029), W16(0x00d7), W16(0x268d),
+ W16(0x0000), W16(0xfffd), W16(0x0024), W16(0xffae), W16(0x246c),
+ W16(0x0000), W16(0x000a), W16(0x0021), W16(0xfe6e), W16(0x2248),
+ W16(0x0000), W16(0xfff3), W16(0x001a), W16(0xfd19), W16(0x2022),
+ W16(0x0000), W16(0x0003), W16(0x0006), W16(0xfbad), W16(0x1df8),
+ W16(0x0000), W16(0x0002), W16(0xfff5), W16(0xfa2d), W16(0x1bcb),
+ W16(0x0000), W16(0xffff), W16(0xffe2), W16(0xf899), W16(0x199d),
+ W16(0x0000), W16(0x0001), W16(0xffcf), W16(0xf6f2), W16(0x1770),
+ W16(0x0000), W16(0x0001), W16(0xffbd), W16(0xf537), W16(0x1546),
+ W16(0x0000), W16(0x0001), W16(0xffad), W16(0xf36b), W16(0x1320),
+ W16(0x0000), W16(0x0000), W16(0xff9d), W16(0xf18e), W16(0x10fc),
+ W16(0x0000), W16(0x0001), W16(0xff8e), W16(0xefa2), W16(0x0ed3),
+ W16(0x0000), W16(0x0001), W16(0xff7f), W16(0xeda7), W16(0x0ca3),
+ W16(0x0000), W16(0x0001), W16(0xff6f), W16(0xeb9e), W16(0x0a6c),
+ W16(0x0000), W16(0xfffd), W16(0xff5e), W16(0xe989), W16(0x0837),
+ W16(0x0000), W16(0x0003), W16(0xff4b), W16(0xe769), W16(0x0618),
+ W16(0x0000), W16(0x0006), W16(0xff35), W16(0xe542), W16(0x042a),
+ W16(0x0000), W16(0x0013), W16(0xff1e), W16(0xe314), W16(0x0284),
+ W16(0x0000), W16(0x0020), W16(0xff06), W16(0xe0e2), W16(0x010c)
+};
+
+/*!
+ * \brief CLDFB prototype filter
+ *
+ * cldfb bands: 40
+ * delay[ms]: 1.00
+ * abs. max Val: 1.04
+ * scale: 0.50
+ */
+const Word16 CLDFB80_40[] =//Q.5
+{
+ W16(0x0000), W16(0xfffa), W16(0xffe2), W16(0x0112), W16(0x2117),
+ W16(0x0000), W16(0xfffb), W16(0xffdc), W16(0x0128), W16(0x22d6),
+ W16(0x0000), W16(0xfffc), W16(0xffe0), W16(0x013c), W16(0x2494),
+ W16(0x0000), W16(0xfffe), W16(0xffe5), W16(0x0151), W16(0x2651),
+ W16(0x0000), W16(0xffff), W16(0xffed), W16(0x0167), W16(0x280b),
+ W16(0x0000), W16(0xffff), W16(0xfff4), W16(0x0180), W16(0x29c0),
+ W16(0x0000), W16(0xffff), W16(0xfff4), W16(0x019b), W16(0x2b6f),
+ W16(0x0000), W16(0xffff), W16(0xfff8), W16(0x01b8), W16(0x2d18),
+ W16(0x0000), W16(0xffff), W16(0xfffd), W16(0x01d8), W16(0x2eb8),
+ W16(0x0000), W16(0xffff), W16(0x0002), W16(0x01fb), W16(0x304e),
+ W16(0x0000), W16(0x0000), W16(0x0008), W16(0x0221), W16(0x31da),
+ W16(0x0000), W16(0x0000), W16(0x000d), W16(0x0249), W16(0x335a),
+ W16(0x0000), W16(0x0000), W16(0x0013), W16(0x0275), W16(0x34ce),
+ W16(0x0000), W16(0x0000), W16(0x0017), W16(0x02a4), W16(0x3634),
+ W16(0x0000), W16(0x0000), W16(0x001b), W16(0x02d6), W16(0x378b),
+ W16(0x0000), W16(0x0000), W16(0x001d), W16(0x030c), W16(0x38d3),
+ W16(0x0000), W16(0x0000), W16(0x001e), W16(0x0344), W16(0x3a08),
+ W16(0x0000), W16(0x0000), W16(0x001e), W16(0x0380), W16(0x3b2b),
+ W16(0x0000), W16(0x0000), W16(0x0017), W16(0x03bf), W16(0x3c3b),
+ W16(0x0000), W16(0xffff), W16(0x0002), W16(0x03ff), W16(0x3d36),
+ W16(0x0000), W16(0xffff), W16(0x001a), W16(0x0445), W16(0x3e1d),
+ W16(0x0000), W16(0x0000), W16(0x001a), W16(0x048d), W16(0x3eef),
+ W16(0x0000), W16(0x0000), W16(0x001b), W16(0x04d6), W16(0x3fad),
+ W16(0x0000), W16(0x0000), W16(0x001d), W16(0x0520), W16(0x4055),
+ W16(0x0000), W16(0x0001), W16(0x001f), W16(0x056a), W16(0x40e8),
+ W16(0x0000), W16(0xffff), W16(0x0021), W16(0x05b5), W16(0x4164),
+ W16(0x0000), W16(0x0000), W16(0x0026), W16(0x05fe), W16(0x41ca),
+ W16(0x0000), W16(0x0000), W16(0x0029), W16(0x0646), W16(0x421b),
+ W16(0x0000), W16(0xffff), W16(0x002d), W16(0x068c), W16(0x4256),
+ W16(0x0000), W16(0x0000), W16(0x002e), W16(0x06ce), W16(0x427f),
+ W16(0x0000), W16(0x0000), W16(0x002f), W16(0x070c), W16(0x4295),
+ W16(0x0000), W16(0x0000), W16(0x0031), W16(0x0746), W16(0x429c),
+ W16(0x0000), W16(0x0000), W16(0x0032), W16(0x077a), W16(0x4293),
+ W16(0x0000), W16(0x0000), W16(0x0032), W16(0x07a8), W16(0x427a),
+ W16(0x0000), W16(0x0001), W16(0x0030), W16(0x07d0), W16(0x424f),
+ W16(0x0000), W16(0xffff), W16(0x002d), W16(0x07f0), W16(0x4210),
+ W16(0x0000), W16(0xffff), W16(0x0028), W16(0x080a), W16(0x41ba),
+ W16(0x0000), W16(0xfffd), W16(0x001f), W16(0x081b), W16(0x414b),
+ W16(0x0000), W16(0xfffa), W16(0x0018), W16(0x0824), W16(0x40c6),
+ W16(0x0000), W16(0xfff4), W16(0x0009), W16(0x0822), W16(0x403a),
+ W16(0xffff), W16(0xfff1), W16(0xfff9), W16(0x081c), W16(0x3f57),
+ W16(0x0000), W16(0xffed), W16(0xffec), W16(0x0810), W16(0x3e1f),
+ W16(0x0000), W16(0xfff3), W16(0xffe6), W16(0x07f9), W16(0x3ce2),
+ W16(0x0000), W16(0xfff6), W16(0xffe1), W16(0x07d5), W16(0x3b92),
+ W16(0x0000), W16(0xfffb), W16(0xffe0), W16(0x07a6), W16(0x3a2f),
+ W16(0x0000), W16(0xffff), W16(0xffe3), W16(0x076a), W16(0x38bc),
+ W16(0x0000), W16(0xfffd), W16(0xffea), W16(0x0720), W16(0x373e),
+ W16(0x0000), W16(0xfffd), W16(0xfff3), W16(0x06c8), W16(0x35b7),
+ W16(0x0000), W16(0xfffe), W16(0xfffd), W16(0x0662), W16(0x342a),
+ W16(0x0000), W16(0xffff), W16(0x0008), W16(0x05ee), W16(0x329a),
+ W16(0x0000), W16(0x0000), W16(0x0011), W16(0x056b), W16(0x3107),
+ W16(0x0000), W16(0xffff), W16(0x001a), W16(0x04d9), W16(0x2f70),
+ W16(0x0000), W16(0x0000), W16(0x0022), W16(0x043a), W16(0x2dd4),
+ W16(0x0000), W16(0x0000), W16(0x0028), W16(0x038c), W16(0x2c33),
+ W16(0x0000), W16(0x0000), W16(0x002c), W16(0x02cf), W16(0x2a8c),
+ W16(0x0000), W16(0x0001), W16(0x002d), W16(0x0205), W16(0x28e0),
+ W16(0x0000), W16(0xffff), W16(0x002b), W16(0x012c), W16(0x2730),
+ W16(0x0000), W16(0xfffd), W16(0x0027), W16(0x0045), W16(0x257d),
+ W16(0x0000), W16(0xffff), W16(0x0023), W16(0xff50), W16(0x23c8),
+ W16(0x0000), W16(0x000a), W16(0x0021), W16(0xfe4d), W16(0x2211),
+ W16(0x0000), W16(0xfff3), W16(0x001c), W16(0xfd3c), W16(0x2059),
+ W16(0x0000), W16(0x0000), W16(0x000b), W16(0xfc1c), W16(0x1e9e),
+ W16(0x0000), W16(0x0003), W16(0xfffd), W16(0xfaf0), W16(0x1ce2),
+ W16(0x0000), W16(0x0001), W16(0xffef), W16(0xf9b6), W16(0x1b24),
+ W16(0x0000), W16(0xfffe), W16(0xffe0), W16(0xf870), W16(0x1965),
+ W16(0x0000), W16(0x0001), W16(0xffd1), W16(0xf71d), W16(0x17a7),
+ W16(0x0000), W16(0x0000), W16(0xffc3), W16(0xf5be), W16(0x15ec),
+ W16(0x0000), W16(0x0001), W16(0xffb5), W16(0xf453), W16(0x1433),
+ W16(0x0000), W16(0x0001), W16(0xffa8), W16(0xf2de), W16(0x127c),
+ W16(0x0000), W16(0x0000), W16(0xff9b), W16(0xf15e), W16(0x10c5),
+ W16(0x0000), W16(0x0001), W16(0xff8f), W16(0xefd4), W16(0x0f0b),
+ W16(0x0000), W16(0x0001), W16(0xff83), W16(0xee40), W16(0x0d4c),
+ W16(0x0000), W16(0x0001), W16(0xff77), W16(0xeca4), W16(0x0b88),
+ W16(0x0000), W16(0x0001), W16(0xff6a), W16(0xeaff), W16(0x09c2),
+ W16(0x0000), W16(0xfffd), W16(0xff5d), W16(0xe953), W16(0x0800),
+ W16(0x0000), W16(0x0002), W16(0xff4d), W16(0xe7a0), W16(0x064d),
+ W16(0x0000), W16(0x0006), W16(0xff3c), W16(0xe5e8), W16(0x04b8),
+ W16(0x0000), W16(0x0009), W16(0xff2a), W16(0xe42c), W16(0x034d),
+ W16(0x0000), W16(0x0018), W16(0xff17), W16(0xe26c), W16(0x0212),
+ W16(0x0001), W16(0x0020), W16(0xff03), W16(0xe0aa), W16(0x00e3)
+};
+
+/*!
+ * \brief CLDFB prototype filter
+ *
+ * cldfb bands: 60
+ * delay[ms]: 1.00
+ * abs. max Val: 1.04
+ * scale: 0.50
+ */
+const Word16 CLDFB80_60[] =//Q.5
+{
+ W16(0x0000), W16(0xfffa), W16(0xffe2), W16(0x010f), W16(0x20cd),
+ W16(0x0000), W16(0xfffb), W16(0xffdf), W16(0x011e), W16(0x21f7),
+ W16(0x0000), W16(0xfffb), W16(0xffdd), W16(0x012b), W16(0x2320),
+ W16(0x0000), W16(0xfffd), W16(0xffe0), W16(0x0138), W16(0x244a),
+ W16(0x0000), W16(0xfffd), W16(0xffe1), W16(0x0146), W16(0x2573),
+ W16(0x0000), W16(0xfffe), W16(0xffe6), W16(0x0155), W16(0x269b),
+ W16(0x0000), W16(0xfffe), W16(0xffec), W16(0x0164), W16(0x27c1),
+ W16(0x0000), W16(0xffff), W16(0xfff2), W16(0x0173), W16(0x28e6),
+ W16(0x0000), W16(0xffff), W16(0xfff4), W16(0x0184), W16(0x2a08),
+ W16(0x0000), W16(0xffff), W16(0xfff4), W16(0x0196), W16(0x2b28),
+ W16(0x0000), W16(0xffff), W16(0xfff6), W16(0x01a9), W16(0x2c45),
+ W16(0x0000), W16(0xffff), W16(0xfff9), W16(0x01bd), W16(0x2d5e),
+ W16(0x0000), W16(0xffff), W16(0xfffc), W16(0x01d2), W16(0x2e73),
+ W16(0x0000), W16(0xffff), W16(0xffff), W16(0x01e9), W16(0x2f84),
+ W16(0x0000), W16(0x0000), W16(0x0003), W16(0x0201), W16(0x3091),
+ W16(0x0000), W16(0x0000), W16(0x0008), W16(0x021a), W16(0x3199),
+ W16(0x0000), W16(0x0000), W16(0x000a), W16(0x0235), W16(0x329c),
+ W16(0x0000), W16(0x0000), W16(0x000e), W16(0x0251), W16(0x3399),
+ W16(0x0000), W16(0x0000), W16(0x0012), W16(0x026e), W16(0x3491),
+ W16(0x0000), W16(0x0000), W16(0x0014), W16(0x028c), W16(0x3583),
+ W16(0x0000), W16(0x0000), W16(0x0018), W16(0x02ac), W16(0x366f),
+ W16(0x0000), W16(0x0000), W16(0x001b), W16(0x02ce), W16(0x3753),
+ W16(0x0000), W16(0x0000), W16(0x001b), W16(0x02f1), W16(0x3831),
+ W16(0x0000), W16(0x0000), W16(0x001d), W16(0x0315), W16(0x3907),
+ W16(0x0000), W16(0x0000), W16(0x001e), W16(0x033b), W16(0x39d6),
+ W16(0x0000), W16(0x0000), W16(0x001e), W16(0x0362), W16(0x3a9c),
+ W16(0x0000), W16(0x0000), W16(0x001d), W16(0x038a), W16(0x3b5a),
+ W16(0x0000), W16(0x0000), W16(0x0019), W16(0x03b4), W16(0x3c0f),
+ W16(0x0000), W16(0x0001), W16(0x000d), W16(0x03df), W16(0x3cbb),
+ W16(0x0000), W16(0xffff), W16(0x0001), W16(0x040a), W16(0x3d5e),
+ W16(0x0000), W16(0xfffe), W16(0x0017), W16(0x0439), W16(0x3df8),
+ W16(0x0000), W16(0x0000), W16(0x001b), W16(0x0469), W16(0x3e89),
+ W16(0x0000), W16(0x0000), W16(0x001a), W16(0x0499), W16(0x3f10),
+ W16(0x0000), W16(0x0000), W16(0x001a), W16(0x04c9), W16(0x3f8f),
+ W16(0x0000), W16(0x0000), W16(0x001c), W16(0x04fb), W16(0x4004),
+ W16(0x0000), W16(0x0000), W16(0x001e), W16(0x052c), W16(0x406f),
+ W16(0x0000), W16(0x0001), W16(0x001f), W16(0x055e), W16(0x40d1),
+ W16(0x0000), W16(0x0000), W16(0x0020), W16(0x0590), W16(0x4129),
+ W16(0x0000), W16(0x0000), W16(0x0022), W16(0x05c1), W16(0x4177),
+ W16(0x0000), W16(0x0000), W16(0x0025), W16(0x05f2), W16(0x41bb),
+ W16(0x0000), W16(0x0000), W16(0x0027), W16(0x0622), W16(0x41f5),
+ W16(0x0000), W16(0xffff), W16(0x002a), W16(0x0652), W16(0x4226),
+ W16(0x0000), W16(0xffff), W16(0x002c), W16(0x0680), W16(0x424e),
+ W16(0x0000), W16(0x0000), W16(0x002e), W16(0x06ad), W16(0x426d),
+ W16(0x0000), W16(0x0000), W16(0x002e), W16(0x06d9), W16(0x4284),
+ W16(0x0000), W16(0x0000), W16(0x002f), W16(0x0702), W16(0x4293),
+ W16(0x0000), W16(0x0000), W16(0x0030), W16(0x072a), W16(0x429b),
+ W16(0x0000), W16(0x0000), W16(0x0031), W16(0x074f), W16(0x429b),
+ W16(0x0000), W16(0x0000), W16(0x0032), W16(0x0772), W16(0x4295),
+ W16(0x0000), W16(0x0000), W16(0x0032), W16(0x0792), W16(0x4288),
+ W16(0x0000), W16(0x0000), W16(0x0032), W16(0x07af), W16(0x4274),
+ W16(0x0000), W16(0x0001), W16(0x0031), W16(0x07ca), W16(0x4257),
+ W16(0x0000), W16(0x0001), W16(0x002e), W16(0x07e1), W16(0x4232),
+ W16(0x0000), W16(0xffff), W16(0x002c), W16(0x07f5), W16(0x4203),
+ W16(0x0000), W16(0xfffe), W16(0x0029), W16(0x0806), W16(0x41ca),
+ W16(0x0000), W16(0xfffe), W16(0x0024), W16(0x0813), W16(0x4186),
+ W16(0x0000), W16(0xfffd), W16(0x001e), W16(0x081d), W16(0x4137),
+ W16(0x0000), W16(0xfffa), W16(0x0019), W16(0x0823), W16(0x40de),
+ W16(0x0000), W16(0xfff8), W16(0x0011), W16(0x0825), W16(0x407d),
+ W16(0xffff), W16(0xfff3), W16(0x0006), W16(0x0821), W16(0x4023),
+ W16(0xffff), W16(0xfff2), W16(0xfffb), W16(0x081d), W16(0x3f8c),
+ W16(0x0000), W16(0xffed), W16(0xfff1), W16(0x0818), W16(0x3eb8),
+ W16(0x0000), W16(0xffee), W16(0xffeb), W16(0x080d), W16(0x3deb),
+ W16(0x0000), W16(0xfff2), W16(0xffe7), W16(0x07fd), W16(0x3d18),
+ W16(0x0000), W16(0xfff5), W16(0xffe3), W16(0x07e8), W16(0x3c3c),
+ W16(0x0000), W16(0xfff7), W16(0xffe0), W16(0x07ce), W16(0x3b58),
+ W16(0x0000), W16(0xfffa), W16(0xffe0), W16(0x07ae), W16(0x3a6b),
+ W16(0x0000), W16(0xfffe), W16(0xffe1), W16(0x0789), W16(0x3977),
+ W16(0x0000), W16(0xffff), W16(0xffe4), W16(0x075e), W16(0x387d),
+ W16(0x0000), W16(0xfffd), W16(0xffe8), W16(0x072d), W16(0x377e),
+ W16(0x0000), W16(0xfffd), W16(0xffee), W16(0x06f6), W16(0x367b),
+ W16(0x0000), W16(0xfffe), W16(0xfff4), W16(0x06b8), W16(0x3575),
+ W16(0x0000), W16(0xfffe), W16(0xfffb), W16(0x0674), W16(0x346d),
+ W16(0x0000), W16(0xfffe), W16(0x0002), W16(0x062a), W16(0x3363),
+ W16(0x0000), W16(0xffff), W16(0x000a), W16(0x05d9), W16(0x3257),
+ W16(0x0000), W16(0x0000), W16(0x0010), W16(0x0582), W16(0x314b),
+ W16(0x0000), W16(0xffff), W16(0x0016), W16(0x0524), W16(0x303c),
+ W16(0x0000), W16(0xffff), W16(0x001b), W16(0x04c0), W16(0x2f2c),
+ W16(0x0000), W16(0x0000), W16(0x0021), W16(0x0455), W16(0x2e19),
+ W16(0x0000), W16(0x0000), W16(0x0026), W16(0x03e4), W16(0x2d04),
+ W16(0x0000), W16(0x0000), W16(0x0029), W16(0x036d), W16(0x2bed),
+ W16(0x0000), W16(0x0000), W16(0x002c), W16(0x02f0), W16(0x2ad3),
+ W16(0x0000), W16(0x0000), W16(0x002d), W16(0x026c), W16(0x29b7),
+ W16(0x0000), W16(0x0000), W16(0x002c), W16(0x01e2), W16(0x2898),
+ W16(0x0000), W16(0xffff), W16(0x002b), W16(0x0151), W16(0x2778),
+ W16(0x0000), W16(0xfffe), W16(0x0029), W16(0x00bb), W16(0x2657),
+ W16(0x0000), W16(0xfffd), W16(0x0026), W16(0x001d), W16(0x2534),
+ W16(0x0000), W16(0xfffe), W16(0x0024), W16(0xff7a), W16(0x2411),
+ W16(0x0000), W16(0x0005), W16(0x0021), W16(0xfed0), W16(0x22ed),
+ W16(0x0000), W16(0x0009), W16(0x0021), W16(0xfe21), W16(0x21c8),
+ W16(0x0000), W16(0xfff5), W16(0x001f), W16(0xfd6b), W16(0x20a2),
+ W16(0x0000), W16(0xfff8), W16(0x0014), W16(0xfcae), W16(0x1f7c),
+ W16(0x0000), W16(0x0001), W16(0x0009), W16(0xfbeb), W16(0x1e54),
+ W16(0x0000), W16(0x0003), W16(0x0000), W16(0xfb23), W16(0x1d2c),
+ W16(0x0000), W16(0x0002), W16(0xfff7), W16(0xfa55), W16(0x1c03),
+ W16(0x0000), W16(0x0001), W16(0xffed), W16(0xf981), W16(0x1ad9),
+ W16(0x0000), W16(0xffff), W16(0xffe3), W16(0xf8a7), W16(0x19b0),
+ W16(0x0000), W16(0x0000), W16(0xffd8), W16(0xf7c8), W16(0x1886),
+ W16(0x0000), W16(0x0001), W16(0xffcf), W16(0xf6e3), W16(0x175d),
+ W16(0x0000), W16(0x0000), W16(0xffc5), W16(0xf5f9), W16(0x1636),
+ W16(0x0000), W16(0x0001), W16(0xffbc), W16(0xf50a), W16(0x150f),
+ W16(0x0000), W16(0x0001), W16(0xffb3), W16(0xf416), W16(0x13e9),
+ W16(0x0000), W16(0x0001), W16(0xffaa), W16(0xf31d), W16(0x12c5),
+ W16(0x0000), W16(0x0001), W16(0xffa2), W16(0xf21f), W16(0x11a0),
+ W16(0x0000), W16(0x0000), W16(0xff99), W16(0xf11d), W16(0x107b),
+ W16(0x0000), W16(0x0000), W16(0xff91), W16(0xf016), W16(0x0f55),
+ W16(0x0000), W16(0x0001), W16(0xff89), W16(0xef0b), W16(0x0e2c),
+ W16(0x0000), W16(0x0001), W16(0xff81), W16(0xedfc), W16(0x0d01),
+ W16(0x0000), W16(0x0001), W16(0xff79), W16(0xece9), W16(0x0bd4),
+ W16(0x0000), W16(0x0001), W16(0xff71), W16(0xebd2), W16(0x0aa5),
+ W16(0x0000), W16(0x0001), W16(0xff68), W16(0xeab8), W16(0x0976),
+ W16(0x0000), W16(0xfffd), W16(0xff5f), W16(0xe99b), W16(0x084a),
+ W16(0x0000), W16(0xfffe), W16(0xff55), W16(0xe87a), W16(0x0724),
+ W16(0x0000), W16(0x0003), W16(0xff4a), W16(0xe757), W16(0x0607),
+ W16(0x0000), W16(0x0006), W16(0xff3f), W16(0xe632), W16(0x04f9),
+ W16(0x0000), W16(0x0006), W16(0xff33), W16(0xe50a), W16(0x03fd),
+ W16(0x0000), W16(0x000c), W16(0xff27), W16(0xe3e1), W16(0x0315),
+ W16(0x0000), W16(0x0016), W16(0xff1a), W16(0xe2b7), W16(0x0244),
+ W16(0x0000), W16(0x001e), W16(0xff0d), W16(0xe18b), W16(0x017f),
+ W16(0x0002), W16(0x0020), W16(0xff00), W16(0xe05e), W16(0x00a9)
+};
+
+const Word16 CLDFB80_30[] =//Q.5
+{
+ 0, -5, -30, 278, 8546,
+ 0, -4, -33, 306, 9141,
+ 0, -2, -29, 334, 9735,
+ 0, -1, -17, 363, 10324,
+ 0, -1, -13, 397, 10904,
+ 0, -1, -9, 435, 11474,
+ 0, -1, -2, 478, 12028,
+ 0, 0, 6, 525, 12566,
+ 0, 0, 12, 578, 13083,
+ 0, 0, 19, 637, 13579,
+ 0, 0, 26, 701, 14050,
+ 0, 0, 28, 771, 14493,
+ 0, 0, 30, 846, 14906,
+ 0, 0, 28, 927, 15285,
+ 0, 0, 4, 1012, 15630,
+ 0, -1, 27, 1105, 15937,
+ 0, -1, 26, 1201, 16209,
+ 0, 0, 29, 1299, 16442,
+ 0, 1, 31, 1399, 16638,
+ 0, 0, 36, 1498, 16794,
+ 0, 0, 41, 1594, 16911,
+ 0, -1, 45, 1687, 16990,
+ 0, 0, 46, 1774, 17036,
+ 0, 0, 49, 1853, 17052,
+ 0, 0, 50, 1922, 17040,
+ 0, 0, 50, 1981, 16999,
+ 0, 0, 45, 2027, 16924,
+ 0, -1, 39, 2061, 16809,
+ 0, -4, 27, 2080, 16651,
+ 0, -10, 12, 2084, 16463,
+ 0, -17, -10, 2075, 16161,
+ 0, -16, -23, 2054, 15746,
+ 0, -10, -31, 2012, 15307,
+ 0, -4, -32, 1949, 14834,
+ 0, -2, -26, 1862, 14334,
+ 0, -3, -15, 1752, 13816,
+ 0, -2, -1, 1616, 13288,
+ 0, 0, 13, 1454, 12753,
+ 0, -1, 25, 1267, 12212,
+ 0, 0, 35, 1054, 11663,
+ 0, 0, 42, 815, 11104,
+ 0, 1, 45, 552, 10536,
+ 0, -2, 42, 263, 9960,
+ 0, -3, 37, -51, 9379,
+ 0, 9, 33, -391, 8795,
+ 0, -12, 25, -755, 8207,
+ 0, 3, 4, -1144, 7616,
+ 0, 2, -14, -1557, 7022,
+ 0, -2, -34, -1992, 6427,
+ 0, 0, -54, -2449, 5833,
+ 0, 1, -73, -2927, 5244,
+ 0, 1, -90, -3425, 4659,
+ 0, 0, -107, -3942, 4072,
+ 0, 1, -123, -4476, 3479,
+ 0, 1, -139, -5026, 2877,
+ 0, -1, -156, -5590, 2272,
+ 0, 0, -176, -6167, 1684,
+ 0, 6, -199, -6754, 1144,
+ 0, 18, -223, -7348, 682,
+ 0, 32, -249, -7947, 282
+};
+
+/*!
+ * \brief CLDFB rRotVectr
+ *
+ * cldfb bands: 10
+ * global gain: 8.00
+ * scale: sqrt(1.0/16.00)
+ */
+const Word16 rRotVectr_10[] =//Q(sqrt(1.0/16.00))
+{
+ W16(0x5a71), W16(0x54ea), W16(0x4714), W16(0x3249), W16(0x1891)
+};
+
+/*!
+ * \brief CLDFB iRotVectr
+ *
+ * cldfb bands: 10
+ * global gain: 8.00
+ * scale: sqrt(1.0/16.00)
+ */
+const Word16 iRotVectr_10[] =//Q(sqrt(1.0/16.00))
+{
+ W16(0xfc72), W16(0xe0ac), W16(0xc7f7), W16(0xb4be), W16(0xa8e3)
+};
+
+/*!
+ * \brief CLDFB rRotVectr
+ *
+ * cldfb bands: 16
+ * global gain: 5.00
+ * scale: sqrt(1.0/8.00)
+ */
+const Word16 rRotVectr_16[] =//Q(sqrt(1.0/8.00))
+{
+ W16(0x652a), W16(0x62bc), W16(0x5c83), W16(0x52bc), W16(0x45c7),
+ W16(0x3623), W16(0x246b), W16(0x114d)
+};
+
+/*!
+ * \brief CLDFB iRotVectr
+ *
+ * cldfb bands: 16
+ * global gain: 5.00
+ * scale: sqrt(1.0/8.00)
+ */
+const Word16 iRotVectr_16[] =//Q(sqrt(1.0/8.00))
+{
+ W16(0xfd84), W16(0xe9d4), W16(0xd6fe), W16(0xc5bb), W16(0xb6b6),
+ W16(0xaa82), W16(0xa196), W16(0x9c4c)
+};
+
+/*!
+ * \brief CLDFB rRotVectr
+ *
+ * cldfb bands: 20
+ * global gain: 4.00
+ * scale: sqrt(1.0/8.00)
+ */
+const Word16 rRotVectr_20[] =//Q(sqrt(1.0/8.00))
+{
+ W16(0x5a7e), W16(0x591a), W16(0x5584), W16(0x4fd3), W16(0x482a),
+ W16(0x3ebb), W16(0x33c1), W16(0x2780), W16(0x1a46), W16(0x0c67)
+};
+
+/*!
+ * \brief CLDFB iRotVectr
+ *
+ * cldfb bands: 20
+ * global gain: 4.00
+ * scale: sqrt(1.0/8.00)
+ */
+const Word16 iRotVectr_20[] =//Q(sqrt(1.0/8.00)
+{
+ W16(0xfe39), W16(0xf017), W16(0xe259), W16(0xd556), W16(0xc95f),
+ W16(0xbec1), W16(0xb5bf), W16(0xae90), W16(0xa963), W16(0xa658)
+};
+
+/*!
+ * \brief CLDFB rRotVectr
+ *
+ * cldfb bands: 30
+ * global gain: 2.50
+ * scale: sqrt(1.0/4.00)
+ */
+const Word16 rRotVectr_30[] =//Q(sqrt(1.0/4.00))
+{
+ 25902, 25725, 25265, 24529, 23525, 22262, 20756, 19022, 17080, 14950, 12657, 10226, 7682, 5054, 2370
+};
+
+/*!
+ * \brief CLDFB iRotVectr
+ *
+ * cldfb bands: 30
+ * global gain: 2.50
+ * scale: sqrt(1.0/4.00)
+ */
+const Word16 iRotVectr_30[] =//Q(sqrt(1.0/4.00))
+{
+ -339, -3045, -5717, -8327, -10845, -13245, -15499, -17584, -19476, -21154, -22601, -23801, -24739, -25406, -25796
+};
+/*!
+ * \brief CLDFB rRotVectr
+ *
+ * cldfb bands: 32
+ * global gain: 2.50
+ * scale: sqrt(1.0/4.00)
+ */
+const Word16 rRotVectr_32[] =//Q(sqrt(1.0/4.00))
+{
+ W16(0x652f), W16(0x6494), W16(0x6300), W16(0x6078), W16(0x5d02),
+ W16(0x58a7), W16(0x5371), W16(0x4d6e), W16(0x46ac), W16(0x3f3b),
+ W16(0x372f), W16(0x2e9a), W16(0x2593), W16(0x1c2f), W16(0x1286),
+ W16(0x08af)
+};
+
+/*!
+ * \brief CLDFB iRotVectr
+ *
+ * cldfb bands: 32
+ * global gain: 2.50
+ * scale: sqrt(1.0/4.00)
+ */
+const Word16 iRotVectr_32[] =//Q(sqrt(1.0/4.00))
+{
+ W16(0xfec2), W16(0xf4d9), W16(0xeb0b), W16(0xe170), W16(0xd821),
+ W16(0xcf35), W16(0xc6c1), W16(0xbed9), W16(0xb793), W16(0xb0ff),
+ W16(0xab2d), W16(0xa62d), W16(0xa20b), W16(0x9ed0), W16(0x9c84),
+ W16(0x9b2e)
+};
+
+/*!
+ * \brief CLDFB rRotVectr
+ *
+ * cldfb bands: 40
+ * global gain: 2.00
+ * scale: sqrt(1.0/4.00)
+ */
+const Word16 rRotVectr_40[] =//Q(sqrt(1.0/4.00))
+{
+ W16(0x5a81), W16(0x5a28), W16(0x5941), W16(0x57cc), W16(0x55cd),
+ W16(0x5347), W16(0x503d), W16(0x4cb4), W16(0x48b3), W16(0x443e),
+ W16(0x3f5e), W16(0x3a1a), W16(0x347b), W16(0x2e88), W16(0x284c),
+ W16(0x21d0), W16(0x1b1f), W16(0x1444), W16(0x0d48), W16(0x0637)
+};
+
+/*!
+ * \brief CLDFB iRotVectr
+ *
+ * cldfb bands: 40
+ * global gain: 2.00
+ * scale: sqrt(1.0/4.00)
+ */
+const Word16 iRotVectr_40[] =//Q(sqrt(1.0/4.00))
+{
+ W16(0xff1d), W16(0xf803), W16(0xf0f7), W16(0xea02), W16(0xe330),
+ W16(0xdc8b), W16(0xd61f), W16(0xcff4), W16(0xca15), W16(0xc48c),
+ W16(0xbf60), W16(0xba9a), W16(0xb642), W16(0xb25e), W16(0xaef5),
+ W16(0xac0b), W16(0xa9a6), W16(0xa7ca), W16(0xa678), W16(0xa5b4)
+};
+
+/*!
+ * \brief CLDFB rRotVectr
+ *
+ * cldfb bands: 60
+ * global gain: 1.33
+ * scale: sqrt(1.0/2.00)
+ */
+const Word16 rRotVectr_60[] =//Q(sqrt(1.0/2.00))
+{
+ W16(0x6882), W16(0x6855), W16(0x67de), W16(0x671e), W16(0x6615),
+ W16(0x64c5), W16(0x632f), W16(0x6153), W16(0x5f32), W16(0x5ccf),
+ W16(0x5a2a), W16(0x5747), W16(0x5426), W16(0x50ca), W16(0x4d35),
+ W16(0x496a), W16(0x456c), W16(0x413d), W16(0x3ce0), W16(0x3859),
+ W16(0x33aa), W16(0x2ed6), W16(0x29e2), W16(0x24d0), W16(0x1fa5),
+ W16(0x1a63), W16(0x150f), W16(0x0fac), W16(0x0a3e), W16(0x04c9)
+};
+
+/*!
+ * \brief CLDFB iRotVectr
+ *
+ * cldfb bands: 60
+ * global gain: 1.33
+ * scale: sqrt(1.0/2.00)
+ */
+const Word16 iRotVectr_60[] =//Q(sqrt(1.0/2.00))
+{
+ W16(0xff51), W16(0xf9d9), W16(0xf465), W16(0xeefa), W16(0xe99a),
+ W16(0xe44a), W16(0xdf0e), W16(0xd9e9), W16(0xd4de), W16(0xcff2),
+ W16(0xcb27), W16(0xc682), W16(0xc204), W16(0xbdb3), W16(0xb990),
+ W16(0xb59e), W16(0xb1e0), W16(0xae5a), W16(0xab0c), W16(0xa7fb),
+ W16(0xa526), W16(0xa292), W16(0xa03f), W16(0x9e30), W16(0x9c65),
+ W16(0x9ae0), W16(0x99a2), W16(0x98ac), W16(0x97fe), W16(0x9799)
+};
+
+const Word16 cldfb_anaScale[] = // Q0
+{
+ SCALE_CLDFB_ANA_10, SCALE_CLDFB_ANA_16, SCALE_CLDFB_ANA_20, SCALE_CLDFB_ANA_32, SCALE_CLDFB_ANA_40, SCALE_CLDFB_ANA_60, SCALE_CLDFB_ANA_30
+};
+const Word16 cldfb_synScale[] = // Q0
+{
+ SCALE_CLDFB_SYN_10, SCALE_CLDFB_SYN_16, SCALE_CLDFB_SYN_20, SCALE_CLDFB_SYN_32, SCALE_CLDFB_SYN_40, SCALE_CLDFB_SYN_60, SCALE_CLDFB_SYN_30
+};
+const Word16 cldfb_synGain[] =//Q0
+{
+ 0x6666, /* 10 bands */
+ 0x51EC, /* 16 bands */
+ 0x6666, /* 20 bands */
+ 0x51EC, /* 32 bands */
+ 0x6666, /* 40 bands */
+ 0x4CCD /* 60 bands */
+};
+
+const Word16 *cldfb_protoFilter_2_5ms[] =
+{
+ CLDFB80_10, CLDFB80_16, CLDFB80_20, CLDFB80_32, CLDFB80_40, CLDFB80_60, CLDFB80_30
+};
+
+const Word16 cldfb_scale_2_5ms[7] =
+{
+ 22603/*88.293854 Q8*/, /* 10 bands */
+ 22605/*88.299622 Q8*/, /* 16 bands */
+ 22605/*88.300926 Q8*/, /* 20 bands */
+ 22606/*88.303848 Q8*/, /* 32 bands */
+ 22606/*88.304718 Q8*/, /* 40 bands */
+ 22535/*88.028412 Q8*/, /* 60 bands */
+ 22588/*88.234489 Q8*/ /* 30 bands */
+};
+
+const Word16 cldfb_scale_5_0ms[7] =
+{
+ 21649/*88.293854 Q8*/, /* 10 bands */
+ 21649/*88.299622 Q8*/, /* 16 bands */
+ 21649/*88.300926 Q8*/, /* 20 bands */
+ 21649/*88.303848 Q8*/, /* 32 bands */
+ 21649/*88.304718 Q8*/, /* 40 bands */
+ 22535/*88.028412 Q8*/, /* 60 bands */
+ 21581/*88.028412 Q8*/ /* 30 bands */
+};
+
+
+/*Q31*/
+const Word32 rot_vec_syn_re_L10_fx[5] =
+{
+ 239910864 ,225255952 ,188551424 ,133390176 ,65171760 ,
+};
+
+
+/*Q31*/
+const Word32 rot_vec_syn_im_L10_fx[5] =
+{
+ -9426123 ,-83101312 ,-148641968 ,-199632496 ,-231081632 ,
+};
+
+
+/*Q31*/
+const Word32 rot_vec_syn_re_L16_fx[8] =
+{
+ 240023664 ,234262144 ,219498080 ,196298816 ,165555904 ,128450776 ,86409352 ,41047260 ,
+};
+
+
+/*Q31*/
+const Word32 rot_vec_syn_im_L16_fx[8] =
+{
+ -5892250 ,-52605324 ,-97296808 ,-138249232 ,-173888800 ,-202845936 ,-224007808 ,-236561200 ,
+};
+
+
+/*Q31*/
+const Word32 rot_vec_syn_re_L20_fx[10] =
+{
+ 240049696 ,236356848 ,226844128 ,211745744 ,191433472 ,166407488 ,137283984 ,104780104 ,69696184 ,32896112 ,
+};
+
+
+/*Q31*/
+const Word32 rot_vec_syn_im_L20_fx[10] =
+{
+ -4713971 ,-42207980 ,-78662688 ,-113180456 ,-144911344 ,-173074048 ,-196975088 ,-216025936 ,-229757520 ,-237831712 ,
+};
+
+
+/*Q31*/
+const Word32 rot_vec_syn_re_L30_fx[15] =
+{
+ 240075408 ,238431728 ,234175760 ,227354112 ,218041520 ,206340016 ,192377808 ,176307872 ,
+ 158306272 ,138570240 ,117315992 ,94776408 ,71198440 ,46840400 ,21969170 ,
+};
+
+
+/*Q31*/
+const Word32 rot_vec_syn_im_L30_fx[15] =
+{
+ -3142759 ,-28220256 ,-52988564 ,-77176320 ,-100518520 ,-122759408 ,-143655328 ,-162977328 ,
+ -180513712 ,-196072352 ,-209482768 ,-220598064 ,-229296448 ,-235482592 ,-239088752 ,
+};
+
+
+/*Q31*/
+const Word32 rot_vec_syn_re_L32_fx[16] =
+{
+ 240077888 ,238633056 ,234890064 ,228884944 ,220675536 ,210340896 ,197980576 ,183713584 ,
+ 167677328 ,150026240 ,130930336 ,110573488 ,89151760 ,66871456 ,43947140 ,20599588 ,
+};
+
+
+/*Q31*/
+const Word32 rot_vec_syn_im_L32_fx[16] =
+{
+ -2946347 ,-26463908 ,-49726608 ,-72510408 ,-94595904 ,-115770384 ,-135829936 ,-154581360 ,
+ -171844080 ,-187451856 ,-201254368 ,-213118704 ,-222930576 ,-230595504 ,-236039664 ,-239210640 ,
+};
+
+
+/*Q31*/
+const Word32 rot_vec_syn_re_L40_fx[20] =
+{
+ 240084400 ,239159360 ,236759824 ,232900592 ,227605456 ,220907040 ,212846672 ,203474016 ,
+ 192846896 ,181030800 ,168098592 ,154130000 ,139211136 ,123434000 ,106895848 ,89698648 ,
+ 71948424 ,53754620 ,35229396 ,16486972 ,
+};
+
+
+/*Q31*/
+const Word32 rot_vec_syn_im_L40_fx[20] =
+{
+ -2357099 ,-21186638 ,-39885552 ,-58338564 ,-76431896 ,-94054000 ,-111096224 ,-127453512 ,
+ -143025008 ,-157714704 ,-171432032 ,-184092416 ,-195617824 ,-205937184 ,-214986864 ,-222711088 ,
+ -229062224 ,-234001104 ,-237497296 ,-239529232 ,
+};
+
+
+/*Q31*/
+const Word32 rot_vec_syn_re_L60_fx[30] =
+{
+ 240090832 ,239679552 ,238611328 ,236889088 ,234517552 ,231503216 ,227854352 ,223580960 ,218694736 ,
+ 213209088 ,207139056 ,200501264 ,193313904 ,185596688 ,177370784 ,168658704 ,159484336 ,149872832 ,
+ 139850544 ,129444936 ,118684528 ,107598816 ,96218184 ,84573816 ,72697640 ,60622212 ,48380616 ,
+ 36006412 ,23533520 ,10996123 ,
+};
+
+
+/*Q31*/
+const Word32 rot_vec_syn_im_L60_fx[30] =
+{
+ -1571413 ,-14134643 ,-26659130 ,-39110548 ,-51454764 ,-63657948 ,-75686648 ,-87507896 ,-99089296 ,
+ -110399096 ,-121406296 ,-132080736 ,-142393152 ,-152315264 ,-161819904 ,-170881008 ,-179473744 ,
+ -187574544 ,-195161216 ,-202212960 ,-208710464 ,-214635904 ,-219973040 ,-224707248 ,-228825536 ,
+ -232316640 ,-235170976 ,-237380736 ,-238939840 ,-239844032 ,
+};
+
+
+const Word16 bpf_weights_16_Fx[16] =
+{
+ 16385/*0.500020f Q15*/, 23022/*0.702561f Q15*/, 6843/*0.208838f Q15*/, 51/*0.001553f Q15*/,
+ 58/*0.001777f Q15*/, 45/*0.001370f Q15*/, 30/*0.000926f Q15*/, 18/*0.000554f Q15*/,
+ 9/*0.000270f Q15*/, 3/*0.000080f Q15*/, 1/*0.000030f Q15*/, 3/*0.000082f Q15*/,
+ 3/*0.000081f Q15*/, 2/*0.000052f Q15*/, 1/*0.000017f Q15*/, 1/*0.000016f Q15*/
+};
+
+const Word16 bpf_weights_16_ivas_fx[16] =
+{
+ 32767/*0.999969f Q15*/, 23022/*0.702561f Q15*/, 6843/*0.208838f Q15*/, 51/*0.001553f Q15*/,
+ 58/*0.001777f Q15*/, 45/*0.001370f Q15*/, 30/*0.000926f Q15*/, 18/*0.000554f Q15*/,
+ 9/*0.000270f Q15*/, 3/*0.000080f Q15*/, 1/*0.000030f Q15*/, 3/*0.000082f Q15*/,
+ 3/*0.000081f Q15*/, 2/*0.000052f Q15*/, 1/*0.000017f Q15*/, 1/*0.000016f Q15*/
+};
+const Word32 bpf_weights_16_ivas_fx_32[16] =
+{
+ 1073784774/*1.000040f Q30*/, 754369130/*0.702561f Q30*/, 224238095/*0.208838f Q30*/, 1667521/*0.001553f Q30*/,
+ 1908039/*0.001777f Q30*/, 1435593/*0.001370f Q30*/, 994285/*0.000926f Q30*/, 594853/*0.000554f Q30*/,
+ 289910/*0.000270f Q30*/, 85899/*0.000080f Q30*/, 32212/*0.000030f Q30*/, 88047/*0.000082f Q30*/,
+ 86973/*0.000081f Q30*/, 55835/*0.000052f Q30*/, 18254/*0.000017f Q30*/, 17179/*0.000016f Q30*/
+};
+
+
+/*-------------------------------------------------------------------*
+ * LP CNG excitation details code book
+ *-------------------------------------------------------------------*/
+
+const Word16 CNG_details_codebook_fx[64][NUM_ENV_CNG] = /* Q6 */
+{
+ {443,547,613,547,510,471,540,479,586,535,565,611,532,500,462,551,498,463,446,484},
+ {600,499,472,537,633,654,641,646,674,677,687,693,693,690,688,700,693,696,640,571},
+ {529,537,501,582,537,474,505,491,521,545,561,591,566,609,570,608,636,655,649,524},
+ {648,690,689,684,693,599,668,714,663,675,524,519,726,658,673,696,654,715,708,668},
+ {623,630,660,656,686,688,637,666,630,555,470,468,464,445,502,583,615,545,605,592},
+ {659,668,669,625,662,700,700,693,702,702,688,677,654,584,525,492,446,477,634,615},
+ {634,648,656,552,520,557,662,659,572,617,691,683,684,666,673,695,682,698,680,623},
+ {756,743,734,709,730,757,746,722,484,552,779,688,686,610,616,749,758,694,745,729},
+ {549,568,556,625,683,619,609,667,663,684,709,649,691,668,594,511,525,617,542,684},
+ {550,467,533,760,739,692,773,756,743,770,765,791,779,784,775,792,759,577,642,553},
+ {658,674,656,651,670,582,593,520,467,470,522,589,600,596,587,631,652,679,645,669},
+ {788,765,787,797,785,799,787,786,780,692,641,550,501,513,726,747,670,687,734,773},
+ {641,654,668,673,665,682,689,684,697,665,664,593,544,494,458,537,622,650,635,635},
+ {706,753,762,716,748,762,788,792,785,788,799,777,782,766,760,710,704,503,519,735},
+ {748,775,784,635,717,504,539,640,764,778,681,721,791,786,787,780,780,770,774,781},
+ {752,516,624,780,713,753,569,548,770,784,749,740,690,755,776,748,744,730,767,698},
+ {453,471,516,517,561,653,659,616,629,608,682,698,679,681,645,587,594,522,499,469},
+ {617,534,506,615,782,792,754,771,740,787,791,776,782,787,793,788,775,778,651,736},
+ {661,593,490,495,491,495,554,656,658,611,628,660,680,677,698,678,673,699,687,679},
+ {798,793,786,795,799,772,771,696,624,557,507,545,724,757,747,770,780,785,793,784},
+ {703,695,703,714,697,701,697,631,598,498,475,451,503,611,648,664,664,683,679,688},
+ {744,672,659,762,785,745,757,761,761,767,722,757,761,737,699,471,582,770,724,756},
+ {775,746,535,680,541,513,697,723,743,744,769,741,741,738,769,772,779,743,714,724},
+ {767,771,697,756,766,752,710,477,602,783,746,766,692,708,783,782,761,778,787,785},
+ {483,588,700,665,665,640,650,717,699,707,692,698,700,692,668,650,609,610,540,484},
+ {507,618,788,766,754,692,709,785,788,770,793,785,799,784,767,776,789,759,761,495},
+ {709,712,706,678,661,604,503,480,653,664,664,639,621,675,695,689,704,681,711,709},
+ {788,740,770,768,771,776,732,749,739,764,714,492,544,783,714,708,717,559,739,768},
+ {758,771,789,779,777,799,791,785,779,779,752,675,718,510,501,600,727,750,752,758},
+ {759,765,676,658,774,767,737,749,769,784,778,738,755,769,788,756,473,530,777,725},
+ {669,665,721,653,499,774,780,781,767,561,690,747,722,779,757,727,764,745,770,736},
+ {731,768,745,775,783,782,715,741,786,673,766,777,764,730,773,769,774,781,778,764},
+ {557,505,545,604,660,672,604,596,580,612,587,556,546,597,530,494,437,480,546,555},
+ {560,588,510,495,606,720,718,742,756,755,767,774,776,778,772,772,776,776,754,592},
+ {680,644,620,612,516,477,471,499,502,598,664,588,656,682,689,671,668,672,682,692},
+ {757,778,781,799,775,750,799,758,789,774,489,579,799,739,774,723,686,788,787,778},
+ {705,685,654,680,672,680,657,579,574,619,639,518,482,545,665,587,540,599,606,651},
+ {729,767,767,773,783,778,793,773,784,779,757,768,686,654,679,564,483,549,490,522},
+ {725,693,715,588,522,629,721,647,697,684,614,725,708,674,715,729,717,725,689,738},
+ {797,783,795,797,782,757,636,624,508,517,703,750,746,757,772,771,774,790,779,799},
+ {556,591,652,692,728,712,698,688,704,718,728,717,713,693,716,558,490,540,620,678},
+ {532,617,777,775,763,789,768,785,778,791,792,792,793,777,781,724,551,665,540,509},
+ {710,697,706,717,673,679,620,581,546,474,562,684,680,675,660,656,702,680,701,708},
+ {771,793,788,787,794,791,792,783,791,792,733,770,532,525,692,761,777,753,734,728},
+ {724,695,678,652,695,735,697,712,714,721,696,710,569,581,570,522,642,704,748,726},
+ {796,754,785,782,732,814,803,794,799,790,810,806,794,797,756,745,749,506,741,779},
+ {793,767,785,780,724,648,488,747,784,771,793,740,759,805,794,796,795,795,801,806},
+ {787,508,640,775,722,792,774,705,781,801,774,800,786,806,808,783,795,797,784,782},
+ {654,649,601,597,594,667,646,662,615,623,651,671,669,674,682,653,624,484,473,665},
+ {790,765,479,527,746,728,770,753,721,774,794,802,789,782,803,795,764,804,779,776},
+ {738,699,642,509,515,501,466,614,702,612,683,720,687,717,704,739,714,733,721,718},
+ {778,795,791,786,758,783,783,743,744,527,554,789,762,767,722,722,777,788,776,782},
+ {694,696,700,696,709,710,696,689,674,662,581,538,496,637,644,681,679,671,689,704},
+ {776,788,742,796,779,756,788,789,782,798,795,804,771,753,571,611,504,545,593,779},
+ {799,717,747,682,487,573,766,774,775,762,711,802,799,796,790,787,802,789,773,786},
+ {795,797,790,804,788,791,774,706,532,770,786,743,789,708,755,785,804,803,807,770},
+ {568,722,738,680,713,703,693,749,703,705,740,720,712,631,621,727,730,722,574,612},
+ {626,762,734,770,759,750,792,775,790,792,788,786,791,767,782,778,794,745,504,544},
+ {774,784,779,753,654,560,530,532,555,699,742,695,716,767,770,772,778,780,779,782},
+ {781,781,790,783,792,798,787,792,765,740,701,537,564,773,767,756,786,797,789,801},
+ {738,717,799,794,772,784,774,790,788,748,789,769,768,763,504,587,783,751,784,732},
+ {776,789,763,772,800,786,802,787,805,799,776,773,792,761,750,702,532,745,807,735},
+ {765,778,764,484,607,791,757,760,700,687,789,777,779,783,768,791,778,757,784,770},
+ {800,825,775,782,821,679,805,824,752,824,796,785,829,817,824,803,814,807,762,779}
+};
+/*-------------------------------------------------------------------*
+ * FD CNG
+ *-------------------------------------------------------------------*/
+
+const Word16 d_array[SIZE_SCALE_TABLE_CN] = { 1, 2, 5, 8, 10, 15, 20, 30, 40, 60, 80, 120, 140, 160, 180, 220, 260, 300 };
+const Word16 m_array[SIZE_SCALE_TABLE_CN] = { 0/*0.000f Q15*/, 8520/*0.260f Q15*/, 15729/*0.480f Q15*/, 19005/*0.580f Q15*/, 19988/*0.610f Q15*/, 21889/*0.668f Q15*/, 23101/*0.705f Q15*/, 24969/*0.762f Q15*/, 26214/*0.800f Q15*/, 27558/*0.841f Q15*/, 28344/*0.865f Q15*/, 29164/*0.890f Q15*/, 29491/*0.900f Q15*/, 29819/*0.910f Q15*/, 30147/*0.920f Q15*/, 30474/*0.930f Q15*/, 30638/*0.935f Q15*/, 30802/*0.940f Q15*/ };
+const Word16 msQeqInvAv_thresh[3] = { 328/*0.01f Q15*/, 983/*0.03f Q15*/, 1638/*0.05f Q15*/ };
+const Word16 msNoiseSlopeMax[4] = { 32767/*2.f Q14*/, 26214/*1.6f Q14*/, 21299/*1.3f Q14*/, 18022/*1.1f Q14*/ };
+
+
+const SCALE_SETUP scaleTableStereo[SIZE_SCALE_TABLE_STEREO] =
+{
+ { 1, 0, 8000, /* -5.5f,*/ -704/*-5.5f Q7*/, -704 },
+ { 1, 8000, 9600, /* -5.0f,*/ -640/*-5.0f Q7*/, -640 },
+ { 1, 9600, 13200, /* -4.0f,*/ -512/*-4.0f Q7*/, -512 },
+ { 1, 13200, 16400, /* -3.0f,*/ -384/*-3.0f Q7*/, -384 },
+ { 1, 16400, 24400, /* -1.6f,*/ -204/*-1.6f Q7*/, -204 },
+ { 1, 24400, 32000, /* -0.2f,*/ -26/*-1.6f Q7*/, -26 },
+ { 1, 32000,512001, /* 0.0f,*/ 0 /*0.0f Q7*/, 0 },
+
+ { 2, 0, 8000, /*-0.9f ,*/ -115/*-0.9f Q7*/, -115 },
+ { 2, 8000, 9600, /*-0.65f,*/ -83/*-0.65f Q7*/, -83 },
+ { 2, 9600, 13200, /*-2.0f ,*/ -256/*-2.0f Q7*/, -256 },
+ { 2, 13200, 16400, /*-3.0f ,*/ -384/*-3.0f Q7*/, -384 },
+ { 2, 16400, 24400, /*-0.8f ,*/ -102/*-0.8f Q7*/, -102 },
+ { 2, 24400, 32000, /*-0.25f,*/ -32/*-0.25f Q7*/, -32 },
+ { 2, 32000,512001, /* 0.0f ,*/ 0/* 0.0f Q7*/, 0 }
+};
+const SCALE_SETUP scaleTableMono[SIZE_SCALE_TABLE_MONO] =
+{
+ { 0, 0, 8000, /* -5.5f,*/ -704/*-5.5f Q7*/, -704 },
+ { 0, 8000, 9600, /* -5.0f,*/ -640/*-5.0f Q7*/, -640 },
+ { 0, 9600, 13200, /* -4.0f,*/ -512/*-4.0f Q7*/, -512 },
+ { 0, 13200, 16400, /* -3.0f,*/ -384/*-3.0f Q7*/, -384 },
+ { 0, 16400, 24400, /* -1.5f,*/ -192/*-1.5f Q7*/, -192 },
+ { 0, 24400,128001, /* -0.5f,*/ -64/*-0.5f Q7*/, -64 },
+
+ { 1, 0, 8000, /*-5.5f ,*/ -704/*-5.5f Q7*/, -704 },
+ { 1, 8000, 9600, /*-5.0f ,*/ -640/*-5.0f Q7*/, -640 },
+ { 1, 9600, 13200, /*-1.55f,*/ -198/*-1.55f Q7*/, -198 },
+ { 1, 13200, 16400, /*-3.0f ,*/ -384/*-3.0f Q7*/,-384 },
+ { 1, 16400, 24400, /*-0.6f ,*/ -77/*-0.6f Q7*/, -77 },
+ { 1, 24400, 32000, /*-0.2f ,*/ -26/*-0.2f Q7*/, -26 },
+ { 1, 32000,128001, /* 0.0f ,*/ 0/* 0.0f Q7*/, 0 },
+
+ { 2, 0, 8000, /*-0.9f ,*/ -115/*-0.9f Q7*/, -115 },
+ { 2, 8000, 9600, /*-0.65f,*/ -83/*-0.65f Q7*/, -83 },
+ { 2, 9600, 13200, /*-2.0f ,*/ -256/*-2.0f Q7*/, -256 },
+ { 2, 13200, 16400, /*-3.0f ,*/ -384/*-3.0f Q7*/, -384 },
+ { 2, 16400, 24400, /*-0.8f ,*/ -102/*-0.8f Q7*/, -102 },
+ { 2, 24400, 32000, /*-0.25f,*/ -32/*-0.25f Q7*/, -32 },
+ { 2, 32000,128001, /* 0.0f ,*/ 0/* 0.0f Q7*/,0 }
+};
+
+const SCALE_SETUP scaleTable_cn_only[SIZE_SCALE_TABLE_CN] =
+{
+ { 0, 0, 8000, /*-3.5f,*/ 20295/*1.2387211385 Q14*/ /*-3.5f*/, 20295 },
+ { 0, 8000, 9600, /*-3.0f,*/ 16306/*0.9952622652 Q14*/ /*-3.0f*/, 16306 },
+ { 0, 9600, 13200, /*-2.5f,*/ 12751/*0.7782794237 Q14*/ /*-2.5f*/, 12751 },
+ { 0, 13200, 16400, /*-2.0f,*/ 9583/*0.5848932266 Q14*/ /*-2.0f*/, 9583 },
+ { 0, 16400,128001, /* 0.0f,*/ 0/*0.0000000000 Q14*/ /* 0.0f*/, 0 },
+
+ { 1, 0, 8000, /*-3.0f,*/ 16306/*0.9952622652 Q14*/ /*-3.0f*/, 16306 },
+ { 1, 8000, 9600, /*-2.5f,*/ 12751/*0.7782794237 Q14*/ /*-2.5f*/, 12751 },
+ { 1, 9600, 13200, /*-1.5f,*/ 6759/*0.4125375748 Q14*/ /*-1.5f*/, 6759 },
+ { 1, 13200, 16400, /*-2.5f,*/ 12751/*0.7782794237 Q14*/ /*-2.5f*/, 12751 },
+ { 1, 16400, 24400, /*-0.5f,*/ 1999/*0.1220184565 Q14*/ /*-0.5f*/, 1999 },
+ { 1, 24400,128001, /* 0.0f,*/ 0/*0.0000000000 Q14*/ /* 0.0f*/, 0 },
+
+ { 2, 0, 8000, /*-2.5f,*/ 12751/*0.7782794237 Q14*/ /*-2.5f*/, 12751 },
+ { 2, 8000, 9600, /*-2.5f,*/ 12751/*0.7782794237 Q14*/ /*-2.5f*/, 12751 },
+ { 2, 9600, 13200, /*-2.0f,*/ 9583/*0.5848932266 Q14*/ /*-2.0f*/, 9583 },
+ { 2, 13200, 16400, /*-1.0f,*/ 4242/*0.2589254379 Q14*/ /*-1.0f*/, 4242 },
+
+ { 2, 16400, 24400, /*-0.5f,*/ 1999/*0.1220184565 Q14*/ /*-0.5f*/, 1999 },
+ { 2, 24400, 32000, /* 0.0f,*/ 0/*0.0000000000 Q14*/ /* 0.0f*/, 0 },
+ { 2, 32000,128001, /* 0.0f,*/ 0/*0.0000000000 Q14*/ /* 0.0f*/, 0 }
+};
+
+const SCALE_SETUP scaleTable_cn_dirac[15] =
+{
+ { 0, 0, 13200, /*-3.0f,*/ 16306/*0.9952622652 Q14*/ /*-3.0f*/, 16306 },
+ { 0, 13200, 16400, /*-2.5f,*/ 12751/*0.7782794237 Q14*/ /*-2.5f*/, 12751 },
+ { 0, 16400, 24400, /*-2.0f,*/ 9583/*0.5848932266 Q14*/ /*-2.0f*/, 9583 },
+ { 0, 24400, 32000, /*-1.5f,*/ 6759/*0.4125375748 Q14*/ /*-1.5f*/, 6759 },
+ { 0, 32000,512001, /* 0.0f,*/ 0/*0.0000000000 Q14*/ /* 0.0f*/, 0 },
+
+ { 1, 0, 13200, /*-3.0f,*/ 16306/*0.9952622652 Q14*/ /*-3.0f*/, 16306 },
+ { 1, 13200, 16400, /*-2.5f,*/ 12751/*0.7782794237 Q14*/ /*-2.5f*/, 12751 },
+ { 1, 16400, 24400, /*-2.0f,*/ 9583/*0.5848932266 Q14*/ /*-2.0f*/, 9583 },
+ { 1, 24400, 32000, /*-1.5f,*/ 6759/*0.4125375748 Q14*/ /*-1.5f*/, 6759 },
+ { 1, 32000,512001, /* 0.0f,*/ 0/*0.0000000000 Q14*/ /* 0.0f*/, 0 },
+
+ { 2, 0, 13200, /*-3.0f,*/ 16306/*0.9952622652 Q14*/ /*-3.0f*/, 16306 },
+ { 2, 13200, 16400, /*-2.5f,*/ 12751/*0.7782794237 Q14*/ /*-2.5f*/, 12751 },
+ { 2, 16400, 24400, /*-2.0f,*/ 9583/*0.5848932266 Q14*/ /*-2.0f*/, 9583 },
+ { 2, 24400, 32000, /*-1.5f,*/ 6759/*0.4125375748 Q14*/ /*-1.5f*/, 6759 },
+ { 2, 32000,512001, /* 0.0f,*/ 0/*0.0000000000 Q14*/ /* 0.0f*/, 0 }
+};
+const Word16 scaleTable_cn_only_amrwbio[3][2] =
+{
+ { ACELP_6k60, 24771/*1.5118864315 Q14*/ },
+ { ACELP_8k85, 16306/*0.9952622652 Q14*/ },
+ { ACELP_12k65, 9583/*0.5848932266 Q14*/ },
+};
+const Word32 scaleTable_cn_only_amrwbio_fx_by_10f[SIZE_SCALE_TABLE_CN_AMRWB][2] =//Q29
+{
+ { ACELP_6k60, 858993459 },
+ { ACELP_8k85, 644245094 },
+ { ACELP_12k65, 429496729 }
+};
+
+const Word16 sidparts_encoder_noise_est[SIZE_SIDPARTS_ENC_NOISE_EST] = { 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 58, 68, 80, 92, 108, 126, 148, 176, 212, 255, 259, 264, 269, 279 }; // Q0
+
+const Word16 sidPartitions_nb[] = { 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 58, 68, 80, 92, 108, 126, 159 }; // Q0
+const Word16 sidPartitions_wb1[] = { 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 58, 68, 80, 92, 108, 126, 148, 176, 212, 255 }; // Q0
+const Word16 sidPartitions_wb2[] = { 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 58, 68, 80, 92, 108, 126, 148, 176, 212, 255, 259 }; // Q0
+const Word16 sidPartitions_wb3[] = { 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 58, 68, 80, 92, 108, 126, 148, 176, 212, 255, 319 }; // Q0
+const Word16 sidPartitions_swb1[] = { 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 58, 68, 80, 92, 108, 126, 148, 176, 212, 255, 259, 264, 269, 274 }; // Q0
+const Word16 sidPartitions_swb2[] = { 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 58, 68, 80, 92, 108, 126, 148, 176, 212, 255, 319, 324, 329, 339 }; // Q0
+
+const Word16 shapingPartitions_nb[] = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 25, 28, 31, 34, 37, 40, 43, 47, 51, 55, 59, 64, 69, 74, 80, 86, 93, 100, 108, 117, 126, 136, 159 }; // Q0
+const Word16 shapingPartitions_wb1[] = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 25, 28, 31, 34, 37, 40, 43, 47, 51, 55, 59, 64, 69, 74, 80, 86, 93, 100, 108, 117, 126, 135, 148, 162, 176, 192, 212, 232, 255 }; // Q0
+const Word16 shapingPartitions_wb2[] = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 25, 28, 31, 34, 37, 40, 43, 47, 51, 55, 59, 64, 69, 74, 80, 86, 93, 100, 108, 117, 126, 135, 148, 162, 176, 192, 212, 232, 255 }; // Q0
+const Word16 shapingPartitions_wb3[] = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 25, 28, 31, 34, 37, 40, 43, 47, 51, 55, 59, 64, 69, 74, 80, 86, 93, 100, 108, 117, 126, 136, 148, 176, 212, 256, 308, 319 }; // Q0
+const Word16 shapingPartitions_swb1[] = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 25, 28, 31, 34, 37, 40, 43, 47, 51, 55, 59, 64, 69, 74, 80, 86, 93, 100, 108, 117, 126, 135, 148, 162, 176, 192, 212, 232, 255 }; // Q0
+const Word16 shapingPartitions_swb2[] = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 25, 28, 31, 34, 37, 40, 43, 47, 51, 55, 59, 64, 69, 74, 80, 86, 93, 100, 108, 117, 126, 136, 148, 176, 212, 256, 308, 319 }; // Q0
+
+const FD_CNG_SETUP FdCngSetup_nb = { 512, 160, sizeof(sidPartitions_nb)/sizeof(Word16), sidPartitions_nb, sizeof(shapingPartitions_nb)/sizeof(Word16), shapingPartitions_nb };
+const FD_CNG_SETUP FdCngSetup_wb1 = { 512, 256, sizeof(sidPartitions_wb1)/sizeof(Word16), sidPartitions_wb1, sizeof(shapingPartitions_wb1)/sizeof(Word16), shapingPartitions_wb1 };
+const FD_CNG_SETUP FdCngSetup_wb2 = { 512, 256, sizeof(sidPartitions_wb2)/sizeof(Word16), sidPartitions_wb2, sizeof(shapingPartitions_wb2)/sizeof(Word16), shapingPartitions_wb2 };
+const FD_CNG_SETUP FdCngSetup_wb3 = { 640, 320, sizeof(sidPartitions_wb3)/sizeof(Word16), sidPartitions_wb3, sizeof(shapingPartitions_wb3)/sizeof(Word16), shapingPartitions_wb3 };
+const FD_CNG_SETUP FdCngSetup_swb1 = { 512, 256, sizeof(sidPartitions_swb1)/sizeof(Word16), sidPartitions_swb1, sizeof(shapingPartitions_swb1)/sizeof(Word16), shapingPartitions_swb1 };
+const FD_CNG_SETUP FdCngSetup_swb2 = { 640, 320, sizeof(sidPartitions_swb2)/sizeof(Word16), sidPartitions_swb2, sizeof(shapingPartitions_swb2)/sizeof(Word16), shapingPartitions_swb2 };
+
+
+const Word16 levels_37bits[FD_CNG_stages_37bits] = { 128, 64, 64, 64, 64, 64 }; // Q0
+const Word16 bits_37bits[FD_CNG_stages_37bits] = { 7, 6, 6, 6, 6, 6 }; // Q0
+
+/* IDCT_MATRIX_ROM: 18*24 Word16 = 432 Word16 */
+/* or compressed IDCT_MATRIX_ROM: 18*24 Word8 + 25 = 230 Word16 + WMOPS (INDIRECT(432) and STORE(432) ) */
+
+/* Stage1 Word8 tables 16x8+ 17*10+ 17*16 + 78*18 = = 1974 Word8 -> 987 Word16 */
+
+/* ROM storeSizeW8 = W8reduction (3072- (987+230) )/3072 = 1207/3072 --> 39.3 % */
+/* ROM with DCTII-24 in PROM = W8reduction (3072- (987) )/3072 = /3072 --> 31.8 % */
+
+/* additional minor Table ROM ( dct_mid points 18 Word16, dct_col_upshifts 52, scaleFactors 2*2 = ~= 74 Word16s */
+
+
+const Word16 cdk1_ivas_entries_per_segment[FDCNG_VQ_DCT_NSEGM] = { 16, 17, 17, 78 }; // Q0
+const Word16 cdk1_ivas_cum_entries_per_segment[FDCNG_VQ_DCT_NSEGM + 1] = { 0, 16 ,33, 50, 128 }; // Q0
+const Word16 /* DCT trunc_len */ cdk1_ivas_cols_per_segment[FDCNG_VQ_DCT_NSEGM] = { FDCNG_VQ_DCT_MINTRUNC, 10, 16, FDCNG_VQ_DCT_MAXTRUNC }; /* 8, 10, 16, 18 */
+const Word16 /* segment inner DCT trunc_len */ cdk1_ivas_trunc_dct_cols_per_segment[FDCNG_VQ_DCT_NSEGM] = { FDCNG_VQ_DCT_MAXTRUNC - FDCNG_VQ_DCT_MINTRUNC, FDCNG_VQ_DCT_MAXTRUNC - 10 , FDCNG_VQ_DCT_MAXTRUNC - 16 , 0 };
+
+/* to get back to FDCNG VQ domain for segment S use : idct as follows */
+/* cdk1r_vec[col, row] = cdk1r_tr_midQ_truncQ(col 1:24 ) + invScaleFQ * idctMat( cdk1_ivas_dct_sS_W8[1:col]<fftlen/2+1; j++) hs->fftSineTab[j] = (float)sin(2.0*EVS_PI*j/hs->fftlen); */
+
+
+const Word32 olapWinAna512_fx[512] = { /* Q30 */
+ 4658693, 13975905, 23292590, 32608396, 41922980, 51235980, 60547056, 69855848,
+ 79162008, 88465192, 97765048, 107061216, 116353360, 125641120, 134924144, 144202096,
+ 153474624, 162741360, 172001968, 181256112, 190503440, 199743568, 208976192, 218200960,
+ 227417488, 236625472, 245824528, 255014368, 264194560, 273364832, 282524800, 291674144,
+ 300812512, 309939520, 319054880, 328158240, 337249248, 346327520, 355392768, 364444672,
+ 373482816, 382506912, 391516576, 400511584, 409491456, 418455904, 427404576, 436337216,
+ 445253408, 454152800, 463035104, 471900032, 480747136, 489576160, 498386752, 507178592,
+ 515951328, 524704608, 533438144, 542151616, 550844672, 559516992, 568168256, 576798144,
+ 585406272, 593992320, 602556096, 611097152, 619615168, 628109888, 636580992, 645028096,
+ 653450880, 661849088, 670222400, 678570432, 686892992, 695189632, 703460096, 711704128,
+ 719921344, 728111424, 736274112, 744409088, 752515968, 760594560, 768644608, 776665664,
+ 784657408, 792619584, 800552064, 808454272, 816326144, 824167232, 831977280, 839756032,
+ 847503104, 855218368, 862901376, 870551936, 878169728, 885754432, 893305728, 900823488,
+ 908307264, 915756864, 923171904, 930552256, 937897664, 945207680, 952482048, 959720640,
+ 966923136, 974089152, 981218496, 988310912, 995366080, 1002383808, 1009363840, 1016305856,
+ 1023209536, 1030074688, 1036901120, 1043688512, 1050436672, 1057145152, 1063813888, 1070442688,
+ 1077031040, 1083578880, 1090085888, 1096551936, 1102976640, 1109359872, 1115701248, 1122000640,
+ 1128257792, 1134472576, 1140644480, 1146773504, 1152859392, 1158901888, 1164900608, 1170855680,
+ 1176766592, 1182633088, 1188455168, 1194232448, 1199964800, 1205651968, 1211293824, 1216889984,
+ 1222440320, 1227944704, 1233402752, 1238814464, 1244179456, 1249497600, 1254768768, 1259992704,
+ 1265169152, 1270297984, 1275378944, 1280411904, 1285396736, 1290333056, 1295220992, 1300060032,
+ 1304850048, 1309591040, 1314282624, 1318924928, 1323517440, 1328060032, 1332552832, 1336995328,
+ 1341387520, 1345729152, 1350020224, 1354260352, 1358449536, 1362587648, 1366674432, 1370709632,
+ 1374693376, 1378625408, 1382505344, 1386333312, 1390109184, 1393832576, 1397503616, 1401121920,
+ 1404687488, 1408200320, 1411659904, 1415066496, 1418419840, 1421719680, 1424966016, 1428158720,
+ 1431297664, 1434382720, 1437413760, 1440390656, 1443313408, 1446181632, 1448995584, 1451755008,
+ 1454459648, 1457109632, 1459704704, 1462244864, 1464729856, 1467159808, 1469534464, 1471853824,
+ 1474117760, 1476326272, 1478479104, 1480576256, 1482617728, 1484603264, 1486533120, 1488406912,
+ 1490224640, 1491986176, 1493691648, 1495340800, 1496933760, 1498470400, 1499950464, 1501374080,
+ 1502741248, 1504051840, 1505305856, 1506503168, 1507643648, 1508727424, 1509754368, 1510724480,
+ 1511637888, 1512494208, 1513293568, 1514035968, 1514721408, 1515349760, 1515921152, 1516435456,
+ 1516892672, 1517292672, 1517635584, 1517921408, 1518150144, 1518321664, 1518435968, 1518493184,
+ 1518493184, 1518435968, 1518321664, 1518150144, 1517921408, 1517635584, 1517292672, 1516892672,
+ 1516435456, 1515921152, 1515349760, 1514721408, 1514035968, 1513293568, 1512494208, 1511637888,
+ 1510724480, 1509754368, 1508727424, 1507643648, 1506503040, 1505305728, 1504051840, 1502741248,
+ 1501374080, 1499950464, 1498470272, 1496933760, 1495340800, 1493691648, 1491986176, 1490224640,
+ 1488406784, 1486533120, 1484603264, 1482617728, 1480576256, 1478479104, 1476326272, 1474117760,
+ 1471853824, 1469534464, 1467159808, 1464729856, 1462244864, 1459704704, 1457109504, 1454459648,
+ 1451754880, 1448995584, 1446181632, 1443313408, 1440390656, 1437413760, 1434382720, 1431297664,
+ 1428158720, 1424966016, 1421719680, 1418419712, 1415066496, 1411659904, 1408200192, 1404687488,
+ 1401121920, 1397503488, 1393832576, 1390109056, 1386333312, 1382505344, 1378625280, 1374693376,
+ 1370709632, 1366674432, 1362587648, 1358449536, 1354260352, 1350020096, 1345729024, 1341387392,
+ 1336995200, 1332552704, 1328060032, 1323517440, 1318924800, 1314282624, 1309590912, 1304850048,
+ 1300059904, 1295220864, 1290333056, 1285396736, 1280411904, 1275378944, 1270297856, 1265169024,
+ 1259992576, 1254768640, 1249497600, 1244179456, 1238814336, 1233402752, 1227944576, 1222440192,
+ 1216889984, 1211293696, 1205651840, 1199964672, 1194232320, 1188455040, 1182632960, 1176766464,
+ 1170855552, 1164900608, 1158901760, 1152859264, 1146773504, 1140644352, 1134472448, 1128257664,
+ 1122000640, 1115701120, 1109359744, 1102976512, 1096551808, 1090085760, 1083578752, 1077030912,
+ 1070442560, 1063813824, 1057145088, 1050436608, 1043688448, 1036901056, 1030074624, 1023209472,
+ 1016305728, 1009363776, 1002383744, 995365952, 988310848, 981218432, 974089024, 966922944,
+ 959720576, 952481920, 945207488, 937897472, 930552192, 923171840, 915756736, 908307072,
+ 900823296, 893305664, 885754240, 878169600, 870551808, 862901248, 855218240, 847503040,
+ 839755968, 831977216, 824167104, 816326016, 808454208, 800551936, 792619520, 784657280,
+ 776665472, 768644480, 760594496, 752515904, 744408960, 736273984, 728111296, 719921216,
+ 711704000, 703460032, 695189504, 686892864, 678570368, 670222272, 661848960, 653450752,
+ 645027968, 636580864, 628109760, 619615104, 611097024, 602555968, 593992256, 585406144,
+ 576798016, 568168128, 559516864, 550844544, 542151488, 533438016, 524704480, 515951200,
+ 507178432, 498386592, 489576032, 480747008, 471899904, 463035040, 454152672, 445253280,
+ 436337056, 427404480, 418455744, 409491328, 400511456, 391516512, 382506816, 373482688,
+ 364444544, 355392672, 346327392, 337249088, 328158112, 319054752, 309939392, 300812384,
+ 291674016, 282524672, 273364704, 264194448, 255014224, 245824400, 236625328, 227417360,
+ 218200832, 208976064, 199743440, 190503312, 181255984, 172001856, 162741232, 153474480,
+ 144201968, 134924016, 125640984, 116353224, 107061080, 97764912, 88465064, 79161880,
+ 69855712, 60546920, 51235848, 41922844, 32608264, 23292456, 13975772, 4658560
+};
+
+const Word32 olapWinAna640_fx[640] = { /* Q30 */
+ 3726956, 11180779, 18634332, 26087438, 33539914, 40991584, 48442264, 55891776,
+ 63339940, 70786584, 78231520, 85674560, 93115552, 100554288, 107990608, 115424328,
+ 122855256, 130283240, 137708080, 145129584, 152547616, 159961952, 167372448, 174778896,
+ 182181152, 189579008, 196972288, 204360832, 211744464, 219122960, 226496192, 233863984,
+ 241226128, 248582448, 255932784, 263276976, 270614784, 277946112, 285270720, 292588448,
+ 299899136, 307202592, 314498688, 321787136, 329067872, 336340672, 343605344, 350861792,
+ 358109728, 365349088, 372579616, 379801184, 387013568, 394216640, 401410208, 408594112,
+ 415768160, 422932192, 430086016, 437229536, 444362464, 451484736, 458596064, 465696416,
+ 472785504, 479863168, 486929344, 493983712, 501026240, 508056672, 515074880, 522080640,
+ 529073824, 536054304, 543021824, 549976256, 556917440, 563845248, 570759424, 577659840,
+ 584546368, 591418816, 598276992, 605120768, 611949952, 618764352, 625563904, 632348352,
+ 639117568, 645871424, 652609664, 659332224, 666038848, 672729472, 679403776, 686061824,
+ 692703360, 699328128, 705936064, 712526976, 719100736, 725657216, 732196160, 738717440,
+ 745220992, 751706496, 758173952, 764623104, 771053888, 777466048, 783859456, 790234048,
+ 796589568, 802925888, 809242816, 815540288, 821818048, 828076096, 834314176, 840532096,
+ 846729856, 852907136, 859063872, 865199872, 871315072, 877409344, 883482368, 889534144,
+ 895564480, 901573248, 907560320, 913525504, 919468672, 925389632, 931288320, 937164672,
+ 943018240, 948849280, 954657344, 960442432, 966204416, 971943104, 977658304, 983350016,
+ 989017984, 994662144, 1000282368, 1005878464, 1011450368, 1016997760, 1022520768, 1028019136,
+ 1033492736, 1038941376, 1044364992, 1049763520, 1055136768, 1060484416, 1065806656, 1071103168,
+ 1076373888, 1081618688, 1086837376, 1092029952, 1097196160, 1102335872, 1107449088, 1112535680,
+ 1117595392, 1122628224, 1127633920, 1132612480, 1137563776, 1142487680, 1147383936, 1152252672,
+ 1157093632, 1161906688, 1166691712, 1171448576, 1176177280, 1180877696, 1185549568, 1190193024,
+ 1194807680, 1199393536, 1203950464, 1208478464, 1212977408, 1217447040, 1221887232, 1226298112,
+ 1230679424, 1235031040, 1239352960, 1243644928, 1247907072, 1252139008, 1256340864, 1260512384,
+ 1264653440, 1268764288, 1272844288, 1276893824, 1280912512, 1284900352, 1288857216, 1292782976,
+ 1296677760, 1300541056, 1304373120, 1308173824, 1311942912, 1315680512, 1319386240, 1323060224,
+ 1326702336, 1330312576, 1333890688, 1337436672, 1340950400, 1344431872, 1347880960, 1351297536,
+ 1354681472, 1358032896, 1361351424, 1364637312, 1367890304, 1371110272, 1374297216, 1377451008,
+ 1380571776, 1383659136, 1386713216, 1389733760, 1392720896, 1395674496, 1398594432, 1401480704,
+ 1404333312, 1407151872, 1409936640, 1412687360, 1415404160, 1418086784, 1420735232, 1423349376,
+ 1425929344, 1428475008, 1430986112, 1433462784, 1435904896, 1438312448, 1440685312, 1443023360,
+ 1445326848, 1447595392, 1449828992, 1452027776, 1454191616, 1456320256, 1458413824, 1460472448,
+ 1462495616, 1464483712, 1466436480, 1468353920, 1470235904, 1472082688, 1473893760, 1475669376,
+ 1477409536, 1479113984, 1480782720, 1482416000, 1484013440, 1485575040, 1487100928, 1488591104,
+ 1490045184, 1491463424, 1492845824, 1494192256, 1495502592, 1496776960, 1498015232, 1499217280,
+ 1500383360, 1501513344, 1502606976, 1503664512, 1504685824, 1505670912, 1506619520, 1507532032,
+ 1508408192, 1509247872, 1510051200, 1510818304, 1511548928, 1512243072, 1512900864, 1513522176,
+ 1514107008, 1514655360, 1515167104, 1515642496, 1516081408, 1516483584, 1516849280, 1517178496,
+ 1517471232, 1517727232, 1517946752, 1518129664, 1518276096, 1518385792, 1518459008, 1518495488,
+ 1518495488, 1518459008, 1518385792, 1518276096, 1518129664, 1517946752, 1517727232, 1517471104,
+ 1517178496, 1516849280, 1516483584, 1516081280, 1515642496, 1515167104, 1514655360, 1514107008,
+ 1513522176, 1512900864, 1512243072, 1511548928, 1510818304, 1510051200, 1509247872, 1508408192,
+ 1507532032, 1506619520, 1505670912, 1504685696, 1503664512, 1502606976, 1501513344, 1500383360,
+ 1499217280, 1498015232, 1496776960, 1495502592, 1494192128, 1492845824, 1491463424, 1490045184,
+ 1488590976, 1487100928, 1485575040, 1484013312, 1482416000, 1480782720, 1479113984, 1477409536,
+ 1475669376, 1473893760, 1472082560, 1470235904, 1468353920, 1466436480, 1464483712, 1462495616,
+ 1460472320, 1458413824, 1456320256, 1454191488, 1452027776, 1449828992, 1447595392, 1445326848,
+ 1443023360, 1440685312, 1438312448, 1435904768, 1433462656, 1430986112, 1428474880, 1425929344,
+ 1423349376, 1420735104, 1418086784, 1415404160, 1412687360, 1409936640, 1407151872, 1404333184,
+ 1401480704, 1398594432, 1395674496, 1392720896, 1389733760, 1386713088, 1383659008, 1380571648,
+ 1377451008, 1374297216, 1371110272, 1367890304, 1364637312, 1361351424, 1358032768, 1354681472,
+ 1351297408, 1347880832, 1344431744, 1340950272, 1337436672, 1333890688, 1330312576, 1326702336,
+ 1323060224, 1319386240, 1315680384, 1311942912, 1308173696, 1304373120, 1300541056, 1296677632,
+ 1292782848, 1288857088, 1284900224, 1280912512, 1276893696, 1272844288, 1268764160, 1264653440,
+ 1260512256, 1256340736, 1252138880, 1247906944, 1243644800, 1239352832, 1235030912, 1230679296,
+ 1226297984, 1221887104, 1217446912, 1212977280, 1208478336, 1203950464, 1199393408, 1194807552,
+ 1190192896, 1185549440, 1180877696, 1176177280, 1171448576, 1166691584, 1161906560, 1157093504,
+ 1152252544, 1147383808, 1142487552, 1137563648, 1132612352, 1127633792, 1122628096, 1117595264,
+ 1112535552, 1107448960, 1102335872, 1097196032, 1092029824, 1086837248, 1081618560, 1076373888,
+ 1071103104, 1065806592, 1060484352, 1055136576, 1049763456, 1044364928, 1038941312, 1033492608,
+ 1028019072, 1022520704, 1016997696, 1011450240, 1005878400, 1000282304, 994662080, 989017920,
+ 983349888, 977658240, 971942976, 966204288, 960442368, 954657280, 948849152, 943018176,
+ 937164480, 931288192, 925389504, 919468544, 913525312, 907560192, 901573184, 895564416,
+ 889534016, 883482304, 877409152, 871314944, 865199808, 859063744, 852907008, 846729728,
+ 840532032, 834314112, 828075968, 821817984, 815540096, 809242752, 802925696, 796589376,
+ 790233856, 783859392, 777465984, 771053824, 764622976, 758173824, 751706432, 745220864,
+ 738717312, 732196032, 725657088, 719100608, 712526848, 705935936, 699328000, 692703232,
+ 686061760, 679403712, 672729280, 666038720, 659332096, 652609536, 645871296, 639117440,
+ 632348224, 625563776, 618764224, 611949824, 605120640, 598276864, 591418688, 584546240,
+ 577659712, 570759296, 563845120, 556917312, 549976128, 543021696, 536054144, 529073696,
+ 522080512, 515074752, 508056512, 501026112, 493983648, 486929216, 479863072, 472785376,
+ 465696288, 458596000, 451484608, 444362336, 437229408, 430085952, 422932064, 415768032,
+ 408593952, 401410080, 394216512, 387013440, 379801024, 372579456, 365348960, 358109632,
+ 350861664, 343605248, 336340544, 329067744, 321787008, 314498528, 307202464, 299899008,
+ 292588320, 285270592, 277945984, 270614656, 263276832, 255932656, 248582320, 241225984,
+ 233863840, 226496064, 219122832, 211744320, 204360704, 196972144, 189578864, 182181008,
+ 174778768, 167372304, 159961824, 152547472, 145129456, 137707936, 130283104, 122855136,
+ 115424192, 107990472, 100554160, 93115416, 85674432, 78231384, 70786448, 63339808,
+ 55891640, 48442128, 40991448, 33539780, 26087306, 18634200, 11180647, 3726823
+};
+
+/* Synthesis windows for overlap-add */
+/* for (j=0; jfftlen; j++) hs->olapWinSyn[j] = (float)sin(EVS_PI*((float)j+0.5f)/(float)(hs->fftlen); */
+
+const Word16 olapWinSyn256_fx[256] =
+{//Q15
+ 201, 603, 1005, 1407, 1808, 2210, 2611, 3011, 3411, 3811, 4210, 4609, 5006, 5403, 5800, 6195,
+ 6589, 6983, 7375, 7766, 8156, 8545, 8933, 9319, 9704, 10087, 10469, 10849, 11228, 11605, 11980, 12353,
+ 12725, 13094, 13462, 13828, 14191, 14552, 14912, 15269, 15623, 15976, 16325, 16673, 17018, 17360, 17700, 18037,
+ 18371, 18703, 19032, 19358, 19681, 20001, 20318, 20631, 20942, 21250, 21555, 21856, 22154, 22448, 22740, 23027,
+ 23312, 23593, 23870, 24144, 24414, 24680, 24943, 25201, 25457, 25708, 25955, 26199, 26438, 26674, 26905, 27133,
+ 27356, 27576, 27791, 28002, 28208, 28411, 28609, 28803, 28993, 29178, 29359, 29535, 29707, 29874, 30037, 30196,
+ 30350, 30499, 30644, 30784, 30919, 31050, 31176, 31298, 31414, 31526, 31634, 31736, 31834, 31927, 32015, 32098,
+ 32176, 32250, 32319, 32383, 32442, 32496, 32545, 32589, 32629, 32663, 32693, 32718, 32737, 32752, 32762, 32767,
+ 32767, 32762, 32752, 32737, 32718, 32693, 32663, 32629, 32589, 32545, 32496, 32442, 32383, 32319, 32250, 32176,
+ 32098, 32015, 31927, 31834, 31736, 31634, 31526, 31414, 31298, 31176, 31050, 30919, 30784, 30644, 30499, 30350,
+ 30196, 30037, 29874, 29707, 29535, 29359, 29178, 28993, 28803, 28609, 28411, 28208, 28002, 27791, 27576, 27356,
+ 27133, 26905, 26674, 26438, 26199, 25955, 25708, 25457, 25201, 24943, 24680, 24414, 24144, 23870, 23593, 23312,
+ 23027, 22740, 22448, 22154, 21856, 21555, 21250, 20942, 20631, 20318, 20001, 19681, 19358, 19032, 18703, 18371,
+ 18037, 17700, 17360, 17018, 16673, 16325, 15976, 15623, 15269, 14912, 14552, 14191, 13828, 13462, 13094, 12725,
+ 12353, 11980, 11605, 11228, 10849, 10469, 10087, 9704, 9319, 8933, 8545, 8156, 7766, 7375, 6983, 6589,
+ 6195, 5800, 5403, 5006, 4609, 4210, 3811, 3411, 3011, 2611, 2210, 1808, 1407, 1005, 603, 201
+};
+
+
+const Word16 olapWinSyn320_fx[320] =
+{//Q15
+ 160, 482, 804, 1125, 1447, 1768, 2089, 2410, 2731, 3051,
+ 3371, 3691, 4011, 4330, 4648, 4967, 5284, 5602, 5918, 6234,
+ 6550, 6865, 7179, 7493, 7805, 8117, 8429, 8739, 9049, 9358,
+ 9665, 9972, 10278, 10583, 10887, 11190, 11492, 11793, 12092, 12391,
+ 12688, 12984, 13278, 13572, 13864, 14155, 14444, 14732, 15019, 15304,
+ 15588, 15870, 16151, 16430, 16707, 16983, 17258, 17530, 17801, 18070,
+ 18338, 18604, 18868, 19130, 19390, 19648, 19905, 20159, 20412, 20663,
+ 20911, 21158, 21403, 21645, 21886, 22124, 22360, 22594, 22826, 23056,
+ 23283, 23509, 23732, 23952, 24171, 24387, 24600, 24812, 25021, 25227,
+ 25431, 25633, 25832, 26029, 26223, 26415, 26604, 26790, 26974, 27155,
+ 27334, 27510, 27684, 27854, 28023, 28188, 28351, 28511, 28668, 28822,
+ 28974, 29123, 29269, 29412, 29552, 29690, 29825, 29956, 30085, 30211,
+ 30334, 30455, 30572, 30686, 30797, 30906, 31011, 31114, 31213, 31309,
+ 31403, 31493, 31581, 31665, 31746, 31824, 31899, 31971, 32040, 32106,
+ 32169, 32229, 32285, 32339, 32389, 32436, 32480, 32521, 32559, 32594,
+ 32625, 32653, 32679, 32701, 32720, 32736, 32748, 32758, 32764, 32767,
+ 32767, 32764, 32758, 32748, 32736, 32720, 32701, 32679, 32653, 32625,
+ 32594, 32559, 32521, 32480, 32436, 32389, 32339, 32285, 32229, 32169,
+ 32106, 32040, 31971, 31899, 31824, 31746, 31665, 31581, 31493, 31403,
+ 31309, 31213, 31114, 31011, 30906, 30797, 30686, 30572, 30455, 30334,
+ 30211, 30085, 29956, 29825, 29690, 29552, 29412, 29269, 29123, 28974,
+ 28822, 28668, 28511, 28351, 28188, 28023, 27854, 27684, 27510, 27334,
+ 27155, 26974, 26790, 26604, 26415, 26223, 26029, 25832, 25633, 25431,
+ 25227, 25021, 24812, 24600, 24387, 24171, 23952, 23732, 23509, 23283,
+ 23056, 22826, 22594, 22360, 22124, 21886, 21645, 21403, 21158, 20911,
+ 20663, 20412, 20159, 19905, 19648, 19390, 19130, 18868, 18604, 18338,
+ 18070, 17801, 17530, 17258, 16983, 16707, 16430, 16151, 15870, 15588,
+ 15304, 15019, 14732, 14444, 14155, 13864, 13572, 13278, 12984, 12688,
+ 12391, 12092, 11793, 11492, 11190, 10887, 10583, 10278, 9972, 9665,
+ 9358, 9049, 8739, 8429, 8117, 7805, 7493, 7179, 6865, 6550,
+ 6234, 5918, 5602, 5284, 4967, 4648, 4330, 4011, 3691, 3371,
+ 3051, 2731, 2410, 2089, 1768, 1447, 1125, 804, 482, 160
+};
+
+/*-------------------------------------------------------------------*
+ * AMR-WB ISF codebook - common 1st stage for 46bit and 36bit codebooks,
+ * 2 splits
+ *
+ * codebook vector dimension number of vectors
+ * ~~~~~~~~ ~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
+ * 1_1 9 256
+ * 1_2 7 256
+ *-------------------------------------------------------------------*/
+
+/*-------------------------------------------------------------------*
+ * 1nd stage, 1st split: ISF0 to ISF8
+ *-------------------------------------------------------------------*/
+
+const Word16 dico1_isf_fx[] =
+{/*Qlog2(2.56)*/
+ 740, 1263, 1292, 1006, 997, 1019, 1017, 976, 923,
+ 557, 946, 1049, 867, 846, 990, 1112, 1262, 1241,
+ 633, 898, 996, 756, 662, 683, 783, 909, 996,
+ 830, 736, 278, 820, 1254, 686, 712, 1039, 473,
+ 503, 885, 1508, 1307, 1282, 1172, 1119, 1209, 1061,
+ 416, 719, 989, 1227, 1001, 1052, 954, 741, 1044,
+ 585, 1132, 1233, 1091, 1247, 1433, 1512, 1448, 1314,
+ -31, 469, 803, 659, 619, 658, 843, 987, 1113,
+ 842, 1678, 1841, 1549, 1474, 1256, 1082, 905, 742,
+ 370, 1216, 1768, 1633, 1212, 636, 22, -330, 71,
+ 73, 738, 893, 968, 993, 1768, 2273, 1840, 1391,
+ 1513, 1714, 1238, 534, 276, 315, 461, 459, 508,
+ 421, 1293, 1640, 1623, 1742, 1617, 1499, 1284, 1006,
+ -95, 752, 1680, 1569, 1618, 1436, 1200, 980, 712,
+ -78, 831, 1194, 1110, 1378, 1481, 1492, 1365, 1217,
+ 670, 1208, 1168, 860, 742, 601, 528, 403, 309,
+ 397, 621, 966, 752, 579, 398, 400, 329, 252,
+ 510, 864, 1108, 807, 939, 902, 925, 717, 481,
+ 539, 835, 913, 719, 617, 544, 591, 565, 642,
+ 162, 889, 654, 108, -34, 244, 488, 561, 532,
+ -62, 1033, 1308, 1035, 1127, 1098, 1029, 961, 823,
+ -14, 945, 990, 801, 755, 815, 847, 913, 892,
+ 394, 1765, 1666, 1339, 1117, 806, 642, 479, 380,
+ 529, 1851, 2003, 1228, 622, -41, -416, 344, 819,
+ 635, 1058, 883, 492, 372, 312, 317, 274, 241,
+ 279, 966, 1642, 1478, 1463, 1123, 795, 525, 339,
+ 457, 955, 1177, 1214, 1427, 1457, 1345, 917, 539,
+ 148, 751, 1515, 1105, 867, 606, 474, 448, 399,
+ 579, 1081, 1035, 390, 3, -263, -198, -82, 38,
+ 18, -68, -12, 313, 761, 405, 249, 111, -76,
+ -91, 827, 948, 648, 613, 535, 522, 490, 421,
+ 41, -44, -281, -472, 652, 534, 193, 135, -90,
+ 41, -121, -356, -60, 663, 307, 61, -48, -344,
+ -118, -204, 328, 512, 870, 793, 610, 402, 186,
+ 156, 293, 74, -338, -475, -897, -594, -161, -497,
+ 226, 131, -138, 307, 169, -271, -164, -387, -624,
+ 62, -32, -61, -252, -541, -828, -1027, -523, -662,
+ 102, -61, 141, 112, -270, -251, -541, 25, -150,
+ 6, -132, -356, -686, -96, -322, -522, -31, -326,
+ -36, -209, -521, -229, 307, -132, -5, -99, -384,
+ 60, -51, -237, -668, -973, -407, -708, -75, -172,
+ 26, -138, -266, 111, -302, 43, -278, -356, -359,
+ 570, 822, 496, -154, -312, -92, 137, 279, 371,
+ -146, 368, 409, 68, 6, 77, 167, 202, 162,
+ -103, 294, 607, 415, 483, 462, 480, 431, 408,
+ -120, -338, -612, -524, 584, 331, 92, 433, 276,
+ -178, -293, -154, -41, 269, 100, -9, 213, 160,
+ -218, -304, 463, 454, 397, 273, 202, 286, 273,
+ -232, 7, 6, -388, -472, -427, -378, -167, -100,
+ -294, -183, 134, -47, 101, -88, -84, -117, -3,
+ 57, 17, -202, -634, -989, -1119, -533, 176, -36,
+ 120, -28, 23, 111, -319, 318, -22, -77, 266,
+ -271, -464, -434, -658, -640, -385, -385, -99, -69,
+ -198, -259, -266, -44, -39, -139, -137, 171, 66,
+ 9, -145, -377, -846, -1000, -111, -325, 342, 135,
+ -81, -286, -380, 192, -57, 307, 76, -24, -140,
+ 677, 702, 247, 56, 249, 141, -105, -236, -99,
+ 36, -39, -69, 348, 198, -93, 322, 91, -72,
+ -127, -376, -657, 139, 623, 223, 501, 306, 220,
+ -113, -384, -796, 504, 438, 85, 213, -83, -194,
+ -174, -422, 7, 1155, 1089, 1182, 1003, 945, 806,
+ 8, -126, -317, -103, -351, -695, -98, -268, -537,
+ 33, -103, -290, 167, -39, -407, 44, -208, -375,
+ 104, -23, -64, -291, -637, -851, -1084, -61, -112,
+ -75, -306, -434, 218, -148, -354, -680, -133, -216,
+ -121, -377, -718, -97, -130, -361, -156, -379, -599,
+ -56, -254, -586, 235, 157, -214, 11, -260, -149,
+ -124, -267, -397, -580, -593, -527, -805, -385, 346,
+ -193, -440, -708, -351, -141, -255, -499, -147, -185,
+ 448, 660, 494, 208, 509, 461, 338, 291, 149,
+ -223, 88, 335, 159, 212, 191, 286, 308, 205,
+ -171, -242, 514, 362, 295, 524, 552, 694, 585,
+ -64, -308, -448, -21, 284, 786, 446, 289, 92,
+ -218, -390, -7, 169, 206, 330, 352, 408, 358,
+ -36, 702, 959, 859, 861, 1115, 1269, 1357, 1305,
+ -133, -341, -65, 678, 417, 440, 486, 518, 780,
+ 33, -44, -191, -344, -461, -755, -201, 217, -31,
+ -353, -547, -44, 123, -61, -68, -79, 29, 60,
+ 73, -57, -406, -766, -1243, -1203, 240, 400, 165,
+ -73, -282, -601, -213, -171, -375, 332, 35, -103,
+ -29, -207, -553, -476, -638, -908, 172, -22, -135,
+ -192, -239, -164, -103, -111, -47, 153, 125, 110,
+ -1, -203, -570, -1030, -1424, -535, 155, 1, 147,
+ -333, -653, -865, -197, -158, -21, -44, 95, 108,
+ 389, 588, 490, 33, -237, -524, -628, -136, -260,
+ 40, -177, -462, 453, 862, 380, 131, -130, -405,
+ -76, -281, -741, -742, 898, 619, 277, 71, -222,
+ -32, -265, -556, -25, 994, 682, 305, 126, -165,
+ -69, -349, -585, 234, 1158, 903, 626, 510, 251,
+ -1, -99, -272, -210, -603, -351, -540, -811, -383,
+ -16, -230, -504, 410, 149, -205, -343, -651, -639,
+ 103, -9, -227, -205, -562, -781, -1079, -1208, -156,
+ 143, 63, -135, -67, -317, -602, -784, -1154, -640,
+ -144, -391, -674, -622, -200, -254, -660, -947, -395,
+ -40, -250, -625, 27, 543, 94, -131, -386, -673,
+ -123, -371, -757, -451, -564, -614, -415, -711, -35,
+ -116, -309, -593, -268, 239, -33, -338, -650, -135,
+ 94, 251, 554, 57, -312, -423, -154, -57, 235,
+ -268, -71, 381, 114, -44, -87, 125, 173, 133,
+ -131, -19, 1149, 670, 486, 356, 309, 369, 296,
+ -223, -501, -899, -722, -70, 6, 131, 310, 394,
+ -99, -303, -517, 249, 64, -53, 135, -11, 453,
+ -147, -399, -730, -401, 817, 738, 802, 749, 575,
+ -154, -435, -739, 800, 593, 366, 529, 318, 326,
+ -224, 45, -39, -387, -515, -518, -608, -384, -321,
+ -315, -377, 143, -101, -113, -377, -177, -144, -12,
+ 117, 40, -239, -651, -1051, -581, -737, -990, -328,
+ 26, -50, -157, -23, -453, -283, -531, -546, 192,
+ -252, -501, -743, -589, -627, -499, -328, -118, -72,
+ -324, -494, -244, -306, -144, -177, -262, -135, -78,
+ -36, -234, -519, -961, -1290, -314, -479, -371, -45,
+ -95, -292, -535, -8, -300, 112, -164, -277, 198,
+ -99, -128, 880, 836, 579, 351, 23, -95, -217,
+ -27, -258, 124, 1011, 597, 425, 144, 7, -73,
+ -69, -300, -683, -435, 1132, 899, 504, 332, 109,
+ -74, -323, -637, 563, 1074, 608, 371, 105, -49,
+ -259, -121, 1440, 1334, 1628, 1490, 1438, 1223, 933,
+ -82, -306, -613, -222, -378, -675, -545, -671, -845,
+ 53, -124, -347, 422, 52, -125, -270, -529, 9,
+ 79, -89, -320, -662, -999, -1199, -1243, -676, -297,
+ -68, -273, -611, 137, -146, -397, -627, -845, -220,
+ -112, -346, -797, -826, 234, -132, -188, -278, -522,
+ -159, -405, -734, -419, 293, 74, -167, -167, 184,
+ -153, -437, -833, -1080, -336, -472, -561, -340, -253,
+ -169, -423, -820, -904, -131, -19, -346, -604, 31,
+ 33, -31, 312, 62, -148, 49, -59, 564, 486,
+ -306, -333, 194, -44, 67, 72, 147, 205, 243,
+ -207, -49, 1360, 983, 969, 991, 1014, 1110, 973,
+ -211, -172, 883, 627, 711, 674, 705, 798, 746,
+ -88, -325, -763, -974, 687, 908, 514, 382, 172,
+ -292, -612, -805, 63, 131, 270, 259, 352, 348,
+ -235, -84, 955, 818, 1120, 1289, 1559, 1480, 1285,
+ -180, -461, -614, 657, 691, 745, 854, 783, 713,
+ -97, -309, -477, -614, -777, -734, -768, -526, -472,
+ -344, -476, -35, -169, 49, -77, -150, -240, -141,
+ -52, -268, -639, -919, -1278, -1113, -342, -333, -151,
+ -68, -242, -585, -73, -209, -478, -159, -429, 133,
+ -197, -499, -1005, -1268, -272, -224, -105, -67, 17,
+ -363, -618, -414, -116, -62, 20, 10, 116, 108,
+ -195, -475, -906, -1260, -891, -441, -277, -142, -28,
+ -226, -519, -950, -700, -275, -266, -116, -105, 82,
+ 404, 511, 520, 327, 17, -194, -333, -536, -586,
+ -114, -130, 276, 237, 204, 342, 135, -16, -111,
+ 191, 180, -137, -467, 272, 106, -95, 17, -192,
+ -80, -290, -626, 194, 598, 196, 21, -281, 77,
+ 137, 367, 534, 764, 670, 382, 296, 153, 84,
+ 303, 497, 144, -85, -125, -539, -482, -464, -764,
+ 233, 347, 68, -147, 169, -210, -242, -226, -482,
+ 307, 422, 154, -175, -386, -722, -724, -904, -1015,
+ 309, 308, 160, -60, -470, -420, -598, -791, -219,
+ 68, 121, -137, -560, -146, -446, -515, -494, -729,
+ 130, 53, -227, 46, 474, 32, -161, -192, -490,
+ 213, 164, -71, -465, -876, -161, -456, -587, -48,
+ 218, 117, 39, 177, -194, -88, -226, -418, 50,
+ 210, 547, 569, 279, 121, -44, -50, 10, -84,
+ 58, 140, 182, -5, 267, 117, 106, 211, 198,
+ 153, 559, 872, 460, 222, 108, 188, 180, 183,
+ 158, 119, 284, -153, -271, 229, 87, 110, -57,
+ -183, 82, 118, 21, 13, 40, 118, 191, 185,
+ 163, 56, 609, 341, 50, 329, 68, 266, 218,
+ 100, 206, 18, -304, -107, -436, -487, -65, -306,
+ -86, 154, 134, -30, -45, -73, -104, -80, -96,
+ 245, 330, 10, -440, -849, -1082, 79, 40, -265,
+ 196, 372, 272, -181, -493, -389, 275, 80, -59,
+ 2, -12, -246, -505, -100, -436, 21, -187, -431,
+ -221, -48, 36, -271, -186, -147, -109, 26, 71,
+ 213, 140, 72, -351, -620, -84, -363, 69, 46,
+ 91, 167, -3, -95, -99, -105, -48, 114, 147,
+ 259, 249, 172, 607, 406, 52, 59, -189, -320,
+ 115, -85, -54, 574, 128, 226, -59, -253, 130,
+ 39, 364, 757, 940, 728, 660, 659, 583, 770,
+ -115, -338, -760, -471, 394, 37, 441, 178, 6,
+ -57, -305, -525, 796, 453, 188, -4, -114, 248,
+ 71, 444, 797, 731, 1096, 1157, 1222, 1029, 811,
+ 135, 359, 551, 425, 749, 815, 874, 704, 502,
+ 132, 247, 0, -206, -449, -750, -258, -514, -633,
+ 248, 249, 91, 121, -195, -499, -90, -282, -435,
+ 78, 20, -277, -623, -983, -1224, -415, -458, -639,
+ 347, 509, 208, -179, -464, -728, -76, -237, -486,
+ -103, -343, -756, -713, -265, -609, -191, -398, -636,
+ -121, -383, -749, 567, 252, -36, -354, -417, -50,
+ 204, 100, -149, -650, -1081, -47, -7, -263, 111,
+ -46, -180, -267, -324, -562, -394, -692, 398, 292,
+ 482, 670, 683, 624, 442, 165, 116, 36, -149,
+ 108, 247, 291, 247, 355, 122, 109, 224, 296,
+ 292, 349, 725, 482, 388, 329, 429, 620, 667,
+ -34, 197, 213, -127, 84, 494, 620, 575, 375,
+ 126, 207, 172, 167, 362, 202, 296, 395, 455,
+ -6, 250, 539, 467, 636, 801, 1149, 1287, 1118,
+ 27, 240, 369, 280, 440, 411, 634, 892, 953,
+ 159, 170, -58, -395, -797, -690, 77, -211, -334,
+ -5, -28, -13, -74, -335, -603, 300, 88, -205,
+ 82, -33, -364, -698, -1203, -1153, 110, -146, -289,
+ 113, 1, -243, -588, -994, -496, 414, 160, 42,
+ -56, -247, -440, -693, -996, -479, 11, -178, -357,
+ -151, -353, -327, -211, -340, 141, 65, 425, 453,
+ 34, -169, -455, -932, -1215, 138, 499, 256, 324,
+ 68, 139, -15, -547, -478, 17, 306, 502, 481,
+ -32, -134, 445, 129, -143, -244, -503, -507, -599,
+ 61, -140, -345, 496, 458, -2, 20, -227, -514,
+ 215, 519, 920, 1053, 1090, 791, 528, 290, 155,
+ -54, -233, -647, -602, 639, 294, -2, -167, -442,
+ -78, -315, -791, -113, 820, 403, 158, -116, -356,
+ -105, -379, -236, 1224, 893, 749, 568, 356, 214,
+ -17, -199, -144, 50, -283, -247, -578, -846, -1087,
+ 69, -11, -381, -206, 209, -284, -387, -416, -716,
+ 39, -5, -145, -374, -682, -909, -1074, -1169, -1066,
+ 287, 226, 67, -221, -662, -171, -421, -642, -707,
+ -132, -348, -538, -448, -20, -4, -354, -748, -933,
+ 4, -75, -289, -598, 317, 52, -208, -297, -559,
+ -88, -264, -358, -589, -631, -248, -523, -822, -1071,
+ 70, -8, 54, -314, -515, 92, -146, -274, -493,
+ 199, 62, 391, 158, -141, 71, -219, -203, -207,
+ 152, 40, 329, 162, -29, 48, -149, 108, 127,
+ 267, 722, 1256, 882, 625, 248, 8, -81, -60,
+ -58, -138, -291, -600, -12, -2, -39, 147, 117,
+ -107, -345, -513, 459, 76, 92, -272, 388, 262,
+ 362, 516, 203, -409, -716, -831, -331, 185, 209,
+ -117, -391, -298, 671, 292, 538, 257, 166, -38,
+ -102, -319, -194, -283, -573, -262, -579, -219, -444,
+ -235, 78, 11, -168, -101, -229, -263, -321, -123,
+ 70, 50, -170, -599, -996, -588, -263, -516, -455,
+ 394, 363, 229, -136, -538, 21, -183, -348, -201,
+ -124, -368, -640, -879, -847, -209, -409, -494, -515,
+ -127, -341, -541, -425, -510, -10, -252, -473, -291,
+ 84, -69, -201, -676, -868, 103, -311, -132, -320,
+ 5, -173, -188, -297, -628, 197, -57, 7, -11,
+ 49, -160, 56, 558, 111, 33, -311, -440, -463,
+ -1, -246, -307, 862, 453, 139, -170, -355, -232,
+ -197, -38, 1702, 1331, 1252, 950, 692, 504, 426,
+ -108, -344, -861, -1172, 444, 354, 88, -46, -220,
+ -53, -321, -494, 1113, 744, 364, 198, -34, -75,
+ -69, 199, 897, 1140, 1343, 1183, 977, 742, 522,
+ 122, 44, -269, 27, -155, -562, -307, -590, -773,
+ 154, 42, -160, 252, -129, -305, -471, -733, -371,
+ 135, 185, -82, -416, -722, -913, -504, -743, -880,
+ 149, 214, -84, -329, -680, -835, -426, -661, -81,
+ -128, -380, -735, -998, -337, 17, -182, -467, -697,
+ -84, -290, -510, -592, 13, 440, 154, -38, -279,
+ 70, -61, -246, -727, -1047, -80, -381, -535, -704,
+ 178, -2, -146, -670, -938, 482, 138, 63, 65,
+ -11, 15, 772, 443, 142, -20, -209, -126, -161,
+ -32, -249, 95, 552, 124, 30, -343, 82, -86,
+ -163, -257, 899, 1097, 906, 751, 502, 390, 294,
+ -51, -258, -447, -806, -368, 763, 464, 364, 183,
+ -166, -374, -367, 87, 35, 399, 418, 856, 833,
+ -205, -310, 588, 778, 785, 1065, 1118, 1245, 1157,
+ -173, -312, 107, 345, 400, 790, 870, 1113, 1001,
+ -7, -120, -387, -410, -614, -943, -226, -384, -491,
+ -203, -288, -51, -331, -90, -178, -408, -573, -338,
+ 56, -29, -273, -627, -1041, -798, -247, -467, 148,
+ 66, -2, -205, -205, -575, -349, -57, -352, -58,
+ -45, -225, -471, -924, -497, 77, -32, 44, -135,
+ -277, -491, -497, -502, -424, -202, -137, 77, 96,
+ 26, -179, -469, -1008, -1260, 262, -35, -132, -259,
+ -66, -232, -447, -533, -789, -191, -100, -267, 364,
+ 111, 43, -287, -423, -608, -987, -922, -799, -827,
+ 77, 76, -101, -260, -549, -850, -88, -231, -329,
+ 75, 24, -66, -269, -427, -528, -773, 201, -5,
+ 67, 7, -61, -320, -487, 12, -200, -242, -94,
+ 27, -54, -149, -354, -661, -594, -450, -481, 560,
+ 31, -69, -246, -549, -1141, -178, -232, -275, -288,
+ 16, -84, -176, 7, -83, -210, -246, -424, -589,
+ 63, -60, -201, -90, -269, -400, -685, -1218, -258,
+ 169, 217, 142, -71, -243, -433, -504, -511, -537,
+ 6, -105, -234, -321, -188, -131, -307, -521, -1319,
+ -34, -151, -369, 11, 44, -95, -280, -500, 160,
+ 31, -37, -163, -334, 288, 89, -150, -86, -299,
+ -35, -161, -362, -74, -74, -263, 240, 9, -153,
+ -45, -208, -529, -896, 89, 24, -130, -313, -373,
+ 234, 276, 197, -10, -236, -162, -134, -85, -112,
+ 42, -73, 133, 392, 98, 72, -153, -162, -99,
+ -3, -145, -338, 408, 401, 133, -52, -296, -501,
+ 3, -109, -152, -85, -56, 42, -145, 703, 205,
+ -49, -149, -281, -134, -121, -41, -21, 16, 958,
+ 30, -107, -196, -463, -523, 490, 236, 70, -128,
+ -33, -161, -364, -148, 757, 516, 250, 43, -65,
+ -34, -193, -244, 750, 527, 349, 234, 172, 134,
+ -64, -223, -379, 55, 28, 248, 793, 442, 320,
+ 29, -85, -298, -622, -888, 127, 206, 387, 460,
+ -48, -170, -477, -876, 573, 635, 440, 375, 311,
+ 42, 3, -212, -441, -718, -821, 388, 373, 211,
+ -106, -155, 1092, 459, 570, 561, 506, 604, 514,
+ -144, -264, 0, 460, 619, 877, 916, 1273, 921
+};
+
+/*-------------------------------------------------------------------*
+ * 1nd stage, 2nd split: ISF9 to ISF15
+ *-------------------------------------------------------------------*/
+
+/* ISF codebook - common 1st stage, 2nd split (only in AMR-WB IO mode) */
+const Word16 dico2_isf_fx[] =
+{/*Qlog2(2.56)*/
+ 1357, 1313, 1136, 784, 438, 181, 145,
+ 636, 648, 667, 568, 442, 217, 362,
+ 427, 440, 674, 524, 332, 117, -417,
+ 121, 295, 468, 465, 230, 44, -221,
+ -147, -240, 149, 80, 390, 278, 106,
+ -418, -556, 552, 511, 235, 144, -95,
+ 43, 193, 274, 150, 67, 34, -273,
+ -43, -126, 171, 416, 282, 63, -354,
+ -372, -86, -344, -108, -94, -182, -89,
+ -600, -840, -200, 465, 258, -11, -253,
+ -48, 329, 97, -290, -543, -795, -354,
+ -570, -117, 187, 10, -133, -416, -76,
+ -618, -129, -247, -371, 45, -76, 277,
+ -1022, -1079, 126, 474, 254, 127, 52,
+ -281, 76, -167, -361, -283, -551, -283,
+ -119, -52, -1, 134, -32, -204, -415,
+ 1064, 827, 637, 684, 464, 209, 12,
+ 482, 416, 449, 371, 335, 294, 194,
+ 719, 576, 365, 135, 113, 91, -199,
+ 298, 176, 493, 366, 194, 163, 36,
+ -35, -236, -259, -36, -4, 99, 152,
+ -98, -306, -27, 228, 90, 111, -86,
+ 91, 13, -211, -258, -106, 86, -64,
+ 73, -35, -57, -31, 162, 35, -192,
+ -109, -335, -629, -66, -61, -128, 322,
+ -495, -669, -728, 193, 31, -220, 122,
+ 324, 95, -89, -91, -409, -710, -154,
+ 0, -234, 92, 33, -343, -609, -220,
+ -343, -408, -476, -655, -153, 82, 222,
+ -490, -745, -255, 49, -48, 135, -127,
+ 119, -67, -328, -390, -272, -545, -56,
+ -57, -130, -10, -7, -164, -47, -22,
+ 984, 1064, 961, 568, 210, -27, 16,
+ 811, 691, 754, 514, 224, -35, 166,
+ 662, 704, 618, 386, 57, -211, -257,
+ 510, 359, 418, 393, 91, -144, -18,
+ -193, -31, -27, 223, 89, -143, 24,
+ -112, -98, 471, 319, 185, 3, 175,
+ 252, 146, -47, 272, 48, -211, -234,
+ 146, 69, 203, 364, 68, -52, 51,
+ -259, -478, -697, -349, -758, -501, 63,
+ -501, -769, -289, 79, -311, -497, -106,
+ 251, 53, -235, -469, -895, -884, 145,
+ -416, -551, 140, -133, -523, -775, 44,
+ -326, -423, -713, -497, -86, -431, 99,
+ -757, -772, -160, -76, -46, -32, 379,
+ 85, -35, -200, -401, -663, -1040, -247,
+ -180, -330, -92, -376, 27, -183, -110,
+ 1279, 1086, 781, 502, 324, 164, 157,
+ 682, 466, 449, 277, 146, 28, 409,
+ 635, 472, 390, 107, -232, -538, -139,
+ 196, 396, 332, 213, 209, -29, -81,
+ 150, -95, -312, 76, -77, -320, -50,
+ 46, 9, 47, 175, 139, 30, 384,
+ 218, 206, -24, -250, -96, -276, -183,
+ 26, 119, 38, 14, -4, -133, -52,
+ -477, -614, -987, -715, -631, -813, 200,
+ -744, -1009, -1065, -745, -631, -171, 18,
+ -137, -251, -483, -613, -980, -1203, 12,
+ -605, -767, -562, -686, -1088, -515, 58,
+ -202, -428, -782, -1072, -96, -234, -179,
+ -480, -709, -1070, -897, -131, -92, 321,
+ -145, -193, -512, -729, -572, -765, -210,
+ -331, -585, -525, -631, -281, -208, -303,
+ 1165, 1104, 939, 828, 716, 426, 155,
+ 6, -109, 820, 778, 415, 113, -27,
+ 381, 339, 314, 265, 121, -9, -474,
+ -373, 47, 584, 442, 99, -231, -113,
+ -496, -38, -285, 262, 305, 170, 4,
+ -587, -556, 69, 66, 471, 354, 13,
+ -138, 70, -18, 106, 67, 167, -302,
+ -445, -141, 185, 191, 151, 83, -133,
+ -257, -521, -720, -198, 134, -46, -182,
+ -819, -1168, -777, 512, 359, 95, -113,
+ 137, -2, -74, -138, -401, -114, -371,
+ -242, -466, 204, 223, -31, -212, -192,
+ -532, -637, -466, -686, 256, 277, -139,
+ -1141, -1244, -381, -75, -54, 14, 88,
+ -311, 115, -143, -499, -343, 124, -416,
+ -616, -147, -135, 43, -4, 121, -369,
+ 835, 783, 641, 390, 355, 350, 64,
+ 72, 194, 443, 467, 436, 219, 372,
+ 464, 369, 192, 4, -156, -72, -226,
+ 57, 206, 303, 205, 188, 101, 265,
+ -40, -205, -488, -184, 276, 64, -26,
+ -217, -433, -297, 137, 328, 308, -289,
+ 378, 81, -308, -465, 57, -37, 227,
+ -100, 24, -36, -151, 199, 8, 143,
+ -426, -697, -1059, -133, 388, 161, 321,
+ -644, -1023, -1271, 39, 66, -123, 70,
+ 372, 177, -173, -556, -553, -304, -189,
+ -117, -369, -425, -122, -462, -152, -73,
+ -649, -850, -1189, -767, 497, 360, 222,
+ -798, -1139, -1455, -190, 430, 234, 179,
+ 42, -94, -405, -692, 38, -202, -246,
+ -169, -366, -290, -88, -64, 32, -292,
+ 1010, 923, 938, 710, 465, 230, 342,
+ 217, 300, 1054, 675, 68, -458, -179,
+ 78, 453, 316, 18, -237, -496, -243,
+ 167, 21, 424, 215, -91, -303, -170,
+ -290, -81, -70, -67, 40, 54, -59,
+ -353, -427, -90, 53, 94, 9, 54,
+ -28, 318, 283, 15, -240, -58, 79,
+ -75, -121, 229, 35, 58, 6, -133,
+ -351, -514, -744, -834, -705, -137, 164,
+ -1124, -1388, -1055, -230, -73, 40, 36,
+ -163, -233, -532, -785, -1170, -697, 96,
+ -788, -959, -246, -430, -624, -165, -8,
+ -856, -540, -630, -907, -337, -70, 76,
+ -937, -1042, -659, -733, -208, 199, -26,
+ -523, 78, -98, -501, -869, -890, -81,
+ -624, -703, -45, -348, -25, 87, -186,
+ 1005, 823, 546, 249, 90, -22, 207,
+ 298, 397, 381, 319, 200, 62, 303,
+ 473, 379, 133, -247, -632, -441, 75,
+ 284, 208, 391, 115, -25, 44, 95,
+ -72, 79, -95, -63, -129, -293, 203,
+ -164, -349, 115, 122, 69, -1, 378,
+ 348, 170, 99, 58, -179, -302, 188,
+ -190, -2, 150, 23, -51, -11, 216,
+ -615, -863, -1090, -1427, -802, -48, -6,
+ -961, -1276, -1548, -727, -58, 56, 223,
+ -124, -255, -561, -988, -1277, -148, -82,
+ -480, -660, -891, -1191, -1339, -325, 20,
+ -621, -917, -1296, -1350, 264, 289, 50,
+ -844, -1022, -1345, -1329, -293, 46, 278,
+ -260, -468, -829, -1176, -533, -560, -78,
+ -215, -484, -822, -1233, -791, 15, -138,
+ 1301, 1317, 1262, 1048, 716, 357, -64,
+ 578, 824, 925, 802, 630, 362, 102,
+ 470, 925, 767, 514, 327, 190, -112,
+ 225, 492, 495, 437, 598, 384, -45,
+ 43, 82, -42, 175, 519, 342, -64,
+ -304, -154, 159, 576, 403, 221, 327,
+ 214, 244, 122, -62, 312, 92, -160,
+ 218, 208, 310, 268, 306, 323, -199,
+ -285, -269, -79, -124, -143, -153, 236,
+ -205, -384, -426, 344, 59, -185, -184,
+ -272, 247, 126, -210, -518, -468, 78,
+ -99, -120, 502, 160, -280, -557, 304,
+ -423, -17, -283, -443, 215, 212, -140,
+ -564, -684, -228, 510, 361, 130, 323,
+ -428, 335, 98, -65, 36, -215, -246,
+ -362, 51, 364, -16, -234, 150, -165,
+ 914, 883, 751, 653, 676, 464, -153,
+ 631, 545, 535, 720, 596, 360, -81,
+ 783, 712, 512, 439, 341, 251, -391,
+ 497, 417, 249, 372, 295, 173, -193,
+ 128, -110, -385, 93, 39, 173, -231,
+ 216, -59, -253, 462, 389, 154, 69,
+ 455, 270, -4, -337, -49, 233, -322,
+ 307, 143, 53, 218, 128, 236, -156,
+ -37, -186, -240, -411, -110, 9, 399,
+ -140, -365, -628, 258, 380, 214, 277,
+ 131, 454, 177, -285, -520, 108, -214,
+ 77, -141, 201, -123, -490, -131, 60,
+ -14, -194, -521, -741, 273, 362, -33,
+ -362, -566, -287, -228, 161, 237, 317,
+ -269, 195, -75, -375, -204, 11, 77,
+ -128, -264, -156, -223, -475, 265, 27,
+ 1238, 1147, 916, 689, 432, 210, -280,
+ 800, 664, 879, 726, 411, 160, -164,
+ 454, 686, 536, 275, 147, 46, 111,
+ 303, 486, 512, 355, 241, 181, -69,
+ 79, 92, 29, 147, 233, 52, 17,
+ -171, 289, 131, 439, 271, 3, -10,
+ 413, 241, 144, 174, 155, -2, 14,
+ 58, 217, 247, 219, 149, 175, -18,
+ 228, -8, -240, -206, -513, -191, 202,
+ -96, -272, -454, 33, -300, -575, 46,
+ -10, -108, -246, -347, -770, -535, 9,
+ -326, -430, -61, -321, -704, -299, 201,
+ -1, -280, -603, -419, -185, 18, -36,
+ -516, -522, -379, -291, -181, -97, 27,
+ -159, -313, -525, -224, -510, -831, -197,
+ -292, -459, -59, -310, -562, -143, -351,
+ 1066, 912, 631, 389, 207, 86, -224,
+ 596, 512, 596, 505, 314, 122, -48,
+ 787, 861, 441, -93, -303, 33, -190,
+ 257, 469, 337, 51, 15, 298, -93,
+ 295, 73, -119, 25, 36, 23, 108,
+ -28, -3, -32, 114, 21, 185, 107,
+ 482, 305, 15, -279, -319, 52, 96,
+ 226, 46, 115, 72, -136, 133, -125,
+ 18, -207, -559, -590, -503, -482, 321,
+ -571, -789, -951, -172, -441, -538, 113,
+ 181, 14, -310, -641, -1001, -202, 159,
+ -136, -393, -433, -513, -911, -144, -22,
+ 72, -265, -706, -954, -159, 53, 332,
+ -338, -591, -852, -383, -395, 56, 44,
+ 43, -158, -464, -897, -631, -157, -294,
+ -161, -128, -328, -573, -483, -125, 11,
+ 1017, 906, 1051, 1005, 679, 341, -102,
+ 359, 334, 1567, 1314, 723, 105, 10,
+ -65, 726, 529, 301, 220, 43, -273,
+ -510, 436, 719, 566, 358, 179, 114,
+ -560, 298, 133, -120, 342, 225, 14,
+ -899, -101, 217, 617, 400, 146, -58,
+ -41, 352, 82, -196, 39, 121, -167,
+ -212, 59, 447, 284, 423, 250, -169,
+ -371, -484, -596, 30, -41, 249, 22,
+ -372, -650, -794, 477, 445, 216, -79,
+ -352, 275, 17, -443, -929, 92, 19,
+ -699, -696, 431, 264, -49, -310, 182,
+ -978, -217, -430, -400, 101, 261, 72,
+ -929, -889, -357, -13, 463, 378, 236,
+ -826, 56, 30, -299, -360, -128, -51,
+ -878, -299, -111, 75, 65, 36, 3,
+ 817, 368, -25, 354, 697, 591, -173,
+ 309, 212, 222, 751, 484, 140, -56,
+ 593, 379, 70, -8, 258, 180, 110,
+ 165, -46, 255, 297, 219, 273, 105,
+ 160, -70, -358, -181, 379, 330, 319,
+ -238, -369, -198, 740, 580, 319, -143,
+ 201, 109, -202, -456, 328, 276, -141,
+ 203, 170, 111, 42, 207, 360, 188,
+ -345, -399, -513, -233, 650, 422, 81,
+ -635, -961, -1220, 463, 539, 204, 209,
+ 202, -25, -194, -498, -787, 193, -143,
+ -449, -538, 195, -106, -331, 68, 62,
+ -228, -477, -840, -576, 317, 128, 283,
+ -671, -937, -807, -114, 391, 335, -62,
+ 246, 2, -314, -679, -303, 180, -88,
+ -107, -272, 90, -198, -28, 290, -112,
+ 885, 1149, 1021, 712, 496, 281, -83,
+ 269, 492, 787, 643, 347, 70, 124,
+ 336, 636, 499, 92, -229, -179, 191,
+ 26, 402, 564, 340, 149, -11, 135,
+ -440, 561, 470, 204, -72, -186, 140,
+ -720, 14, 355, 229, 68, -133, 465,
+ 110, 310, 103, 12, 106, 29, 158,
+ -178, 113, 161, 142, 121, 115, 27,
+ -651, -414, -645, -152, -164, -13, -429,
+ -639, -944, -681, -104, -81, 52, -189,
+ -663, -164, -316, -683, -954, -205, -83,
+ -609, -669, -172, -517, -694, 283, -80,
+ -646, -152, -383, -678, -246, -40, -143,
+ -747, -796, -745, -390, -98, 43, 275,
+ -599, -199, -398, -433, -436, -538, 31,
+ -1107, -568, -376, -265, -126, -21, 1,
+ 847, 573, 308, 392, 305, 101, 55,
+ 273, 293, 201, 267, 346, 201, 123,
+ 727, 480, 226, 2, -65, -138, 164,
+ 273, 208, 173, 292, 12, 253, 174,
+ 340, 207, 180, 88, 116, 46, 475,
+ -460, -166, -30, 13, 110, 173, 396,
+ 137, 88, 43, -137, -94, 34, 284,
+ 96, -14, 226, 40, 63, 70, 130,
+ -467, -735, -1012, -1174, -307, 305, -67,
+ -612, -920, -1146, -567, -8, 92, -25,
+ -182, -271, -492, -754, -857, 287, -75,
+ -494, -787, -689, -683, -709, 137, -326,
+ -288, -550, -903, -1105, 334, 321, -62,
+ -354, -653, -834, -445, 1, 377, -152,
+ -162, -306, -608, -937, -297, 247, -192,
+ -234, -477, -244, -488, -266, 342, -332
+};
+
+/*-------------------------------------------------------------------*
+ * AMR-WB ISF codebook - 46bits, 2 stages, 1st stage common with the
+ * 36bit codebook,5 splits in the 2nd stage
+ *
+ * codebook vector dimension number of vectors
+ * ~~~~~~~~ ~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
+ * 2_1 3 64
+ * 2_2 3 128
+ * 2_3 3 128
+ * 2_4 3 32
+ * 2_5 4 32
+ *-------------------------------------------------------------------*/
+
+/*-------------------------------------------------------------------*
+ * 2nd stage, 1st split: ISF0 to ISF2
+ *-------------------------------------------------------------------*/
+
+/* ISF codebook - 46b, 2nd stage, 1st split (only in AMR-WB IO mode) */
+const Word16 dico21_isf_46b_fx[] =
+{/*Qlog2(2.56)*/
+ 329, 409, 249,
+ -33, 505, 160,
+ -29, -14, 582,
+ -262, 127, 354,
+ 145, 237, 175,
+ -152, 245, 122,
+ 27, 42, 340,
+ -84, -93, 311,
+ 285, 222, -156,
+ 47, -43, -504,
+ 234, 121, 385,
+ 104, -317, 45,
+ 176, 195, 8,
+ 104, -59, -94,
+ 177, 53, 192,
+ -34, -127, 152,
+ 570, 277, -34,
+ -67, -329, -639,
+ -157, -272, 462,
+ -177, -462, 198,
+ 322, 179, 115,
+ -386, 171, 19,
+ 19, -12, 195,
+ -120, -252, 201,
+ 304, 36, -336,
+ -128, -221, -380,
+ 171, -185, 296,
+ -242, -312, 23,
+ 198, 39, 16,
+ -3, -177, -111,
+ 111, -93, 76,
+ -92, -223, 4,
+ 177, 406, -44,
+ -168, 380, -149,
+ -4, 273, 331,
+ -420, 513, 277,
+ 21, 247, 47,
+ -58, 131, -2,
+ -3, 134, 180,
+ -145, 40, 175,
+ 189, 74, -145,
+ -27, -45, -325,
+ 370, -114, -21,
+ -83, -415, -173,
+ 77, 95, -51,
+ -40, -30, -67,
+ 71, 88, 86,
+ -35, -98, 14,
+ 69, 197, -334,
+ -196, 79, -231,
+ -348, -137, 218,
+ -352, -89, -85,
+ 47, 201, -130,
+ -165, 37, -15,
+ -43, 3, 86,
+ -161, -108, 79,
+ 83, 21, -237,
+ -81, -149, -238,
+ 150, -186, -251,
+ -186, -249, -162,
+ -19, 66, -139,
+ -26, -50, -181,
+ 24, 11, 0,
+ -130, -105, -98
+};
+
+/*-------------------------------------------------------------------*
+ * 2nd stage, 2nd split: ISF3 to ISF5
+ *-------------------------------------------------------------------*/
+
+/* ISF codebook - 46b, 2nd stage, 2st split (only in AMR-WB IO mode) */
+const Word16 dico22_isf_46b_fx[] =
+{/*Qlog2(2.56)*/
+ -127, 310, 42,
+ -242, 197, 5,
+ -151, 84, -17,
+ -214, 127, -149,
+ -247, -131, 159,
+ -268, -267, -95,
+ -217, 1, -79,
+ -271, -80, -185,
+ -45, 436, 159,
+ 165, 199, 391,
+ -33, 81, 187,
+ -66, -42, 355,
+ -298, -57, 343,
+ -108, -537, 226,
+ -144, -23, 193,
+ 176, -402, 87,
+ 53, 296, 25,
+ -84, 253, -104,
+ -58, 105, -126,
+ -169, 174, -314,
+ -48, 44, -294,
+ -164, -417, -242,
+ -139, 3, -194,
+ -155, -207, -211,
+ 119, 322, 213,
+ 333, 50, 380,
+ 237, 247, -2,
+ 466, -16, 201,
+ 238, -255, -107,
+ 67, -440, -149,
+ 122, -88, -139,
+ 88, -247, -73,
+ -41, 231, 167,
+ -62, 155, 16,
+ -65, 16, 77,
+ -68, -2, -63,
+ -151, -300, 160,
+ -18, -333, 54,
+ -56, -94, 5,
+ 2, -190, 14,
+ 92, 148, 209,
+ 108, 9, 272,
+ 108, 35, 110,
+ 142, -85, 145,
+ 47, -157, 279,
+ 3, -320, 246,
+ 43, -72, 68,
+ 86, -217, 135,
+ 36, 140, 79,
+ 56, 175, -49,
+ 26, 45, 3,
+ 73, 55, -101,
+ 109, -183, -242,
+ -4, -283, -242,
+ 48, -68, -48,
+ -6, -153, -122,
+ 161, 196, 96,
+ 232, 80, 190,
+ 165, 97, 11,
+ 258, -31, 71,
+ 267, -77, -91,
+ 311, -209, 87,
+ 152, -14, -22,
+ 150, -149, 9,
+ -324, 557, 187,
+ -384, 307, 46,
+ -251, 27, 77,
+ -365, 77, -52,
+ -482, -84, 160,
+ -424, -515, -64,
+ -294, -120, -4,
+ -476, -116, -109,
+ -97, 318, 365,
+ 106, 627, 445,
+ -190, 120, 287,
+ -146, 65, 619,
+ -427, 242, 363,
+ -361, -371, 432,
+ -347, 102, 168,
+ -629, 195, -14,
+ -65, 476, -47,
+ -297, 320, -168,
+ -55, 356, -264,
+ -391, 82, -286,
+ -51, -31, -556,
+ -178, -399, -586,
+ -205, -49, -360,
+ -343, -238, -337,
+ 220, 457, 58,
+ 561, 467, 259,
+ 340, 270, -168,
+ 450, 77, -280,
+ 60, 167, -413,
+ 133, -252, -492,
+ 216, 157, -290,
+ 282, 0, -495,
+ -226, 293, 183,
+ -157, 135, 122,
+ -158, -59, 39,
+ -133, -118, -97,
+ -332, -309, 113,
+ -160, -425, -6,
+ -149, -211, 24,
+ -80, -277, -90,
+ -11, 125, 338,
+ 130, -71, 465,
+ 5, -45, 184,
+ 237, -95, 253,
+ -139, -197, 297,
+ -19, -300, 511,
+ -63, -152, 139,
+ 250, -289, 336,
+ 124, 339, -150,
+ 34, 176, -208,
+ 171, 166, -116,
+ 94, 38, -229,
+ 75, -65, -339,
+ -78, -205, -385,
+ 0, -30, -163,
+ -56, -110, -242,
+ 321, 244, 194,
+ 505, 238, -1,
+ 317, 116, 65,
+ 309, 88, -74,
+ 452, -51, -50,
+ 334, -217, -290,
+ 211, 41, -152,
+ 238, -55, -260
+};
+
+/*-------------------------------------------------------------------*
+ * 2nd stage, 3rd split: ISF6 to ISF8
+ *-------------------------------------------------------------------*/
+
+/* ISF codebook - 46b, 2nd stage, 3rd split (only in AMR-WB IO mode) */
+const Word16 dico23_isf_46b_fx[] =
+{/*Qlog2(2.56)*/
+ -10, 151, 359,
+ 136, 298, 223,
+ 255, -104, 290,
+ 423, 6, 183,
+ -270, -269, -98,
+ -52, -82, 13,
+ -82, -274, -97,
+ 90, -246, -72,
+ -299, -70, 421,
+ -88, 365, 430,
+ 187, -318, 381,
+ 380, 37, 488,
+ -373, -316, 79,
+ -308, -101, 5,
+ -135, -451, 8,
+ 72, -421, -154,
+ 180, 170, -121,
+ 62, 177, -40,
+ 326, 80, -105,
+ 248, 263, -5,
+ -168, -181, -221,
+ -2, -23, -158,
+ -14, -149, -121,
+ 119, -91, -147,
+ 119, 332, -153,
+ 49, 303, 34,
+ 442, -55, -69,
+ 217, 454, 58,
+ -359, -187, -375,
+ -42, 50, -274,
+ -8, -267, -249,
+ 85, -86, -346,
+ -77, -40, 345,
+ 89, 134, 219,
+ 156, -80, 160,
+ 108, 40, 116,
+ -158, -206, 29,
+ 5, -32, 175,
+ -65, -158, 146,
+ 55, -78, 73,
+ -114, -222, 353,
+ -47, 81, 211,
+ 49, -151, 268,
+ 105, 4, 302,
+ -263, -132, 183,
+ -151, -28, 201,
+ -177, -307, 166,
+ 101, -221, 130,
+ 74, 58, -98,
+ 32, 44, 13,
+ 194, 30, -142,
+ 170, 96, 8,
+ -136, -119, -91,
+ -65, 8, -55,
+ 3, -188, 12,
+ 45, -63, -49,
+ 149, -21, -19,
+ 24, 144, 95,
+ 254, -22, 60,
+ 161, 196, 96,
+ -158, -61, 48,
+ -70, 33, 82,
+ -23, -321, 58,
+ 155, -147, 5,
+ -364, 328, 77,
+ -21, 453, 173,
+ -108, 82, 630,
+ 367, 263, 208,
+ -300, -62, -176,
+ -205, 143, -158,
+ -169, -410, -264,
+ 257, -269, -100,
+ -636, 289, -2,
+ -292, 627, 173,
+ -382, -363, 387,
+ 248, 524, 447,
+ -521, -111, -107,
+ -395, 118, -274,
+ -343, -680, -125,
+ -172, -447, -663,
+ 75, 148, -367,
+ -79, 263, -94,
+ 249, 148, -286,
+ 380, 271, -162,
+ -142, -4, -186,
+ -57, 111, -125,
+ -35, -108, -254,
+ 100, 29, -242,
+ -80, 303, -264,
+ -78, 464, -57,
+ 248, -22, -494,
+ 661, 662, 44,
+ -193, -40, -330,
+ -178, 145, -337,
+ -90, -199, -400,
+ -40, -23, -498,
+ -192, 114, 315,
+ -41, 244, 190,
+ 88, -97, 485,
+ 241, 80, 212,
+ -246, 40, 87,
+ -156, 147, 134,
+ -2, -334, 239,
+ 308, -203, 110,
+ -459, 251, 422,
+ -218, 310, 228,
+ -86, -346, 654,
+ 184, 175, 425,
+ -481, -63, 169,
+ -349, 117, 188,
+ -125, -560, 310,
+ 158, -416, 94,
+ 46, 171, -192,
+ -63, 157, 14,
+ 256, -35, -271,
+ 322, 123, 53,
+ -214, 4, -76,
+ -156, 86, -18,
+ 128, -197, -232,
+ 265, -90, -98,
+ -308, 332, -145,
+ -131, 308, 58,
+ 509, 59, -339,
+ 562, 196, -14,
+ -378, 100, -47,
+ -234, 202, 1,
+ 104, -270, -493,
+ 319, -210, -325
+};
+
+/*-------------------------------------------------------------------*
+ * 2nd stage, 4th split: ISF9 to ISF11
+ *-------------------------------------------------------------------*/
+
+/* ISF codebook - 46b, 2nd stage, 4th split (only in AMR-WB IO mode) */
+const Word16 dico24_isf_46b_fx[] =
+{/*Qlog2(2.56)*/
+ -79, -89, -4,
+ -171, 77, -211,
+ 160, -193, 98,
+ 120, -103, 323,
+ 32, -22, -129,
+ 72, 78, -268,
+ 182, -76, -66,
+ 309, 99, -145,
+ -229, -157, -84,
+ -383, 98, -71,
+ -90, -352, 12,
+ -284, -178, 178,
+ -65, -125, -166,
+ -87, -175, -351,
+ 42, -198, -48,
+ 154, -140, -243,
+ -77, 18, 108,
+ -39, 355, 91,
+ 87, 8, 155,
+ -4, 158, 239,
+ 128, 95, -54,
+ 7, 246, -124,
+ 258, 15, 89,
+ 206, 216, 98,
+ -201, 9, 18,
+ -312, 233, 204,
+ -39, -174, 155,
+ -144, -9, 284,
+ -57, 70, -69,
+ -157, 187, 18,
+ 54, -30, 23,
+ 24, 135, 55
+};
+
+/*-------------------------------------------------------------------*
+ * 2nd stage, 1st split: ISF12 to ISF15
+ *-------------------------------------------------------------------*/
+
+/* ISF codebook - 46b, 2nd stage, 5th split (only in AMR-WB IO mode) */
+const Word16 dico25_isf_46b_fx[] =
+{/*Qlog2(2.56)*/
+ 169, 142, -119, 115,
+ 206, -20, 94, 226,
+ -106, 313, -21, 16,
+ -62, 161, 71, 255,
+ -89, 101, -185, 125,
+ 72, -30, -201, 344,
+ -258, 33, -8, 81,
+ -104, -154, 72, 296,
+ 144, -68, -268, -25,
+ 81, -78, -87, 106,
+ 22, 155, -186, -119,
+ -46, -28, 27, 91,
+ -114, -37, -175, -33,
+ -94, -222, -189, 122,
+ -132, -119, -191, -270,
+ -172, -173, 18, -43,
+ 279, 135, -42, -128,
+ 187, -86, 229, -138,
+ 159, 240, 140, 46,
+ 69, 25, 227, 77,
+ 21, 115, 13, 8,
+ 68, -248, 126, 81,
+ -150, 137, 207, -9,
+ -154, -133, 289, 67,
+ 143, -37, -86, -326,
+ 180, -32, 19, -23,
+ 26, 168, 116, -233,
+ -32, -26, 118, -78,
+ 3, -8, -45, -115,
+ 57, -215, -54, -83,
+ -209, 112, -22, -167,
+ -91, -151, 168, -262
+};
+
+
+/*-------------------------------------------------------------------*
+ * AMR-WB ISF codebook - 36bits, 2 stages, 1st stage common with the
+ * 46bit codebook,3 splits in the 2nd stage
+ *
+ * codebook vector dimension number of vectors
+ * ~~~~~~~~ ~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
+ * 2_1 5 128
+ * 2_2 4 128
+ * 2_3 7 64
+ *-------------------------------------------------------------------*/
+
+/*-------------------------------------------------------------------*
+ * 2nd stage, 1st split: ISF0 to ISF4
+ *-------------------------------------------------------------------*/
+
+/* ISF codebook - 36b, 2nd stage, 1st split (only in AMR-WB IO mode) */
+const Word16 dico21_isf_36b_fx[] =
+{/*Qlog2(2.56)*/
+ -52, -96, 212, 315, -73,
+ 82, -204, 363, 136, -197,
+ -126, -331, 183, 218, 143,
+ -49, -41, 557, 230, 72,
+ 2, -73, 163, 377, 221,
+ 133, 111, 278, 215, -110,
+ -102, -20, 284, 113, 273,
+ 84, 319, 290, 18, 85,
+ -25, -5, 125, 132, -204,
+ -38, -5, 286, -9, -356,
+ -140, -256, 92, 117, -189,
+ -144, 191, 313, 51, -98,
+ 167, -10, 44, 247, 36,
+ 381, 197, 238, 74, 6,
+ 38, -408, 29, -3, -85,
+ 92, 266, 157, -25, -200,
+ 161, -121, 70, 84, -140,
+ -16, -86, 112, -94, -189,
+ -269, -270, 351, 107, -24,
+ -68, -67, 492, -103, -155,
+ -53, -131, 62, 122, 10,
+ 135, 84, 283, -55, -120,
+ -12, -219, 331, -81, 167,
+ 220, -136, 147, -172, -42,
+ 140, -95, -109, -88, -194,
+ 0, -2, -4, -33, -381,
+ -66, -217, 152, -186, -402,
+ 244, 108, 156, -140, -395,
+ 113, -136, -196, 110, -24,
+ 214, 118, 11, -64, -131,
+ -110, -286, -6, -332, 16,
+ 94, 97, 79, -291, -205,
+ -5, -39, -20, 252, -96,
+ 76, 174, 101, 163, 61,
+ -69, -239, -55, 399, 6,
+ -115, 319, 164, 275, 196,
+ -15, 36, -47, 331, 121,
+ 226, 209, 271, 325, 184,
+ 13, -80, -218, 471, 353,
+ 288, 378, 16, -51, 251,
+ 174, 116, 52, 149, -279,
+ 235, 276, 39, 120, -48,
+ 0, -108, -108, 241, -339,
+ -93, 534, 45, 33, -87,
+ 194, 149, -71, 405, -44,
+ 409, 370, 81, -186, -154,
+ 25, -102, -448, 124, -173,
+ 22, 408, -110, -310, -214,
+ -26, 23, -83, 114, 14,
+ -110, 164, 52, 223, -82,
+ 37, -25, -263, 306, -15,
+ -466, 415, 292, 165, -18,
+ 29, -19, -171, 155, 182,
+ 179, 144, -27, 231, 258,
+ -103, -247, -396, 238, 113,
+ 375, -154, -109, -4, 156,
+ 98, 85, -292, -5, -124,
+ 116, 139, -116, -98, -294,
+ -14, -83, -278, -117, -378,
+ 106, 33, -106, -344, -484,
+ 119, 17, -412, 138, 166,
+ 384, 101, -204, 88, -156,
+ -121, -284, -300, -1, -166,
+ 280, 33, -152, -313, -81,
+ -37, 22, 229, 153, 37,
+ -60, -83, 236, -8, -41,
+ -169, -228, 126, -20, 363,
+ -235, 17, 364, -156, 156,
+ -25, -30, 72, 144, 156,
+ 153, -26, 256, 97, 144,
+ -21, -37, 48, -65, 250,
+ 63, 77, 273, -128, 124,
+ -129, -26, 40, 9, -115,
+ -6, 82, 38, -90, -182,
+ -336, -13, 28, 158, 91,
+ -30, 241, 137, -170, -17,
+ 146, 14, -11, 33, 61,
+ 192, 197, 54, -84, 85,
+ 23, -200, -78, -29, 140,
+ 122, 237, 106, -341, 136,
+ -57, -142, -85, -16, -74,
+ -59, -90, -8, -187, -20,
+ -211, -267, 216, -179, -110,
+ -50, -7, 220, -267, -70,
+ -57, -42, -17, -15, 71,
+ 32, 21, 63, -137, 33,
+ -137, -175, 104, -68, 97,
+ -67, -43, 133, -301, 221,
+ -116, -200, -81, -92, -272,
+ -64, -41, -54, -244, -220,
+ -287, -242, -50, -87, -89,
+ -245, 236, 102, -166, -295,
+ 66, 24, -162, -71, 95,
+ 66, 136, -90, -220, -36,
+ -98, -161, -222, -188, 29,
+ -18, 18, -19, -415, 9,
+ 49, 61, 100, 39, -56,
+ -111, 82, 135, -31, 52,
+ -90, -153, -93, 189, 182,
+ -214, 295, 119, -74, 284,
+ 2, 137, 37, 47, 182,
+ 92, 117, 184, -53, 373,
+ -21, -14, -35, 136, 391,
+ 146, 129, -164, -28, 333,
+ 92, 80, -84, 100, -134,
+ -8, 217, -32, 3, -47,
+ -151, 251, -215, 142, 92,
+ -224, 310, -172, -275, 98,
+ 159, 155, -177, 112, 53,
+ 205, 27, 8, -240, 192,
+ 169, 120, -319, -201, 106,
+ 11, 36, -86, -237, 455,
+ -109, -154, -163, 174, -55,
+ -38, 32, -101, -78, -59,
+ -205, -321, -97, 69, 79,
+ -310, 44, 18, -185, 34,
+ -115, -20, -148, -39, 203,
+ -29, 154, -30, -158, 166,
+ -45, -131, -317, -24, 363,
+ -165, -205, -112, -222, 265,
+ -32, -44, -150, 54, -193,
+ -6, -38, -255, -169, -115,
+ -266, 87, -189, -36, -169,
+ -60, -87, -266, -436, -170,
+ -68, -81, -278, 24, 38,
+ -23, -19, -155, -256, 141,
+ -61, -226, -565, -175, 71,
+ 9, -29, -237, -515, 263
+};
+
+/*-------------------------------------------------------------------*
+ * 2nd stage, 2nd split: ISF5 to ISF8
+ *-------------------------------------------------------------------*/
+
+/* ISF codebook - 36b, 2nd stage, 2nd split (only in AMR-WB IO mode) */
+
+const Word16 dico22_isf_36b_fx[] =
+{/*Qlog2(2.56)*/
+ -298, -6, 95, 31,
+ -213, -87, -122, 261,
+ 4, -49, 208, 14,
+ -129, -110, 30, 118,
+ -214, 258, 110, -235,
+ -41, -18, -126, 120,
+ 103, 65, 127, -37,
+ 126, -36, -24, 25,
+ -138, -67, -278, -186,
+ -164, -194, -201, 78,
+ -211, -87, -51, -221,
+ -174, -79, -94, -39,
+ 23, -6, -157, -240,
+ 22, -110, -153, -68,
+ 148, -5, -2, -149,
+ -1, -135, -39, -179,
+ 68, 360, -117, -15,
+ 137, 47, -278, 146,
+ 136, 260, 135, 65,
+ 61, 116, -45, 97,
+ 231, 379, 87, -120,
+ 338, 177, -272, 3,
+ 266, 156, 28, -69,
+ 260, 84, -85, 86,
+ -266, 154, -256, -182,
+ -17, -65, -304, -6,
+ -40, 175, -151, -180,
+ -27, 27, -87, -63,
+ 121, 114, -166, -469,
+ 159, -66, -323, -231,
+ 214, 152, -141, -212,
+ 137, 36, -184, -51,
+ -282, -237, 40, 10,
+ -48, -235, -37, 251,
+ -54, -323, 136, 29,
+ -88, -174, 213, 198,
+ -390, 99, -63, -375,
+ 107, -169, -164, 424,
+ 69, -111, 141, -167,
+ 74, -129, 65, 144,
+ -353, -207, -205, -109,
+ -160, -386, -355, 98,
+ -176, -493, -20, -143,
+ -252, -432, -2, 216,
+ -90, -174, -168, -411,
+ 13, -284, -229, -160,
+ -87, -279, 34, -251,
+ -75, -263, -58, -42,
+ 420, 53, -211, -358,
+ 384, -35, -374, 396,
+ 68, -228, 323, -2,
+ 167, -307, 192, 194,
+ 459, 329, -5, -332,
+ 375, 79, -7, 313,
+ 282, -124, 200, -92,
+ 271, -162, -70, 180,
+ -157, -298, -514, -309,
+ 58, -163, -546, 18,
+ 124, -364, 167, -238,
+ 83, -411, -117, 96,
+ 140, -112, -388, -624,
+ 259, -133, -317, 41,
+ 163, -130, -64, -334,
+ 226, -165, -124, -110,
+ -466, -61, 6, 229,
+ -153, 205, -145, 242,
+ -159, 48, 195, 148,
+ -58, 28, 31, 279,
+ -303, 185, 279, -4,
+ -61, 197, 59, 86,
+ -114, 123, 168, -52,
+ 35, 36, 100, 126,
+ -407, 102, -77, -40,
+ -338, -1, -342, 156,
+ -179, 105, -34, -97,
+ -185, 84, -35, 108,
+ -133, 107, -91, -357,
+ -180, 54, -229, 24,
+ -44, 47, 47, -182,
+ -66, 13, 45, 4,
+ -339, 251, 64, 226,
+ -42, 101, -350, 275,
+ -99, 398, 142, 121,
+ 111, 12, -102, 260,
+ 0, 505, 260, -94,
+ 161, 285, -96, 224,
+ -4, 206, 314, 33,
+ 167, 139, 88, 204,
+ -235, 316, -60, -25,
+ -8, -150, -312, 201,
+ -36, 292, 61, -104,
+ -40, 174, -162, 42,
+ -21, 402, -29, -351,
+ 21, 152, -360, -93,
+ 57, 191, 212, -196,
+ 76, 158, -21, -69,
+ -328, -185, 331, 119,
+ -53, 285, 56, 337,
+ -107, -24, 405, 29,
+ -18, 137, 272, 277,
+ -255, 22, 173, -191,
+ 295, 322, 325, 302,
+ 21, -27, 332, -178,
+ 119, 13, 271, 129,
+ -455, -180, 116, -191,
+ -227, 62, -148, 524,
+ -176, -287, 282, -157,
+ -243, 13, 199, 430,
+ -59, -49, 115, -365,
+ 72, -172, -137, 93,
+ -138, -126, 141, -84,
+ 5, -124, 38, -20,
+ -258, 311, 601, 213,
+ 94, 130, -61, 502,
+ -1, -157, 485, 313,
+ 146, -74, 158, 345,
+ 276, 135, 280, -57,
+ 490, 252, 99, 43,
+ 267, -74, 429, 105,
+ 278, -23, 119, 94,
+ -542, 488, 257, -115,
+ -84, -244, -438, 478,
+ -113, -545, 387, 101,
+ -95, -306, 111, 498,
+ 95, 166, 22, -301,
+ 420, -15, -58, -78,
+ 270, 29, 122, -282,
+ 160, -240, 50, -38
+};
+
+/*-------------------------------------------------------------------*
+ * 2nd stage, 3rd split: ISF9 to ISF15
+ *-------------------------------------------------------------------*/
+
+/* ISF codebook - 36b, 2nd stage, 3rd split (only in AMR-WB IO mode) */
+const Word16 dico23_isf_36b_fx[] =
+{/*Qlog2(2.56)*/
+ 81, -18, 68, -27, -122, -280, -4,
+ 45, -177, 209, -30, -136, -74, 131,
+ -44, 101, -75, -88, -48, -137, -54,
+ -245, -28, 63, -18, -112, -103, 58,
+ -79, -6, 220, -65, 114, -35, -50,
+ 109, -65, 143, -114, 129, 76, 125,
+ 166, 90, -61, -242, 186, -74, -43,
+ -46, -92, 49, -227, 24, -155, 39,
+ 67, 85, 99, -42, 53, -184, -281,
+ 142, -122, 0, 21, -142, -15, -17,
+ 223, 92, -21, -48, -82, -14, -167,
+ 51, -37, -243, -30, -90, 18, -56,
+ 54, 105, 74, 86, 69, 13, -101,
+ 196, 72, -89, 43, 65, 19, 39,
+ 121, 34, 131, -82, 25, 213, -156,
+ 101, -102, -136, -21, 57, 214, 22,
+ 36, -124, 205, 204, 58, -156, -83,
+ 83, -117, 137, 137, 85, 116, 44,
+ -92, -148, -68, 11, -102, -197, -220,
+ -76, -185, -58, 132, -26, -183, 85,
+ -7, -31, -2, 23, 205, -151, 10,
+ -27, -37, -5, -18, 292, 131, 1,
+ 117, -168, 9, -93, 80, -59, -125,
+ -182, -244, 98, -24, 135, -22, 94,
+ 221, 97, 106, 42, 43, -160, 83,
+ 25, -64, -21, 6, 14, -15, 154,
+ 126, 15, -140, 150, -10, -207, -114,
+ 79, -63, -211, -70, -28, -217, 165,
+ 46, 38, -22, 281, 132, -62, 109,
+ 112, 54, -112, -93, 208, 27, 296,
+ 115, 10, -147, 41, 216, 42, -276,
+ 50, -115, -254, 167, 117, -2, 61,
+ 17, 144, 34, -72, -186, -150, 272,
+ -29, -66, -89, -95, -149, 129, 251,
+ 122, 0, -50, -234, -91, 36, 26,
+ -105, -102, -88, -121, -236, -7, -11,
+ -204, 109, 5, -191, 105, -15, 163,
+ -80, 32, -24, -209, 41, 294, 70,
+ -106, -94, -204, -118, 120, -50, -37,
+ -82, -241, 46, -131, -29, 150, -55,
+ 33, 155, 120, -89, -8, 7, 62,
+ 213, 82, 61, 18, -161, 144, 152,
+ 30, 131, 65, -87, -255, -17, -107,
+ -8, 85, -64, 51, -162, 223, -53,
+ -134, 261, 69, -56, 218, 72, -111,
+ 2, 155, -113, -87, 49, 85, -28,
+ -163, 42, -1, -196, 7, 39, -245,
+ 14, -137, -79, 11, -160, 202, -293,
+ -94, 33, 208, 100, 56, -44, 326,
+ -78, -41, 232, 13, -142, 227, 80,
+ -16, -87, 201, 33, -133, 15, -183,
+ -58, -192, -47, 184, -128, 133, 99,
+ -205, 11, -155, 78, 52, 72, 141,
+ -246, 26, 99, 151, 59, 115, -64,
+ -79, -47, -16, -14, 6, 47, -43,
+ -72, -178, -27, 162, 112, 43, -174,
+ -175, 238, 186, 71, -54, -188, -76,
+ -225, 233, 39, -39, -158, 122, 44,
+ -26, 43, 84, 130, -93, -51, 22,
+ 3, 92, -150, 136, -182, -57, 97,
+ -131, 179, -78, 80, 91, -165, 90,
+ -2, 148, 15, 130, 65, 175, 117,
+ -138, 114, -137, 132, 3, -10, -186,
+ 140, -4, -37, 254, -62, 92, -109
+};
+
+/*-------------------------------------------------------------------*
+ * AMR-WB ISF codebook for SID - 28bits, 1 stage, 5 splits
+ *
+ * codebook vector dimension number of vectors
+ * ~~~~~~~~ ~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
+ * 1 2 64
+ * 2 3 64
+ * 3 3 64
+ * 4 4 32
+ * 5 4 32
+ *-------------------------------------------------------------------*/
+
+/*-------------------------------------------------------------------*
+ * 1st stage, 1st split: ISF0 to ISF1
+ *-------------------------------------------------------------------*/
+
+/* ISF codebook for SID frames - 28b, 1st split */
+const Word16 dico1_ns_28b_fx[] =
+{/*Qlog2(2.56)*/
+ -269, -673,
+ -222, -537,
+ -233, -430,
+ -138, -451,
+ -212, -331,
+ -192, -241,
+ -87, -231,
+ -191, -128,
+ -70, -106,
+ -164, -6,
+ 74, -179,
+ 27, -33,
+ -102, 74,
+ -162, 115,
+ -94, 172,
+ -6, 130,
+ -143, 234,
+ 14, 218,
+ -65, 270,
+ 88, 182,
+ -124, 341,
+ -44, 381,
+ 38, 335,
+ 117, 274,
+ -112, 454,
+ 74, 431,
+ -5, 488,
+ 175, 384,
+ -83, 561,
+ 122, 529,
+ 21, 601,
+ 229, 481,
+ 231, 303,
+ 226, 608,
+ 300, 372,
+ 210, 187,
+ 306, 265,
+ 328, 473,
+ 382, 331,
+ 371, 132,
+ 139, 58,
+ 365, 21,
+ 250, -82,
+ 443, 218,
+ 483, 110,
+ 426, 415,
+ 579, 222,
+ 518, 333,
+ 573, 448,
+ 455, 529,
+ 685, 329,
+ 332, 580,
+ 595, 593,
+ 468, 645,
+ 762, 517,
+ 326, 709,
+ 485, 793,
+ 130, 684,
+ 671, 737,
+ 354, 876,
+ 88, 806,
+ -65, 706,
+ -35, 1016,
+ 266, 1123
+};
+
+/*-------------------------------------------------------------------*
+ * 1st stage, 2ndt split: ISF2 to ISF4
+ *-------------------------------------------------------------------*/
+
+/* ISF codebook for SID frames - 28b, 2nd spilt */
+const Word16 dico2_ns_28b_fx[] =
+{/*Qlog2(2.56)*/
+ -824, -884, -949,
+ -805, -456, -418,
+ -442, -438, -541,
+ -217, -578, -793,
+ -168, -444, -582,
+ -287, -492, -274,
+ -552, -297, -300,
+ -163, -333, -358,
+ -370, -232, -232,
+ -175, -358, -159,
+ -381, -21, -357,
+ -184, -159, -162,
+ -53, -191, -280,
+ 18, -267, -215,
+ -138, 61, -283,
+ 71, -95, -294,
+ 13, -156, -546,
+ 0, -83, -79,
+ 44, 97, -316,
+ 178, -52, -213,
+ 222, -261, -422,
+ 237, -118, -44,
+ 141, 145, -132,
+ 363, 81, -287,
+ 213, 65, 34,
+ -107, 94, -5,
+ 91, -29, 126,
+ -355, 51, -41,
+ -219, -76, 145,
+ -63, 100, 244,
+ -719, 44, 27,
+ -572, -124, 155,
+ -423, 133, 315,
+ -917, 71, 224,
+ -268, 318, 131,
+ -93, -190, 420,
+ -97, 122, 491,
+ -79, 317, 355,
+ 130, 100, 325,
+ 86, -293, 210,
+ 133, 258, 161,
+ 176, -73, 465,
+ 195, 300, 384,
+ 348, 22, 221,
+ 376, 183, 409,
+ 377, 286, 202,
+ 242, 213, 659,
+ 257, 565, 248,
+ 344, 408, -76,
+ 405, 440, 509,
+ 612, 385, 379,
+ 536, 607, 216,
+ -56, 582, 192,
+ 100, 517, 567,
+ -365, 448, 445,
+ 728, 347, 10,
+ 505, 357, 759,
+ 636, 582, 658,
+ 335, 517, 852,
+ 378, 809, 572,
+ -195, 878, 829,
+ 529, 707, 987,
+ 918, 726, 392,
+ 1250, 997, 1063
+};
+
+/*-------------------------------------------------------------------*
+ * 1st stage, 3rd split: ISF5 to ISF7
+ *-------------------------------------------------------------------*/
+
+/* ISF codebook for SID frames - 28b, 3rd spilt */
+const Word16 dico3_ns_28b_fx[] =
+{/*Qlog2(2.56)*/
+ -805, -838, -774,
+ -522, -627, -828,
+ -477, -486, -603,
+ -295, -481, -634,
+ -366, -384, -393,
+ -186, -414, -396,
+ -237, -394, -106,
+ -252, -202, -275,
+ -61, -177, -442,
+ -84, -198, -199,
+ -179, -125, -31,
+ -72, -47, -163,
+ -298, -220, 215,
+ -64, -168, 251,
+ -133, 156, -59,
+ -30, -2, 127,
+ 54, 66, -61,
+ -233, 21, 251,
+ 209, -50, 32,
+ 33, 194, 136,
+ -117, -18, 475,
+ 202, 46, 309,
+ 256, 185, 53,
+ 35, 200, 390,
+ 200, 263, 242,
+ -216, 302, 294,
+ 128, 358, 0,
+ 19, 431, 287,
+ 224, 447, 280,
+ 367, 165, 213,
+ 397, 314, 319,
+ 383, 379, 75,
+ 277, 325, 462,
+ 394, 505, 334,
+ 251, 98, -213,
+ 450, 153, 448,
+ 565, 226, 76,
+ 470, 383, 502,
+ 635, 390, 278,
+ 237, 135, 620,
+ 342, 401, 649,
+ 331, 551, 518,
+ 130, 418, 592,
+ 531, 306, 737,
+ 729, 389, 580,
+ 497, 557, 699,
+ 296, 383, 874,
+ 283, 624, 759,
+ 126, 622, 476,
+ 559, 595, 472,
+ 382, 770, 616,
+ 719, 613, 745,
+ 540, 639, 928,
+ 517, 826, 801,
+ 684, 811, 604,
+ 752, 786, 857,
+ 933, 661, 350,
+ 694, 450, 1061,
+ 562, 911, 1051,
+ 824, 813, 1104,
+ 758, 1047, 882,
+ 1140, 917, 889,
+ 1039, 1246, 1426,
+ 1483, 1666, 1876
+};
+
+/*-------------------------------------------------------------------*
+ * 1st stage, 4th split: ISF8 to ISF11
+ *-------------------------------------------------------------------*/
+
+/* ISF codebook for SID frames - 28b, 4th spilt */
+const Word16 dico4_ns_28b_fx[] =
+{/*Qlog2(2.56)*/
+ -776, -854, -891, -920,
+ -552, -610, -663, -741,
+ -321, -370, -476, -565,
+ 274, -160, -456, 201,
+ 265, 67, -160, -306,
+ -8, -210, 79, 272,
+ 163, 236, 307, 308,
+ 578, 317, 64, 298,
+ -9, 197, 342, 620,
+ 343, 232, 314, 622,
+ 173, 149, 548, 527,
+ 356, 370, 481, 376,
+ 135, 444, 488, 556,
+ 391, 471, 487, 653,
+ 228, 424, 576, 835,
+ 422, 372, 722, 682,
+ 295, 673, 693, 635,
+ 539, 596, 590, 449,
+ 475, 618, 659, 818,
+ 735, 517, 491, 673,
+ 602, 346, 257, 877,
+ 625, 635, 849, 720,
+ 727, 818, 698, 595,
+ 653, 481, 690, 1139,
+ 814, 762, 704, 908,
+ 507, 747, 898, 936,
+ 848, 855, 924, 785,
+ 646, 1037, 882, 795,
+ 772, 845, 1024, 1151,
+ 1133, 983, 818, 921,
+ 940, 1068, 1252, 1302,
+ 1588, 1767, 1718, 1513
+};
+
+/*-------------------------------------------------------------------*
+ * 1st stage, 5th split: ISF12 to ISF15
+ *-------------------------------------------------------------------*/
+
+/* ISF codebook for SID frames - 28b, 5th spilt */
+const Word16 dico5_ns_28b_fx[] =
+{/*Qlog2(2.56)*/
+ -810, -879, -945, -254,
+ 248, 184, 671, 128,
+ 288, 703, 918, 99,
+ 658, 558, 662, 219,
+ 552, 585, 910, 208,
+ 559, 804, 759, 119,
+ 606, 774, 921, -139,
+ 782, 761, 748, 208,
+ 756, 708, 983, 56,
+ 544, 864, 1010, 152,
+ 737, 698, 987, 299,
+ 771, 924, 879, 103,
+ 536, 785, 961, 405,
+ 667, 916, 801, 328,
+ 738, 705, 773, 439,
+ 823, 871, 992, 355,
+ 640, 1004, 1052, 369,
+ 724, 822, 949, 597,
+ 415, 655, 729, 482,
+ 1009, 896, 793, 363,
+ 908, 803, 687, -25,
+ 1016, 838, 1011, 189,
+ 947, 1112, 942, 222,
+ 914, 1049, 981, 527,
+ 956, 987, 1011, -120,
+ 781, 1049, 1121, 92,
+ 1178, 1053, 884, 47,
+ 1123, 1059, 1182, 118,
+ 933, 972, 1277, 357,
+ 1109, 918, 1101, 503,
+ 1039, 1286, 1220, 317,
+ 1351, 1207, 1010, 326
+}; /*1.28f Q1*/
+
+const Word16 means_nb_31bits_ma_lsf[16] = { 861 /*336.3281f*1.28f Q1*/, 1360 /*531.2500f*1.28f Q1*/, 2270 /*886.7188f*1.28f Q1*/, 3243 /*1266.7969f*1.28f Q1*/, 4171 /*1629.2969f*1.28f Q1*/, 5052 /*1973.4375f*1.28f Q1*/, 6012 /*2348.4375f*1.28f Q1*/, 6776 /*2646.8750f*1.28f Q1*/, 7676 /*2998.4375f*1.28f Q1*/, 8428 /*3292.1875f*1.28f Q1*/, 9194 /*3591.4062f*1.28f Q1*/, 9744 /*3806.2500f*1.28f Q1*/, 10580 /*4132.8125f*1.28f Q1*/, 11911 /*4652.7344f*1.28f Q1*/, 13440 /*5250.0000f*1.28f Q1*/, 15061 /*5883.2031f*1.28f Q1*/ };
+const Word16 means_wb_31bits_ma_lsf[16] = { 818 /*319.5312f*1.28f Q1*/, 1403 /*548.0469f*1.28f Q1*/, 2392 /*934.3750f*1.28f Q1*/, 3465 /*1353.5156f*1.28f Q1*/, 4429 /*1730.0781f*1.28f Q1*/, 5428 /*2120.3125f*1.28f Q1*/, 6414 /*2505.4688f*1.28f Q1*/, 7323 /*2860.5469f*1.28f Q1*/, 8304 /*3243.7500f*1.28f Q1*/, 9221 /*3601.9531f*1.28f Q1*/, 10162 /*3969.5312f*1.28f Q1*/, 11091 /*4332.4219f*1.28f Q1*/, 12125 /*4736.3281f*1.28f Q1*/, 13153 /*5137.8906f*1.28f Q1*/, 14241 /*5562.8906f*1.28f Q1*/, 15266 /*5963.2812f*1.28f Q1*/ };
+
+
+const Word16 *lsf_means[2] = { means_wb_31bits_ma_lsf, means_nb_31bits_ma_lsf };
+
+const lsp_unw_triplet p16_gamma0_92to1[16] = /* Q14 */
+{
+ { 0, 19622, -9695 },
+ { -14938, 29357, -13258 },
+ { -8483, 23708, -13414 },
+ { -7350, 22410, -12305 },
+ { -7397, 21417, -12160 },
+ { -7071, 19878, -11229 },
+ { -7144, 19877, -11326 },
+ { -6423, 17194, -9613 },
+ { -7407, 18024, -9695 },
+ { -6972, 16339, -8191 },
+ { -8220, 17625, -8422 },
+ { -8159, 17459, -8289 },
+ { -8700, 19066, -9508 },
+ { -7986, 17629, -8607 },
+ { -8503, 17203, -8109 },
+ { -7820, 14903, 0 }
+};
+
+const lsp_unw_triplet p16_gamma0_94to1[16] = /* Q14 */
+{
+ { 0, 12931, -6314 },
+ { -9364, 19577, -8870 },
+ { -5512, 16236, -9305 },
+ { -4892, 15366, -8398 },
+ { -4869, 14631, -8275 },
+ { -4631, 13358, -7540 },
+ { -4575, 13271, -7599 },
+ { -4151, 11403, -6385 },
+ { -4859, 11947, -6371 },
+ { -4504, 10805, -5407 },
+ { -5346, 11618, -5515 },
+ { -5418, 11578, -5424 },
+ { -5806, 12711, -6226 },
+ { -5205, 11592, -5606 },
+ { -5745, 11498, -5188 },
+ { -5473, 10245, 0 }
+};
+
+
+const Word16 dico_lsf_abs_8b[256 * M] = /*14Q1*1.28*/
+{
+ 966, 1761, 2937, 3740, 4574, 5488, 6457, 7398, 8355, 9289, 10254, 11211, 12247, 13202, 14221, 15172,
+ 1540, 2731, 3544, 4232, 5065, 5917, 6846, 7707, 8602, 9538, 10479, 11445, 12439, 13339, 14332, 15243,
+ 1414, 2201, 3469, 4160, 4832, 5563, 6504, 7493, 8507, 9423, 10261, 11087, 12014, 12887, 13935, 15041,
+ 1176, 2031, 3312, 4141, 4915, 5612, 6368, 7097, 7965, 8861, 9900, 10956, 12137, 13161, 14215, 15190,
+ 840, 1102, 1853, 3913, 4514, 5155, 5976, 6577, 7726, 8469, 9195, 9896, 12016, 13534, 14458, 15327,
+ 1165, 1552, 2467, 3520, 3933, 4902, 6085, 6607, 7652, 8343, 8922, 9577, 11002, 13331, 14521, 15310,
+ 1113, 1431, 2280, 3471, 3975, 4853, 5690, 6407, 7275, 8032, 8621, 9884, 12276, 13033, 13880, 15039,
+ 719, 1036, 1867, 2553, 4352, 5021, 5775, 6505, 7179, 7826, 9601, 11113, 12075, 12807, 14022, 15272,
+ 953, 1294, 1952, 2553, 3007, 5085, 6062, 6718, 8178, 8712, 9927, 11330, 12351, 13205, 14164, 15087,
+ 940, 1283, 2111, 2792, 3256, 3911, 6096, 6898, 7589, 9317, 10103, 10891, 11893, 12886, 13757, 15049,
+ 587, 903, 1795, 3140, 4297, 4853, 5479, 6468, 7886, 8442, 9844, 11336, 12043, 12793, 13911, 15151,
+ 861, 1323, 2258, 3258, 3853, 4815, 5824, 6684, 8004, 9358, 10709, 11951, 12810, 13582, 14465, 15216,
+ 758, 1202, 2449, 3134, 3694, 4423, 5673, 6885, 7835, 9014, 10027, 11120, 12196, 13199, 14218, 15199,
+ 1042, 1478, 2150, 3726, 4263, 4954, 6139, 6790, 7965, 8974, 9643, 10764, 12030, 12725, 13557, 14581,
+ 719, 926, 2434, 3748, 4185, 5032, 5661, 6815, 7286, 9180, 10365, 11159, 11991, 12918, 13824, 15248,
+ 715, 1008, 2245, 3846, 4283, 5859, 6516, 7754, 9005, 9791, 10611, 11473, 12342, 13216, 14190, 15177,
+ 972, 1282, 1856, 2557, 3020, 4536, 7105, 8030, 8649, 9405, 10103, 10712, 11575, 12633, 13608, 14745,
+ 813, 1132, 1994, 2990, 3472, 4041, 4711, 7349, 8285, 8967, 9924, 10497, 11905, 13402, 14503, 15358,
+ 897, 1260, 1953, 3238, 3878, 4495, 6373, 7420, 8046, 9326, 10330, 10893, 11883, 13155, 14226, 15156,
+ 772, 1190, 1952, 2591, 4617, 5613, 6788, 7715, 8323, 9061, 10103, 11442, 12520, 13313, 14105, 15130,
+ 648, 914, 1614, 2978, 3913, 5180, 6371, 7029, 7510, 8288, 10181, 11303, 12262, 13298, 14629, 15443,
+ 679, 934, 1510, 2061, 4006, 5506, 6056, 6653, 7326, 8996, 10254, 11800, 12686, 13410, 14130, 15080,
+ 536, 802, 1288, 2431, 4428, 4896, 5421, 6396, 8409, 9756, 10509, 11135, 12212, 13338, 14298, 15284,
+ 774, 1064, 1751, 2361, 3813, 5723, 6272, 7170, 7837, 9027, 9999, 10677, 11383, 12564, 14005, 15142,
+ 678, 938, 1492, 2025, 4146, 5207, 5984, 6738, 7509, 8781, 9766, 10948, 12156, 13220, 14217, 15296,
+ 639, 927, 1490, 2153, 4243, 5592, 6466, 7219, 7989, 9277, 10369, 11353, 12295, 13240, 14272, 15267,
+ 743, 1035, 1700, 2248, 3167, 5728, 6394, 7572, 8421, 9284, 10729, 11762, 12753, 13526, 14380, 15202,
+ 468, 692, 1255, 2740, 4287, 5357, 6462, 7499, 8537, 9503, 10499, 11458, 12457, 13393, 14352, 15260,
+ 734, 989, 1478, 1957, 2947, 5157, 6144, 7370, 8090, 8834, 9907, 11183, 12331, 13280, 14246, 15263,
+ 461, 681, 1659, 3534, 4547, 5654, 6632, 7664, 8623, 9608, 10561, 11542, 12490, 13438, 14368, 15271,
+ 792, 1113, 1855, 2398, 3238, 5817, 6524, 7434, 8483, 9164, 10021, 11002, 12178, 13218, 14316, 15216,
+ 658, 1008, 1970, 3074, 4543, 5908, 7154, 8105, 8980, 9832, 10606, 11401, 12264, 13165, 14158, 15163,
+ 1009, 1541, 2392, 3464, 4644, 5562, 6666, 7588, 8538, 9554, 10547, 11489, 12487, 13412, 14326, 15206,
+ 955, 1704, 3142, 3903, 4985, 6046, 7112, 8024, 8864, 9606, 10417, 11275, 12242, 13171, 14188, 15188,
+ 1152, 2084, 3441, 4308, 5341, 6367, 7465, 8361, 9258, 10034, 10799, 11569, 12435, 13295, 14269, 15192,
+ 1361, 2472, 3734, 4540, 5724, 6786, 7934, 8876, 9753, 10482, 11209, 11930, 12704, 13494, 14411, 15293,
+ 1448, 2793, 3997, 5078, 6382, 7418, 8278, 9062, 9827, 10479, 11193, 11976, 12798, 13632, 14523, 15357,
+ 1488, 2499, 3704, 4557, 5499, 6512, 7628, 8636, 9720, 10662, 11547, 12425, 13250, 13991, 14754, 15490,
+ 1099, 2055, 3146, 3872, 4700, 5675, 6721, 7670, 8652, 9638, 10640, 11603, 12561, 13473, 14404, 15285,
+ 575, 841, 1577, 3091, 3894, 4777, 5587, 6225, 8293, 8937, 9666, 10986, 12135, 13292, 14164, 15178,
+ 799, 1086, 1834, 2360, 3186, 5166, 5756, 7271, 8036, 8703, 9532, 10239, 11731, 13180, 14418, 15362,
+ 956, 1297, 2021, 2413, 4341, 5175, 5948, 6783, 7304, 8114, 9024, 9853, 10910, 12746, 14094, 15167,
+ 1288, 1856, 2407, 3125, 3686, 4421, 5672, 6339, 7288, 8274, 9315, 10205, 11191, 12856, 14483, 15463,
+ 1020, 1359, 2139, 2709, 3398, 4646, 5412, 6441, 7053, 7923, 9213, 10192, 11791, 13084, 14208, 15242,
+ 839, 1165, 2114, 2625, 3382, 3972, 5064, 7268, 7966, 8749, 9833, 12022, 13123, 13848, 14622, 15279,
+ 837, 1104, 1848, 2230, 3860, 4731, 5491, 6377, 6917, 8917, 10029, 10891, 12043, 12753, 13952, 15201,
+ 1136, 1564, 2097, 2558, 3026, 4824, 5743, 6459, 7664, 8183, 9819, 10837, 11538, 12762, 14193, 15309,
+ 1013, 1492, 2105, 2593, 3135, 5090, 6278, 6877, 7559, 8026, 9120, 10257, 11268, 12899, 14253, 15324,
+ 677, 952, 1578, 2156, 3456, 4665, 5545, 6815, 7822, 8967, 10044, 11143, 12218, 13205, 14269, 15290,
+ 560, 833, 1626, 2825, 4189, 5300, 5822, 6280, 7858, 9256, 10189, 11481, 12413, 13040, 14138, 15123,
+ 666, 1181, 2686, 3416, 4169, 5158, 6179, 7282, 8275, 9372, 10419, 11434, 12436, 13400, 14358, 15244,
+ 773, 1040, 1809, 3551, 4049, 5132, 5867, 6525, 7877, 8558, 9275, 10956, 12231, 13016, 14012, 15032,
+ 881, 1209, 1988, 3725, 4126, 5152, 6189, 6712, 8497, 9495, 10097, 11006, 12228, 13271, 14197, 15140,
+ 850, 1109, 2540, 3212, 3836, 4671, 5423, 6258, 6873, 7502, 9107, 10990, 12254, 13154, 14378, 15352,
+ 721, 954, 2751, 3694, 4320, 5071, 5825, 6738, 7291, 7984, 9289, 11579, 12483, 13254, 14338, 15260,
+ 1055, 1371, 1968, 3743, 4580, 4986, 5695, 6267, 7257, 8890, 9548, 10261, 11586, 12347, 13324, 15091,
+ 676, 972, 2112, 2850, 3753, 4728, 5494, 6367, 7285, 8675, 9943, 11368, 12460, 13350, 14172, 15122,
+ 1049, 1494, 2200, 3000, 3527, 5081, 6046, 6884, 8291, 9069, 10097, 11369, 12496, 13375, 14347, 15128,
+ 814, 1123, 2183, 2717, 3304, 3975, 5256, 6076, 7491, 8840, 10493, 11738, 12716, 13494, 14450, 15263,
+ 948, 1271, 2388, 3106, 3719, 4616, 5356, 6675, 7383, 7967, 9440, 11584, 12408, 13133, 13866, 14860,
+ 635, 881, 1924, 3907, 4384, 5217, 5950, 6984, 7695, 8650, 9877, 11108, 12074, 13120, 14245, 15282,
+ 762, 1028, 2283, 3533, 3943, 4563, 5144, 6692, 7423, 8653, 9739, 10969, 12023, 13103, 14147, 15192,
+ 579, 854, 1748, 3347, 3979, 4734, 5418, 7056, 8203, 9063, 10246, 11271, 12279, 13293, 14338, 15258,
+ 503, 768, 1465, 3077, 4620, 5151, 5798, 7143, 8378, 9391, 10401, 11373, 12315, 13200, 14113, 15106,
+ 717, 1002, 1807, 3675, 4066, 5418, 6034, 6837, 8445, 8980, 10353, 11755, 12753, 13520, 14476, 15232,
+ 672, 949, 1676, 3274, 4729, 5344, 6538, 7393, 8330, 9755, 10902, 11594, 12475, 13327, 14247, 15152,
+ 496, 912, 2757, 3804, 4833, 5819, 6853, 7814, 8753, 9709, 10654, 11604, 12540, 13471, 14395, 15300,
+ 775, 1049, 2302, 3012, 3920, 4950, 5709, 7219, 7761, 9746, 10544, 11297, 12044, 12831, 13700, 15084,
+ 1078, 1504, 2140, 3195, 3778, 4555, 5966, 6673, 7747, 8995, 9612, 10447, 11613, 12329, 13101, 14856,
+ 968, 1849, 3399, 4265, 5004, 5732, 6679, 7575, 8554, 9526, 10485, 11412, 12400, 13344, 14309, 15220,
+ 1199, 2464, 3945, 4913, 6009, 6786, 7495, 8106, 8835, 9620, 10520, 11438, 12438, 13342, 14319, 15235,
+ 1081, 2165, 3828, 4637, 5448, 6070, 6800, 7534, 8434, 9349, 10320, 11262, 12293, 13218, 14232, 15192,
+ 1083, 1694, 2537, 3083, 3771, 5128, 6256, 7141, 8587, 9530, 10324, 11062, 11832, 12707, 13900, 15104,
+ 925, 1244, 2121, 3433, 3834, 5306, 6241, 6848, 8344, 9060, 9700, 10464, 11277, 12214, 14081, 15400,
+ 773, 1006, 1754, 4566, 5209, 5778, 6451, 7124, 8069, 8706, 9253, 10001, 10837, 12064, 14326, 15356,
+ 620, 950, 1866, 3048, 4740, 5460, 5977, 6457, 7915, 9271, 9868, 10687, 11496, 12237, 13203, 15016,
+ 1104, 1439, 2275, 2648, 3695, 5401, 5983, 7243, 7860, 8327, 8987, 11178, 12399, 13141, 14208, 14977,
+ 1076, 1712, 2332, 3118, 4625, 5250, 6130, 7069, 7734, 8740, 10166, 11116, 12011, 12960, 13959, 14830,
+ 659, 949, 1548, 2807, 4382, 4952, 5938, 7089, 7729, 8587, 10547, 11148, 11668, 12528, 13953, 15131,
+ 618, 891, 1593, 3197, 3993, 4733, 5928, 6583, 7372, 9278, 10158, 10852, 12066, 13201, 14256, 15298,
+ 1226, 1611, 2351, 3438, 3930, 4616, 6358, 6975, 7675, 9306, 10025, 10545, 11077, 12750, 14164, 15269,
+ 680, 957, 1852, 3036, 3864, 5284, 5883, 6570, 7132, 8763, 9943, 10590, 11425, 12827, 14180, 15184,
+ 567, 890, 1811, 3039, 4034, 4670, 5067, 5886, 7597, 8889, 10127, 10989, 12275, 13126, 14471, 15240,
+ 1017, 1306, 1912, 4065, 5098, 5506, 6244, 6943, 7610, 8963, 10029, 10608, 11375, 12363, 14054, 15433,
+ 718, 949, 1640, 4407, 4989, 5504, 6145, 6846, 8055, 8755, 9764, 11309, 12335, 13157, 13991, 15052,
+ 833, 1104, 2582, 3256, 3910, 5291, 5740, 7382, 8142, 8582, 9618, 11230, 12436, 13284, 14118, 14993,
+ 1157, 1491, 2370, 3490, 3848, 5022, 5800, 6591, 7995, 8564, 9304, 10921, 12495, 13372, 14254, 15054,
+ 1052, 1417, 2072, 2620, 3044, 4572, 5432, 6284, 7546, 8244, 9800, 10798, 12368, 13625, 14662, 15445,
+ 795, 1132, 1902, 2810, 3433, 4747, 5790, 6745, 8443, 9315, 10050, 10836, 11673, 12528, 13832, 15149,
+ 967, 1250, 2420, 3159, 3625, 4266, 4948, 7030, 7674, 8235, 9112, 9840, 11161, 12837, 14235, 15341,
+ 730, 997, 2113, 3171, 3737, 4764, 5577, 6449, 7240, 8394, 9116, 10604, 12009, 13102, 14231, 15244,
+ 1192, 1617, 2341, 3430, 4000, 4721, 5596, 6358, 7429, 8167, 8895, 9916, 10855, 12188, 13896, 15254,
+ 872, 1150, 2032, 3553, 3983, 4963, 5636, 6604, 7462, 8064, 9470, 10203, 11089, 12799, 14118, 15282,
+ 1013, 1444, 1984, 3267, 4408, 4772, 5805, 7143, 7690, 8647, 10029, 10669, 11431, 12636, 13988, 15117,
+ 830, 1134, 1866, 3581, 4056, 4925, 6011, 6558, 8076, 8830, 9656, 10706, 12639, 13726, 14663, 15367,
+ 684, 957, 1801, 3005, 3559, 4879, 5574, 6920, 7739, 8471, 9724, 10719, 12040, 13148, 14262, 15275,
+ 699, 1022, 2042, 3021, 3652, 5369, 6030, 7152, 8031, 8854, 9968, 10869, 11910, 13073, 14255, 15228,
+ 831, 1105, 1945, 3827, 4272, 5403, 6214, 6843, 8117, 8827, 9516, 10328, 11201, 12905, 14507, 15398,
+ 785, 1036, 2037, 4291, 4698, 5531, 6223, 7000, 8372, 9181, 9784, 10501, 11195, 12592, 13855, 15023,
+ 1079, 1556, 2081, 3294, 4678, 5189, 5975, 6991, 7650, 8458, 9624, 10387, 11370, 12518, 13343, 14521,
+ 1085, 1535, 2122, 2772, 3190, 4157, 6280, 7310, 8119, 8898, 9511, 10169, 11313, 12529, 13732, 15153,
+ 1130, 1625, 2359, 3044, 3504, 5151, 6102, 6755, 7616, 8099, 8791, 9828, 10718, 12434, 14231, 15302,
+ 894, 1194, 1854, 2315, 3048, 5073, 5700, 6637, 7336, 8181, 9563, 10924, 12316, 13331, 14349, 15237,
+ 1274, 1843, 2368, 2935, 3396, 4031, 5905, 6950, 7597, 8704, 9554, 10193, 11657, 13031, 13891, 14934,
+ 1208, 1660, 2310, 3189, 3644, 4355, 5442, 6162, 7602, 8433, 9505, 10600, 12310, 13625, 14495, 15234,
+ 884, 1244, 2154, 2652, 3187, 3810, 5991, 6674, 7284, 8251, 9106, 10547, 11947, 13173, 14248, 15300,
+ 851, 1095, 2125, 2913, 3429, 4068, 4931, 6228, 6911, 8477, 9513, 10932, 12187, 13333, 14385, 15286,
+ 637, 976, 2370, 3892, 4718, 6063, 7126, 8378, 9405, 10359, 11188, 12001, 12807, 13610, 14465, 15303,
+ 674, 1156, 3206, 3848, 4574, 5332, 6275, 7180, 7979, 8944, 9945, 11135, 12211, 13166, 14189, 15185,
+ 648, 874, 1620, 4523, 5335, 5818, 6480, 7079, 8024, 8654, 9320, 10068, 11602, 13428, 14329, 15293,
+ 602, 831, 3174, 4258, 4758, 5558, 6154, 6862, 7261, 8173, 9894, 11228, 12406, 13185, 14416, 15390,
+ 728, 1050, 2523, 3324, 4581, 5112, 6274, 7249, 7665, 8228, 9024, 9779, 11962, 13886, 14569, 15310,
+ 625, 1064, 2658, 3373, 4317, 5328, 6341, 7576, 8230, 9137, 10072, 11030, 12105, 13071, 14050, 15127,
+ 860, 1199, 2569, 3264, 3928, 5082, 6012, 7023, 7568, 8726, 9899, 10975, 11665, 12602, 13465, 14849,
+ 994, 1326, 2131, 3392, 3914, 4629, 5507, 6365, 7208, 8086, 9307, 10139, 11960, 13752, 14791, 15505,
+ 1297, 1723, 2304, 2955, 3528, 4575, 5330, 6141, 7321, 7873, 9079, 11066, 12114, 12781, 13485, 14866,
+ 1247, 1673, 2480, 3557, 4100, 4892, 5843, 6678, 7764, 8607, 9292, 10007, 11055, 11895, 12912, 14829,
+ 1108, 1515, 2302, 3815, 4582, 5275, 6233, 7271, 7993, 8890, 9807, 10489, 11145, 11905, 12753, 14036,
+ 969, 1302, 2055, 2425, 3922, 5219, 6014, 6785, 7331, 9195, 10032, 10897, 11788, 12542, 13408, 14826,
+ 1042, 1398, 2217, 2813, 3449, 4242, 5032, 6957, 7766, 8985, 9916, 10576, 11237, 12222, 13952, 15302,
+ 1099, 1456, 2313, 2814, 3532, 5651, 6349, 7119, 8208, 8769, 9427, 10112, 11070, 12005, 12975, 14815,
+ 952, 1343, 2279, 4277, 5014, 5588, 6550, 7259, 8172, 9304, 10112, 10905, 11848, 12798, 13734, 14852,
+ 827, 1155, 2015, 2590, 3389, 5575, 6147, 7237, 8788, 9352, 9943, 10452, 11166, 11866, 13017, 14908,
+ 965, 1342, 1904, 3530, 4756, 5265, 6282, 7430, 8006, 8866, 10189, 10858, 11593, 12497, 13413, 14286,
+ 791, 1033, 1807, 4669, 5445, 6065, 6777, 7311, 8217, 8955, 9594, 10171, 10891, 11711, 13024, 15079,
+ 703, 982, 1468, 2926, 5508, 6551, 7045, 7648, 8280, 9027, 10043, 10724, 11477, 12486, 13816, 15160,
+ 636, 1084, 3228, 4342, 5051, 5884, 6638, 7545, 8362, 9253, 10190, 11160, 12212, 13207, 14220, 15198,
+ 821, 1100, 1682, 3559, 5618, 6419, 6944, 7630, 8233, 9075, 10130, 10822, 11427, 12149, 13027, 14146,
+ 629, 1332, 3013, 3722, 4532, 5532, 6531, 7553, 8517, 9499, 10507, 11474, 12457, 13390, 14358, 15272,
+ 1317, 2450, 3297, 3892, 4613, 5418, 6425, 7337, 8291, 9245, 10282, 11346, 12442, 13393, 14373, 15268,
+ 1375, 2387, 3533, 4376, 5325, 6263, 7320, 8268, 9276, 10272, 11197, 12094, 13000, 13818, 14648, 15432,
+ 1158, 2044, 2814, 3372, 4231, 5273, 6326, 7190, 8055, 8945, 9909, 11036, 12230, 13264, 14271, 15192,
+ 871, 1102, 2233, 4189, 4539, 5309, 5875, 6894, 8135, 8683, 9397, 10814, 12535, 13312, 14286, 15134,
+ 814, 1062, 2256, 4246, 4741, 5468, 6095, 6832, 7800, 8445, 9019, 9623, 10539, 12957, 14398, 15333,
+ 958, 1249, 1879, 3625, 4221, 4743, 5374, 6010, 7564, 8370, 9054, 10537, 11472, 12580, 13996, 15129,
+ 871, 1148, 2666, 3651, 4193, 5040, 5660, 6778, 7459, 8017, 8780, 9530, 10508, 12721, 14270, 15304,
+ 651, 1057, 2426, 3096, 4328, 5224, 6148, 6984, 7722, 9038, 10150, 11248, 12299, 13281, 14301, 15245,
+ 617, 889, 2138, 4101, 4573, 5464, 6134, 7293, 8294, 9277, 10316, 11265, 12281, 13301, 14327, 15273,
+ 792, 1161, 2081, 2883, 3644, 5502, 6438, 7760, 8867, 9704, 10404, 11003, 11913, 13286, 14647, 15445,
+ 1202, 1869, 2491, 2996, 4025, 5336, 6574, 7586, 8415, 9166, 9940, 11099, 12441, 13461, 14408, 15252,
+ 1164, 2036, 2762, 3315, 4510, 5722, 6901, 7925, 8892, 9813, 10715, 11594, 12526, 13416, 14359, 15235,
+ 1442, 2242, 2916, 3528, 4751, 5836, 6787, 7599, 8395, 9235, 10177, 11157, 12208, 13147, 14145, 15115,
+ 1182, 2189, 3501, 4359, 5481, 6402, 7306, 7997, 8719, 9457, 10314, 11195, 12207, 13152, 14186, 15159,
+ 1123, 1928, 3249, 4174, 5190, 6018, 6841, 7570, 8320, 9079, 9969, 10880, 11946, 12957, 14056, 15116,
+ 1391, 2121, 3172, 3766, 4449, 5215, 6232, 7171, 8096, 8981, 9854, 10664, 11746, 12851, 14017, 15116,
+ 1330, 2144, 2998, 3489, 4141, 5059, 6328, 7427, 8552, 9564, 10505, 11379, 12290, 13173, 14193, 15189,
+ 1109, 1492, 2303, 2946, 3382, 4987, 6548, 6997, 8296, 9305, 9871, 10389, 11172, 13047, 14487, 15395,
+ 1088, 1547, 2223, 3092, 3620, 4386, 6452, 7580, 8220, 9176, 10021, 10624, 11535, 12511, 13349, 14330,
+ 888, 1265, 1930, 3715, 4354, 4929, 6671, 7348, 8125, 9622, 10527, 11265, 12457, 13225, 13909, 14800,
+ 815, 1189, 2006, 3817, 4374, 5838, 6485, 7386, 8816, 9395, 10242, 10930, 11702, 12358, 13510, 14977,
+ 990, 1329, 1856, 2513, 2960, 3841, 6200, 7584, 8128, 9084, 9884, 10615, 11927, 13026, 14162, 15236,
+ 809, 1891, 3000, 3978, 4992, 5938, 6931, 7857, 8818, 9757, 10695, 11637, 12557, 13495, 14394, 15295,
+ 554, 1531, 2712, 3754, 4813, 5795, 6805, 7758, 8739, 9677, 10642, 11569, 12527, 13426, 14344, 15173,
+ 961, 1247, 2162, 4030, 4594, 5392, 6191, 6804, 7979, 8852, 9449, 10061, 10905, 11757, 12852, 14951,
+ 1214, 1854, 2494, 3286, 3894, 4471, 5973, 7358, 7967, 8807, 9608, 10178, 10994, 12344, 13316, 14487,
+ 1024, 1446, 2069, 2773, 3329, 5327, 6627, 7318, 8209, 8780, 9592, 11114, 12066, 12765, 13662, 14618,
+ 907, 1229, 2135, 2657, 3456, 4585, 5614, 6412, 7107, 8072, 10517, 11769, 12447, 13038, 14011, 15186,
+ 608, 888, 1729, 3791, 4395, 4825, 5374, 6977, 7738, 8387, 9316, 10715, 12651, 13548, 14546, 15311,
+ 941, 1202, 2101, 3123, 3503, 4159, 4619, 6676, 7402, 8223, 9627, 10280, 11822, 13131, 14470, 15468,
+ 800, 1065, 1726, 2186, 4630, 5715, 6394, 7256, 7782, 8452, 9368, 11407, 12394, 13086, 14086, 15167,
+ 875, 1208, 1941, 2508, 3296, 4447, 5532, 6821, 7582, 8862, 9556, 10519, 11696, 12896, 14109, 15273,
+ 900, 1183, 1959, 2423, 3386, 5868, 6409, 7218, 7883, 8442, 9143, 9913, 11104, 13003, 14241, 15213,
+ 1115, 1573, 2286, 3113, 3574, 4645, 5519, 6311, 8196, 8937, 9864, 11290, 12252, 13043, 13810, 14631,
+ 754, 1068, 2679, 3694, 4190, 5008, 5606, 7347, 8013, 8864, 9972, 10786, 11627, 12824, 14010, 15316,
+ 825, 1144, 1765, 3426, 4206, 4874, 6385, 7180, 7946, 9319, 10153, 10682, 11276, 11957, 13415, 15087,
+ 537, 862, 1866, 3116, 4349, 4842, 5496, 7245, 7958, 8822, 9611, 10099, 11455, 13291, 14370, 15284,
+ 887, 1205, 1698, 3243, 5173, 5813, 6470, 7237, 7881, 8707, 9739, 10497, 11284, 12115, 13185, 14869,
+ 726, 1002, 2984, 3728, 4334, 5142, 5946, 7127, 7676, 8367, 9085, 10668, 11889, 13054, 14011, 15180,
+ 771, 981, 1772, 4221, 4795, 5401, 6003, 6690, 7480, 8115, 8717, 9938, 12232, 13037, 13941, 15157,
+ 1303, 1922, 2468, 3316, 4185, 4656, 5507, 6631, 7341, 8291, 9593, 10378, 11412, 12616, 13556, 14820,
+ 1080, 1403, 2477, 2954, 3741, 4642, 5517, 6582, 7111, 7805, 8786, 9547, 11253, 12874, 14045, 15236,
+ 872, 1141, 2386, 3209, 3896, 5042, 5805, 7002, 7549, 8285, 9036, 9939, 12031, 13030, 13767, 15055,
+ 728, 1046, 2013, 4276, 5230, 5799, 6889, 7772, 8535, 9890, 10949, 11702, 12791, 13661, 14459, 15218,
+ 768, 1578, 3171, 4134, 5114, 6061, 7128, 8112, 9139, 10152, 11101, 12005, 12913, 13736, 14586, 15387,
+ 622, 1221, 3202, 4279, 5529, 6753, 7808, 8631, 9408, 10115, 10830, 11631, 12512, 13365, 14324, 15263,
+ 621, 848, 1626, 4612, 5335, 5797, 6416, 7167, 8286, 8933, 9880, 11327, 12709, 13565, 14439, 15329,
+ 650, 861, 3115, 4397, 4828, 5572, 6159, 7071, 7513, 8108, 8667, 9739, 12413, 13532, 14414, 15581,
+ 756, 1091, 1615, 2958, 4679, 5429, 6304, 7065, 7657, 8329, 10012, 10763, 11425, 12569, 14285, 15324,
+ 765, 1051, 2074, 3446, 3838, 5659, 6318, 7149, 8407, 8942, 9688, 11058, 12443, 13347, 14361, 15231,
+ 1121, 1473, 2217, 2827, 3347, 5017, 5872, 6668, 7595, 8264, 9085, 10487, 12210, 13022, 13866, 14985,
+ 1056, 1457, 2212, 2861, 3453, 5060, 5976, 6759, 7697, 8519, 9461, 10348, 11169, 12000, 13798, 15274,
+ 1042, 1388, 2220, 3677, 4297, 5120, 6037, 6788, 7788, 8549, 9262, 10069, 10878, 11755, 14085, 15413,
+ 961, 1331, 1957, 3111, 3796, 4344, 5010, 5553, 7612, 9441, 10155, 10903, 11982, 12664, 13391, 14959,
+ 1135, 1470, 2082, 3284, 3937, 4423, 5140, 5618, 7055, 8860, 9355, 10318, 11706, 12556, 13826, 15192,
+ 1084, 1383, 2209, 3550, 4038, 4636, 5240, 5911, 8011, 9044, 9570, 10294, 11155, 11865, 13587, 15219,
+ 737, 1028, 1858, 2434, 3038, 3815, 5414, 6560, 7753, 9010, 10088, 11109, 12200, 13241, 14292, 15286,
+ 979, 1377, 2142, 3511, 4042, 4787, 5869, 6505, 7764, 8710, 9567, 10378, 11383, 13445, 14620, 15417,
+ 802, 1063, 1768, 3997, 4648, 5273, 6005, 6694, 7698, 8427, 9191, 10230, 11176, 12425, 13991, 15244,
+ 926, 1148, 2359, 3438, 3811, 4446, 4994, 6492, 7088, 7840, 8921, 9955, 11823, 13037, 14140, 15275,
+ 639, 939, 1753, 3080, 4204, 5022, 5702, 6198, 6811, 8268, 9786, 10836, 12243, 13126, 14260, 15306,
+ 736, 1079, 1802, 3276, 4001, 5415, 6381, 7119, 8492, 9232, 10308, 11105, 12031, 12793, 13904, 15114,
+ 1249, 1897, 2616, 3398, 4149, 4840, 5809, 6616, 7453, 8768, 9869, 10767, 12051, 13177, 14339, 15241,
+ 1026, 1314, 2014, 3249, 3690, 4344, 4892, 5691, 7289, 7970, 9397, 10615, 11663, 13015, 14272, 15328,
+ 970, 1249, 2342, 2895, 3661, 4685, 5348, 6691, 7176, 8850, 10323, 11025, 11936, 12697, 13429, 14816,
+ 872, 1155, 1680, 2334, 2880, 4439, 6448, 7088, 8221, 9517, 10060, 10691, 11577, 12830, 14274, 15377,
+ 874, 1131, 2067, 2714, 3203, 3786, 4480, 6643, 7487, 8708, 9861, 10989, 12079, 13208, 14240, 15290,
+ 804, 1079, 1708, 2236, 2842, 5275, 6096, 7030, 7886, 8704, 9978, 11354, 12923, 13800, 14706, 15380,
+ 646, 907, 1724, 3428, 3981, 5158, 5889, 7244, 8226, 8728, 9227, 10055, 11833, 13065, 14232, 15287,
+ 986, 1315, 1948, 2518, 3010, 5465, 6638, 7224, 8275, 8820, 9602, 10482, 11268, 12169, 14206, 15449,
+ 565, 805, 1593, 3458, 4571, 5319, 6411, 7828, 8796, 9460, 10121, 10926, 11931, 12989, 14085, 15181,
+ 532, 795, 1654, 3253, 3949, 5323, 6246, 7279, 8378, 9364, 10397, 11379, 12395, 13375, 14390, 15290,
+ 835, 1169, 1895, 2461, 3233, 5608, 6358, 7353, 8521, 9756, 10632, 11371, 12291, 12967, 13777, 14575,
+ 528, 840, 1585, 2511, 4342, 5075, 5825, 7183, 8370, 8938, 9529, 10614, 12398, 13483, 14482, 15340,
+ 789, 1044, 2065, 2677, 3589, 5397, 5969, 7559, 8126, 8638, 9332, 10989, 12645, 13441, 14355, 15188,
+ 685, 970, 1644, 2232, 4331, 5344, 6203, 6877, 7736, 9534, 10331, 11186, 11981, 12778, 13629, 14878,
+ 800, 1120, 1829, 2303, 4180, 4963, 5877, 6722, 7425, 8436, 9106, 10138, 12113, 13163, 14087, 15242,
+ 851, 1150, 2243, 3088, 3642, 5370, 6027, 6953, 7919, 8562, 9276, 9957, 10896, 12786, 14320, 15324,
+ 735, 1113, 2000, 3196, 4699, 5471, 6589, 7347, 8003, 8855, 9650, 10594, 12001, 13017, 13918, 15089,
+ 837, 1098, 1699, 2175, 3008, 6101, 6902, 7529, 8229, 8790, 9674, 10585, 11532, 12971, 14334, 15323,
+ 626, 1278, 3315, 4325, 5436, 6586, 7790, 8824, 9821, 10690, 11482, 12268, 13043, 13789, 14591, 15381,
+ 1439, 2612, 3825, 4715, 5881, 7098, 8204, 9129, 10075, 10889, 11673, 12416, 13159, 13897, 14672, 15420,
+ 1489, 2697, 3785, 4568, 5440, 6284, 7191, 8043, 8936, 9852, 10756, 11696, 12662, 13539, 14458, 15314,
+ 663, 932, 1850, 4514, 5042, 5800, 6482, 7381, 8674, 9537, 10447, 11239, 12074, 12975, 13958, 14969,
+ 695, 1028, 1781, 2195, 4548, 5142, 6539, 7282, 7728, 8259, 8915, 9755, 11646, 13482, 14373, 15221,
+ 846, 1138, 1713, 2239, 2823, 5254, 6237, 6940, 7777, 8443, 9981, 10858, 11793, 13022, 14259, 15331,
+ 595, 882, 1481, 3108, 4815, 5391, 5979, 6529, 8058, 8939, 9706, 10649, 11884, 13065, 14350, 15334,
+ 887, 1139, 1829, 2276, 3102, 5552, 6221, 7067, 7712, 8368, 9127, 10682, 12241, 13127, 14112, 15133,
+ 1019, 1418, 2165, 2865, 3353, 4937, 6019, 6784, 7810, 8440, 9197, 10025, 12092, 13614, 14602, 15352,
+ 951, 1206, 2295, 3066, 3586, 4125, 4780, 7215, 7687, 8320, 9079, 10918, 12519, 13503, 14488, 15224,
+ 847, 1149, 2069, 2504, 4231, 5041, 6034, 6862, 7321, 7882, 8765, 10837, 12433, 13022, 13809, 15203,
+ 829, 1111, 2677, 3505, 3999, 5080, 5694, 7033, 7667, 8302, 8963, 10297, 12410, 13340, 14485, 15373,
+ 908, 1284, 2182, 2613, 3944, 5116, 5768, 7284, 7825, 8461, 10123, 11755, 12583, 13368, 14195, 15053,
+ 930, 1215, 2323, 2834, 3500, 4216, 5200, 5956, 6576, 7757, 9998, 10921, 12073, 12844, 14003, 15254,
+ 973, 1343, 2164, 3265, 3733, 4538, 5294, 6469, 7850, 8468, 9747, 10750, 11398, 12428, 13990, 15226,
+ 952, 1239, 1992, 3093, 3498, 4156, 4605, 5695, 7946, 8668, 9684, 11027, 12029, 13102, 14093, 15158,
+ 558, 828, 1638, 2628, 3361, 4827, 6046, 7182, 8226, 9297, 10326, 11331, 12343, 13333, 14312, 15248,
+ 543, 797, 1292, 2197, 4031, 4954, 6096, 7133, 8292, 9244, 10253, 11267, 12293, 13293, 14303, 15272,
+ 562, 818, 1546, 2854, 3792, 5212, 5897, 6697, 8329, 9105, 10103, 11572, 13033, 13866, 14716, 15223,
+ 897, 1320, 1937, 2717, 3205, 4412, 6880, 7773, 8381, 9585, 10492, 11242, 12589, 13425, 14212, 15053,
+ 798, 1174, 2038, 2482, 3869, 4999, 5820, 7157, 7807, 9160, 10013, 11078, 12122, 13113, 14028, 14997,
+ 686, 1000, 2269, 3020, 3755, 5347, 5960, 7664, 8406, 9199, 10485, 11521, 12512, 13361, 14217, 15144,
+ 715, 1058, 1660, 3282, 4591, 4997, 6361, 7315, 7878, 9084, 10356, 11033, 12186, 13333, 14390, 15279,
+ 784, 1087, 1584, 3299, 5404, 6007, 6611, 7254, 7870, 8870, 10201, 10911, 11780, 12799, 14077, 15156,
+ 664, 905, 1952, 4880, 5346, 5934, 6519, 7374, 8530, 9311, 10103, 10819, 11525, 12818, 14071, 15168,
+ 626, 914, 2854, 4227, 4737, 5634, 6361, 7354, 7918, 8636, 9491, 10701, 11785, 13139, 14220, 15292,
+ 1793, 3491, 4468, 5330, 6092, 6716, 7382, 8023, 8852, 9777, 10729, 11640, 12576, 13418, 14323, 15182,
+ 688, 949, 1560, 3990, 5022, 5519, 6194, 6798, 8071, 8773, 9515, 10514, 12712, 13784, 14609, 15400,
+ 783, 1014, 2824, 3542, 4129, 4903, 5606, 6542, 6965, 7778, 10053, 10913, 11995, 12759, 13498, 15320,
+ 753, 1093, 2085, 2706, 4391, 5134, 5930, 6777, 7408, 8184, 9523, 10719, 12392, 13543, 14552, 15277,
+ 920, 1325, 2067, 2928, 3400, 4646, 5913, 6704, 8091, 8819, 9941, 10843, 12080, 13740, 14761, 15449,
+ 618, 961, 2096, 3325, 4242, 5555, 6567, 7721, 8801, 9891, 10891, 11871, 12871, 13717, 14555, 15310,
+ 826, 1165, 2466, 3876, 4364, 5723, 6461, 7667, 8417, 9095, 9913, 10755, 11704, 12971, 14239, 15196,
+ 1056, 1577, 2885, 3726, 4232, 5031, 5736, 6842, 8006, 8903, 10198, 11414, 12536, 13409, 14359, 15205,
+ 876, 1205, 2453, 3059, 3652, 4312, 5617, 6518, 7542, 8743, 9363, 11286, 13049, 13835, 14643, 15303,
+ 763, 990, 2805, 3723, 4228, 4936, 5628, 6613, 7058, 7705, 8476, 10130, 11974, 13113, 14180, 15342,
+ 857, 1152, 1913, 3994, 4629, 5137, 6183, 6861, 7722, 9347, 10177, 10777, 11599, 13112, 14298, 15264,
+ 656, 1269, 3434, 4621, 5637, 6438, 7220, 7942, 8741, 9612, 10517, 11433, 12435, 13354, 14316, 15237,
+ 1359, 2605, 3748, 4758, 6042, 7092, 7952, 8651, 9338, 9974, 10723, 11579, 12528, 13418, 14397, 15297,
+ 1529, 3067, 4410, 5449, 6449, 7233, 7901, 8525, 9237, 10002, 10859, 11784, 12730, 13589, 14467, 15300,
+ 1790, 3311, 4192, 4897, 5538, 6210, 6922, 7697, 8597, 9590, 10560, 11494, 12426, 13283, 14229, 15138,
+ 1252, 2359, 3404, 4211, 5155, 6055, 7030, 7899, 8850, 9793, 10761, 11714, 12674, 13565, 14489, 15352,
+ 590, 998, 2402, 3314, 4528, 5604, 6649, 7644, 8508, 9487, 10408, 11383, 12335, 13276, 14293, 15243,
+ 727, 1025, 1614, 3818, 5876, 6391, 6980, 7606, 8211, 9304, 10696, 11324, 12381, 13241, 13988, 14791,
+ 621, 899, 2068, 4152, 5232, 6483, 7323, 8193, 8960, 9627, 10417, 11291, 12234, 13192, 14216, 15187,
+ 582, 828, 1926, 4025, 4942, 6029, 6957, 7599, 8278, 9093, 10032, 11126, 12233, 13209, 14256, 15311,
+ 788, 1126, 1690, 3183, 3923, 4599, 6240, 6890, 7758, 9022, 9656, 10453, 11779, 12706, 13913, 15214
+};
+
+
+const Word16 lsf_cdk_nb_gc_stg1[] = /* 14Q1*1.28 */
+{
+ -2046, -827, -3490, -8984, -9331, -8562, -2854, 112, 2194, 13294, 11592, 7952,
+ -294, 2271, 1647, -1260, -2029, -3649, -4081, -3432, -3649, 333, 5042, 4720,
+ -1209, 984, -241, -3413, -4476, -4817, -2910, -2016, -2016, 2900, 6868, 5408,
+ -1900, 896, 688, -197, -33, -993, -1470, -1283, -2145, -665, 2161, 4064,
+ -1998, -351, -1985, -4742, -4879, -5329, -3500, -2023, -1264, 8507, 9766, 6640,
+ 245, 3962, 3664, 1935, 1601, 144, -1054, -1236, -2225, -2647, -3746, 1695,
+ -3051, -1382, -1825, 828, 2537, 1872, 957, 689, -592, 1675, 5507, 5216,
+ -2178, -281, 2097, 5417, 4372, 1648, -802, -1304, -2817, -754, 3345, 4224,
+ -3400, -2402, -4098, -3148, -2066, -1985, -558, 466, 705, 11042, 11096, 7424,
+ 776, 4355, 3200, -1139, -2922, -3985, -2990, -2405, -2881, -661, 2897, 4176,
+ -1818, 394, -385, -1504, -1545, -2913, -3062, -2451, -2609, 2093, 6387, 5248,
+ -1081, 2069, 1952, 1345, 1649, 64, -1394, -1526, -2577, -2051, -1025, 2863,
+ 276, 2780, 1567, -3228, -4881, -5970, -4363, -3523, -3089, 3447, 7300, 5456,
+ 1917, 6445, 5552, 2069, 684, -1233, -2371, -2377, -3409, -1635, 1616, 3648,
+ -2734, -1049, -2001, -1927, -1908, -2273, -1294, -652, -944, 4451, 7893, 5888,
+ -1193, 2108, 5153, 7875, 8214, 6145, 2891, 2001, 208, -1312, -2273, 1599,
+ -3697, -3538, -6739, -7238, -4524, -2464, 2424, 4591, 6098, 15691, 13066, 8912,
+ -352, 2108, 847, -247, 1179, -769, -2757, -2873, -3713, 203, 4994, 4688,
+ -1185, 1565, 703, -1788, -2372, -2721, -1951, -1554, -2129, -374, 2529, 4192,
+ -2094, 401, 352, 1118, 2376, 1632, 582, 351, -1009, -1389, -784, 3056,
+ -367, 1637, -145, -5132, -6888, -8178, -5371, -3397, -1776, 9469, 9894, 6752,
+ 953, 5894, 6785, 5196, 4663, 2400, 31, -598, -2065, -2581, -2786, 1743,
+ -2637, -1222, -560, 5363, 6867, 5329, 2192, 1264, -544, -508, 1345, 3664,
+ -1112, 1918, 2976, 3989, 4508, 3104, 1245, 606, -897, -2381, -4258, 1119,
+ -1983, -328, -2930, -6112, -1802, 144, 486, 194, -960, 4066, 7797, 5872,
+ 648, 3526, 3104, 562, -200, -2177, -3380, -3162, -3857, -1516, 2433, 3920,
+ -2908, -722, -417, -181, 290, -352, -352, -175, -1088, 1689, 5603, 5184,
+ -536, 2771, 2064, 10, -643, -1793, -1733, -1523, -2193, -1813, -1585, 2831,
+ 2239, 5541, 4400, -637, -2370, -4802, -5148, -3901, -2912, 7328, 9222, 6320,
+ 8159, 12344, 9921, 5311, 4611, 2480, -1461, -1819, -2032, 5438, 7396, 5968,
+ -3908, -2998, -3105, 1031, 2171, 1952, 2012, 1982, 1280, 8825, 10343, 7056,
+ -80, 5935, 10546, 12414, 12351, 9601, 4823, 3380, 1152, -840, -2161, 1967
+};
+const Word16 lsf_cdk_nb_gc_stg2[] = /* 14Q1*1.28 */
+{
+ -476, -1387, -3185, 464, 1104, 0,
+ -1029, -675, 63, -1664, -1168, 0,
+ -691, -1002, -1697, -1968, -704, 0,
+ -957, -724, -945, 816, 928, 0,
+ -1131, -2087, -1296, 2704, 1376, 0,
+ -1167, -1003, 512, 592, 192, 0,
+ 492, 517, -721, -3600, -1888, 0,
+ 489, -147, -1153, -688, -864, 0,
+ 865, 179, -608, 2000, 1008, 0,
+ -1286, -1953, -1633, -304, -368, 0,
+ 2033, 1593, -369, -576, 272, 0,
+ -718, 685, 751, -192, 192, 0,
+ 1394, 1172, 1520, -480, -576, 0,
+ -1455, -466, 2896, 2176, 896, 0,
+ -1171, 324, 2512, -272, -496, 0,
+ 4950, 5112, 3536, 1040, 80, 0
+};
+const Word16 lsf_cdk_nb_gc_stg3[] = /* 14Q1*1.28 */
+{
+ 1, 6, -801, -3701, -3408, -1712, 2661, 2257, 768,
+ 4, 11, -481, -1886, -2409, -2353, -652, 1216, 256,
+ 14, 6, -1713, -1706, -1012, -817, -1158, -369, -97,
+ 8, 15, 127, -780, -1241, -1617, -2819, -1474, -577,
+ 13, 6, 2320, 103, -1175, -1681, 297, 1536, 384,
+ 4, 14, -529, -319, -161, -129, -2113, -4131, -1281,
+ 0, 5, -2001, -1650, -185, 1040, 2146, 1713, 736,
+ 12, 4, 320, 1615, 1634, 1376, -1700, -4675, -1697,
+ 15, 13, -401, -348, -511, -320, 2570, 2865, 944,
+ 7, 14, 335, -1107, -768, -112, -338, -65, 15,
+ 13, 15, -1025, 563, -38, -865, -1105, 383, 31,
+ 4, 6, 1056, 1034, 443, -289, -2357, -1986, -689,
+ 7, 6, 1008, 1608, 1329, 816, 730, 1312, 432,
+ 4, 12, -1281, 789, 1794, 1328, -517, -561, -113,
+ 12, 4, 704, 1656, 2289, 3153, 5215, 3682, 1680,
+ 11, 15, 2528, 4255, 3539, 2320, -669, -1585, -641
+};
+const Word16 lsf_cdk_nb_vc_stg1[] = /* 14Q1*1.28 */
+{
+ -1950, -1358, -4562, -8912, -8626, -8050, -2211, 1051, 4226, 15749, 13194, 8800,
+ 224, 2532, 175, -5316, -6930, -5601, 381, 515, -416, 3224, 6964, 5584,
+ -2481, -1570, -3746, -3444, -3066, -3665, -2328, -929, -256, 10781, 10903, 7280,
+ -164, 2676, 1952, 1170, 1362, 32, -809, -978, -1793, -2288, -3137, 2287,
+ -1649, -589, -3746, -9056, -6586, -2160, 1693, 1869, 1072, 8982, 10375, 7056,
+ -1442, 731, -465, -352, 881, 0, -1397, -1476, -2273, -792, 2209, 4048,
+ -570, 1125, -577, -4067, -5011, -6130, -4457, -3228, -2464, 7796, 9414, 6432,
+ 314, 2780, 1599, -2442, -4050, -5762, -4680, -3747, -3169, 3706, 7556, 5568,
+ -3306, -3212, -6178, -5257, -2978, -2209, 33, 2038, 3490, 15396, 13130, 8704,
+ -303, 2334, 927, -1025, -1877, -2753, -1964, -1602, -2145, -943, 1457, 3872,
+ -1437, 228, -1633, -3020, -3188, -2833, -1579, -942, -1184, 2482, 6532, 5408,
+ 2622, 6487, 4448, 511, -1383, -2769, -2495, -2230, -2977, -107, 4082, 4480,
+ -1897, -706, -2994, -2432, 566, 704, 220, 99, -608, 3533, 7300, 5744,
+ -2605, -1419, -1376, 1700, 1217, 112, -957, -849, -1633, 1902, 6131, 5296,
+ 2177, 3621, 751, -6700, -10534, -11698, -2205, 713, 3954, 15329, 12986, 8656,
+ 7156, 9030, 4704, 653, -2345, -6178, -4996, -1616, 1762, 14213, 12329, 8272,
+ -997, 238, -2066, -5868, -6868, -7474, -4302, -2171, -623, 12371, 11336, 7600,
+ 2585, 4011, 959, -298, 477, -353, -2457, -2786, -3233, 5865, 8693, 6064,
+ -2145, -680, -1553, -1961, -2011, -3249, -3184, -2317, -1968, 5674, 8613, 6080,
+ 675, 4202, 4128, 2060, 1483, -865, -2647, -2552, -3377, -2094, 64, 3184,
+ -3084, -2915, -5698, -905, 1626, 2176, 1517, 1566, 1024, 9339, 10663, 7232,
+ -741, 1377, 1168, 206, 185, -1601, -3079, -2936, -3553, -265, 4402, 4528,
+ 872, 3048, 799, -4039, -5660, -7890, -7222, -4564, -1792, 10306, 10311, 6992,
+ 2766, 6132, 4848, -1357, -2881, -4914, -4864, -3528, -2608, 9503, 10134, 6832,
+ -1649, -1598, -6691, -10943, -5664, -3632, 2663, 6788, 11044, 19895, 15933, 10416,
+ 530, 3138, 2560, -401, -1453, -3425, -4047, -3463, -3713, 252, 4914, 4672,
+ -879, 1210, 47, -2253, -2732, -3777, -3689, -2947, -2833, 2110, 6499, 5232,
+ 5749, 8736, 6865, 3519, 2447, 383, -1446, -1459, -2385, 970, 4146, 4560,
+ -2556, -1914, -3969, 3390, 7938, 6305, 1777, 560, -928, 1091, 4563, 4928,
+ -1808, -411, 1313, 6469, 6395, 3680, 398, -149, -1713, -1588, 832, 3360,
+ 3630, 5517, 2479, -2938, -6552, -10675, -4951, -545, 1441, 13744, 12041, 8080,
+ 10956, 13776, 9201, 4285, 3873, -801, -5835, -2466, 1233, 13746, 12105, 8192
+};
+const Word16 lsf_cdk_nb_vc_stg2[] = /* 14Q1*1.28 */
+{
+ -377, -729, -1793, 400, 1312, 0,
+ -1197, -1432, -2033, -1936, -1520, 0,
+ -403, -100, 127, -3232, -3456, 0,
+ 555, 364, -865, -592, -1264, 0,
+ -1136, -1968, -2640, 4448, 3824, 0,
+ -1539, 94, 591, 1600, 1376, 0,
+ -1564, -393, 2528, -304, -688, 0,
+ 1075, 823, 1648, -96, -704, 0,
+ -770, -404, 527, -1648, 64, 0,
+ -1320, -1678, -1072, 48, -688, 0,
+ 145, 83, -1089, -3632, -448, 0,
+ 1994, 1756, 159, 1120, 1504, 0,
+ 282, -236, -800, 2080, 624, 0,
+ -1357, -1537, 1008, 2624, 1360, 0,
+ 2002, 2046, 1215, -2336, -1808, 0,
+ 3757, 3480, 2592, 1472, 512, 0
+};
+const Word16 lsf_cdk_nb_vc_stg3[] = /* 14Q1*1.28 */
+{
+ 3, 5, -657, -4633, -3805, -736, 1304, 1024, 368,
+ 6, 12, -305, -1836, -2507, -2625, -1818, -241, -305,
+ 6, 4, -2577, -1854, -1236, -1073, -594, 207, -1,
+ 2, 2, -80, 643, 38, -993, -3719, -1602, -769,
+ 13, 10, -625, -1825, -2422, -2449, 2887, 2625, 784,
+ 6, 0, -336, 315, 466, 560, -2183, -4867, -1345,
+ 10, 7, -2625, 1255, 2305, 1296, 181, 544, 208,
+ 0, 7, 912, 1998, 1662, 623, -416, 256, 32,
+ 10, 6, -1713, -1720, -311, 1408, 2066, 1585, 672,
+ 7, 11, 15, -1217, -99, -33, -851, -33, -81,
+ 12, 0, -1680, 556, -499, -897, 454, 896, 256,
+ 2, 8, 2608, 425, -938, -1937, -1205, 15, -177,
+ 6, 2, 1504, -796, -939, 80, 2179, 1777, 672,
+ 3, 13, 1984, 3517, 3171, 2320, -2605, -5651, -1857,
+ 14, 2, -160, 1660, 2380, 2832, 2924, 2097, 992,
+ 10, 0, 3857, 3623, 2853, 1728, 1554, 1441, 656
+};
+const Word16 lsf_cdk_wb_gc_stg1[] = /* 14Q1*1.28 */
+{
+ -854, -266, -3202, -8408, -10604, -11763, -10826, -9448, -7970, -4784, -3493, -2593,
+ -2727, -1241, -1489, -1469, -1977, -2529, -2344, -2279, -2273, -1750, -1365, -1505,
+ -728, 1001, -113, -1594, -2256, -3553, -4619, -4591, -4497, -3300, -2327, -2129,
+ -590, 1699, 1264, 1187, 300, -865, -1554, -1669, -1649, -1202, -837, -1169,
+ -1612, -578, -2546, -5013, -6155, -6834, -6779, -6002, -5506, -3988, -2968, -2625,
+ -1725, 1072, 1280, 74, 277, 672, 1385, 2172, 2688, 2643, 2065, 848,
+ -86, 3639, 3824, 1931, 2115, 1120, 338, 500, 496, 751, 718, -65,
+ -1024, 1647, 5377, 9202, 8763, 7665, 5376, 4447, 3824, 2803, 2000, 608,
+ -2585, -2600, -6211, -11489, -11790, -10322, -5788, -3684, -2289, -465, -33, -289,
+ -3165, -2478, -3521, -1181, 298, 1632, 2160, 2107, 2272, 2075, 1407, 319,
+ 1275, 3587, 2848, 570, -26, -1489, -4034, -4818, -5202, -3732, -2550, -2049,
+ -2614, -1530, -848, 4992, 6996, 8002, 9185, 9172, 9106, 7739, 5862, 3408,
+ 440, 2263, 751, -3627, -4674, -4978, -4938, -5078, -5554, -5428, -4266, -3361,
+ -2308, -80, 176, 2603, 3871, 3792, 3219, 2667, 2480, 2189, 1405, 95,
+ 2569, 6546, 6257, 3885, 2438, 1504, 1431, 1319, 1392, 1337, 942, -65,
+ -712, 3328, 6290, 10673, 12635, 13827, 14544, 13939, 13619, 10691, 8026, 4768,
+ 842, 2338, 159, -5945, -8498, -9619, -8197, -7076, -6066, -4502, -3722, -3409,
+ -1628, 617, -129, -1907, -2194, -1505, -95, 486, 928, 1268, 1071, 175,
+ 538, 3277, 2111, -1606, -3194, -3553, -2105, -1604, -1393, -974, -740, -1009,
+ -1279, 456, 2593, 6823, 5435, 3536, 1502, 544, -96, -521, -548, -1105,
+ -983, 675, -865, -4388, -5936, -5697, -3245, -2211, -1633, -519, -276, -849,
+ -102, 3506, 2480, 332, -670, -448, 859, 1384, 1776, 1846, 1568, 448,
+ 270, 5022, 5136, 4435, 4546, 4305, 4185, 4385, 4337, 3659, 2785, 1152,
+ 216, 5449, 10098, 11459, 11060, 9922, 8139, 7175, 6289, 4794, 3394, 1600,
+ -3137, -3309, -5826, -6310, -5500, -4385, -2187, -1054, -288, 502, 527, -129,
+ -2997, -2031, -1344, 2452, 2535, 1856, 912, 451, 272, -124, -515, -993,
+ 3808, 7001, 5536, 908, -807, -1665, -2041, -2232, -2449, -2206, -1782, -1905,
+ -1117, 2493, 3616, 4843, 5755, 6273, 6815, 6906, 6769, 5801, 4580, 2528,
+ 2509, 4911, 3439, -2294, -4945, -7203, -9006, -7957, -6818, -4297, -3321, -3009,
+ -1110, 1877, 1776, 2112, 2398, 2704, 3465, 3938, 4257, 4039, 3202, 1568,
+ 7131, 11568, 10626, 7755, 6467, 5073, 4839, 4543, 4128, 3206, 2160, 912,
+ 2457, 10049, 15204, 18687, 18433, 17364, 14947, 13353, 11682, 8277, 6182, 3232
+};
+const Word16 lsf_cdk_wb_gc_stg2[] = /* 14Q1*1.28 */
+{
+ -1224, -2316, -3425, -928, 128, 0,
+ -1874, -2354, -1025, -624, -448, 0,
+ -1026, -888, -481, -2352, -1024, 0,
+ 838, 174, -2306, -4048, -960, 0,
+ -1336, -2679, -1776, 2464, 1200, 0,
+ 497, 2649, 3536, 1344, 320, 0,
+ -1099, 4, 2448, -544, -752, 0,
+ 993, 486, 592, 64, -480, 0,
+ 288, -551, -2385, 1824, 2016, 0,
+ -1090, -815, 128, 1008, 704, 0,
+ 279, -579, -1729, -560, -832, 0,
+ 60, 1211, 543, -288, 272, 0,
+ 480, 1062, 560, 3152, 1680, 0,
+ -1276, -672, 2961, 2704, 1200, 0,
+ 1357, 1787, 767, -3424, -2768, 0,
+ 4229, 3682, 1696, 192, -256, 0
+};
+const Word16 lsf_cdk_wb_gc_stg3[] = /* 14Q1*1.28 */
+{
+ 15, 1, -1665, -4778, -4630, -3105, -554, -304, -112,
+ 13, 10, -753, -1579, -1817, -1953, -2415, -2148, -1697,
+ 8, 15, 1135, -1716, -3415, -5154, -4958, -3443, -1905,
+ 4, 1, -32, 570, 443, -65, -2187, -2759, -2561,
+ 4, 14, 399, -979, -269, 816, 385, -194, -673,
+ 2, 5, -2161, -1600, -401, -97, -412, -433, -321,
+ 0, 15, 2128, 3449, 1993, 175, -2815, -2580, -1729,
+ 3, 2, 400, 714, 1209, 1904, 2711, 2436, 1840,
+ 9, 13, 143, -1925, -2694, -2545, 358, 930, 960,
+ 10, 0, -960, 868, 173, -513, -97, 577, 896,
+ 0, 5, 1824, 11, -1080, -1761, -1565, -1058, -705,
+ 7, 1, -880, 2304, 2790, 2384, 573, -18, -273,
+ 5, 8, 1840, 1467, 978, 768, 598, 351, -17,
+ 6, 7, -1473, -2052, -711, 992, 3166, 2788, 2080,
+ 7, 12, 1856, 3557, 3483, 3184, 2417, 1923, 1408,
+ 3, 13, -1649, 1850, 4068, 5073, 4907, 4086, 2976
+};
+const Word16 lsf_cdk_wb_vc_stg1[] = /* 14Q1*1.28 */
+{
+ -1159, -1161, -5395, -12785, -14024, -12291, -8572, -6523, -4593, -1979, -1169, -897,
+ -1903, -921, -2065, -1931, -2752, -3825, -4238, -4174, -4145, -3108, -2167, -2081,
+ 522, 1696, -513, -6103, -8611, -9571, -9024, -8617, -7826, -5631, -4489, -3761,
+ -1839, -544, -1280, 1080, 564, 752, 844, 1110, 1344, 1185, 1039, 63,
+ -2685, -2538, -5074, -6161, -6745, -6738, -5709, -4457, -3377, -1830, -1188, -1185,
+ -3059, -3565, -6706, -3405, -1183, -272, -112, 33, 160, -5, 13, -721,
+ 4464, 5425, 1535, -8151, -13242, -15171, -5882, -2159, -288, 176, 739, 1440,
+ 1431, 2210, -769, -2539, -889, -721, -4378, -6019, -8099, -8147, -6215, -3873,
+ -1779, -2663, -8548, -12911, -8955, -5265, -1796, -700, 240, 746, 528, -160,
+ -847, 1228, 735, -1117, -1191, -1857, -2236, -2407, -2321, -1779, -1542, -1665,
+ -11, 1561, 591, -2764, -3940, -4994, -5679, -5652, -5586, -4852, -3930, -3297,
+ -783, 2500, 2912, 1480, 864, -64, -492, -833, -769, -353, -452, -1009,
+ -1207, 305, -1169, -3978, -4167, -3249, -1227, -606, -48, 233, -51, -545,
+ -2442, -2531, -3873, 5622, 7990, 7025, 4210, 3337, 2576, 1042, 237, -673,
+ 7644, 9215, 4703, -2206, -6625, -10676, -11281, -8039, -4321, -386, 15, -113,
+ 5397, 7494, 5296, -39, -1846, -2017, -1875, -1846, -1697, -2156, -2072, -1969,
+ -279, 230, -3010, -8280, -10317, -11859, -10729, -9576, -7922, -4867, -3862, -2865,
+ -899, -234, -2897, 3569, 4566, 799, -5740, -7153, -6546, -3276, -2048, -960,
+ 954, 3319, 1295, -3334, -5133, -5137, -2866, -2245, -1793, -1073, -934, -1281,
+ -1098, 1538, 1024, 1919, 2978, 3729, 4709, 5431, 5521, 4962, 3843, 1920,
+ -772, 429, -1810, -5319, -6411, -7074, -6828, -6001, -5266, -3901, -3160, -2833,
+ -140, 1442, -1153, -2496, -631, 1264, 2033, 3167, 3840, 3225, 2577, 1232,
+ 2263, 4102, 1167, -4671, -6812, -9651, -10507, -2400, 272, 1823, 1124, -2641,
+ 3904, 5709, 4800, 1435, -1797, -3682, -7176, -9009, -11812, -10666, -5157, -2353,
+ 122, 738, -2898, -9698, -11180, -8161, -1527, -926, -352, 476, -116, -705,
+ 1615, 3938, 3296, -117, -1405, -2593, -4075, -4383, -4273, -3528, -3017, -2881,
+ 3319, 4999, 2191, -4352, -6684, -7394, -7503, -7494, -6914, -5038, -4138, -3841,
+ 1933, 5658, 4544, 2619, 2149, 1456, 812, 401, 240, 207, 12, -673,
+ 1747, 3791, 1295, -236, -1712, -1232, 632, 903, 1488, 1527, 1184, 368,
+ -1030, 922, 4017, 7665, 6754, 5073, 3236, 1989, 1056, 426, 45, -609,
+ 12487, 14522, 8896, 2687, 1057, -3810, -10425, -9171, -6482, -2948, -2321, -1169,
+ 7344, 9906, 7921, 4454, 3289, 2320, 1483, 513, 192, 491, 493, 79
+};
+const Word16 lsf_cdk_wb_vc_stg2[] = /* 14Q1*1.28 */
+{
+ -182, -1035, -2593, -176, 528, 0,
+ -2110, -2904, -2881, -1696, -864, 0,
+ -160, -876, -1777, -4160, -2112, 0,
+ 1601, 651, -1393, 208, -896, 0,
+ -1109, -1806, -2112, 2592, 1360, 0,
+ -1723, -1575, 1104, 912, 288, 0,
+ -700, 1343, 687, 1408, 144, 0,
+ 863, 454, 864, 464, -160, 0,
+ -1234, -1141, -289, -832, 832, 0,
+ -230, -608, -480, -1520, -2352, 0,
+ 1268, 2126, 1919, -3440, -3072, 0,
+ 1298, 1365, -65, -2832, 672, 0,
+ 1095, 493, -849, 3184, 3056, 0,
+ -469, -479, 1617, 3728, 2112, 0,
+ -675, 1400, 3984, 240, -592, 0,
+ 2580, 2697, 2432, 1920, 1040, 0
+};
+const Word16 lsf_cdk_wb_vc_stg3[] = /* 14Q1*1.28 */
+{
+ 7, 3, -1329, -4391, -3913, -3041, -859, -255, 176,
+ 13, 7, -2257, -960, -1287, -1649, -1313, -770, -433,
+ 3, 13, -33, -1650, -2302, -2721, -4039, -3798, -2609,
+ 10, 4, 0, 1123, 279, -1057, -2271, -1039, 160,
+ 7, 12, 15, -748, 384, 848, -1029, -1992, -2385,
+ 4, 1, -2417, -2753, -316, 912, 1240, 993, 704,
+ 0, 0, 2497, 3043, 1347, -849, -5667, -5913, -4193,
+ 5, 2, 848, 519, 1737, 2560, 1763, 1506, 912,
+ 12, 12, 271, -2734, -3306, -736, 1294, 383, -209,
+ 10, 14, -577, -71, -129, -449, 1561, 2068, 1920,
+ 14, 1, 1408, -1285, -2943, -4177, -1355, 306, 752,
+ 15, 8, -2529, 2194, 2953, 2368, 1761, 1377, 816,
+ 14, 10, 3024, 1322, 224, -304, 514, 511, -81,
+ 1, 12, -849, -709, 112, 2417, 5221, 4664, 3648,
+ 1, 9, 160, 3607, 3314, 2016, -333, -884, -1233,
+ 13, 12, 1888, 3621, 3935, 4000, 3607, 2932, 2128
+};
+
+const Word16 *const lsf_codebook[2][2][TCXLPC_NUMSTAGES] = /* 14Q1*1.28 */
+{
+ {
+ { lsf_cdk_wb_gc_stg1, lsf_cdk_wb_gc_stg2, lsf_cdk_wb_gc_stg3 },
+ { lsf_cdk_wb_vc_stg1, lsf_cdk_wb_vc_stg2, lsf_cdk_wb_vc_stg3 }
+ },
+ {
+ { lsf_cdk_nb_gc_stg1, lsf_cdk_nb_gc_stg2, lsf_cdk_nb_gc_stg3 },
+ { lsf_cdk_nb_vc_stg1, lsf_cdk_nb_vc_stg2, lsf_cdk_nb_vc_stg3 }
+ }
+};
+
+const Word16 lsf_numbits[TCXLPC_NUMSTAGES] = { 5, 4, 4 }; // Q0
+
+const Word16 lsf_dims_ivas[TCXLPC_NUMSTAGES] = { 16, 6, 10 }; // Q0
+const Word16 lsf_offs_ivas[TCXLPC_NUMSTAGES] = { 0, 0, 6 }; // Q0
+const Word16 lsf_dims[TCXLPC_NUMSTAGES] = { 16, 8, 12 }; // Q0
+const Word16 lsf_offs[TCXLPC_NUMSTAGES] = { 0, 0, 4 }; // Q0
+
+
+const Word16 lsf_ind_cdk_nb_gc_stg4[] = /* 14Q1*1.28 */
+{
+ -1360, -704, 0,
+ 80, 256, 0,
+ -896, 1008, 0,
+ 960, 2016, 0
+};
+const Word16 lsf_ind_cdk_nb_vc_stg4[] = /* 14Q1*1.28 */
+{
+ -1360, -944, 0,
+ 624, 1408, 0,
+ -368, 240, 0,
+ 2480, 3216, 0
+};
+const Word16 lsf_ind_cdk_wb_gc_stg4[] = /* 14Q1*1.28 */
+{
+ -1280, -816, 0,
+ 368, 272, 0,
+ -704, 1136, 0,
+ 1296, 2448, 0
+};
+const Word16 lsf_ind_cdk_wb_vc_stg4[] = /* 14Q1*1.28 */
+{
+ -1040, -848, 0,
+ 688, 400, 0,
+ -560, 1520, 0,
+ 2256, 2704, 0
+};
+
+const Word16 *const lsf_ind_codebook[2][2][TCXLPC_IND_NUMSTAGES] = /* 14Q1*1.28 */
+{
+ { { lsf_ind_cdk_wb_gc_stg4 }, { lsf_ind_cdk_wb_vc_stg4 } },
+ { { lsf_ind_cdk_nb_gc_stg4 }, { lsf_ind_cdk_nb_vc_stg4 } }
+};
+
+const Word16 lsf_ind_numbits[TCXLPC_IND_NUMSTAGES] = { 2 }; // Q0
+
+const Word16 lsf_ind_dims_ivas[TCXLPC_IND_NUMSTAGES] = { 2 }; // Q0
+const Word16 lsf_ind_dims[TCXLPC_IND_NUMSTAGES] = { 4 }; // Q0
+const Word16 lsf_ind_offs[TCXLPC_IND_NUMSTAGES] = { 0 }; // Q0
+
+const Word16 min_distance_thr[2][2] = /* 14Q1*1.28 */
+{
+ /* GC, VC */
+ /* WB */ { 580, 580 },
+ /* NB */ {1000, 580 }
+};
+const Word16 lsf_q_diff_cb_8b_rf[256 * 16] = /* Q6 */
+{
+ -3145, 863, -1389, 4087, 1110, 3193, 290, -3160, 824, 212, -2936, -5827, -10181, -15650, -13373, -3849,
+ -4602, -3228, -8398, -1649, -5788, -8971, -2025, -2971, -1476, -2748, -2458, 966, -4, -1802, -1360, 654,
+ -8629, -7702, 6280, 3296, -1205, 365, -5964, 3125, 2443, 1442, 1149, -3835, -9867, -4238, -1977, -1955,
+ -2629, -759, -2056, -2297, -1839, 1678, -2412, -7539, -13208, -9624, -1688, -2171, 943, -454, 536, 2644,
+ -2840, -1391, -10500, 2516, 907, 146, -2762, -6750, 2949, -2282, -4614, -5663, -7773, -5510, -5947, -3727,
+ -4006, -939, -2500, -771, -3414, -4521, -6417, -4064, 3698, 3969, 4300, 4177, -3195, -10419, -13072, -6695,
+ -4284, -1172, -4415, -1601, -6029, 66, -4338, -2300, -3402, -5614, -7181, -7288, 7154, 6538, 64, -3263,
+ -6470, -4503, -9698, -5885, 235, 5049, 2698, -3656, -3600, -6261, -4270, 766, 1037, -1511, -1274, 1800,
+ 669, 2937, -3464, -1034, -4098, -11296, -382, -4610, -9613, -2081, 3947, 2832, 2962, -332, -9039, -10702,
+ -11109, -5950, -7200, -6525, -4260, -5060, -8936, -91, -672, 4557, 3192, -147, -2247, 1566, -734, -3007,
+ -2411, 1587, -2575, 2172, -3270, 10648, 7093, 1517, 1512, -392, 49, -9117, -16895, -908, -8443, -9923,
+ -1934, -603, -6588, 5335, -1565, -11521, 5944, -5092, -615, -2221, -7703, -1903, -5195, 2323, 3958, 3050,
+ -7094, 5361, -7885, -3299, -3282, -3125, -1888, -406, 1522, -23, -1506, -6075, -8517, -7605, -3450, -3362,
+ -3573, -2421, 1385, -181, -11027, 4778, -4014, -4956, 7316, 3138, 2351, 3406, -1998, -968, -2375, -3262,
+ -141, 6652, 11944, -4131, -2073, -2592, -1562, 1521, -1804, -2585, -2685, -5798, -10850, -11629, -4300, -4287,
+ -1569, 2229, 2330, 3147, -1026, -7010, 265, -1320, -3648, 1942, -5375, 73, 10348, 3913, -5535, -5938,
+ -5642, -3433, -8423, 1178, -540, -4790, -1976, 4686, 1701, -1323, -2009, -5997, -5693, -3852, -7604, -5361,
+ -1784, -325, -8561, -17592, 1663, 1377, 2347, -245, -2426, 141, -137, 985, -4926, -7898, -3559, 895,
+ -2548, -1563, -5007, 7311, 4409, 3177, 3920, 1546, -725, -5252, -9754, -9267, -5701, -6900, -961, 1772,
+ -1676, 889, -4798, 8060, 3460, -1911, 415, -4044, -6146, -12074, -10588, 13056, 2765, 1396, -4737, -4905,
+ 943, 3342, -8515, 4676, -774, -3963, -5503, -1625, 3909, -3614, 12347, 2835, -9710, 5877, 297, -918,
+ -5317, -2799, -3708, -4084, -8175, -6155, 1752, 6801, 7493, 6271, 4083, 3132, -809, -4200, -5389, -5982,
+ -5060, -5285, -1533, -2751, 2259, -3893, -3473, -108, -4711, -2627, -2069, -2320, -172, 1547, 770, 309,
+ -4485, -2618, -7238, 1767, -2965, 6693, 5256, 18, -1789, -5076, 7167, 3204, -1242, 1628, 4519, 1796,
+ -114, 1225, -3083, 321, -4002, 4834, -3014, -741, -4189, -5946, 6871, -2068, -13016, -9772, -3235, 2044,
+ 559, 10477, -9704, -7733, -8989, -10787, -10342, -8585, -2844, 1474, 5638, 9798, 10986, 9105, 4619, 2186,
+ 1576, 9039, 4354, 2073, 1861, -1492, -715, 1840, -6736, -10798, 994, -2921, -6369, 779, 2668, -443,
+ -2067, -1020, 1, 14571, 2253, -2163, 5255, 973, -1722, 4173, 102, -3633, -1430, -1720, 1243, 1749,
+ -6589, -1601, -9469, -5581, 3018, 1186, -11, 1252, 5708, 3338, 187, -3950, -6035, -3294, -106, -1130,
+ -2490, 445, -2543, -3283, -3432, -6963, 9950, 4072, 2294, 4517, 2736, 8173, 4270, -8347, -9374, 4776,
+ -66, 3476, 537, 2659, -677, 1552, 1974, -1703, -2139, -634, -1988, 694, 1921, -12938, -16525, 5848,
+ -9849, 7389, 4653, -1158, 1340, -2250, -2460, -2201, -3122, -90, 3974, 5105, 9127, 8701, 6184, 3770,
+ -5086, -3159, -3197, -9944, -7474, 961, 1158, -3536, 1050, 5572, -1480, -11120, -9276, -1841, -2086, -24,
+ -1019, -346, -6765, -8343, -6302, -3019, -5606, 2728, -3994, -6909, 10146, 6321, -230, -393, -846, -1536,
+ -1598, 3610, 3330, -233, -1215, -1953, -1330, 19, -4839, -10681, -11699, -1104, 1146, -6143, -6849, 422,
+ 892, 7937, -5005, -5547, 1756, -4020, -3420, -6811, -6304, -7812, -6019, 5109, 5503, 5568, 4600, 6472,
+ -3296, -2230, -6010, 3497, 5502, -2291, -2342, -6544, -12576, 2192, -1004, -5205, -500, -6764, -6200, 1816,
+ 5114, 4922, 6498, 6613, 4909, 2318, -5626, -11915, 3072, 11570, 1766, 4361, 552, -8139, -14006, -17228,
+ -3321, -1514, -473, 3295, -1028, -4536, -12374, 12452, 7396, -2269, -5052, 554, 1053, -4370, -5859, 97,
+ -2532, 2546, -4920, -13800, 8116, 2425, 1695, -2088, -5105, -346, -2869, -2457, 9336, 13166, 6150, 5166,
+ -2329, 72, 11513, -3075, -7745, -5492, -8015, -5108, -16, 3261, 876, -357, -3241, -2956, -4265, -2320,
+ -7869, -6495, -16668, -1339, -3678, 975, -2740, -2776, 3755, 141, -190, 1026, 5972, 3232, -924, -3212,
+ -1077, 568, -5606, 1478, -243, 2479, 10198, 3667, 682, -2873, -9164, -9042, 2186, 4347, -750, 5303,
+ 556, 5098, -6825, -2564, -3946, -5752, 1977, -6171, -5627, 4580, -835, -6362, 10132, 9511, 6475, 2861,
+ 3320, 11074, -483, 2698, -20, -4084, -4213, -3931, -231, -17, -1826, -2737, -5920, -1539, -1897, -3347,
+ -1346, 2075, -1230, -5248, 10906, 9461, 5046, 3485, -267, -948, 4273, 1889, 81, -488, -4763, -5532,
+ -1237, 6446, 3974, 5166, -723, -10033, 8338, 4102, 683, 1474, 624, -5287, -8628, -7519, -6290, 1767,
+ 207, 2676, 870, 13754, 7087, 2357, -922, -1734, -4651, 352, 14028, 10050, 8916, 2725, -5722, -9415,
+ 364, 3660, -813, 4370, -2151, -2115, 5570, -2545, -8167, -1978, -8301, -10715, 959, -5127, -11250, -7721,
+ -1668, -1437, -5508, -11155, -15130, 6829, 6070, -1555, -3048, -314, -528, 1714, 1474, -42, -541, 3361,
+ -15356, -12047, -4659, -1598, 4105, 3069, 2375, 3647, 1217, 140, -2518, -4195, -3080, 2155, 66, -570,
+ 84, 1523, -742, 13326, 5544, -2653, -5484, -3816, -9239, -10794, 6967, 2095, -4231, -2102, 4368, 8737,
+ 2959, 3968, -2430, 4601, 317, 5804, -3547, -11099, 5849, 273, -5513, 767, -9421, -11095, 3029, 8472,
+ -518, 2355, 2733, 53, -1439, -2709, -394, 5355, -2408, -3122, 8729, 5660, 7771, 4999, -7588, -15134,
+ -2240, 2281, 6677, -5155, 5663, 266, -4355, -7052, -3825, -2235, -2745, -3212, -2018, 1828, 1971, 2086,
+ -1241, 699, -2126, 3835, 1147, 4456, -3810, -23, 1284, -4878, 3807, 14029, 2820, -6773, 9556, 6600,
+ -1716, 315, -3259, -3282, -2859, -2219, 3508, -3452, -7850, 623, -5558, -2168, 1842, -8228, -885, 15388,
+ -8177, -7705, -14377, -6808, -7099, -7676, -4141, -5548, 3677, 5846, 6160, 10031, 11318, 8141, 3326, 904,
+ -3072, 1139, 1875, 4811, 3767, 7294, 4507, 1476, -1622, -6385, 384, 3318, -3867, -10447, -6387, -4252,
+ -19, 1102, -6317, 3433, -1856, -5732, 7225, -2107, -6977, 9620, 7964, 3013, 7152, 4986, -2184, 2136,
+ -524, 1479, -923, 3729, -259, 227, 6477, 2660, 4208, 1017, -423, -6090, -13677, 5309, 702, 2721,
+ -822, 2175, 1717, 3580, 1133, 3835, 980, 13265, 6367, 2741, 7462, 6211, -2347, -7635, 4781, 4132,
+ -8168, 13481, 5777, -963, 643, -2853, -2086, -1593, -2092, 2348, 3867, 413, 461, 1644, -259, -1656,
+ -846, 1615, -2805, 935, 3206, 1907, 7862, 3901, -975, 4507, 3151, 1433, 15449, 4412, -1221, 1001,
+ -3952, 1411, -2148, -1025, -2553, -4164, -4725, -3465, -2654, -3828, -6151, -7679, -5881, -2007, -581, -2499,
+ -1744, 4546, -8725, -6274, -1364, -1087, -2198, -4504, -3542, -1966, -516, -802, 448, -162, -1277, -2081,
+ -12133, -10923, 10206, 4436, 611, -2300, -4926, -4708, -5138, -3373, 2358, 295, -370, 4406, 2947, 351,
+ 1477, 3584, 3776, 4714, -1508, 2029, 426, -5245, -2805, -5852, -8752, 199, -3945, 10358, 10127, 4852,
+ -1894, 528, -776, 2698, -1298, -7579, -12457, -12545, 2483, 2421, -140, 723, -395, -292, -4196, -1766,
+ -3071, 1449, -3716, 3712, -3017, 543, -391, -1984, 3301, 375, 1107, -2635, 4730, 870, -19666, -12653,
+ -2823, 3165, 5399, -10321, -6087, -2824, -329, -1699, -268, -1995, -2254, 2744, 319, 51, 2834, 452,
+ -2837, -240, -1298, 2244, 1977, 3061, 3676, -1207, -3774, -2607, -3405, 9701, 12102, -3052, -10263, 1164,
+ -1548, -515, -3862, 1117, 3329, 4105, -804, -4141, -9321, -3136, 1792, 3484, 2025, -6747, -11991, -10905,
+ -3361, -2922, -3472, 1165, -3055, -1620, -4751, -8940, -477, 1932, 1054, 4687, 5735, 5566, 2447, -778,
+ 1791, 3768, 602, -2421, -6876, 9505, 7350, 2428, -3175, -6252, -707, -3720, -7723, -42, 4292, -1141,
+ -2469, 269, -1028, 1057, -890, 383, -128, 821, -2854, -5548, -2437, -3349, 3935, 1474, 14267, 13393,
+ -3416, 14072, 1196, -3166, -4252, -711, 521, 2462, 5346, 1483, -4287, -7676, -5805, -321, 867, 475,
+ -1674, 1391, 539, -471, -5201, -25, 6911, -2142, 10454, 10963, 1353, -2831, -3219, -131, -3005, -4468,
+ 3476, 4986, 6318, -2959, -9204, -87, 3906, -833, -247, 5687, 451, 716, -2970, -5788, -6743, -9436,
+ 4831, 6767, 3852, 2164, -1362, -1404, -3260, -4807, 2809, -2699, -4693, 21984, 10803, 4063, 2353, 6177,
+ -2813, -890, -5363, -165, -5755, -20361, 3639, 4639, -2073, 1798, -1097, -6169, 30, -1827, -4590, -2586,
+ -5855, -6418, -10115, -6038, 2674, 3620, 1206, 1379, -520, 5333, 5334, 3618, 439, -1048, 439, 777,
+ -7871, 2657, -3649, 7671, 10875, 5285, 423, 1869, -2283, -6081, -2750, -3935, -1815, 2851, 754, -2545,
+ -2253, -245, 87, 3432, 4323, 803, -3981, -8416, -12174, 6263, 9281, 7472, 2558, 327, -3198, -1436,
+ -1398, -211, -6595, 4670, 63, 2041, -4372, 967, 2444, -9123, -11355, 1727, -4221, -3144, 6411, 4338,
+ -4409, -3256, -6504, 6064, 4055, -2268, 5638, 5466, 82, -516, 6974, 5206, 1235, -364, -4919, -6016,
+ 2, 7, -5, 5, 1, 2, -8, 4, 4, 2, 4, 5, 0, -1, -3, 1,
+ -1139, 1101, -1501, -3122, 2059, 9130, 5593, -2976, -5845, -8198, 10800, 771, -4815, 20594, 5385, 9434,
+ -497, 877, -5365, -1190, -2940, -6216, 4700, 872, -2276, 9901, 5530, 417, -4381, -9743, -1935, -1025,
+ -3555, -643, -5254, -6674, -6586, -4879, -3791, -2733, 1046, 2275, 3157, 3643, 8384, 10607, 11929, 9237,
+ 1573, 3323, 130, 12128, 9521, 6522, 4035, -1444, -7190, 565, 2160, -2808, -3716, -9398, -1115, 4631,
+ -1938, -2034, -5142, 6407, 5972, 302, -3078, -7362, -12229, 6591, 5640, 1240, 2727, 3243, 9738, 7334,
+ -8793, 935, -4176, 103, 2398, 1724, 1579, 7649, 5685, 2791, 1754, -453, -5030, -4870, -3871, -3139,
+ -243, 3111, -2068, 3022, -4587, -11340, 14571, 7771, 3558, 5750, 1203, 4665, -1981, -109, 4442, 1369,
+ -2041, 3713, 1013, 1345, 4716, 129, 3062, 1444, -3639, -6184, 7457, 7819, 958, -8391, -8799, 9312,
+ 235, 3895, 12172, 2716, -1347, -1094, -4869, -880, 7519, 9011, 9914, 5683, 5909, 7805, 4428, 2129,
+ -1538, -36, -678, 1486, -649, 1517, -5121, 8530, 5048, -1844, -4781, -9145, -11353, -8076, -4133, -307,
+ -2707, 80, -5905, -4315, -4389, -6758, -6105, -9003, -10744, -1701, 3765, 6091, 10523, 7504, 4350, 4312,
+ 786, 3663, 9280, 6578, 391, 1514, -7019, 5089, 3483, -6871, -8172, -180, -7469, 1419, -121, 838,
+ 2692, 6995, 1431, -1074, 1394, -268, -1170, -3367, -7586, -5698, 7587, 7378, 5733, 8353, 10152, 10834,
+ -8158, -6271, -9914, 9985, 5364, -2601, -1959, -6260, -4097, 3235, 2097, -196, 2968, 3371, 2095, -1207,
+ -2269, 648, -1910, 7766, 5356, 3667, 981, 2825, 4288, 6668, 696, -661, 4042, -5356, -12858, -3646,
+ -4703, -3239, 10100, -2312, -256, -2120, -2612, 4835, -1675, 1068, 5746, -140, -869, 3620, 3505, 1703,
+ -3250, -2423, -1423, -674, -4843, 10905, 4109, 635, -1606, -6241, -2449, 3295, 6275, 14389, 8002, 4352,
+ -842, 3170, 1430, 1513, -4583, -12820, 1470, -4220, -8952, 6987, 4718, 532, -2136, -3700, -1727, 4512,
+ -3663, -2257, -8998, 5471, 843, -2858, -4142, 5134, 7250, 525, 3002, 118, 423, 6929, 5389, -1003,
+ -3457, -2564, 4399, 5758, -1462, 9992, 2582, 885, 6350, -670, -4446, -5882, -1814, -1178, -3073, 1157,
+ 2529, 7505, 5440, 202, -5746, -976, 8235, 1049, -181, -142, -6919, -6675, 18283, 16554, 8385, 3001,
+ 2266, 12753, -3253, -3832, -7200, -5627, -4778, -925, 239, 539, 2225, 324, 3182, 1914, -309, -507,
+ 5074, 4381, 9167, 1915, -3908, 1754, -5997, 2537, 17796, 13293, 7314, 12286, 1815, -4329, -8064, -20774,
+ -2484, 4942, 14515, 5406, -2595, -1380, 8417, 5956, 1651, 1559, -1389, 24, -6421, -4047, 2557, -1331,
+ -3164, 848, 15096, 9663, 6043, 3180, 595, 2733, 830, 1861, 9051, 8435, 8904, 6571, 2208, -762,
+ -135, 870, -2484, -3227, -9497, -586, 14177, 5880, -3708, 505, -1483, -415, 2507, -1973, -13853, -8468,
+ -3854, -2420, -9258, -4766, -3435, -2360, 10467, 7572, 598, -4099, 3457, 402, -195, 4193, 2023, 1851,
+ -4359, -3760, -1315, -585, 11411, 2958, 5446, 1608, 228, 4691, 1446, -1971, -3898, -3822, -1651, -1697,
+ 5112, 1738, -12375, 11069, 8416, -139, -721, 740, -8678, -7527, 10378, 4791, 5388, 2724, 4652, 1931,
+ -1419, 520, -6325, 10393, 8379, 2544, -2104, -11110, 7461, 2884, -1766, 548, -217, -2709, -1287, -2598,
+ 1996, 4969, 3862, 5813, -629, -7138, 7107, 9009, 5157, 1564, 5244, 1326, 78, 263, -4389, -5858,
+ -5423, -34, 1648, 2316, -3981, -5525, -1762, -996, 2075, 878, 718, 1458, 613, 3914, 3912, 2074,
+ -1176, 643, -3222, -444, 779, 9634, 14238, 11755, 3727, 1970, -1421, 3653, 1795, -2315, 10947, 8623,
+ 19, 6095, 3277, 2648, 2148, 509, 3577, 978, 1862, 5842, 1302, -3853, -10993, -12406, 858, 7763,
+ -4944, -1993, -5563, 833, -1365, -2240, -25, 2546, 10150, 10369, 10670, 10551, 9322, 5582, 881, -1029,
+ -763, 4474, 9314, 8818, 2703, 4844, 7776, 1684, 1, -3980, -9739, 5565, 2667, 1185, 2203, 1611,
+ -635, 724, -4112, 8414, 3049, 1437, 2314, -2611, -5835, 5541, -3027, 1017, 14246, 10165, 9910, 14393,
+ 2201, 3204, -295, 2519, -855, 5303, -2184, -12725, 10839, 1337, 154, -5290, -7908, 9490, 4292, 5533,
+ 544, 3574, 602, -783, -3121, 21721, 8166, -1137, 4729, -2399, 2504, 3721, -2704, -10309, 4957, 8028,
+ 2782, 11109, 5440, 2691, -3942, 3286, 2848, -532, -186, -2661, 7318, 6015, -1200, 2174, 5498, -379,
+ 4440, 6050, 3576, -819, -3697, 13144, 9664, -2178, 2966, 3302, -623, 10572, 15713, 9000, 2137, -5160,
+ -1593, 613, 3985, -7128, -5989, 2429, 721, -5488, -11848, 981, -3054, -4499, -4102, -7743, -7416, -340,
+ -2759, -2449, -4426, -6796, -13804, -7472, -1409, -1103, 181, 3071, 434, -741, 1045, 1976, 1407, 1365,
+ -2578, -1275, 5323, 9313, 4798, -1130, -6220, -2101, -3402, -868, -1959, -4365, -4536, -1626, -3701, -5011,
+ -3479, -3407, -9706, 4812, -812, -4014, 2558, -5416, -10543, -5186, -3840, 1189, 3804, 5839, 4744, 1003,
+ -3585, -2339, -4745, 3869, -2763, 1306, -6059, -8604, -1377, -5116, -730, -1693, -3321, 888, -685, 876,
+ -3492, 910, -7012, -2555, -5147, -1372, -1910, -8518, 2661, 7652, 6967, 7296, 4514, -4741, -9827, 873,
+ -1258, 4649, 3654, 653, -5264, -5509, -4222, 1703, 3992, -5102, -4342, -6447, 6603, 2642, -923, 6242,
+ -992, 647, 1228, -3124, -3463, 15067, 838, -6186, -3433, 872, 97, 2876, 3686, -2643, -6780, 356,
+ -1727, 2555, 2552, -1938, -8798, -773, -757, -3588, -7005, -6121, 4601, 235, -4446, 2984, 1353, -776,
+ -15055, -12154, -6273, 84, 390, -3286, -4758, -3713, -2185, -1512, 1403, 3479, 7578, 6327, 5045, 3075,
+ 2469, 8960, 6679, 3813, 1059, 9183, 2971, 4300, -1040, -927, -2376, -6240, -5131, -6030, -7385, -7560,
+ 933, 4512, -899, -1226, -7230, -10649, 11249, 4655, -7924, -5423, -5107, 993, 588, 2896, 4305, 1369,
+ -1938, 11282, -2696, -7285, 1163, -6289, -344, -2329, 3632, 2191, -1017, -1404, -2305, -6223, -2822, -1369,
+ -3688, -918, -3118, 256, -5446, 8638, 6195, 2855, 7432, 6937, 8638, 4020, -3296, -4260, 21, -3914,
+ 3006, 5845, 16377, 17059, 3579, 103, 204, -563, 1735, 6204, -405, -2618, -7929, -14028, -9415, -5277,
+ 303, 934, -305, 3211, -2970, 2963, 10231, 2833, 1656, 1162, -4439, 6346, 9314, 7062, -5015, -15980,
+ -320, 499, -14803, 4610, 2112, -4049, 7242, -245, -3115, 1323, -1276, -4286, -1951, 100, -1389, -1612,
+ -4391, -2691, -5202, -11000, 373, -2423, 4221, 4146, 1045, 503, -4063, -2244, 2311, 1646, -1779, -3188,
+ -3374, 346, -3243, -3662, 5971, 5519, 3022, 516, -4538, -6550, -5227, -6165, -4919, -1105, 30, 721,
+ 2935, 3922, -1041, 4217, 2528, 1985, 661, -824, -10133, -13715, 8714, 2218, 3769, 3384, 1193, -6246,
+ -5357, -2959, -8106, 5394, 1542, -4964, -7749, -4183, 877, 1146, 8307, 2891, -4905, -5775, 1888, 1442,
+ -2472, -850, 1278, 1397, -4545, -3625, -11722, 9811, 7790, 7832, 12234, 6079, -2436, -890, -1820, -234,
+ -3905, -1081, -7818, 2577, -299, 5742, 4982, -1421, 3506, -604, -4944, 2130, 544, 1545, -2399, -3202,
+ -895, -203, 783, -203, -2734, 10200, 7718, 3943, -6098, 9859, 9374, 6777, 2263, -2089, 866, 3381,
+ -3828, 1991, -2866, -1612, 747, -3896, 6041, 2875, -5838, -6829, -2319, -1146, -8845, -10612, 3630, 2942,
+ -509, 5457, 1119, -3222, -3623, -6421, -9746, -8661, 5658, 8283, 8062, 6310, 1787, 454, 1766, 2750,
+ -1632, 7787, 5349, 243, -1526, 3143, 5218, 10290, 1446, -6324, -3035, -1055, 2974, -7871, 39, 3664,
+ -769, -9, -8896, 9699, 4546, -1295, 6107, -4534, 3367, 1450, -3607, 8816, 3219, -5601, 1298, 12366,
+ -7130, -4420, -6848, 3453, 3599, 4371, 609, -6059, 8057, 9067, 2408, -3523, -6908, -6822, -6636, -2017,
+ -477, 5145, -1462, -475, -2003, -3769, 7781, 4563, 4437, 2134, -2726, 15777, 2839, -1929, 2913, 2174,
+ 841, 2396, 754, 14163, 4130, -1807, -177, -3884, -6782, 9287, 1864, -599, 5913, -2587, -10749, 5856,
+ 1304, 7980, -2237, -2092, -4384, -828, 552, -6108, 2193, 10107, 6057, 9885, 13003, 8977, 4006, -926,
+ -1523, 1282, -1805, -2709, -6024, -7618, -10251, 832, -689, -1488, 1528, -1635, -4512, -3974, 3366, 5884,
+ -2891, -646, -4227, -16787, 4586, 2689, -48, 1956, -5398, -5693, 4030, 1138, 2292, 2634, 6453, 3271,
+ -3526, 9059, 2896, 8101, 3313, -270, -1336, -3002, 826, -1572, -3793, -2235, -1597, 272, 910, -778,
+ -1195, 3634, 1576, 2036, -3675, -10512, -6414, -3268, -9714, -6636, 3287, -947, 6643, 7755, 4317, 2928,
+ -592, -46, -6118, -3775, 11750, 5301, -2878, -7240, -4674, 1543, -626, -1300, -608, -1661, -4053, -3154,
+ -2514, -545, 771, 7292, 3641, 749, -1664, -1652, 2686, 8715, 10176, 4547, -6065, -7417, -6454, -4928,
+ -576, 940, 681, 2977, -2947, -1968, -6468, 10093, 7720, -2235, -3869, -8057, -4152, 7399, 8617, 5658,
+ -1043, 1637, -3699, -5968, 13092, 1526, 1185, -3128, -2234, 3343, 5773, 9935, 7870, 6240, 3284, 3932,
+ 377, 5872, 3528, 3824, -852, -1575, -3799, -8401, -5628, -3612, -2451, 1396, 1471, -1669, -579, -384,
+ -6978, -4522, -6731, -1881, 1485, -73, -38, -3990, 11379, 4104, 1154, 5492, 3709, -645, -641, -750,
+ -97, 2556, 1619, 3351, 1996, 10845, 8411, 2751, 3099, -165, -6582, -11822, 8128, 7722, 4495, 3322,
+ 950, 2744, -2039, -3959, -6098, -2113, 4512, -1699, -758, 3243, -4760, 7788, 11837, 5336, 7626, 5509,
+ -4876, 13906, -3059, 1351, 4037, 2283, 614, -5014, 2149, 613, 744, -4239, -5981, -4296, -1799, -3121,
+ -2111, 3530, -1221, 1654, 9442, 10361, 6422, 7826, 7510, 7790, 3836, -323, -761, 1652, 330, -386,
+ -3239, 3070, 7009, -1209, 6710, 213, 5225, 3105, 1173, 842, -1774, -5027, -3901, -1359, -2786, -3513,
+ 1481, 1904, 7402, 23443, 5946, -3615, -1528, -4317, -2629, 11277, 7171, 5620, 7938, 4715, 3575, -3794,
+ 2315, 5200, 63, 4010, -400, -2074, 6624, -516, -731, -2133, -10088, 6969, -3380, -7450, -7347, -6915,
+ -3407, -3447, -1422, -4020, -11809, 3562, 3865, 570, 7656, 6367, 5964, 802, -2306, 5862, 7700, 6476,
+ -17049, -2577, 3748, -1004, 990, 2569, 4487, 2137, -3540, -3508, 608, -2102, 90, 4634, 3115, 1273,
+ -1960, -1414, 1516, 9460, 6833, 2088, -3598, -3590, -2554, -1783, 2680, 2127, 939, 8562, 4170, 1914,
+ 3335, 6241, -2988, 1816, 3233, -951, 587, -5590, -3415, -926, -7987, 8897, 3700, -12712, 5722, 4683,
+ -756, 1823, 2804, 3392, -2019, 801, -2923, 43, 5720, 2302, 3604, 14791, 4960, -425, -7298, -6606,
+ 205, 5909, 8599, 4641, -4600, -1580, -4536, -5178, 2346, 6910, 3641, -2630, -6079, 351, 5478, 5524,
+ 151, 1252, -2569, 6834, 5377, 4284, 450, -1607, 7257, 4429, -2568, 9851, 9183, 2197, 20053, 9155,
+ -1462, 924, -3196, -3257, -8953, 6147, 6251, -3186, 3285, 3198, 2326, 1225, -8446, -11295, 5393, 10785,
+ -2381, -2014, -9329, 4719, -880, -2308, -4714, 4429, 3675, -1874, 3253, 9686, 12557, 9338, 4719, 3836,
+ -3103, 7031, 11258, 6883, 11690, 8131, 3644, -307, -2590, -274, 1004, -1314, -166, 3063, 695, -1815,
+ -2455, 811, -1161, 2731, 5931, 2352, 3361, -363, -7371, 2805, 4053, 3586, 7364, 242, -1692, 17531,
+ -4497, -535, 286, 214, 3804, 11412, 4562, -1157, 550, 4841, 1657, -4984, -6307, 1482, 5745, 3540,
+ -2763, -1313, -1385, 3735, -2423, 5601, 14635, 10815, 9726, 6141, 4010, 3556, -104, -3353, -7143, 7077,
+ -245, 8209, 15457, 5234, 1860, -2195, -4620, -4895, -4263, -759, 2016, 2664, 3153, 2966, 1601, 30,
+ -4764, -1351, 3227, 2660, 1556, 198, 5379, 11277, 8580, 6978, 2506, 3310, 13165, 9623, 7120, 1665,
+ -59, 558, 3194, 1299, -2918, -2455, 3754, -3394, -3634, -2782, -7987, -7903, -7058, -2214, -1060, 2183,
+ -1954, -186, -11418, -2859, -1110, -2027, -932, -2040, 1282, 174, -161, -2628, -3341, 2675, 4169, 2475,
+ -5934, -5196, 10580, 9382, 1417, -1362, -2572, -4391, 7418, 4314, 148, 31, -82, 461, -2595, -570,
+ -3639, -2081, -1014, 4355, 5943, 6217, 2491, -4106, -6520, -4050, -5030, -2053, 6821, 6135, 2456, 1015,
+ -3447, -1303, -5380, -6759, -3272, -129, -4989, -11231, 5106, 1264, -3433, -3327, -3139, -1282, 1031, 1558,
+ 4180, 1592, -3435, 2252, -4803, -6443, 8937, 1696, -5599, 9240, 5481, -328, 3197, -4392, -12452, -16482,
+ -4613, 5693, 11596, -9035, 1399, 1388, 5182, 4750, 958, 310, -866, 829, 5122, 1203, -115, -759,
+ -3551, -1843, -3272, -1753, -195, 17324, 8182, -502, -2987, -146, -2640, 6865, 6979, -3675, -6047, 12865,
+ 3739, 8307, 5634, -2783, 96, 1167, -274, -636, -5808, -8880, 835, 6363, 5092, -700, -8229, -7634,
+ -6799, -5871, 4391, 1265, -1493, 440, -7322, 2387, 1763, -1406, 4030, 8075, 8810, 5655, 1375, 2309,
+ 3191, 6527, 2671, -128, -5345, 14221, 13006, 1792, -548, -2974, -7549, -3471, 1835, -1490, -3556, -4240,
+ -3368, -1748, -3945, 8349, 2444, -5349, 5825, 4222, -1891, -3570, -10832, 8764, 2791, 5495, 9332, 5366,
+ 1020, 5766, -8313, 522, -568, -20, -2169, 3981, 6641, 4235, 1781, -4362, -7143, -3864, -2205, -3217,
+ -3300, -1346, -1200, 5950, -1315, -285, 2642, -180, 12986, 11560, 5996, 6755, -2578, -1417, 1848, 5560,
+ 10662, 13080, 11225, 419, -4335, -128, 6716, 1638, -4903, 154, -2404, -4228, 5262, -364, -5170, -12310,
+ 360, 1588, 2173, 8939, 4304, 7241, 367, -2361, 6569, 837, -4801, 8650, 7208, 5996, 3566, 1112,
+ -5017, 4300, 2649, 3064, -6110, -14292, 2204, 13008, 5245, 1594, -6536, -11045, 5146, -211, -4067, -11435,
+ -530, 1840, 187, -12175, 1984, -1576, 3659, 4293, -1971, 8025, 8287, 4420, 3935, 358, -1691, -2707,
+ -3429, 252, 1235, 3895, 13024, 5900, 317, 1720, 3724, 1510, -3576, -6091, -8218, -3620, -844, -406,
+ 2105, 7096, 3064, 3952, 2071, -2774, 8459, 1501, -10913, 1387, -405, 12863, 2328, 4475, 3498, -1584,
+ -3085, -920, -7032, 8494, 2146, 1346, 1867, -404, 1886, -1042, -378, -2121, -10433, -7336, 15525, 9808,
+ -15685, -7623, 1925, 2963, 4001, -105, 3843, 5498, 4039, 6151, 6044, 3867, 1730, 2971, 1484, -319,
+ 3080, 9412, -1223, -3973, 4734, 2248, 3127, 1119, -1738, -1669, -1477, -1472, 1412, 1213, 773, 1674,
+ -730, 2282, 495, 1849, 753, 4313, 2052, 11060, 2638, -4153, 12967, 4232, 1600, 8305, 6247, 4101,
+ 1078, -516, -6160, -2738, -3949, 549, 2665, 313, -11805, 5780, 13753, 4964, -3343, -3825, 7392, 657,
+ -3356, -672, 2091, 1930, -1942, -6931, -7983, -7306, 1452, 3417, 9758, 12537, 14305, 11570, 5653, 1593,
+ 2820, 8229, 5573, 6212, 5169, 4568, 4877, 1219, -5520, -3569, -4997, 3799, -1152, -6233, 13054, 8210,
+ -1905, -1112, -1728, 19102, 8663, -331, 3226, 1066, -1807, 8189, 5678, 1987, 4661, 3278, 7947, 11458,
+ -4574, -517, -5124, 4711, -740, 416, 4847, 4427, 11056, 3251, -1915, -3528, -2529, -2213, 1857, 1203,
+ 316, 3731, 4619, -1294, -3138, -336, 8691, 7311, 3124, 9892, 5880, 614, 1873, 1916, 3856, 3588,
+ 1323, 8284, 7332, 4197, 626, 4877, 9117, 4163, 1998, 4387, 5489, 4184, 2124, -5170, -10914, 3921,
+ -1504, 12727, 938, 3478, 1876, -1017, 389, 3233, 8278, 8027, 8392, 12663, 13264, 9858, 5767, 4287,
+ -4008, 49, -1854, -5454, -9369, 5309, -1597, 6002, 6031, -2543, -4793, -2340, -2559, 229, -983, -2068,
+ -3514, 815, -7510, -3824, -931, -1573, -1337, -1189, -2019, 245, 4084, 4416, 6165, 7239, 3899, 2461,
+ -4781, -2173, 17577, 2751, -894, 2264, 1789, -623, 992, -322, -3113, -1854, -1553, 2213, 731, 850,
+ 2054, 3456, 3747, 3842, 980, -940, -5065, -5905, 423, -2009, 74, 3933, 13511, 12742, 8908, 5783,
+ 894, 6872, -2742, 7127, 5497, -660, -2361, -3114, -5552, -884, -1825, -8536, 4278, 4047, 3263, 2117,
+ 46, 3829, 3392, 7000, 5004, 11640, 7090, 2661, 2072, 3834, 6408, 9453, 4328, -5807, -11811, -6081,
+ 1119, 3292, 8329, 5549, -1361, -4414, -15806, 7144, 6824, -4515, -1143, 4774, 1451, 5261, 4830, 5562,
+ -1393, 5662, 4446, 1807, 8826, 6248, 6415, 4547, -1665, 1181, 6405, 5864, 8293, 10387, 7545, 4688,
+ 1312, 7883, 6317, -3965, -8535, -2725, 1117, -5447, -7012, 3655, 3196, 4576, 6822, -341, -646, 6098,
+ -6332, -4527, -5839, 4942, 2805, 6652, 925, -1187, 3859, 4466, 5194, 4814, 7489, 8532, 2922, 2874,
+ -1137, 1068, 2253, 3741, -2505, 9887, 10247, 3472, 9158, 1176, -2976, 1937, -2064, 7351, 6057, 2696,
+ 532, 4702, 4601, 502, -1350, -5364, 9112, 2103, -4340, 18, -1329, -2532, 2939, 15707, 4071, -2154,
+ -628, 13794, -2239, -2982, -3391, -2332, -1483, 5699, 7418, 5487, 5469, 3426, 2471, 2248, -610, -2978,
+ 4520, 7035, 8360, 8190, 4367, 11231, 9045, 6518, 5468, 6414, -626, -2179, -2327, -6601, -11740, -18010,
+ 872, 6597, 9823, 6115, 5121, 3028, -3065, 9266, 9664, 2144, 2461, -758, -3373, -348, -421, -2786,
+ -2998, -2310, 5826, 14327, 10399, 10344, 5906, 4646, 4013, 7488, 6656, 3601, 212, 2499, 812, -4251,
+ -3455, -259, -2801, -3743, -3930, 4402, 11531, 8368, 3812, 2663, -1885, -3062, -3413, -12432, -6348, -1832,
+ -2574, 1227, -6578, -7396, -131, 1139, 3464, 2303, 6848, 4302, 422, 1994, 4840, 6023, 4369, 1222,
+ -5186, -3043, -5221, 9413, 9009, 6329, 6302, 7712, 4428, -1745, -1711, 1216, 1855, 1215, 1003, 58,
+ 3844, 4380, -2452, 17587, 5229, 106, 3809, 5238, 2909, -6280, 6367, 4649, 3777, 2815, 4377, 9833,
+ -3469, 6722, -2982, 1867, 2944, 3428, -115, -6063, 4740, 2369, 3681, 2580, 319, 76, 4169, 1079,
+ 5357, 7937, 8749, 6732, 3237, 475, 10599, 7708, 2300, 9384, 6872, 6516, 11437, 2109, -2788, -10922,
+ -2925, 1420, 3109, 500, 6953, 1289, -522, 1064, 2885, 6445, 3595, 2000, 2669, 2797, 2174, 873,
+ 1980, 6159, 1331, 1321, -1922, 6722, 11666, 3321, -1515, 1233, -1664, 9262, 9668, 2502, 13862, 9666,
+ 3582, 10575, 2715, -603, 596, -1567, 4182, 49, 2208, 1795, 10525, 9472, -2866, -8439, 7591, 11197,
+ -2356, 153, -10244, -4768, -2178, -2408, 1367, 708, 4615, 9681, 13007, 14875, 15382, 12708, 8355, 5074,
+ -358, 1803, 1987, 7888, 9168, 16089, 2288, -2716, -1669, 1078, 1165, 5324, 4412, -4354, 298, 6519,
+ 4826, 9355, 6507, 12087, 4177, -6, 2865, -2898, -5149, 6100, -1829, 80, 12459, 4967, 591, 7846,
+ -3452, 13887, -142, 4052, 5842, 3702, 4535, 2718, 4976, 3690, 1377, -72, -1938, -836, 961, -1944,
+ 4315, 5391, 6496, 1795, -2279, 20485, 16142, 9768, 8889, 6390, 1789, 3149, 4186, 487, -922, -2249,
+ -1225, 14246, 10277, 980, 2427, 180, 5713, 4730, -901, 590, 3351, 1871, 4389, 4760, 8650, 3433,
+ 1760, 3580, 5798, 6813, 4246, 17695, 7227, 4364, 2222, 13912, 11731, 10965, 14919, 7273, -6023, 6474,
+};
+
+/*----------------------------------------------------------------------------------*
+ * LSF quantization - Scaling factors
+ *----------------------------------------------------------------------------------*/
+
+/* Stable ISP vector in Q15 */
+const Word16 stable_ISP_fx[16] = { 32139, 30274, 27247, 23170, 18206, 12540, 6393, 0, -6390, -12537, -18203, -23170, -27243, -30271, -32139, 1475 };
+/* Stable LSP vector in Q15 */
+/* This LSP corresponds to GEWB_Ave_fx Q15*/
+const Word16 stable_LSP_fx[16] = { 32437, 31676, 29486, 25681, 21564, 16413, 10838, 5385, -735, -6405, -11986, -17040, -22052, -26346, -29678, -31784 };
+
+/* stable ISF vector */
+const Word16 stable_ISF_fx[M] =/*15Q16*/
+{ 1023, 2048, 3072, 4096, 5120, 6144, 7168, 8192, 9216, 10240, 11264, 12288, 13311, 14335, 15361, 3978 };
+
+/*----------------------------------------------------------------------------------*
+ * LSF quantization - Mean LSF vectors
+ *----------------------------------------------------------------------------------*/
+/* These are not used anywhere */
+/* Length 16 vector in Scale = 2.56f */
+const Word16 means_wb_cleanspeech_lsf16k0[16] = { 727, 1426, 2582, 3554, 4548, 5481, 6397, 7293, 8170, 9010, 9972, 11003, 12072, 13034, 14097, 14956 };
+/* Length 16 vector in Scale = 2.56f */
+const Word16 means_swb_cleanspeech_lsf25k6[16] = { 786, 1840, 2892, 3833, 4778, 5658, 6641, 7662, 8692, 9630, 10603, 11534, 12489, 13387, 14349, 15217 };
+/* Length 16 vector in Scale = 2.56f */
+const Word16 means_swb_cleanspeech_lsf32k0[16] = { 757, 1855, 2862, 3798, 4705, 5661, 6742, 7692, 8658, 9577, 10513, 11401, 12358, 13269, 14275, 15149 };
+
+
+/* An 16-by-1 matrix */
+const Word16 SVWB2_Ave_fx[16] = { 998, 1488, 2682, 3823, 5084, 6305, 7485, 8686, 9861, 11004, 12339, 13664, 15088, 16330, 17663, 18754 }; // Q2.56
+/* An 16-by-1 matrix */
+const Word16 IANB_Ave_fx[16] =
+{
+ 726, 1433, 2493, 3408, 4340, 5215, 6103, 6947, 7772, 8536, 9252, 10012, 10909, 12427, 13997, 15193
+}; // Q2.56
+/* An 16-by-1 matrix */
+const Word16 IAWB_Ave_fx[16] =
+{
+ 577, 1350, 2526, 3535, 4539, 5504, 6497, 7460, 8445, 9396, 10371, 11319, 12307, 13268, 14249, 15207
+}; // Q2.56
+/* An 16-by-1 matrix */
+const Word16 IAWB2_Ave_fx[16] =
+{
+ 731, 1777, 3194, 4386, 5629, 6806, 8012, 9164, 10329, 11469, 12731, 14037, 15326, 16538, 17801, 18927
+}; // Q2.56
+/* Length 16 vector in Scale = 2.56f */
+const Word16 UVNB_Ave_fx[16] = { 1018, 1764, 2856, 3751, 4611, 5410, 6233, 6961, 7685, 8304, 8859, 9325, 9977, 11741, 13699, 15074 };
+/* Length 16 vector in Scale = 2.56f */
+const Word16 UVWB_Ave_fx[16] = { 898, 1900, 3172, 4190, 5181, 6161, 7134, 8066, 8995, 9888, 10784, 11636, 12527, 13396, 14301, 15183 };
+/* Length 16 vector in Scale = 2.56f */
+const Word16 SVNB_Ave_fx[16] = { 890, 1268, 1930, 2902, 3938, 4823, 5832, 6644, 7487, 8202, 8906, 9545, 10788, 12565, 13959, 15183 };
+/* Length 16 vector in Scale = 2.56f */
+const Word16 SVWB_Ave_fx[16] = { 832, 1248, 1949, 3083, 4131, 5117, 6179, 7067, 8008, 8922, 9875, 10741, 11785, 12860, 13968, 15048 };
+/* Length 16 vector in Scale = 2.56f */
+const Word16 GEWB_Ave_fx[16] = { 742, 1350, 2354, 3495, 4446, 5456, 6434, 7331, 8309, 9218, 10145, 11044, 12042, 13063, 14101, 15103 };
+/* Length 16 vector in Scale = 2.56f */
+const Word16 GEWB2_Ave_fx[16] = { 909, 1783, 3227, 4443, 5685, 6851, 7996, 9116, 10213, 11263, 12465, 13754, 15090, 16293, 17621, 18695 };
+/* Length 16 vector in Scale = 2.56f */
+const Word16 GENB_Ave_fx[16] = { 836, 1344, 2257, 3263, 4173, 5031, 5950, 6707, 7514, 8234, 8881, 9439, 10393, 12226, 13855, 15135 };
+/* Length 16 vector in Scale = 2.56f */
+const Word16 TRNB_Ave_fx[16] = { 919, 1335, 2106, 3142, 4092, 4938, 5905, 6670, 7490, 8199, 8868, 9444, 10544, 12383, 13900, 15156 };
+/* Length 16 vector in Scale = 2.56f */
+const Word16 TRWB_Ave_fx[16] = { 834, 1326, 2151, 3341, 4305, 5299, 6318, 7198, 8167, 9071, 10001, 10867, 11871, 12912, 13986, 15046 };
+/* Length 16 vector in Scale = 2.56f */
+const Word16 TRWB2_Ave_fx[16] = { 945, 1546, 2866, 4150, 5342, 6568, 7660, 8809, 9894, 10934, 12170, 13577, 14981, 16280, 17614, 18778 };
+/* Length 16 vector in Scale = 2.56f */
+const Word16 AUNB_Ave_fx[16] = { 887, 1443, 2356, 3194, 4105, 4949, 5841, 6635, 7437, 8181, 8867, 9478, 10385, 12182, 13858, 15131 };
+/* Length 16 vector in Scale = 2.56f */
+const Word16 AUWB_Ave_fx[16] = { 810, 1468, 2476, 3417, 4396, 5342, 6311, 7215, 8171, 9078, 10030, 10969, 12014, 13075, 14146, 15133 };
+/* Length 16 vector in Scale = 2.56f */
+const Word16 AUWB2_Ave_fx[16] = { 933, 1745, 3040, 4157, 5379, 6490, 7646, 8725, 9852, 10930, 12214, 13647, 15062, 16297, 17636, 18768 };
+
+
+
+
+
+/* Length 16 vector in Q = 15 */
+const Word16 Predictor0_fx[16] = { 27361, 27361, 27361, 27197, 27197, 27197, 26378, 26460, 26214, 25985, 26460, 26460, 25985, 25723, 25723, 24740 };
+/* Length 16 vector in Q = 15 */
+const Word16 Predictor1_fx[16] = { 27034, 27034, 27034, 26640, 26313, 26640, 26640, 26132, 26214, 26214, 26460, 26870, 26870, 26706, 27034, 26640 };
+/* Length 16 vector in Q = 15 */
+const Word16 Predictor2_fx[16] = { 24248, 23593, 24510, 24248, 24510, 24019, 24019, 23757, 23757, 24019, 24248, 24248, 23593, 23101, 23593, 23101 };
+/* Length 16 vector in Q = 15 */
+const Word16 Predictor3_fx[16] = { 24248, 24248, 24740, 24248, 24510, 23757, 23429, 23101, 22610, 23101, 23593, 24740, 25002, 24740, 25002, 24838 };
+/* Length 16 vector in Q = 15 */
+const Word16 Predictor4_fx[16] = { 19005, 18350, 19268, 19005, 19268, 18776, 18776, 18514, 18514, 18776, 19005, 19005, 18350, 17859, 17695, 17203 };
+/* Length 16 vector in Q = 15 */
+const Word16 Predictor5_fx[16] = { 23839, 23593, 23593, 23839, 23839, 23593, 23593, 23593, 23839, 24084, 24347, 24576, 24576, 23364, 23364, 23364 };
+/* Length 16 vector in Q = 15 */
+const Word16 Predictor6_fx[16] = { 24084, 23839, 24084, 23593, 23593, 22938, 22381, 21791, 21135, 21955, 22381, 24347, 24576, 23593, 24576, 24347 };
+/* Length 16 vector in Q = 15 */
+const Word16 Predictor7_fx[16] = { 24347, 24084, 24347, 24347, 24347, 24084, 24347, 24576, 24576, 24740, 25068, 24347, 24084, 23839, 23364, 24740 };
+/* Length 16 vector in Q = 15 */
+const Word16 Predictor8_fx[16] = { 24740, 24740, 24740, 24576, 24576, 24576, 24084, 23839, 23593, 23364, 23839, 23839, 23364, 23101, 23101, 22118 };
+
+/* An 16-by-16 matrix */
+const Word16 CNG_SN1_fx[256] =
+{//Qlog2(2.56)
+ 600, 1640, 3039, 4257, 5512, 6740, 7989, 9169, 10393, 11612, 12880, 14100, 15378, 16554, 17816, 18918,
+ 1188, 2487, 3746, 4903, 6103, 7261, 8437, 9587, 10776, 11954, 13172, 14355, 15564, 16712, 17913, 19012,
+ 346, 799, 2259, 3555, 4876, 6175, 7516, 8803, 10073, 11323, 12631, 13938, 15282, 16553, 17817, 19039,
+ 439, 1616, 3446, 4743, 6073, 7288, 8553, 9726, 10947, 12106, 13312, 14474, 15650, 16773, 17894, 18977,
+ 921, 1800, 2976, 4007, 5105, 6137, 7178, 8150, 9057, 9914, 11009, 12545, 13671, 15502, 17428, 18927,
+ 896, 1899, 3035, 4128, 5301, 6429, 7604, 8719, 9886, 11059, 12417, 13621, 14962, 16135, 17475, 18460,
+ 722, 1507, 2537, 3437, 4328, 5190, 6018, 6841, 7587, 8343, 8925, 9511, 9919, 11075, 13613, 15021,
+ 315, 612, 1671, 2910, 3990, 5083, 6120, 7170, 8188, 9173, 10148, 11186, 12250, 13262, 14290, 15284,
+ 885, 1928, 3010, 3973, 4952, 5900, 6848, 7769, 8701, 9609, 10581, 11540, 12508, 13450, 14412, 15349,
+ 338, 1020, 2657, 3736, 4839, 5791, 6806, 7760, 8738, 9659, 10627, 11567, 12534, 13468, 14416, 15334,
+ 1126, 1964, 2999, 3855, 4764, 5608, 6482, 7286, 8109, 8827, 9570, 10649, 11999, 13125, 14223, 15252,
+ 385, 815, 2000, 2939, 3906, 4879, 5793, 6734, 7661, 8526, 9309, 10146, 11597, 12955, 14106, 15241,
+ 633, 1445, 2400, 3293, 4235, 5171, 6143, 7084, 8057, 8980, 9924, 10924, 11987, 12998, 14016, 15058,
+ 584, 1248, 2250, 3131, 4050, 4920, 5811, 6652, 7471, 8244, 8913, 9480, 10188, 12225, 13871, 15123,
+ 1157, 1820, 2745, 3505, 4354, 5097, 5932, 6648, 7408, 8034, 8635, 9083, 9977, 12228, 13819, 15108,
+ 572, 1401, 2514, 3501, 4503, 5465, 6469, 7435, 8416, 9328, 10306, 11309, 12328, 13303, 14306, 15261,
+};
+
+const Word16 SVWB2_SN1_fx[256] = {//Qlog2(2.56)
+ -257, -385, -673, 926, 1408, 874, 735, 512, 624, 587, 493, 688, 845, 521, 428, 95,
+ -32, -90, 1046, 666, 329, -59, -324, -282, -712, -783, -229, 28, -354, -434, -497, -351,
+ 182, 111, 512, 746, 365, 91, -214, -477, -401, -496, -931, -1180, -1422, -1085, -456, -9,
+ -286, -387, -325, 317, 172, 274, 238, 550, 555, 574, 618, 717, 751, 611, 441, 233,
+ 96, 178, 203, -112, -464, -591, -212, 124, 32, 192, 244, 94, -41, -293, -507, -649,
+ -94, -164, 1011, 926, 688, 461, 593, 587, 398, 400, 351, 486, 482, 424, 294, 219,
+ -260, -356, -458, -252, -162, -350, -394, -255, 30, 173, 90, 64, 93, 157, 66, 2,
+ 43, 100, -48, -596, -852, -787, -569, -536, -780, -607, -169, -125, -75, 96, 98, 154,
+ 240, 203, 404, 79, -202, -555, -718, -1023, -1158, -1390, -1537, -774, -478, -173, -63, 272,
+ -164, -291, -405, 1049, 779, 349, 224, 12, 265, 37, -182, -446, -396, -81, -16, -146,
+ 75, 45, -248, -832, 729, 416, 499, 178, -115, 16, 79, 243, 265, 77, -69, -43,
+ 639, 705, 482, -40, -529, -198, -109, -399, -242, -433, -713, -811, -934, -777, -332, 26,
+ 110, 166, -54, -792, -974, 386, 190, 192, 67, -172, -141, -298, -539, -400, -139, 80,
+ 147, 307, 168, 52, -285, -270, -212, -179, 138, 200, 194, 64, 476, 673, 636, 500,
+ 5, 38, -176, 212, 752, 433, 322, 500, 560, 276, 107, -245, -358, -768, -817, -1065,
+ -233, -294, -581, -1147, -869, 77, 144, 335, 269, 501, 638, 719, 614, 376, 219, 172
+};
+
+/* An 16-by-16 matrix */
+const Word16 SVWB2_SN2_fx[256] = {//Qlog2(2.56)
+ -100, -130, -545, -834, 489, 501, 523, 297, 137, 198, 270, 172, 17, -50, -147, -63,
+ 333, 351, 143, 142, 47, -137, -131, -323, -216, -32, 105, 264, 541, 425, 342, 153,
+ -93, -168, 184, 605, 372, 237, 186, 175, 307, 321, 448, 205, -128, -481, -477, -512,
+ -24, -30, 26, -47, -159, -88, -344, -130, -88, -280, -742, -901, -264, 176, 38, -26,
+ 258, 250, 114, -75, -186, -326, -360, -237, 268, 532, 236, -341, -556, -334, -181, -30,
+ 123, 241, 118, 205, 441, 172, 49, -158, -273, -214, -428, -729, -758, -532, -289, -112,
+ -160, -224, -512, 393, 460, 216, 179, -94, -78, -320, -473, 13, 224, 196, 127, 37,
+ -35, -65, 360, 164, -185, -563, -683, -357, -634, -61, 400, 133, -232, -264, -174, 32,
+ -140, -196, -470, -355, -532, -323, -268, -76, 260, 258, 218, 161, 206, 266, 234, 168,
+ 99, 109, -60, -368, -564, -49, 75, -60, -160, -654, -847, 162, 278, 76, -24, 42,
+ 12, 88, 124, -54, -91, 197, 289, 211, 240, 184, 10, 16, 560, 677, 619, 350,
+ -37, -91, 771, 654, 291, 165, 104, 43, -224, -365, -411, -78, -90, -20, 85, 168,
+ 45, 1, 58, 80, 293, 411, 443, 655, 604, 642, 624, 529, 373, 227, 166, 128,
+ -176, -124, -182, -131, -260, -127, 350, 460, 425, 260, -76, -400, -605, -506, -121, -49,
+ -96, -92, -274, -176, -220, -323, -399, -505, -610, -530, 124, 268, 235, 272, 128, 160,
+ -6, 80, 145, -198, -197, 38, -15, 100, 45, 58, 542, 524, 197, -128, -324, -448
+};
+
+/* SVWB2_AR1 * 2.56f */
+const Word16 SVWB2_AR1_fx[128] = {//Qlog2(2.56)
+ -28, -38, -122, 74, 296, 148, 146, 120, 148, 36, -11, -163, -223, -299, -290, -320,
+ -22, -30, -138, -319, -385, 159, 124, 51, 32, -44, -15, -78, -96, -53, 40, 64,
+ -96, -144, -205, -96, 80, 96, 152, 246, 206, 193, 265, 333, 320, 232, 131, 32,
+ 108, 106, 102, 37, -14, -17, -61, -144, -161, -160, -257, -404, -540, -316, -124, 18,
+ 22, 12, 34, -14, -52, -106, -144, -266, -346, -472, -401, -30, -4, -43, -88, -10,
+ -52, -117, -203, 415, 324, 171, 121, -31, 48, -31, -60, -65, 128, 193, 141, 67,
+ -47, -86, 430, 334, 193, 136, 85, 82, 1, -34, 47, 84, 2, -30, -77, -45,
+ -4, -14, -9, -38, -136, -242, -217, -54, -38, 179, 191, 61, 42, -3, 5, -37
+};
+
+/* SVWB2_AR2 * 2.56f */
+const Word16 SVWB2_AR2_fx[128] = {//Qlog2(2.56)
+ 12, 16, -46, -156, -329, -293, 43, 141, 61, 15, -9, 29, -74, -41, -37, 16,
+ -47, -81, -136, 82, -33, -111, -268, -293, 109, 136, 53, -58, -51, 62, 64, 14,
+ -15, -19, -171, -347, 258, 161, 88, 13, -57, -26, -59, 24, 10, 14, -41, -8,
+ 33, 38, 139, 157, 31, 65, -14, 52, 63, 30, -8, -1, -182, -341, -344, -258,
+ 14, 16, 46, 6, -54, -64, -136, -132, -318, -303, 261, 146, -19, -57, -30, 30,
+ -34, -34, 21, 93, 163, 201, 290, 257, 225, 296, 209, 197, 72, 26, 57, 1,
+ 33, 66, 73, -8, -104, 44, 31, -13, 70, 72, -17, -48, 430, 373, 218, 92,
+ 1, -2, 74, 172, 67, -3, -34, -25, -156, -219, -432, -288, -181, -35, 113, 112
+};
+
+/*----------------------------------------------------------------------------------*
+ * LSF quantization - LSF mode/codebook selection tables
+ *----------------------------------------------------------------------------------*/
+const Word16 CB_lsf[] =
+{
+ -1, /* Mode 0 : INACTIVE NB, Safety net */
+ -1, /* Mode 1 : UNVOICED NB, Safety net */
+ 0, /* Mode 2 : VOICED NB, Safety net */
+ 2, /* Mode 3 : GENERIC NB, Safety net */
+ 2, /* Mode 4 : TRANSITION NB, Safety net */
+ 4, /* Mode 5 : AUDIO NB, Safety net */
+ -1, /* Mode 6 : INACTIVE WB, Safety net */
+ -1, /* Mode 7 : UNVOICED WB, Safety net */
+ 5, /* Mode 8 : VOICED WB, Safety net */
+ 7, /* Mode 9 : GENERIC WB, Safety net */
+ 7, /* Mode 10 : TRANSITION WB, Safety net */
+ 9, /* Mode 11 : AUDIO WB, Safety net */
+ -1, /* Mode 12 : INACTIVE WB16k, Safety net */
+ -1, /* Mode 13 : UNVOICED WB16k, Safety net */
+ 14, /* Mode 14 : VOICED WB16k, Safety net */
+ -1, /* Mode 15 : GENERIC WB 16k, Safety net */
+ 10, /* Mode 16 : TRANSITION WB16k, Safety net */
+ -1, /* Mode 17 : AUDIO WB16k, Safety net */
+ 13 /* Mode 18 : CNG, Safety net */
+}; // Q0
+
+const Word16 CB_p_lsf[] =
+{
+ 0, /* Mode 0 : INACTIVE NB, Predictive */
+ 1, /* Mode 1 : UNVOICED NB, Predictive */
+ 4, /* Mode 2 : VOICED NB, Predictive */
+ 4, /* Mode 3 : GENERIC NB, Predictive */
+ -1, /* Mode 4 : TRANSITION NB, Predictive */
+ -1, /* Mode 5 : AUDIO NB, Predictive */
+ 0, /* Mode 6 : INACTIVE WB, Predictive */
+ 1, /* Mode 7 : UNVOICED WB, Predictive */
+ 6, /* Mode 8 : VOICED WB, Predictive */
+ 6, /* Mode 9 : GENERIC WB, Predictive */
+ -1, /* Mode 10 : TRANSITION WB, Predictive */
+ -1, /* Mode 11 : AUDIO WB, Predictive */
+ 0, /* Mode 12 : INACTIVE WB16k, Predictive */
+ -1, /* Mode 13 : UNVOICED WB16k, Predictive */
+ 11, /* Mode 14 : VOICED WB16k, Predictive */
+ 8, /* Mode 15 : GENERIC WB16k, Predictive */
+ -1, /* Mode 16 : TRANSITION WB16k, Predictive */
+ 10, /* Mode 17 : AUDIO WB16k, Predictive */
+ 9, /* Mode 18 : GENERIC WB, MA Predictive */
+}; // Q0
+
+
+const Word16 *const ModeMeans_fx[] = { IANB_Ave_fx, UVNB_Ave_fx, SVNB_Ave_fx, GENB_Ave_fx, TRNB_Ave_fx, AUNB_Ave_fx, IAWB_Ave_fx, UVWB_Ave_fx,
+ SVWB_Ave_fx, GEWB_Ave_fx, TRWB_Ave_fx, AUWB_Ave_fx, IAWB2_Ave_fx, NULL, SVWB2_Ave_fx, GEWB2_Ave_fx, TRWB2_Ave_fx, AUWB2_Ave_fx
+}; //Qlog2(2.56)
+const Word16 * const Predictors_fx[] = { Predictor6_fx, NULL, Predictor1_fx, Predictor3_fx, NULL, Predictor6_fx,Predictor5_fx, NULL, Predictor0_fx,
+ Predictor2_fx, NULL, Predictor5_fx, Predictor7_fx, NULL, Predictor8_fx, Predictor4_fx, NULL, Predictor7_fx
+}; // Q15
+
+const Word16 CBsizes[] =
+{
+ 1,2,4,8,16,32,64
+}; // Q0
+
+
+const Word16 CBbits[] =
+{
+ -1, /* Mode 0 : INACTIVE NB, Safety net */
+ -1, /* Mode 1 : UNVOICED NB, Safety net */
+ 4, /* Mode 2 : VOICED NB, Safety net */
+ 5, /* Mode 3 : GENERIC NB, Safety net */
+ 5, /* Mode 4 : TRANSITION NB, Safety net */
+ 4, /* Mode 5 : AUDIO NB, Safety net */
+ -1, /* Mode 6 : INACTIVE WB, Safety net */
+ -1, /* Mode 7 : UNVOICED WB, Safety net */
+ 4, /* Mode 8 : VOICED WB, Safety net */
+ 5, /* Mode 9 : GENERIC WB, Safety net */
+ 5, /* Mode 10 : TRANSITION WB, Safety net */
+ 4, /* Mode 11 : AUDIO WB, Safety net */
+ -1, /* Mode 12 : INACTIVE WB16k, Safety net */
+ -1, /* Mode 13 : UNVOICED WB16k, Safety net */
+ 4, /* Mode 14 : VOICED WB16k, Safety net */
+ -1, /* Mode 15 : GENERIC WB16k, Safety net */
+ 4, /* Mode 16 : TRANSITION WB16k, Safety net */
+ -1, /* Mode 17 : AUDIO WB16k, Safety net */
+ 4, /* Mode 18: CNG, Safety net */
+}; // Q0
+
+
+const Word16 CBbits_p[] =
+{
+ 5, /* Mode 0 : INACTIVE NB, Predictive */
+ 4, /* Mode 1 : UNVOICED NB, Predictive */
+ 3, /* Mode 2 : VOICED NB, Predictive */
+ 3, /* Mode 3 : GENERIC NB, Predictive */
+ -1, /* Mode 4 : TRANSITION NB, Predictive */
+ 0, /* Mode 5 : AUDIO NB, Predictive */
+ 5, /* Mode 6 : INACTIVE WB, Predictive */
+ 4, /* Mode 7 : UNVOICED WB, Predictive */
+ 3, /* Mode 8 : VOICED WB, Predictive */
+ 3, /* Mode 9 : GENERIC WB, Predictive */
+ -1, /* Mode 10 : TRANSITION WB, Predictive */
+ 0, /* Mode 11 : AUDIO WB, Predictive */
+ 5, /* Mode 12 : INACTIVE WB16k, Predictive */
+ -1, /* Mode 13 : UNVOICED WB16k, Predictive */
+ 3, /* Mode 14 : VOICED WB16k, Predictive */
+ 5, /* Mode 15 : GENERIC WB16k, Predictive */
+ -1, /* Mode 16 : TRANSITION WB16k, Predictive */
+ 5, /* Mode 17 : AUDIO WB16k, Predictive */
+ 5, /* Mode 9 : GENERIC WB, Predictive */
+}; // Q0
+
+
+
+const Word16 BitsVQ[]=
+{
+ -1, /* Mode 0 : INACTIVE NB, Safety net */
+ -1, /* Mode 1 : UNVOICED NB, Safety net */
+ 8, /* Mode 2 : VOICED NB, Safety net */
+ 9, /* Mode 3 : GENERIC NB, Safety net */
+ 9, /* Mode 4 : TRANSITION NB, Safety net */
+ 4, /* Mode 5 : AUDIO NB, Safety net */
+ -1, /* Mode 6 : INACTIVE WB, Safety net */
+ -1, /* Mode 7 : UNVOICED WB, Safety net */
+ 8, /* Mode 8 : VOICED WB, Safety net */
+ 9, /* Mode 9 : GENERIC WB, Safety net */
+ 9, /* Mode 10 : TRANSITION WB, Safety net */
+ 4, /* Mode 11 : AUDIO WB, Safety net */
+ -1, /* Mode 12 : INACTIVE WB16k, Safety net */
+ -1, /* Mode 13 : UNVOICED WB16k, Safety net */
+ 8, /* Mode 14 : VOICED WB16k, Safety net */
+ -1, /* Mode 15 : GENERIC WB16k, Safety net */
+ 8, /* Mode 16 : TRANSITION WB16k, Safety net */
+ -1, /* Mode 17 : AUDIO WB16k, Safety net */
+ 4, /* Mode 18: CNG, Safety net */
+}; // Q0
+
+
+const Word16 BitsVQ_p[]=
+{
+ 5, /* Mode 0 : INACTIVE NB, Predictive */
+ 8, /* Mode 1 : UNVOICED NB, Predictive */
+ 6, /* Mode 2 : VOICED NB, Predictive */
+ 6, /* Mode 3 : GENERIC NB, Predictive */
+ -1, /* Mode 4 : TRANSITION NB, Predictive */
+ 0, /* Mode 5 : AUDIO NB, Predictive */
+ 5, /* Mode 6 : INACTIVE WB, Predictive */
+ 12, /* Mode 7 : UNVOICED WB, Predictive */
+ 6, /* Mode 8 : VOICED WB, Predictive */
+ 6, /* Mode 9 : GENERIC WB, Predictive */
+ -1, /* Mode 10 : TRANSITION WB, Predictive */
+ 0, /* Mode 11 : AUDIO WB, Predictive */
+ 5, /* Mode 12 : INACTIVE WB16k, Predictive */
+ -1, /* Mode 13 : UNVOICED WB16k, Predictive */
+ 6, /* Mode 14 : VOICED WB16k, Predictive */
+ 5, /* Mode 15 : GENERIC WB16k, Predictive */
+ -1, /* Mode 16 : TRANSITION WB16k, Predictive */
+ 5, /* Mode 17 : AUDIO WB16k, Predictive */
+ 5, /* Mode 18 : GENERIC WB, MA Predictive */
+}; // Q0
+
+
+const Word16 predmode_tab_float[][6] =
+{
+ {1,1,2,2,0,2},
+ {1,1,2,2,0,2},
+ {1,-1,2,1,0,1},
+ {1,1,2,1,0,1} /* should check how is the cb for audio mode at 13.2*/
+};
+
+const Word16 predmode_tab[][6] =
+{
+ {1,1,2,2,0,2},
+ {1,1,2,2,0,2},
+ {1,-1,2,1,0,1},
+ {1,1,2,1,0,2} /* should check how is the cb for audio mode at 13.2*/
+}; // Q0
+
+
+const Word16 SVNB_SN1_fx[256] =
+{//Qlog2(2.56)
+ 135, 109, 135, -153, -549, 214, 416, 195, 291, 247, 100, -127, -579, -160, -66, -32,
+ -107, -150, -274, -149, 642, 594, 338, 183, 81, -31, -14, -150, -387, -40, -44, -18,
+ 73, 42, 171, 339, 213, 42, -137, -277, -379, -441, -440, -478, 270, 126, -4, 6,
+ -307, -479, -636, -596, -100, 83, 167, 200, 260, 376, 523, 1051, 1142, 490, 249, 108,
+ -148, -215, -324, -570, -917, -685, -208, 127, 285, 353, 441, 940, 1100, 458, 229, 100,
+ 427, 432, 548, 426, 133, 13, -9, -141, -108, -144, -195, -419, -733, -144, -109, -45,
+ -115, -220, -194, 661, 896, 688, 489, 351, 211, 258, 147, 30, -746, -784, -156, -95,
+ 16, -48, -88, -430, -798, 36, 204, 68, 174, 162, 20, 61, 627, 266, 102, 48,
+ -252, -370, -630, -614, 680, 1024, 869, 598, 419, 259, 193, 27, 90, 156, 53, 27,
+ -48, 33, 26, -227, -556, -766, -391, 231, 413, 282, 226, 89, 194, 187, 44, 30,
+ -204, -291, -345, -131, 125, 72, 16, -29, -106, -49, -27, 183, 714, 277, 114, 49,
+ -11, 205, 285, 69, -58, -207, -301, -160, -30, -2, 12, -99, -580, -178, -80, -41,
+ 120, 189, 281, 427, 234, 138, 124, 126, 50, 205, 121, 76, -797, -1204, -235, -133,
+ 63, -18, 146, 666, 480, 236, 134, -39, -97, -130, -175, -378, -746, -159, -106, -46,
+ 386, 399, 415, 157, -175, -282, -315, -318, -222, -225, -267, -342, 317, 152, 15, 14,
+ 39, 56, 71, -95, -387, -509, -595, -466, -395, -186, -24, 421, 814, 292, 127, 52
+};
+
+/* An 16-by-16 matrix in Scale = 2.56f */
+const Word16 SVNB_SN2_fx[256] =
+{//Qlog2(2.56)
+ -16, 111, 111, -89, -115, -404, -514, 162, 277, 41, -94, -89, 15, 31, 2, 2,
+ -82, -99, -25, -287, -464, 204, 18, -123, -38, 56, 109, 198, 160, 96, 41, 19,
+ -95, -62, -242, -415, 318, 118, -121, 44, 74, 40, 85, 114, 52, 36, 21, 8,
+ 29, 40, 43, 23, -202, -149, 288, 149, -20, -109, -186, -275, -127, 18, -25, -6,
+ 20, 36, -97, -228, 565, 508, 134, 42, -70, -237, -258, -259, -123, -9, -29, -10,
+ -72, -169, 492, 463, 193, 204, -13, -75, -82, -125, -181, -230, -181, -10, -40, -12,
+ -108, -221, -229, 648, 575, 288, 146, 1, -14, -4, -51, -120, -81, -14, -17, -5,
+ -199, -264, -309, 209, 8, -128, 24, -47, 87, 257, 240, 185, 93, 70, 34, 16,
+ 25, 82, -60, -155, -407, -615, 29, 100, -113, 32, 207, 258, 203, 111, 49, 21,
+ 37, 127, 95, 4, 112, -45, -217, -158, -277, -407, -304, -152, 72, 52, -6, 0,
+ -30, -81, -116, -416, -219, 677, 538, 328, 213, 60, -60, -109, -78, 0, -5, 0,
+ 9, -15, 26, 75, -175, -336, -673, -586, 238, 310, 198, 189, 212, 126, 48, 24,
+ -18, -4, -80, 102, 130, -116, -268, -471, -567, -104, 205, 221, 143, 81, 29, 12,
+ 4, 39, 65, 115, 88, 189, 136, 124, 49, 106, 37, 89, -375, -626, -114, -73,
+ 540, 525, 472, 221, 118, -31, 15, 7, -71, -139, -108, -93, -13, -4, -13, -8,
+ -44, -44, -143, -272, -525, -365, 479, 502, 312, 225, 161, 72, 28, 42, 26, 12
+};
+
+const Word16 GETRNB_SN1_fx[512] =
+{//Qlog2(2.56)
+ -119, -271, -427, 447, 321, 58, 37, -105, -65, 99, 106, 21, -277, 53, 9, -6,
+ -93, -241, -433, -826, -1028, 17, 180, 138, 320, 234, 152, 235, 973, 594, 199, 96,
+ -300, -474, -553, -497, -374, -231, -224, -170, -145, 51, 154, 714, 1338, 690, 271, 118,
+ -115, -228, -248, 9, -27, -196, -240, -269, -293, -310, -276, -254, 769, 481, 117, 59,
+ 172, 58, 469, 585, 512, 336, 145, -52, -167, -344, -379, -487, 285, 377, 27, 27,
+ 81, 34, 574, 859, 818, 702, 521, 344, 177, 23, -116, -274, -611, -78, -61, -35,
+ 76, 19, -104, -388, -687, 54, 279, 144, 237, 223, 110, 9, -335, 4, 3, -10,
+ 115, 380, 486, 446, 389, 316, 239, 249, 197, 207, 162, 141, -435, -1516, -409, -136,
+ -146, -348, -425, 645, 998, 790, 609, 468, 282, 287, 153, 87, -461, -592, -88, -64,
+ -249, -471, -835, -642, 589, 960, 887, 637, 442, 286, 242, 132, 142, 299, 99, 44,
+ 128, 37, -120, -314, -571, -730, -868, -558, -259, -109, 8, 413, 1145, 593, 210, 92,
+ 151, 331, 267, 130, -24, -89, -133, -43, -75, 57, 19, 94, -469, -796, -124, -90,
+ -339, -468, -292, -34, 76, 179, 231, 269, 259, 281, 275, 204, -93, 157, 53, 16,
+ 33, 176, 25, -201, -311, -497, -509, -242, -47, 6, 86, 48, -165, 176, 24, 8,
+ 27, 223, 461, 500, 479, 475, 489, 560, 635, 741, 924, 1347, 1546, 806, 277, 54,
+ 510, 464, 402, 114, -80, -285, -290, -321, -283, -368, -325, -424, 388, 402, 52, 38,
+ 521, 614, 732, 549, 428, 278, 180, 81, 14, -110, -204, -355, -649, -32, -56, -36,
+ 72, 26, 262, 263, 159, 113, 60, -10, -73, -121, -201, -329, -768, -61, -60, -39,
+ 85, 57, 116, -40, -78, -159, -154, -247, -220, -366, -331, -532, -35, 344, 0, 25,
+ 527, 919, 1339, 1225, 1190, 1023, 774, 577, 393, 160, -4, -184, -281, 29, -21, -12,
+ -230, -283, -338, -379, -313, -293, -163, -122, 15, 97, 243, 168, 361, 449, 102, 61,
+ 378, 369, 369, 136, 42, -72, -73, -154, -155, -260, -270, -444, -562, 173, -36, -9,
+ 168, 108, -36, -347, -559, -436, -254, -263, -236, -227, -247, -238, 796, 488, 123, 62,
+ -151, -118, 163, 452, 430, 484, 456, 418, 377, 363, 256, 183, -403, -1429, -382, -126,
+ -204, -366, -652, -512, 428, 353, 182, 88, -10, -94, -54, -11, 801, 527, 151, 76,
+ 60, 79, -169, -465, -789, -844, -55, 181, 209, 172, 210, 107, 260, 399, 91, 52,
+ -69, -205, -377, -164, 647, 584, 302, 151, 32, -135, -136, -223, -269, 170, 4, 5,
+ 38, 418, 885, 979, 990, 1027, 870, 804, 669, 537, 360, 241, -336, -1281, -338, -111,
+ -420, -700, -912, -622, -337, -51, 67, 173, 326, 554, 766, 1395, 1656, 894, 390, 178,
+ -141, -252, -507, -822, -1084, -845, -280, 20, 149, 242, 393, 951, 1428, 740, 303, 135,
+ -120, -37, 31, 105, 72, 99, 53, 117, 59, 171, 120, 177, -414, -993, -160, -98,
+ -382, -612, -631, -167, 4, 104, 130, 141, 242, 325, 348, 430, 1048, 651, 222, 109
+};
+
+/* An 16-by-16 matrix in Scale = 2.56f */
+const Word16 GETRNB_SN2_fx[256] =
+{//Qlog2(2.56)
+ -27, 71, 45, -4, 28, 69, 25, 94, 45, 90, 45, 87, -177, -567, -116, -59,
+ -208, -147, 531, 399, 199, 113, -21, -28, -34, -38, -48, -46, -47, 18, -1, -1,
+ 69, -20, -115, -355, -380, 388, 379, 193, 134, 37, -42, -60, -35, 29, 6, 5,
+ 107, 89, -98, -189, 379, 289, 68, 22, -71, -179, -187, -192, -137, 4, -17, -7,
+ -44, -81, -371, -448, 226, 75, -52, 43, 40, 36, 79, 120, 130, 76, 36, 15,
+ 131, 115, 192, 177, 25, -7, -23, -95, -132, -184, -206, -245, -200, -12, -29, -11,
+ 45, -25, -249, 50, -189, -358, 253, 145, -39, 27, 34, -20, -52, 13, 1, 2,
+ -254, -155, 23, -89, -30, 23, -23, -21, -45, -86, -92, -109, -48, 52, 3, 3,
+ -248, -233, 139, 213, 232, 361, 349, 401, 373, 301, 230, 207, 204, 101, 32, 14,
+ 491, 546, 409, 147, 34, -18, 52, 59, 48, 27, 14, 7, -1, -37, -16, -9,
+ 36, 41, 0, -21, -29, -64, -207, -346, -516, -355, -64, 73, 156, 94, 30, 11,
+ -28, -173, -278, 506, 427, 164, 111, 21, -33, -61, -78, -90, -32, 39, 4, 4,
+ -44, -60, -215, -373, -485, -270, 12, 151, 271, 265, 215, 178, 153, 71, 32, 17,
+ 110, 155, -29, -259, -218, -183, -175, -132, -85, -98, -87, -93, -77, 0, -9, -4,
+ -116, -14, 235, 1, -238, -398, -419, -55, 109, 77, 62, 74, 73, 47, 16, 8,
+ -20, -108, -219, 246, 20, -184, -328, -449, -67, 142, 125, 110, 91, 74, 28, 13
+};
+
+/* An 16-by-16 matrix in Scale = 2.56f */
+const Word16 AUNB_SN1_fx[256] =
+{//Qlog2(2.56)
+ -180, -79, -51, 39, 66, 99, 48, 108, 56, 127, 34, 46, -470, -845, -141, -90,
+ -212, 82, 284, 422, 416, 416, 313, 289, 233, 210, 108, 55, -439, -1323, -336, -123,
+ -9, 405, 532, 659, 710, 798, 844, 971, 1072, 1181, 1464, 1913, 2028, 1232, 549, 265,
+ 75, 49, 330, 493, 448, 329, 204, 67, -18, -134, -235, -400, -605, -30, -67, -36,
+ -9, -7, -95, -222, -322, -421, -321, -233, -110, -86, 67, -19, 3, 345, 41, 30,
+ 153, 34, -172, -386, -500, -548, -503, -420, -317, -207, -114, 183, 1096, 661, 198, 94,
+ 616, 501, 471, 220, 157, 55, 4, -161, -178, -314, -267, -389, 216, 429, 46, 38,
+ -559, -854, -789, -369, -153, 64, 146, 296, 388, 520, 574, 958, 1481, 898, 340, 164,
+ 131, 137, 116, 57, 64, -21, -38, -112, -123, -199, -214, -379, -641, 83, -53, -21,
+ -101, -324, -648, -801, -835, -737, -501, -296, -86, 144, 400, 1025, 1501, 861, 322, 151,
+ -231, -397, -512, -506, -308, -200, -127, -91, -18, 17, 94, 114, 798, 625, 161, 88,
+ -518, -617, -201, 103, 258, 279, 273, 267, 281, 251, 214, 114, 58, 270, 70, 31,
+ 17, -86, -78, -82, -22, -73, -171, -299, -334, -431, -422, -526, 517, 511, 71, 53,
+ 276, 182, -40, -336, -461, -93, 342, 267, 166, 18, -43, -196, -146, 236, 18, 14,
+ 227, 338, 224, 188, 107, 80, 57, 92, 34, 80, -5, -4, -515, -927, -174, -100,
+ 731, 744, 797, 675, 590, 438, 328, 215, 144, 24, -96, -239, -486, -175, -65, -41
+};
+
+const Word16 SVWB_SN1_fx[256] =
+{//Qlog2(2.56)
+ -71, -61, -170, -563, -962, -845, 186, 421, 282, 344, 260, 155, 186, 52, -18, -11,
+ -107, -139, -289, -270, 788, 615, 249, 174, -1, -24, 159, 106, -46, -183, -187, -107,
+ -144, -221, -215, 359, 192, -34, -186, -326, -256, -124, -49, 84, 214, 237, 186, 91,
+ 218, 332, 335, 41, -191, -394, -614, -543, -415, -379, -285, -153, -86, -101, -69, -13,
+ 587, 616, 732, 419, 270, 252, 102, 40, 53, -35, -57, -34, 19, -14, -15, -120,
+ -76, -222, -127, 1216, 1188, 815, 532, 320, 311, 228, 34, -59, -96, -86, -44, -38,
+ -176, -282, -507, -455, 1122, 1359, 965, 742, 610, 448, 474, 412, 185, 127, 127, -24,
+ -156, -225, 16, 458, 423, 438, 393, 400, 525, 658, 682, 681, 612, 438, 267, 68,
+ 89, 120, 172, 355, 195, -8, -22, -67, -110, -40, -93, -163, -382, -685, -926, -468,
+ -227, -362, -452, -577, -213, -22, 56, 82, 132, 216, 348, 420, 358, 299, 257, 143,
+ 38, -77, 117, 856, 486, 282, 16, -154, -130, -315, -618, -783, -892, -545, -88, 59,
+ 218, 324, 232, -162, -583, -552, 126, 62, -40, -27, -227, -348, -334, -324, -238, -65,
+ 82, 16, -20, -539, -787, 604, 340, 259, 260, -53, -251, -211, -12, 127, 171, 99,
+ -24, 168, 202, -142, -223, -448, -282, 122, 148, 155, 363, 380, 347, 263, 124, -68,
+ 165, 150, 226, 95, -172, -257, -413, -510, -533, -734, -1014, -1206, -834, -162, 6, 97,
+ -78, -72, -81, -322, -605, -731, -740, -564, -356, -219, -151, 11, 200, 237, 212, 170
+};
+
+const Word16 SVWB_SN2_fx[256] =
+{//Qlog2(2.56)
+ -126, -152, -342, -423, 311, 95, 3, 29, -93, 4, 227, 193, 142, 120, 93, 62,
+ 190, 258, 382, 310, 166, -11, -77, -67, -217, -327, -330, -378, -461, -309, -142, -47,
+ -16, -58, -77, -339, -534, 469, 399, 237, 290, 135, 34, 86, -14, -77, -30, 10,
+ 13, -4, 644, 572, 412, 438, 272, 286, 234, 177, 118, 147, 131, 138, 127, 38,
+ -73, -88, -112, 42, 36, 141, 424, 386, 504, 576, 523, 483, 431, 328, 233, 59,
+ -120, -169, -270, -445, -593, -268, -133, -138, -11, 56, 133, 210, 166, 116, 122, 137,
+ 282, 370, 255, 76, -89, -191, 139, 80, 12, 176, 185, 145, 244, 253, 173, -18,
+ 13, 14, -43, 73, -59, -270, -448, -622, -59, 374, 353, 293, 189, -54, -199, -122,
+ -75, -106, -281, -312, 585, 405, 185, 62, -176, -319, -330, -400, -418, -162, -4, 78,
+ -31, -11, -79, -83, -88, -274, -343, -431, -623, -518, -148, -11, -17, -21, 21, 90,
+ -101, -173, -240, 444, 303, 121, 104, -37, 185, 134, -45, -136, -164, 4, 153, 114,
+ -8, 40, 107, -76, -254, -551, -673, 288, 318, 25, 14, -62, -97, -2, 13, -20,
+ 87, 127, 80, 216, 336, 147, 188, 165, -10, 125, 193, 87, -126, -396, -736, -669,
+ 2, 4, 96, 185, 6, 62, -37, -136, -177, -250, -227, 201, 744, 651, 351, 74,
+ -16, -39, -82, -177, -380, -183, -24, -109, -194, -407, -641, -615, -157, 146, 191, 167,
+ -21, -12, -39, -63, -159, -128, 20, 6, 16, 39, -60, -243, -594, -733, -364, 46
+};
+
+const Word16 GETRWB_SN1_fx[512] =
+{//Qlog2(2.56)
+ -232, -191, 282, 248, 344, 390, 428, 490, 538, 592, 620, 607, 533, 372, 261, 136,
+ -59, -227, -418, -288, -247, -448, -501, -644, -760, -922, -1112, -1204, -523, -130, 12, 131,
+ 139, 838, 1402, 1327, 1465, 1391, 1371, 1342, 1220, 1147, 1041, 910, 733, 518, 335, 181,
+ 211, 148, -94, -275, -484, -586, -541, -634, -583, -511, -424, -322, -285, -299, -194, -87,
+ 410, 362, 337, 73, -36, -113, -180, -274, -373, -493, -501, -473, -393, -361, -271, -251,
+ -85, -366, -819, -532, 753, 688, 414, 203, 24, -43, 129, 60, -100, -123, -97, -114,
+ 4, 37, 484, 514, 340, 225, 89, 59, 40, 3, -5, -1, -11, -49, -43, -48,
+ -223, -471, -661, -567, -496, -519, -464, -542, -484, -343, -276, -185, -43, 17, 84, 133,
+ -106, -312, -668, -741, 385, 329, 121, -157, -423, -710, -957, -1280, -1143, -330, -20, 131,
+ 250, 157, 71, -310, -552, -740, -745, -778, -827, -1064, -1336, -1629, -788, -195, -44, 131,
+ 140, 633, 970, 864, 867, 761, 683, 648, 572, 544, 516, 469, 383, 238, 143, 55,
+ 116, 143, 229, 134, -25, -120, -232, -333, -535, -642, -985, -1259, -1873, -1727, -330, -10,
+ -64, -82, -62, -232, -308, -346, -296, -272, -153, -26, 108, 205, 232, 158, 129, 53,
+ 82, -92, -309, -791, -1128, -259, -243, -405, -367, -637, -903, -1084, -675, -199, 17, 146,
+ -247, -569, -886, -758, -334, -206, -158, -150, -64, 57, 190, 252, 261, 210, 163, 129,
+ -23, -319, -458, 791, 718, 400, 233, -81, -174, -400, -758, -1048, -1338, -1038, -288, -6,
+ 50, 462, 303, -47, -122, -134, 15, 137, 179, 222, 266, 249, 219, 123, 80, 30,
+ -116, -332, -650, -1104, -1367, -691, -376, -295, -178, -199, -170, -24, 125, 95, 125, 168,
+ -66, -314, -526, 325, 156, -56, -114, -287, -126, -185, -292, -298, -189, -81, 1, 23,
+ 147, -30, -291, -771, -939, 262, 182, 126, 127, -100, -163, -134, -91, -95, -52, -19,
+ -225, -496, -449, -61, 46, 135, 182, 247, 324, 404, 457, 464, 420, 305, 209, 106,
+ 418, 312, 415, 74, -156, -345, -400, -634, -769, -1057, -1362, -1841, -1848, -471, -147, 87,
+ 38, 19, -232, -552, -698, -941, -483, 119, 54, -34, 70, -68, -144, -192, -253, -236,
+ 80, -30, -214, -157, -292, -312, -283, -347, -384, -372, -487, -503, -746, -950, -1372, -644,
+ 44, 55, 124, 181, 125, 109, 61, 29, -73, -54, -206, -278, -638, -929, -1563, -1742,
+ 802, 823, 726, 353, 272, 122, 117, 94, 80, 40, 68, 47, 42, -19, -26, -69,
+ 50, -97, -306, -666, -918, -1109, -1124, -776, -710, -728, -675, -486, -150, -3, 93, 160,
+ 81, -144, -131, 319, 227, -96, -236, -517, -711, -949, -1231, -1644, -1625, -444, -117, 86,
+ -230, -237, 586, 799, 931, 1023, 1077, 1179, 1133, 1101, 1027, 909, 731, 515, 330, 171,
+ 448, 632, 1047, 782, 631, 390, 155, -82, -342, -685, -1103, -1520, -1779, -931, -214, 34,
+ -77, -352, -353, 787, 938, 677, 513, 352, 284, 278, 247, 181, 141, 73, 8, -39,
+ 54, 42, -67, -298, -465, -593, -533, -547, -626, -741, -977, -1317, -1665, -613, -119, 80
+};
+
+const Word16 GETRWB_SN2_fx[256] =
+{//Qlog2(2.56)
+ -202, -246, -356, -356, -232, -164, -79, 4, 78, 130, 152, 165, 170, 141, 90, 70,
+ 38, 78, -72, -185, -446, -552, 269, 295, 104, 77, -54, -184, -168, -72, -32, -2,
+ 69, 93, 39, 116, 100, 46, 50, -1, -2, 62, 8, -105, -404, -656, -494, -224,
+ -285, -305, 263, 97, 29, 33, -24, 54, 35, 25, -4, -6, -30, 13, 20, 21,
+ -28, -70, -160, 34, 5, -145, -264, -425, -539, -329, -19, 228, 411, 280, 141, 51,
+ 244, 245, 19, -319, -461, -184, -10, 47, 220, 293, 309, 330, 281, 140, 71, 12,
+ -128, -251, -374, 424, 279, 68, 35, -68, 13, 45, -6, -41, -73, -17, 8, 27,
+ -55, -7, 438, 500, 493, 442, 286, 211, 68, -39, -117, -167, -180, -131, -75, -63,
+ 30, 31, 69, 114, -172, -407, -596, -391, 102, 169, 158, 131, 46, 4, -6, -3,
+ 69, 76, 33, 238, 164, 119, 160, 165, 273, 342, 383, 419, 456, 378, 262, 96,
+ -55, 43, -59, -273, -200, -286, -287, -221, -247, -245, -194, -160, -129, -36, -31, 3,
+ -35, -46, -272, -357, 484, 246, -11, 21, -123, -197, -102, -94, -96, -22, 6, 6,
+ -117, -188, -252, -227, 0, 460, 506, 526, 501, 389, 250, 131, -28, -32, 24, 17,
+ 399, 511, 390, 146, 80, -84, -81, -57, -123, -138, -95, -82, -51, -33, -14, -45,
+ -9, 12, 300, 304, 182, 27, -197, -258, -344, -393, -384, -318, -140, -5, -6, 6,
+ 64, 25, -7, -256, -306, 381, 243, 96, -17, -190, -285, -246, -65, 48, 37, 29
+};
+
+const Word16 AUWB_SN1_fx[256] =
+{//Qlog2(2.56)
+ 328, 137, 358, 330, 184, 145, -60, -294, -555, -784, -945, -872, -601, -337, -155, -33,
+ 32, -212, -488, -651, -752, -877, -892, -886, -853, -795, -705, -549, -330, -224, -127, -9,
+ 372, 327, 197, 33, 13, -55, -87, -124, -125, -148, -144, -168, -175, -184, -127, -125,
+ 752, 727, 623, 519, 449, 350, 309, 289, 272, 252, 185, 124, 118, 35, 22, -20,
+ 14, 144, 296, 432, 416, 325, 177, 166, 151, 123, 109, 104, 47, -22, -45, -49,
+ 310, 112, -141, -529, -654, -53, 162, -33, -297, -551, -772, -817, -540, -287, -95, -7,
+ -158, 241, 443, 543, 559, 579, 566, 606, 610, 622, 602, 578, 485, 331, 197, 104,
+ -471, -530, 37, 272, 397, 442, 466, 523, 561, 592, 608, 576, 485, 348, 222, 133,
+ 162, 0, -87, -85, -151, -331, -410, -603, -767, -1030, -1348, -1812, -1735, -678, -284, -6,
+ -156, 36, 15, 26, 41, 118, 201, 265, 339, 382, 420, 435, 377, 264, 159, 84,
+ -69, -274, -411, -158, 60, -56, -190, -305, -371, -389, -411, -407, -338, -276, -173, -99,
+ 0, -26, -196, -379, -369, -327, -193, -148, -77, -10, 63, 98, 98, 49, 40, -5,
+ -149, -432, -729, -923, -927, -766, -568, -455, -333, -219, -122, -29, 11, 9, 20, 54,
+ 177, 64, -60, -232, -411, -552, -557, -550, -509, -464, -380, -331, -297, -288, -215, -170,
+ -16, 439, 971, 1104, 1209, 1323, 1339, 1374, 1317, 1223, 1107, 983, 781, 535, 315, 151,
+ -432, -727, -686, -340, -156, -40, 18, 102, 169, 257, 306, 335, 296, 213, 137, 97
+};
+
+/* An 16-by-16 matrix in Scale = 2.56f */
+const Word16 TRWB2_SN1_fx[256] =
+{//Qlog2(2.56)
+ -74, -384, -764, -964, -1122, -912, -819, -740, -728, -572, -379, -317, -250, -51, -67, 85,
+ -311, -618, -439, -108, 156, 257, 404, 543, 643, 729, 732, 572, 446, 329, 236, 164,
+ 523, 1549, 1557, 1476, 1374, 1192, 1068, 923, 901, 788, 717, 401, 262, 6, -100, -368,
+ -13, -80, -189, -386, -486, -357, -216, -63, 65, 189, 248, 194, 218, 219, 205, 169,
+ -104, -519, -772, 492, 224, 18, -203, -244, -126, -220, -362, -417, -271, -71, -34, -50,
+ -202, 124, 811, 975, 1326, 1468, 1613, 1527, 1474, 1366, 1220, 906, 700, 509, 351, 207,
+ -57, -196, -238, -281, -267, -239, -190, -137, -27, 4, 77, -178, -256, -553, -669, -1105,
+ -183, -211, 804, 789, 685, 529, 479, 403, 371, 313, 279, 49, -19, -156, -179, -335,
+ 758, 848, 608, 313, 271, 176, 177, 73, 106, 61, 59, -159, -203, -287, -268, -343,
+ 199, 70, 95, -29, -245, -411, -745, -1009, -1473, -1921, -2633, -1648, -537, -284, -87, 207,
+ 82, -217, -460, -646, -718, -821, -983, -1282, -1580, -2108, -1863, -609, -407, -122, -50, 243,
+ -132, 364, 364, 340, 489, 496, 596, 606, 704, 756, 777, 616, 521, 409, 305, 211,
+ 123, -189, -91, -306, -319, -407, -600, -679, -911, -855, -566, -249, -65, -1, -65, -25,
+ 79, -58, -103, -150, -268, -265, -426, -479, -614, -671, -1005, -1378, -2027, -1547, -568, -52,
+ -275, -669, -1070, -1097, -688, -433, -340, -148, -27, 194, 309, 277, 229, 188, 82, 127,
+ 397, 1343, 1482, 1729, 1978, 2012, 1969, 1852, 1729, 1574, 1407, 1087, 848, 636, 431, 278
+};
+
+/* An 16-by-16 matrix in Scale = 2.56f */
+const Word16 TRWB2_SN2_fx[256] =
+{//Qlog2(2.56)
+ 50, -66, -486, -850, 504, 345, 261, 10, -207, -218, -174, -18, 72, 69, 3, 24,
+ -171, -439, -632, 390, 143, -89, -292, -314, -227, -157, 33, 181, 185, 204, 128, 167,
+ 458, 459, 78, -250, -365, -381, -353, -382, -327, -284, -191, -18, 3, 37, 29, 95,
+ -169, -227, -423, -448, -485, -426, -364, -284, -238, -184, -228, -190, -145, 17, 65, 145,
+ -4, -120, -170, -333, -677, -782, -719, -391, -112, 232, 464, 392, 275, 215, 121, 139,
+ -94, -130, 453, 295, -45, -286, -444, -473, -519, -428, -268, -40, -12, 46, 39, 118,
+ -189, -245, 805, 815, 518, 293, 162, 110, -67, -158, -223, -120, -36, 15, 26, 60,
+ 23, 130, 107, 0, -31, -66, 33, 22, 101, -10, -32, -232, -281, -590, -672, -1089,
+ 51, 106, 157, 132, 40, 11, -73, -66, -165, -294, -561, -770, -742, -489, -202, 4,
+ 25, 230, 286, 179, 75, 18, 15, 24, 109, 187, 310, 334, 328, 291, 237, 212,
+ -238, -492, -550, 563, 764, 610, 542, 427, 373, 261, 166, 171, 122, 34, -21, -92,
+ -359, -462, -10, 22, -42, -2, 78, 167, 154, 155, 74, 73, 66, 94, 89, 126,
+ -5, -110, -374, -546, -386, -136, 95, 305, 437, 570, 615, 558, 463, 335, 209, 151,
+ 23, 376, 292, 235, 485, 519, 657, 549, 478, 338, 186, 7, -28, -155, -95, -188,
+ 166, 139, -277, -716, -822, 234, 319, 326, 234, 36, -155, -317, -247, -80, 49, 117,
+ 431, 853, 745, 512, 325, 139, 83, -31, -25, -47, -17, -12, -24, -43, -5, 13
+};
+
+/* An 16-by-16 matrix in Scale = 2.56f */
+const Word16 AUWB2_SN1_fx[256] =
+{//Qlog2(2.56)
+ -107, -446, -835, -1041, -1152, -1161, -1146, -969, -828, -533, -251, -242, -139, 172, 95, 466,
+ 1052, 1008, 1052, 875, 864, 748, 783, 690, 754, 715, 688, 342, 195, -32, -251, -509,
+ -311, -170, 366, 632, 748, 863, 983, 1042, 1118, 1188, 1133, 895, 728, 621, 460, 418,
+ 608, 525, 322, 30, -237, -483, -862, -1178, -1651, -2184, -2770, -1349, -430, -28, 128, 562,
+ 296, 171, -192, -429, -488, -470, -492, -473, -448, -352, -242, -309, -337, -210, -265, -182,
+ 831, 703, 456, 217, 165, 65, 17, -53, -67, -78, -38, -222, -340, -329, -349, -391,
+ 162, -13, -158, -335, -526, -705, -986, -1245, -1640, -2149, -2754, -1344, -372, -12, 134, 564,
+ -79, -389, -569, -699, -811, -940, -1058, -1299, -1534, -2077, -1953, -507, -216, 143, 191, 607,
+ -106, -116, -210, -225, -323, -330, -494, -491, -700, -757, -1057, -1424, -2222, -1509, -259, 348,
+ -366, -748, -1177, -1216, -1017, -698, -444, -154, 10, 285, 361, 284, 255, 359, 187, 365,
+ 77, 447, 418, 475, 453, 459, 475, 515, 562, 648, 658, 452, 367, 334, 244, 204,
+ 10, 197, 170, 166, 144, 60, 52, -2, -20, -40, 18, -238, -279, -434, -451, -807,
+ -460, -713, -547, -153, 64, 243, 386, 492, 620, 752, 759, 536, 445, 324, 151, -32,
+ -246, -396, -413, -371, -354, -317, -307, -228, -195, -101, -36, -174, -197, -162, -261, -349,
+ -329, -240, 326, 462, 428, 344, 405, 374, 439, 434, 467, 127, 85, -154, -248, -683,
+ -12, 15, -222, -227, -31, 124, 200, 294, 357, 541, 607, 459, 376, 352, 282, 283
+};
+
+/* An 16-by-32 matrix */
+const Word16 IAA_MA1_fx[512] =
+{//Qlog2(2.56)
+ -175, -490, -520, -631, -645, -614, -610, -548, -503, -432, -353, -301, -238, -141, -67, 26,
+ 301, 407, 227, 96, -12, -18, -13, 2, 39, 107, 124, 92, 83, 100, 62, 72,
+ -280, -737, -569, -164, -9, 100, 141, 211, 252, 281, 274, 217, 206, 219, 117, 106,
+ -266, -753, -841, -587, -487, -345, -263, -167, -114, -30, 8, 32, 34, 61, 55, 104,
+ -91, -137, -293, -349, -352, -326, -268, -247, -178, -129, -56, -96, -11, 219, 49, 56,
+ -18, 1, -33, -14, -19, -5, -22, -14, -43, -37, -104, -143, -375, -770, -190, -100,
+ 72, -22, -121, -220, -320, -378, -500, -587, -729, -795, -1056, -1305, -1691, -1090, -452, -60,
+ 19, -279, -453, -580, -588, -739, -858, -1044, -1281, -1614, -921, -376, -273, -84, -2, 187,
+ 853, 759, 591, 376, 260, 122, 39, -71, -133, -184, -209, -297, -299, -171, -124, -83,
+ 266, 34, -182, -367, -516, -686, -881, -1121, -1414, -1834, -2110, -997, -519, -274, -109, 137,
+ -2, -8, 42, 91, 172, 211, 298, 336, 433, 409, 546, 1043, 1499, 1038, 410, 189,
+ 86, 254, 259, 254, 246, 219, 184, 122, 79, 11, -55, -170, -363, -934, -371, -188,
+ 168, 167, -122, -244, -325, -340, -359, -343, -331, -291, -278, -270, -272, -162, -101, -46,
+ -244, -459, -367, -340, -295, -220, -173, -107, -22, 53, 103, 293, 1084, 807, 260, 117,
+ -319, -650, -685, -427, -290, -105, 25, 161, 303, 418, 587, 1074, 1563, 1085, 400, 170,
+ 146, 257, 282, 295, 303, 294, 297, 262, 237, 193, 92, 341, 1220, 884, 315, 144,
+ -291, -558, 147, 201, 282, 280, 310, 302, 313, 306, 292, 239, 198, 188, 106, 94,
+ -11, -8, -156, -204, -231, -250, -265, -289, -269, -316, -322, -450, -488, -676, -778, -973,
+ -117, -27, 4, 96, 174, 229, 271, 310, 344, 362, 344, 273, 209, 180, 109, 106,
+ -260, -290, 151, 269, 406, 442, 551, 590, 679, 681, 900, 1293, 1631, 1132, 477, 221,
+ -37, 374, 394, 414, 419, 395, 345, 313, 282, 255, 211, 126, 84, 51, -10, -53,
+ 404, 327, 174, 28, -124, -290, -490, -695, -1011, -1111, -529, -288, -183, -69, -7, 142,
+ 563, 752, 585, 555, 512, 478, 424, 396, 376, 343, 300, 194, 193, 162, 78, 46,
+ -59, -131, -35, 49, 54, -12, -92, -185, -243, -289, -288, -344, -326, 0, -38, 6,
+ 496, 582, 564, 514, 521, 490, 486, 436, 432, 320, 456, 1060, 1523, 1058, 419, 194,
+ 174, 77, 18, -89, -112, -196, -165, -247, -222, -326, -332, -494, 499, 617, 121, 60,
+ 315, 299, 229, 137, 78, -3, -40, -138, -198, -307, -375, -502, -515, -25, -88, -49,
+ -232, -29, 353, 399, 485, 487, 523, 526, 556, 559, 520, 415, 328, 283, 187, 166,
+ 182, 385, 403, 453, 515, 572, 635, 691, 787, 852, 1154, 1483, 1779, 1231, 524, 246,
+ -273, -492, -185, -97, -52, -51, -17, -27, 13, 20, 45, -20, 52, 244, 58, 56,
+ 20, -3, -241, -267, -194, -86, 4, 75, 140, 191, 200, 154, 137, 146, 85, 77,
+ 92, 628, 611, 708, 706, 716, 672, 694, 655, 619, 550, 432, 354, 284, 204, 172
+};
+
+/* An 16-by-16 matrix in Scale = 2.56f */
+const Word16 UVD_MA1_fx[256] =
+{//Qlog2(2.56)
+ -301, -503, -426, -187, -131, -64, -45, -20, 11, 56, 63, 90, 110, 175, 97, 33,
+ 161, 353, 474, 502, 709, 782, 794, 765, 632, 532, 406, 285, 230, 145, 97, 52,
+ -37, -5, 205, 323, 412, 349, 221, 91, -6, -59, -86, -112, -32, 209, 73, 23,
+ -273, -615, -820, -794, -834, -838, -822, -819, -751, -701, -641, -562, -391, -271, -184, -63,
+ 262, 168, 104, -9, -78, -163, -141, -199, -191, -249, -245, -317, -168, 535, 109, 33,
+ -410, -675, -681, -611, -500, -396, -273, -183, -47, 60, 194, 357, 1044, 1080, 335, 140,
+ 154, 185, 256, 238, 203, 238, 280, 260, 300, 267, 258, 196, 121, -618, -263, -60,
+ 345, 705, 859, 786, 743, 584, 425, 267, 168, 105, 74, 28, 119, 267, 105, 39,
+ -39, -166, -230, -196, -255, -276, -318, -349, -387, -438, -539, -613, -752, -956, -1353, -1628,
+ 498, 479, 414, 231, 98, 5, -18, -41, -60, -78, -91, -96, -81, 72, 30, -8,
+ 41, 120, 65, 141, 117, 186, 249, 299, 418, 520, 566, 618, 692, 579, 321, 166,
+ -236, -278, -69, 13, 113, 362, 445, 539, 503, 387, 269, 172, 120, -21, 1, 4,
+ -103, -46, -137, -132, -108, -97, -67, -37, -8, 41, 82, 107, 43, -605, -189, -56,
+ -220, -315, -482, -516, -489, -445, -415, -362, -304, -205, -136, -68, -7, 131, 70, 25,
+ -10, -121, -210, -237, -224, -302, -246, -310, -271, -343, -285, -364, 28, 703, 135, 54,
+ 118, 50, -67, -166, -349, -416, -442, -446, -439, -420, -382, -319, -245, -209, -140, -82
+};
+
+/* An 16-by-16 matrix in Scale = 2.56f */
+const Word16 UVD_MA2_fx[256] =
+{//Qlog2(2.56)
+ -75, -64, -150, -231, -272, -278, -248, -194, -156, -107, -74, -43, -92, -21, 9, 5,
+ 393, 275, -12, -156, -208, -215, -162, -132, -115, -109, -94, -85, -104, -10, 5, -1,
+ -297, -389, -99, -78, -66, -19, -12, 8, 0, -3, -15, -22, -113, -82, -16, 2,
+ 59, -11, 5, -33, -11, -61, -70, -139, -143, -239, -207, -223, 711, 701, 143, 68,
+ -195, 406, 222, 49, -6, -23, -6, 9, 0, 13, 26, 49, -44, -129, -18, -7,
+ 23, -30, -141, 79, -18, -76, -55, -14, 44, 98, 88, 86, -96, -351, -112, -39,
+ 380, 329, 235, 173, 141, 72, 25, -4, -6, -19, -21, -33, -55, -23, 3, -1,
+ -81, -210, -284, 158, 396, 290, 163, 59, -25, -22, -10, -6, -46, -32, 9, 5,
+ 9, 34, -15, 5, 23, -48, -127, -243, -347, -421, -455, -475, -495, -449, -294, -163,
+ -13, -171, -416, -414, -245, -25, 69, 102, 104, 84, 50, 33, -38, -4, 0, 5,
+ 50, 118, 68, 37, 147, 319, 371, 355, 291, 204, 130, 81, 21, 46, 36, 22,
+ -95, -108, 311, 214, -28, -153, -226, -192, -129, -69, -42, -11, -48, -17, 13, 2,
+ -185, -223, -104, 26, 53, 89, 132, 181, 258, 346, 397, 445, 392, 241, 125, 58,
+ 83, 33, -9, -81, 40, 99, 56, 8, -51, -85, -106, -124, -196, 5, 5, 0,
+ 143, 148, 19, -121, -247, -211, -67, 83, 198, 268, 290, 300, 240, 164, 86, 37,
+ -198, -136, 370, 372, 300, 240, 156, 113, 79, 60, 44, 29, -35, -38, 6, 7
+};
+
+/* An 16-by-16 matrix in Scale = 2.56f */
+const Word16 UVWB_MA3_fx[256] =
+{//Qlog2(2.56)
+ -26, 23, 7, -6, -1, 3, 40, 35, -43, -24, 56, 157, 265, 423, 382, 260,
+ 61, -300, -130, -101, -8, 106, 108, 114, 88, 43, -2, -33, -56, 67, 29, 13,
+ -31, 47, 45, -121, 46, 22, 111, 233, -256, -252, -123, -71, -31, 54, 56, 33,
+ 20, -154, 67, 198, -232, -167, -86, -12, 79, 116, 88, 78, 44, 75, 27, -7,
+ -14, 153, -166, 21, 107, 64, 233, -223, -147, -27, -1, 43, 61, 70, 50, 18,
+ 3, -115, -8, 143, 192, 193, -124, -195, -198, -162, -75, 14, 45, 83, 79, 49,
+ 12, -57, 25, -29, -11, 12, -7, -13, -12, 31, 74, 99, -10, -421, -209, -111,
+ -25, 115, 119, -19, -117, -164, -203, -237, -206, -169, -110, -41, -11, 15, 1, -7,
+ -13, 170, -143, -128, -224, -94, 1, 96, 144, 102, 29, 2, -37, 46, 7, -12,
+ -11, 10, -34, 38, 24, 86, 149, 211, 240, 279, 247, 218, 154, 161, 74, 15,
+ -24, 64, 110, 125, -24, 123, 161, 166, 177, 18, -112, -116, -141, -117, -113, -91,
+ -4, -20, -17, -11, -27, 13, -15, -40, -58, -157, -252, -283, -288, -186, -162, -112,
+ -20, 2, 32, 44, -31, -49, 8, 13, 55, -59, -162, -212, -61, 384, 115, 36,
+ -4, 42, -75, 92, 268, -203, -125, 10, 52, 121, 72, -43, -109, -47, -66, -76,
+ -39, 76, 268, -254, -28, 87, 2, 91, 85, 68, 89, 96, 42, 90, 39, 4,
+ 2, 2, -56, 7, 67, -31, -219, -192, -24, 146, 249, 269, 209, 199, 106, 31
+};
+
+/* An 16-by-8 matrix in Scale = 2.56f */
+const Word16 GESVNB_AR1_fx[128] =
+{//Qlog2(2.56)
+ -25, -64, -140, -118, 270, 240, 127, 70, 20, -40, -56, -111, -82, 64, 2, 5,
+ 81, 104, 71, 70, 0, -49, -54, -73, -59, -92, -102, -201, -404, -52, -40, -15,
+ -112, -217, -251, -202, -34, 57, 58, 62, 79, 127, 177, 306, 524, 315, 112, 53,
+ 17, -6, 34, 66, 14, -26, -174, -196, -142, -131, -102, -97, 180, 154, 29, 17,
+ 5, -27, -107, -197, -343, -333, -182, -143, -91, -17, 43, 120, 383, 267, 83, 40,
+ -1, -15, -35, -56, -169, -145, 86, 101, 77, 48, 29, 78, -9, 68, 15, 9,
+ 3, 9, 320, 450, 385, 348, 215, 155, 105, 45, -13, -75, -272, -129, -52, -23,
+ 4, 49, 54, 90, 92, 101, 59, 69, 20, 70, 23, 43, -280, -624, -114, -55
+};
+
+/* An 16-by-8 matrix in Scale = 2.56f */
+const Word16 GESVNB_AR2_fx[128] =
+{//Qlog2(2.56)
+ -22, -35, -31, -166, -164, 217, 212, 155, 166, 123, 67, 33, -21, -41, -3, -1,
+ -14, -20, -16, -70, -77, -53, 23, -7, -98, -123, -99, -49, 357, 114, 36, 19,
+ -57, -119, -303, -215, -33, -103, -97, -117, -105, -102, -67, -134, -176, 113, 16, 8,
+ -12, 14, 30, -37, -112, -226, -206, -25, 125, 134, 99, 83, 55, -4, 9, 4,
+ -19, 23, 171, 57, 13, -15, -26, -42, -65, -69, -77, -169, -351, -105, -49, -21,
+ -14, -10, 8, 35, 161, 104, -74, -102, -135, -47, 45, 264, 52, -69, -1, -5,
+ 213, 284, 230, 121, 50, 12, 43, 48, 27, -7, -24, -39, 75, 1, -9, -3,
+ -75, -137, -89, 275, 164, 65, 125, 91, 86, 91, 56, 10, 9, -10, 0, 0
+};
+
+/* An 16-by-8 matrix in Scale = 2.56f */
+const Word16 GESVWB_AR1_fx[128] =
+{//Qlog2(2.56)
+ -3, -16, -31, 2, -81, -123, -226, -260, -196, -122, -20, 78, 178, 145, 84, 46,
+ 55, 42, 15, 32, -48, -81, -109, -137, -187, -264, -330, -387, -363, -176, -38, 37,
+ -32, -70, -144, -269, -337, -183, 59, 58, 44, 49, 42, 51, 72, 50, 26, 38,
+ -18, -58, -79, 125, 352, 291, 180, 118, 72, 25, -23, -82, -185, -167, -33, 6,
+ -10, 135, 544, 517, 517, 561, 515, 528, 500, 472, 413, 383, 318, 219, 118, 57,
+ -54, -280, -614, -548, -521, -522, -448, -479, -457, -438, -377, -355, -318, -271, -222, -89,
+ -62, -96, -86, -10, 104, 155, 120, 112, 190, 264, 291, 272, 232, 166, 95, 27,
+ 33, 61, 155, 121, 9, -28, 6, 103, 64, 17, 4, -2, -31, -88, -209, -206
+};
+
+/* An 16-by-8 matrix in Scale = 2.56f */
+const Word16 GESVWB_AR2_fx[128] =
+{//Qlog2(2.56)
+ -147, -326, -421, -91, -22, -25, -14, -21, 32, 76, 104, 102, 65, 47, 50, 41,
+ -39, -16, 61, -13, -38, -56, 47, 153, 195, 213, 212, 220, 245, 245, 209, 86,
+ -34, -73, 82, 387, 199, 71, 56, -18, -33, -56, -88, -79, -5, 59, 55, 29,
+ -7, -21, -21, -158, -123, 304, 226, 168, 124, 8, -75, -91, -54, -5, 37, 30,
+ -26, -22, -67, -225, 107, 38, -82, -113, -213, -205, -62, 28, 89, 95, 52, 17,
+ 227, 404, 325, 134, 45, -16, 3, -15, -55, -65, -55, -54, -18, -8, 1, -14,
+ 19, 30, 12, 28, 48, 13, 2, -47, -38, 41, 29, -8, -154, -315, -411, -242,
+ 8, 24, 29, -61, -215, -329, -237, -106, -12, -12, -64, -118, -167, -119, 8, 52
+};
+
+/* An 16-by-32 matrix in Scale = 2.56f */
+const Word16 GEWB2_MA1_fx[512] =
+{//Qlog2(2.56)
+ 659, 1694, 1634, 1513, 1305, 1098, 933, 805, 733, 624, 525, 339, 239, 50, -35, -215,
+ 6, 65, 125, 55, -85, -126, -272, -316, -507, -586, -1010, -1278, -1941, -1910, -426, 78,
+ 281, 315, 236, -4, -102, -171, -232, -335, -362, -425, -488, -603, -669, -736, -648, -593,
+ 29, -251, -582, -871, -969, -897, -991, -1077, -1275, -1480, -998, -393, -247, -9, 28, 271,
+ -60, -361, 401, 552, 236, 35, -196, -215, -496, -683, -911, -820, -576, -299, -240, -141,
+ 416, 574, 662, 350, 133, -160, -431, -781, -1200, -1652, -2035, -1092, -449, -192, -11, 263,
+ -206, -609, -931, 28, -229, -358, -543, -462, -377, -360, -336, -251, -105, 35, 26, 80,
+ 369, 1256, 1380, 1571, 1726, 1727, 1644, 1521, 1350, 1156, 984, 748, 580, 395, 254, 108,
+ -147, -479, -330, -73, -272, -441, -685, -837, -1139, -1458, -1370, -414, -208, -12, 14, 213,
+ -50, 100, -82, -253, -7, 119, 294, 392, 494, 578, 589, 523, 462, 383, 300, 249,
+ -94, -362, -575, -770, -987, -999, -922, -697, -582, -305, -135, -31, -8, 23, -33, 62,
+ 29, -64, -4, -123, -344, -414, -679, -767, -1152, -1401, -2105, -1905, -582, -300, -64, 223,
+ 428, 990, 1019, 809, 681, 470, 366, 179, 126, -26, -141, -363, -423, -536, -437, -545,
+ -133, -357, 364, 241, -39, -227, -334, -305, -426, -292, -102, 87, 159, 182, 160, 190,
+ 560, 764, 531, 156, 22, -18, 23, -20, 19, 0, 13, -61, -35, -44, -12, -48,
+ 33, -235, -634, -1093, 136, -31, -68, -285, -529, -535, -462, -249, -95, -53, -116, -61,
+ -188, -628, -894, 702, 700, 373, 196, 51, 95, -56, -191, -181, -173, -132, -116, -218,
+ 37, -188, -661, -1087, -1322, -258, -186, -181, -238, -372, -418, -508, -433, -197, -73, 28,
+ -231, -222, 911, 875, 669, 440, 363, 301, 257, 192, 147, 68, 77, 43, 57, 17,
+ -4, -187, -356, -410, -569, -499, -584, -568, -660, -703, -965, -1201, -1540, -708, -252, 87,
+ 220, 64, -67, -357, -572, -744, -913, -1176, -1439, -1894, -2152, -762, -419, -146, -10, 281,
+ -253, -627, -1075, -1206, -721, -398, -337, -188, -118, 50, 125, 198, 200, 190, 96, 164,
+ -348, -741, -854, -357, -163, -103, -26, 143, 231, 318, 335, 325, 274, 233, 167, 190,
+ -143, -256, -191, -280, -250, -191, -82, 37, 126, 102, 67, -130, -202, -430, -495, -810,
+ 232, 107, -22, -341, -497, -523, -607, -646, -746, -690, -478, -295, -160, -77, -53, -7,
+ -33, -98, -258, -501, -589, -438, -316, -168, -58, 82, 175, 219, 249, 259, 237, 226,
+ -393, -665, -19, 185, 249, 266, 378, 468, 499, 508, 464, 388, 310, 238, 186, 145,
+ -240, -99, 408, 480, 693, 761, 946, 943, 951, 893, 782, 613, 482, 351, 260, 163,
+ -23, 523, 885, 903, 1172, 1287, 1482, 1491, 1476, 1402, 1240, 1005, 787, 604, 433, 292,
+ 262, 988, 904, 732, 734, 665, 715, 656, 673, 615, 541, 372, 284, 139, 68, -84,
+ -119, 446, 1118, 1215, 1372, 1280, 1208, 989, 881, 675, 557, 319, 227, 23, -39, -256,
+ -102, 178, 379, 252, 365, 319, 455, 377, 413, 278, 225, -36, -67, -351, -375, -772
+};
+
+/* An 16-by-32 matrix in Scale = 2.56f */
+const Word16 GEWB_MA1_fx[512] =
+{//Qlog2(2.56)
+ 269, 268, 416, 287, 157, 7, -132, -276, -482, -701, -1025, -1350, -1642, -982, -321, -49,
+ 237, 949, 1374, 1228, 1337, 1219, 1123, 1016, 852, 752, 664, 559, 448, 306, 194, 83,
+ -6, -176, -373, -111, -221, -387, -483, -639, -753, -786, -774, -655, -328, -114, -25, 27,
+ 135, 164, -4, -181, -364, -528, -464, -424, -393, -314, -242, -185, -104, -61, -32, -37,
+ 15, -218, -322, 668, 597, 343, 196, -5, -46, -159, -359, -524, -629, -548, -308, -95,
+ 242, 463, 767, 661, 558, 403, 268, 191, 71, -4, -51, -103, -141, -176, -161, -142,
+ -179, -147, 715, 865, 970, 932, 822, 763, 602, 514, 436, 370, 285, 189, 106, 36,
+ -49, -227, -589, -933, -1172, -700, -248, -175, -132, -132, -125, -103, -47, -49, -12, 60,
+ -7, -227, -404, 272, 83, -50, -165, -319, -343, -501, -731, -939, -1013, -607, -202, -2,
+ -76, -271, -661, -582, 296, 86, -60, -166, -335, -314, -213, -285, -324, -280, -164, -39,
+ -264, -452, -111, 171, 229, 357, 355, 461, 509, 517, 489, 441, 347, 246, 158, 75,
+ 67, -49, -340, -546, -758, -919, -876, -727, -658, -567, -492, -400, -234, -140, -63, 36,
+ -142, 94, 514, 400, 406, 389, 379, 413, 391, 377, 354, 314, 245, 156, 94, 34,
+ 97, -47, -316, -620, -874, -179, -206, -290, -304, -514, -690, -723, -503, -252, -73, 39,
+ 485, 674, 532, 195, 38, -60, 17, 52, 63, 74, 85, 62, 35, -10, -22, -51,
+ -105, -23, 287, 394, 469, 609, 706, 860, 933, 933, 874, 789, 638, 465, 297, 148,
+ -223, -499, -837, -813, -391, -231, -178, -182, -81, 2, 84, 113, 131, 142, 127, 107,
+ -64, 269, 879, 849, 1013, 1157, 1250, 1337, 1263, 1176, 1048, 900, 703, 502, 318, 165,
+ 61, 1, -198, -209, -345, -417, -280, -280, -307, -272, -341, -418, -604, -738, -887, -394,
+ 45, 77, 124, 152, 99, 43, 20, -4, -91, -85, -192, -280, -544, -754, -1176, -1296,
+ 173, 69, -49, -226, -344, -479, -489, -618, -727, -909, -1122, -1446, -1292, -492, -205, 10,
+ -80, -80, 338, 285, 123, 48, -76, -80, -105, -118, -108, -80, -58, -28, -9, -8,
+ 74, -79, -292, -618, -756, 345, 216, 180, 143, -73, -186, -223, -200, -143, -52, -21,
+ -253, -519, -578, -188, -96, -35, -7, 27, 133, 218, 258, 258, 231, 180, 120, 70,
+ 273, 740, 950, 736, 701, 635, 611, 602, 566, 533, 494, 447, 350, 230, 131, 42,
+ -100, -345, -702, -352, 709, 682, 485, 324, 161, 112, 148, 25, -88, -106, -86, -101,
+ 307, 265, 253, 65, -63, -75, -169, -282, -390, -501, -550, -532, -406, -296, -186, -132,
+ -26, 70, 50, -84, -89, 28, 106, 199, 305, 391, 450, 469, 419, 301, 191, 80,
+ 22, 39, -154, -426, -597, -497, -159, -69, 41, 95, 114, 114, 99, 33, -7, -40,
+ -162, -356, -511, -461, -475, -513, -477, -485, -395, -249, -136, -71, -4, 33, 54, 64,
+ -82, -295, -562, 241, 65, -163, -227, -384, -237, -229, -266, -223, -94, 10, 41, 31,
+ -104, -323, -302, 733, 646, 418, 271, 149, 155, 154, 119, 99, 89, 63, 13, -16
+};
+
+/* An 16-by-32 matrix in Scale = 2.56f */
+const Word16 AUWB2_MA1_fx[512] =
+{//Qlog2(2.56)
+ 391, 298, 179, -37, -225, -387, -627, -864, -1216, -1644, -2108, -804, -277, -5, 121, 468,
+ 351, 213, 141, -75, -130, -164, -332, -410, -524, -573, -575, -474, -331, -103, -22, 201,
+ 81, 874, 1137, 1223, 1242, 1262, 1238, 1185, 1141, 1085, 993, 733, 570, 424, 256, 145,
+ -6, -25, -105, -147, -327, -342, -587, -620, -954, -1143, -1878, -2059, -356, -100, 134, 477,
+ -197, -505, -826, -1043, -863, -485, -296, -103, -6, 178, 269, 245, 231, 320, 243, 413,
+ -518, -605, 282, 430, 532, 596, 676, 748, 808, 861, 834, 681, 534, 498, 293, 337,
+ -244, -563, -720, -599, -500, -494, -627, -739, -1028, -1219, -297, 9, 71, 272, 285, 563,
+ -448, -854, -916, -518, -287, -52, 56, 245, 347, 524, 557, 497, 416, 452, 321, 437,
+ 150, 113, 28, -26, 1, -80, -177, -226, -193, -156, -62, -227, -240, -383, -535, -809,
+ -240, -246, -174, -66, 80, 149, 244, 284, 413, 434, 473, 158, 56, -167, -326, -723,
+ 131, -11, 141, 32, 24, -122, -397, -610, -888, -812, 30, 232, 306, 371, 341, 446,
+ -158, -545, -529, 151, 142, -101, -426, -716, -1031, -1479, -1550, -352, -132, 145, 187, 517,
+ 148, -104, -445, -841, -31, 183, -86, -316, -615, -660, -231, 84, 192, 275, 201, 311,
+ -183, -220, -243, -182, -237, -176, -266, -233, -336, -339, -650, -1019, -1652, -846, -52, 387,
+ -104, -117, -254, -332, -191, 1, 64, 182, 317, 495, 626, 574, 519, 508, 456, 505,
+ -151, -237, 492, 479, 273, 139, 36, -60, -119, 74, 174, 188, 298, 366, 347, 478,
+ 158, 23, -210, -450, -673, -637, -423, -331, -133, 14, 128, 69, 62, 143, 171, 313,
+ 501, 394, 37, -57, 67, 70, 46, 35, 92, 120, 337, 258, 276, 283, 368, 500,
+ 42, -157, -398, -600, -742, -780, -781, -980, -1166, -1629, -968, -149, -99, 188, 209, 529,
+ -240, 190, 465, 543, 575, 565, 605, 596, 653, 599, 583, 279, 203, -51, -186, -589,
+ 316, 371, 417, 372, 293, 189, 230, 154, 184, 91, 94, -175, -198, -358, -454, -736,
+ 72, -159, -362, -499, -633, -690, -794, -739, -662, -456, -360, -338, -251, -6, 50, 346,
+ -202, -332, -428, -462, -508, -440, -552, -647, -885, -1217, -1733, -619, -162, 95, 202, 510,
+ -91, -391, -709, -884, -1012, -1001, -936, -714, -509, -198, 42, 99, 119, 261, 238, 496,
+ -370, 92, 476, 604, 681, 762, 826, 893, 934, 1001, 954, 783, 629, 590, 412, 467,
+ -193, -22, -28, 46, 214, 387, 502, 643, 728, 864, 859, 723, 581, 569, 435, 483,
+ 223, 291, 633, 508, 350, 141, -156, -476, -930, -1417, -1809, -764, -206, 77, 191, 515,
+ -475, -791, -417, 75, 201, 343, 408, 549, 612, 707, 686, 572, 463, 457, 321, 373,
+ 842, 716, 669, 593, 419, 423, 373, 321, 273, 280, 354, 217, 193, 232, 175, 294,
+ 116, -60, -144, -299, -421, -551, -732, -952, -1203, -1662, -1996, -537, -240, 55, 138, 486,
+ -323, -665, -686, -214, -201, -260, -373, -329, -333, -165, 66, 96, 175, 310, 291, 486,
+ -19, 43, 35, 40, 42, 55, 63, 101, 133, 194, 222, 152, 117, 145, 133, 213
+};
+
+const Word16 *const Quantizers_fx[] = { SVNB_SN1_fx, SVNB_SN2_fx, GETRNB_SN1_fx, GETRNB_SN2_fx, AUNB_SN1_fx,SVWB_SN1_fx, SVWB_SN2_fx, GETRWB_SN1_fx,
+ GETRWB_SN2_fx, AUWB_SN1_fx,/* U13, */
+ TRWB2_SN1_fx, TRWB2_SN2_fx, AUWB2_SN1_fx, CNG_SN1_fx, SVWB2_SN1_fx, SVWB2_SN2_fx
+};//Qlog2(2.56)
+
+const Word16 *const Quantizers_p_fx[] = { IAA_MA1_fx, UVD_MA1_fx, UVD_MA2_fx, UVWB_MA3_fx, GESVNB_AR1_fx, GESVNB_AR2_fx, GESVWB_AR1_fx, GESVWB_AR2_fx,
+ GEWB2_MA1_fx,GEWB_MA1_fx, AUWB2_MA1_fx, SVWB2_AR1_fx, SVWB2_AR2_fx
+};//Qlog2(2.56)
+
+const Word16 vals_fx[NO_LEADERS][MAX_NO_VALS] = /*Q1 */
+{
+ {2, 0, 0, 0},
+ {1, 0, 0, 0},
+ {2, 0, 0, 0},
+ {4, 0, 0, 0},
+ {3, 1, 0, 0},
+ {2, 0, 0, 0},
+ {4, 2, 0, 0},
+ {3, 1, 0, 0},
+ {2, 0, 0, 0},
+ {4, 2, 0, 0},
+ {4, 0, 0, 0},
+ {3, 1, 0, 0},
+ {5, 1, 0, 0},
+ {4, 2, 0, 0},
+ {4, 2, 0, 0},
+ {6, 2, 0, 0},
+ {3, 1, 0, 0},
+ {5, 3, 1, 0},
+ {4, 2, 0, 0},
+ {4, 0, 0, 0},
+ {6, 2, 0, 0},
+ {3, 1, 0, 0},
+ {5, 3, 1, 0},
+ {4, 2, 0, 0},
+ {4, 2, 0, 0},
+ {6, 2, 0, 0},
+ {6, 4, 2, 0},
+ {3, 1, 0, 0},
+ {5, 3, 1, 0},
+ {5, 1, 0, 0},
+ {7, 1, 0, 0},
+ {4, 2, 0, 0},
+ {4, 0, 0, 0},
+ {6, 2, 0, 0},
+ {6, 4, 2, 0},
+ {8, 0, 0, 0},
+ {3, 1, 0, 0},
+ {5, 3, 1, 0},
+ {5, 3, 1, 0},
+ {7, 3, 1, 0},
+ {4, 2, 0, 0},
+ {6, 4, 2, 0},
+ {6, 4, 2, 0},
+ {6, 0, 0, 0},
+ {8, 2, 0, 0},
+ {3, 0, 0, 0},
+ {5, 3, 1, 0},
+ {5, 3, 1, 0},
+ {7, 3, 1, 0},
+};
+
+const Word16 no_vals[NO_LEADERS]= {2,1,2,2,2,2,3,2,1,3,2,2,2,3,3,3,2,3,3,2,3,2,3,2,3,3,4,2,3,2,2,3,2,2,4,2,2,3,3,3,3,4,4,2,3,1,3,3,3}; // Q0
+
+const Word16 no_vals_ind[NO_LEADERS][MAX_NO_VALS]=
+{
+ {2,6,0,0},
+ {8,0,0,0},
+ {4,4,0,0},
+ {1,7,0,0},
+ {1,7,0,0},
+ {6,2,0,0},
+ {1,2,5,0},
+ {2,6,0,0},
+ {8,0,0,0},
+ {1,4,3,0},
+ {2,6,0,0},
+ {3,5,0,0},
+ {1,7,0,0},
+ {1,6,1,0},
+ {2,2,4,0},
+ {1,1,6,0},
+ {4,4,0,0},
+ {1,1,6,0},
+ {2,4,2,0},
+ {3,5,0,0},
+ {1,3,4,0},
+ {5,3,0,0},
+ {1,2,5,0},
+ {2,6,0,0},
+ {3,2,3,0},
+ {1,5,2,0},
+ {1,1,1,5},
+ {6,2,0,0},
+ {1,3,4,0},
+ {2,6,0,0},
+ {1,7,0,0},
+ {3,4,1,0},
+ {4,4,0,0},
+ {1,7,0,0},
+ {1,1,3,3},
+ {1,7,0,0},
+ {7,1,0,0},
+ {1,4,3,0},
+ {2,1,5,0},
+ {1,1,6,0},
+ {4,2,2,0},
+ {1,1,5,1},
+ {1,2,1,4},
+ {2,6,0,0},
+ {1,2,5,0},
+ {8,0,0,0},
+ {1,5,2,0},
+ {2,2,4,0},
+ {1,2,5,0}
+}; // Q0
+
+
+const Word16 C_VQ[LATTICE_DIM+1][LATTICE_DIM+1] =
+{
+ {1,0,0,0,0,0,0,0,0},
+ {1,1,0,0,0,0,0,0,0},
+ {1,2,1,0,0,0,0,0,0},
+ {1,3,3,1,0,0,0,0,0},
+ {1,4,6,4,1,0,0,0,0},
+ {1,5,10,10,5,1,0,0,0},
+ {1,6,15,20,15,6,1,0,0},
+ {1,7,21,35,35,21,7,1,0},
+ {1,8,28,56,70,56,28,8,1}
+};
+
+const Word16 C_VQ_fx[LATTICE_DIM + 1][LATTICE_DIM + 1] =
+{
+ {1,0,0,0,0,0,0,0,0},
+ {1,1,0,0,0,0,0,0,0},
+ {1,2,1,0,0,0,0,0,0},
+ {1,3,3,1,0,0,0,0,0},
+ {1,4,6,4,1,0,0,0,0},
+ {1,5,10,10,5,1,0,0,0},
+ {1,6,15,20,15,6,1,0,0},
+ {1,7,21,35,35,21,7,1,0},
+ {1,8,28,56,70,56,28,8,1}
+}; // Q0
+
+const UWord32 table_no_cv[] = //Q0
+{
+ 0, 112, 240, 1360, 1376, 2400, 4192, 5536, 9120, 9376, 18336, 18448, 25616, 26640, 33808, 40528, 40752,
+ 49712, 56880, 83760, 84208, 88688, 95856, 117360, 124528, 142448, 153200, 155888, 159472, 195312, 198896, 199920, 235760, 236880,
+ 238928, 274768, 274784, 275808, 311648, 333152, 340320, 367200, 410208, 423648, 423760, 425104, 425232, 446736, 500496, 522000, 0
+};
+//Q0
+const Word32 table_no_cv_fx[] = { 0, 112, 240, 1360, 1376, 2400, 4192, 5536, 9120, 9376, 18336, 18448, 25616, 26640, 33808, 40528, 40752,
+ 49712, 56880, 83760, 84208, 88688, 95856, 117360, 124528, 142448, 153200, 155888, 159472, 195312, 198896, 199920,
+ 235760, 236880, 238928, 274768, 274784, 275808, 311648, 333152, 340320, 367200, 410208, 423648,423760, 425104, 425232, 446736, 500496, 522000
+ ,0
+}; // Q0
+
+
+const Word16 pi0[] =
+{
+ 28,1,70,8,8,28,168,28,1,280,28,56,8,56,420,56, 70, 56,420, 56, 280, 56, 168, 28, 560, 168,336,28,280,28,8,
+ 280,70, 8, 1120, 8, 8, 280, 168, 56, 420, 336, 840, 28, 168, 1, 168, 420, 168
+}; // Q0
+
+const Word16 pl_HQ_fx[] = /* Q1 vectors in first layers */
+{
+ 2, 2, 0, 0, 0, 0, 0, 0, /* 112, 4, 28 */
+ 1, 1, 1, 1, 1, 1, 1, 1, /* 128, 128, 1 */
+ 2, 2, 2, 2, 0, 0, 0, 0, /* 1120, 16, 70 */
+ 4, 0, 0, 0, 0, 0, 0, 0, /* 16 , 2, 8 */
+ 3, 1, 1, 1, 1, 1, 1, 1, /* 5 */ /* 1024,128, 8 */
+ 2, 2, 2, 2, 2, 2, 0, 0, /* 1792, 64, 28 */
+ 4, 2, 2, 0, 0, 0, 0, 0, /* 1344, 8, 168 */
+ 3, 3, 1, 1, 1, 1, 1, 1, /* 3584, 128, 28*/
+ 2, 2, 2, 2, 2, 2, 2, 2, /*256, 256, 1*/
+ 4, 2, 2, 2, 2, 0, 0, 0, /* 10 */ /* 8960, 32, 280 */
+ 4, 4, 0, 0, 0, 0, 0, 0, /* 112, 4, 28 */
+ 3, 3, 3, 1, 1, 1, 1, 1, /* 7168, 128, 56 */
+ 5, 1, 1, 1, 1, 1, 1, 1, /* 1024, 128, 8*/
+ 4, 2, 2, 2, 2, 2, 2, 0, /* 7168, 128, 56*/
+ 4, 4, 2, 2, 0, 0, 0, 0, /* 15 */ /* 6720, 16, 420 */
+ 6, 2, 0, 0, 0, 0, 0, 0, /* 224, 4, 56 */
+ 3, 3, 3, 3, 1, 1, 1, 1, /* 8960, 128, 70 */
+ 5, 3, 1, 1, 1, 1, 1, 1, /* 7168, 128, 56*/
+ 4, 4, 2, 2, 2, 2, 0, 0, /* 26880, 64, 420 */
+ 4, 4, 4, 0, 0, 0, 0, 0, /*20 */ /* 448, 8, 56 */
+ 6, 2, 2, 2, 0, 0, 0, 0, /* 4480, 16, 280 */
+ 3, 3, 3, 3, 3, 1, 1, 1, /* 7168, 128, 56 */
+ 5, 3, 3, 1, 1, 1, 1, 1, /* 21504, 128, 168 */
+ 4, 4, 2, 2, 2, 2, 2, 2, /* 7168, 256, 28 */
+ 4, 4, 4, 2, 2, 0, 0, 0, /* 25 */ /* 17920, 32, 560 */
+ 6, 2, 2, 2, 2, 2, 0, 0, /* 10752, 64, 168 */
+ 6, 4, 2, 0, 0, 0, 0, 0, /* 2688, 8, 336 */
+ 3, 3, 3, 3, 3, 3, 1, 1, /* 3584, 128, 28 */
+ 5, 3, 3, 3, 1, 1, 1, 1, /* 35840,128,280*/
+ 5, 5, 1, 1, 1, 1, 1, 1, /*30 */ /* 3584, 128, 28*/
+ 7, 1, 1, 1, 1, 1, 1, 1, /* 1024,128, 8 */
+ 4, 4, 4, 2, 2, 2, 2, 0,
+ 4, 4, 4, 4, 0, 0, 0, 0,
+ 6, 2, 2, 2, 2, 2, 2, 2,
+ 6, 4, 2, 2, 2, 0, 0, 0,
+ 8, 0, 0, 0, 0, 0, 0, 0,
+ 3, 3, 3, 3, 3, 3, 3, 1,
+ 5, 3, 3, 3, 3, 1, 1, 1,
+ 5, 5, 3, 1, 1, 1, 1, 1,
+ 7, 3, 1, 1, 1, 1, 1, 1,
+ 4, 4, 4, 4, 2, 2, 0, 0,
+ 6, 4, 2, 2, 2, 2, 2, 0,
+ 6, 4, 4, 2, 0, 0, 0, 0,
+ 6, 6, 0, 0, 0, 0, 0, 0,
+ 8, 2, 2, 0, 0, 0, 0, 0,
+ 3, 3, 3, 3, 3, 3, 3, 3,
+ 5, 3, 3, 3, 3, 3, 1, 1,
+ 5, 5, 3, 3, 1, 1, 1, 1,
+ 7, 3, 3, 1, 1, 1, 1, 1
+};
+/*----------------------------------------------------------------------------------*
+ * LSF quantization for CNG
+ *----------------------------------------------------------------------------------*/
+
+const Word16 cng_sort[] = {/*5f */1,1,0,1,0,0, /* 4f */0,1,0,1,0,0,1,1,1,1}; // Q0
+
+
+const Word16 perm_MSLVQ[][4] =
+{
+ /* 5f*/
+ {6,11,7,15},
+ {6,15,-1,0},
+ {5,8,7,15},
+ {7,10,-1,0},
+ {-1,0,0,0},
+ {-1,0,0,0},
+ /* 4f */
+ {-1,0,0,0},
+ {0,9,7,10},
+ {-1,0,0,0},
+ {7,15,-1,0},
+ {-1,0,0,0},
+ {-1,0,0,0},
+ {6,10,7,11},
+ {6,11,7,12},
+ {6,11,7,12},
+ {6,11,7,12}
+}; // Q0
+
+const Word16 pl_par[] = /* 1 if even number of signs */
+{
+ 0, 1, 0, 0, -1, 0, 0, 1, 0, 0,
+ 0, -1, 1, 0, 0, 0, 1, -1, 0, 0,
+ 0, -1, 1, 0, 0, 0, 0, 1, -1, 1, -1, 0,
+ 0, 0, 0, 0, -1, 1, -1, 1, 0, 0, 0, 0, 0, 1, -1, 1, -1
+}; // Q0
+
+const Word16 scales_fx[][6] =//Q11
+{
+ {3129, 0, 0, 3138, 0, 0, }, /* 14 */
+ {3287, 0, 0, 3138, 0, 0, }, /* 15 */
+ {2611, 5034, 0, 3138, 0, 0, },
+ {2611, 5034, 0, 3340, 0, 0, },
+ {2165, 3674, 5931, 2363, 3809, 6281, },
+ {1898, 2986, 4745, 2116, 3668, 7045, }, /* 28 */ /* mode 0 UV WB*/
+ {2630, 5480, 0, 2972, 0, 0, },
+ {2802, 0, 0, 2869, 5073, 0, },
+ {1763, 2546, 3723, 2515, 4559, 21109, },
+ {2195, 3961, 7440, 2501, 6017, 21961, },
+ {1841, 2902, 1386, 2116, 3762, 22309, },
+ {1700, 2710, 1288, 1866, 3246, 20660, }, /* 32 */ /* mode 1 UV NB*/
+
+
+ {3222, 0, 0, 3391, 0, 0, },
+ {2537, 4923, 0, 3187, 0, 0, },
+ {2161, 3482, 9091, 3391, 0, 0, },
+ {2560, 4923, 8462, 2775, 4835, 0, },
+ {2163, 3656, 9263, 2699, 5296, 0, },
+ {2040, 3082, 6871, 2427, 3637, 5587, },
+ {1903, 2841, 6875, 2212, 3484, 5908, },
+ {1888, 3058, 6900, 2212, 3484, 5908, },
+ {1888, 3058, 6900, 2183, 3469, 6420, },
+ {1888, 3058, 6900, 1970, 3174, 8081, },
+ {1528, 2269, 5876, 1964, 3033, 8002, },
+ {1577, 2445, 5782, 1858, 2871, 4334, },
+
+ {1532, 2259, 5870, 2421, 1661, 6824, }, /* 34 */
+
+ {1386, 1972, 4356, 1487, 2216, 4514, }, /* 37 */ /* mode 2 V WB*/
+ {3357, 0, 0, 2494, 4426, 0, },
+ {2634, 5009, 0, 2888, 0, 0, },
+ {2224, 3539, 7696, 2494, 4426, 0, },
+ {2120, 3226, 9861, 2494, 4426, 0, },
+ {1974, 3140, 10121, 2494, 4426, 0, },
+ {1722, 2454, 4059, 2494, 4426, 0, },
+ {1839, 2658, 4473, 2490, 5456, 0, },
+ {1722, 2533, 4581, 2038, 3394, 5808, },
+
+ {1427, 2009, 4184, 1915, 3082, 1350, },
+ {1370, 1862, 2720, 2017, 1339, 3914, }, /* 37 */ /* mode 3 V NB */
+
+ {2482, 3885, 0, 0, 0, 0, },
+ {3346, 0, 0, 3418, 0, 0, },
+ {2638, 4962, 0, 3418, 0, 0, },
+ {2482, 3885, 0, 3418, 0, 0, },
+ {2218, 3617, 6502, 3418, 0, 0, },
+ {2124, 3295, 8659, 3418, 0, 0, },
+ {2243, 3398, 5562, 2693, 5132, 0, },
+ {1927, 2839, 4549, 2693, 5132, 0, },
+ {1860, 2675, 3893, 2703, 5372, 0, },
+ {2202, 3619, 1618, 2703, 5372, 0, },
+ {2093, 3135, 1554, 2273, 3594, 5313, },
+ {2202, 3619, 1618, 2238, 3895, 6173, },
+ {1829, 3015, 1382, 2259, 3625, 5820, },
+ {1864, 3170, 1403, 2114, 3381, 5147, },
+ {1692, 2572, 1294, 2009, 3158, 4540, }, /* 32 (31.995) */ /* G WB*/
+ {2425, 3707, 5655, 0, 0, 0, },
+ {3299, 0, 0, 3314, 0, 0, },
+ {2425, 3707, 5655, 3174, 0, 0, },
+ {2425, 3707, 5655, 3314, 0, 0, },
+ {2177, 3557, 6113, 3314, 0, 0, },
+ {2208, 3738, 6476, 3009, 4606, 0, },
+ {2816, 1874, 4264, 3009, 4606, 0, },
+ {1966, 2914, 1434, 2683, 4366, 0, },
+ {2302, 1626, 3895, 2628, 4714, 0, },
+ {2206, 3537, 1571, 2560, 3996, 6105, },
+ {1911, 3013, 1403, 2560, 3996, 6105, },
+ {1898, 3277, 1380, 2363, 3637, 5845, },
+ {2144, 1479, 3656, 2163, 3363, 5532, },
+ {1989, 1409, 3090, 2136, 3543, 6003, },
+ {1882, 1356, 2800, 2165, 3703, 6285, }, /* 32 (31.987) */ /* G NB*/
+ {3312, 0, 0, 3394, 0, 0, },
+ {2611, 4706, 0, 3201, 0, 0, },
+ {2679, 4821, 0, 2841, 0, 0, },
+ {2644, 4952, 0, 2775, 5003, 0, },
+ {2210, 3623, 6169, 2841, 0, 0, },
+ {2210, 3623, 6169, 2714, 5233, 0, },
+ {1837, 2744, 5333, 2191, 3459, 5175, },
+ {1837, 2744, 5333, 1923, 2978, 4266, },
+ {1853, 2718, 5323, 2271, 1591, 3492, },
+ {1561, 2255, 4831, 1923, 2978, 4266, },
+ {1626, 2511, 6513, 2271, 1591, 3492, }, /* 33 */
+ /* mode 6 T WB */
+ {3336, 0, 0, 2439, 4528, 0, },
+ {2615, 5237, 0, 2800, 0, 0, },
+ {2216, 3607, 8047, 2439, 4528, 0, },
+ {2085, 3144, 5751, 2439, 4528, 0, },
+ {1933, 3025, 5659, 2439, 4528, 0, },
+ {1864, 3572, 6793, 2439, 4528, 0, },
+ {1884, 3375, 6283, 1985, 3447, 8096, },
+ {1513, 2275, 5517, 1800, 2890, 4721, },
+ {1452, 2114, 5564, 1659, 2550, 3736, }, /* 32 */ /* mode 7 T NB */
+
+ {1552, 2286, 4022, 2497, 4139, 1634,},
+ {1432, 2118, 4051, 2497, 4139, 1634, }, /* 32 */ /* mode 8 G 16k */
+
+ {1487, 2150, 3779, 2775, 1761, 4516, },
+ {1386, 2042, 3418, 2775, 1761, 4516, }, /* 33 (32.983) */ /* T 16k */
+
+ {3371, 0, 0, 2568, 5036, 0, },
+ {2198, 3815, 6617, 3437, 0, 0, },
+ {2198, 3815, 6617, 2568, 5036, 0, },
+ {1948, 3056, 5112, 2570, 6085, 0, },
+ {2351, 3770, 1665, 2570, 6085, 0, }, /* 26 */
+ {1233, 1780, 2904, 2589, 1565, 4542, }, /* 36 */ /* mode 10 AUDIO_WB 36 + 4 + 1 */
+
+ {1747, 3623, 9062, 0, 0, 0, },
+ {2071, 3406, 9017, 3232, 0, 0, },
+ {2071, 3406, 9017, 2462, 4964, 0, },
+ {1804, 3314, 8471, 2462, 4964, 0, },
+ {1735, 3668, 9146, 2462, 4964, 0, }, /* 27 */ /* AUDIO_NB */
+ {1372, 2277, 4893, 2462, 4964, 0, }, /* 28 */ /* AUDIO_NB */
+ {2316, 3717, 1630, 2591, 5722, 0, },
+ {1167, 1647, 2451, 2380, 3992, 1491, }, /* 36 */ /* mode 12 AUDIO_WB 16k 15-36 + 4 + 1*/
+ {2140, 3248, 7688, 3418, 0, 0, },
+ {1802, 2621, 5784, 2251, 3553, 0, },
+ {1702, 2488, 5994, 2230, 3498, 5077, },
+ {1782, 2718, 5951, 2183, 3521, 5480, },
+
+ {1581, 2298, 4815, 2961, 1933, 4243, },
+
+ {1436, 2001, 3559, 1939, 2976, 4264, },
+
+ {1473, 2091, 3484, 2292, 1626, 3473, },
+
+ {1311, 1810, 3547, 1546, 2232, 3170, }, /* 37 (36.995) */ /* VOICED 16k */
+ {2494, 1630, 4676, 2642, 6810, 0, },
+ {3256, 1710, 9085, 2247, 6287, 0, },
+
+ {2036, 5360, 0, 2234, 4573, 7080, },
+ {1817, 3222, 7256, 2228, 3742, 6281, },
+ {1714, 2535, 3897, 2658, 5728, 0, },
+ {2331, 5788, 0, 2265, 5726, 8993, },
+ {1927, 3955, 9161, 1395, 2593, 4768, },
+ {2769, 8872, 0, 1679, 3164, 8550, },
+ {2750, 7387, 0, 1759, 2976, 5304, },
+ {2474, 5612, 0, 1554, 2540, 4469, },
+ {2300, 5603, 0, 1790, 3068, 5296, },
+ {1882, 5061, 0, 1260, 2195, 4293, },
+ {3170, 9232, 0, 1690, 4461, 8817, },
+ {2492, 5935, 0, 1509, 2492, 3953, },
+
+ {1999, 4485, 11706, 3084, 1315, 8624, },
+ {2267, 5315, 0, 2666, 1237, 1802}, /* CNG */
+
+};/* An 6-by-146 matrix in Scale = 2048.00f */
+
+const Word16 scales_p_fx[][6] =
+{//Q11
+ {2998, 4862, 0, 0, 0, 0, },
+ {2591, 5251, 0, 3355, 0, 0, },
+ {2177, 3488, 5745, 2650, 4819, 0, },
+ {2177, 3926, 6273, 2796, 0, 0, },
+ {1872, 2892, 4553, 2650, 4819, 0, },
+ {1806, 2869, 4919, 2689, 4999, 0, },
+ {2777, 1776, 4868, 2191, 3453, 5214, },
+ {1733, 2761, 5214, 2204, 3568, 5444, },
+ {1731, 2824, 5255, 2087, 3230, 5003, },
+ {1548, 2435, 5732, 2220, 3695, 5648, },
+ {1546, 2494, 5777, 1933, 2935, 4041, },
+ {1483, 2529, 6025, 2570, 1737, 4096, },
+ {1407, 2279, 4788, 1747, 2720, 3981, },
+ {1327, 2107, 3760, 1749, 2777, 4016, },
+ {1327, 2107, 3760, 1407, 2167, 3891, }, /* 39 (38.488) */ /* V WB*/ /* 14 */
+ {3303, 0, 0, 0, 0, 0, },
+ {2595, 5069, 0, 3316, 0, 0, },
+ {2077, 3338, 5046, 2632, 4405, 0, },
+ {1829, 2847, 4739, 3000, 4708, 0, },
+ {1905, 2869, 4403, 2621, 4616, 0, },
+ {1829, 2847, 4739, 2613, 4518, 6111, },
+ {1829, 2847, 4739, 2122, 3371, 5061, },
+ {1755, 2738, 5046, 2136, 3543, 5376, },
+ {1567, 2497, 3181, 2122, 3371, 5061, },
+ {1616, 2720, 3383, 2154, 3654, 5542, },
+ {1565, 2507, 3185, 1884, 2955, 4168, },
+ {1358, 2173, 2535, 2824, 1839, 3996, },
+ {1378, 2261, 2675, 2578, 1696, 4002, },
+ {1364, 2193, 2558, 1645, 2542, 3541, },
+ {1348, 2128, 2486, 1946, 1333, 2927, }, /* 39 (38.512) */ /* V NB*/ /* 29 */
+ {3277, 0, 0, 3181, 0, 0, },
+ {2322, 4067, 6748, 3181, 0, 0, },
+ {2021, 3662, 5446, 3373, 0, 0, },
+ {1841, 3281, 5282, 3373, 0, 0, },
+ {1632, 2650, 4383, 3373, 0, 0, },
+ {1632, 2650, 4383, 2734, 4557, 0, },
+ {1518, 2357, 3719, 2734, 4557, 0, },
+ {1632, 2650, 4383, 2429, 3957, 0, },
+ {1518, 2357, 3719, 2384, 3734, 5671, },
+ {1450, 2306, 4000, 2204, 3543, 5687, },
+ {1352, 2148, 3217, 2204, 3543, 5687, },
+ {1356, 2101, 3183, 2200, 3918, 6189, },
+ {1352, 2148, 3217, 2947, 1896, 4364, },
+ {1290, 1978, 3117, 2687, 1804, 4520, },
+ {1264, 1886, 2963, 2114, 3172, 1548, }, /* 35 (34.994) */ /* G WB*/ /* 44 */
+ {3267, 0, 0, 3076, 0, 0, },
+ {2300, 3985, 7643, 3076, 0, 0, },
+ {2116, 4250, 8886, 2906, 5009, 0, },
+ {2017, 3672, 12216, 2623, 4760, 0, },
+ {1804, 3289, 14326, 2906, 5009, 0, },
+ {1729, 3240, 14377, 2623, 4760, 0, },
+ {1616, 3113, 14752, 2623, 4760, 0, },
+ {1780, 3168, 14326, 2109, 3592, 6353, },
+ {1673, 3056, 14582, 2109, 3592, 6353, },
+ {1546, 2830, 14608, 2109, 3592, 6353, },
+ {1446, 2693, 14797, 2109, 3592, 6353, },
+ {1411, 2654, 14930, 2081, 3840, 6633, },
+ {1430, 2611, 14764, 1872, 3170, 4983, },
+ {1391, 2693, 14930, 2517, 3779, 1665, },
+ {1391, 2693, 14930, 2433, 1581, 4004, }, /* 35 (34.952) */ /* G NB*/ /* 59 */
+
+ {2070, 3639, 5652, 3305, 0,0,},
+ {1747, 2830, 4231, 2550, 5487, 0,},
+ {2472, 1593, 4522, 2550, 5487, 0,},
+ {2472, 1593, 4522, 2075, 3752, 6253},
+ {2472, 1593, 4522, 2908, 1786, 4772,},
+ {1075, 1577, 2198, 1669, 2533, 1161}, /* 40 (39.990) */ /* AUDIO_WB */ /* 65 */
+
+ {2191, 3668, 7993, 3275, 0, 0, },
+ {1679, 2492, 4278, 2570, 4690, 0, },
+ {1597, 2394, 5110, 2570, 4690, 0, },
+ {2202, 1481, 4835, 2273, 4016, 7150, },
+
+ {1415, 2107, 4786, 2118, 3668, 8200, }, /* 31 */ /*AUDIO_NB */ /* 70 */
+ {1374, 2204, 5337, 1956, 3168, 5149, }, /* 32 */ /*AUDIO_NB */ /* 71 */
+ {2425, 4336, 1589,3420, 2165, 1380, },
+ {1067, 1530, 2116, 1630, 2730, 1110,}, /* 40 */ /* mode AUDIO_WB 16k */ /* 73*/
+
+ {3439, 0, 0, 2626, 5061, 0, },
+ {2228, 3787, 6543, 3455, 0, 0, },
+ {2228, 3787, 6543, 2626, 5061, 0, },
+ {2306, 3459, 1618, 2626, 5061, 0, },
+ {1905, 2830, 1397, 2626, 5061, 0, },
+ {2284, 1626, 3793, 2623, 6212, 0, },
+ {1720, 2818, 1276, 1638, 2900, 8724, }, /* 36 (35.998) */ /* INACTIVE NB */
+ {1640, 2351, 3690, 0, 0, 0, },
+ {2230, 3711, 6496, 3434, 0, 0, },
+ {2230, 3899, 6597, 3115, 5396, 0, },
+ {1731, 2482, 3961, 2689, 4954, 0, },
+ {1595, 2243, 3482, 2689, 4954, 0, },
+ {1481, 2079, 3408, 2689, 4954, 0, },
+ {1829, 1335, 2945, 2204, 1475, 3674, }, /* 36 (35.929) */ /* INACTIVE WB*/
+ {2783, 4723, 0, 3418, 0, 0, },
+ {2206, 3946, 7262, 3418, 0, 0, },
+ {2206, 4162, 7328, 2927, 5552, 0, },
+ {1706, 2566, 4311, 2628, 5235, 0, },
+ {1589, 2359, 3805, 2628, 5235, 0, },
+ {1473, 2183, 3547, 2628, 5235, 0, },
+ {1927, 1333, 3205, 1479, 2437, 3973, }, /* 36 (35.915) */ /* INACTIVE 16k*/
+
+ {2646, 5077, 0, 3156, 0, 0, },
+ {2462, 3897, 0, 3156, 0, 0, },
+ {2105, 3361, 5028, 3375, 0, 0, },
+ {2554, 1798, 4770, 3375, 0, 0, },
+ {1767, 2781, 5165, 3375, 0, 0, },
+ {1673, 2503, 4116, 2200, 3656, 5597, },
+ {1669, 1253, 2623, 2161, 3531, 6046, }, /* 32 (31.990) */ /* UNVOICED NB*/
+
+ {3164, 0, 0, 3170, 0, 0, },
+ {3359, 0, 0, 3170, 0, 0, },
+ {2636, 5630, 0, 3170, 0, 0, },
+ {2636, 5630, 0, 3387, 0, 0, },
+ {2437, 4149, 0, 3387, 0, 0, },
+ {1907, 2986, 5018, 2650, 5616, 0, },
+ {1796, 2859, 5605, 2214, 3719, 6881, }, /* 28 (27.996) */ /* UNVOICED WB */
+ {2316, 3351, 0, 2808, 0, 0, },
+ {1913, 2615, 1491, 2370, 3475, 0, },
+ {1706, 2380, 1348, 2357, 3455, 0, },
+ {1538, 2114, 1225, 2357, 3455, 0, },
+ {1452, 2058, 1167, 2171, 3629, 5569, },
+ {1528, 2050, 1231, 2056, 3693, 5923, },
+ {1522, 2048, 1227, 1917, 3811, 5886, },
+ {1587, 1257, 2124, 1630, 2671, 3901, }, /* 39 (38.301) */ /* VOICED 16k */
+ {1831, 2742, 5220, 2679, 5327, 0, },
+ {1475, 2073, 3273, 3097, 1896, 4377, },
+ {1395, 1993, 3377, 2828, 1794, 4360, },
+ {1401, 1974, 3359, 2392, 3637, 1612, },
+ {1368, 1915, 3176, 2081, 3109, 1458, },
+ {1350, 1866, 2918, 2738, 1821, 1315, },
+ {1350, 1866, 2918, 1718, 2636, 1243, }, /* 37 (36.989) */ /* GENERIC 16k*/
+ {3344, 0, 0, 3455, 0, 0, },
+ {2204, 3666, 6025, 3455, 0, 0, },
+ {1708, 2517, 3871, 3455, 0, 0, },
+ {1921, 2875, 4409, 2675, 5386, 0, },
+ {2744, 1815, 4751, 2675, 5386, 0, },
+ {1706, 2560, 3908, 2675, 5386, 0, },
+ {1706, 2484, 3836, 2304, 3766, 5773, },
+ {1567, 2380, 3461, 2097, 3559, 5812, },
+ {1485, 2150, 3668, 3031, 1888, 6357, },
+ {1458, 2073, 3172, 3060, 1849, 6889, },
+ {1350, 1898, 2779, 3060, 1849, 6889, },
+ {1683, 1257, 2638, 1864, 3090, 4618, },
+ {1722, 1278, 2617, 2378, 1561, 3703, },
+ {1716, 1274, 2593, 2212, 1456, 3502, },
+ {1704, 1268, 2611, 1921, 2929, 1319, }, /* 37 (36.971) */ /* GENERIC 12.8k MA*/
+ {1810, 2763, 5263, 2691, 5343, 0, },
+ {1456, 2085, 3308, 3035, 1886, 7027, },
+
+ {1391, 1995, 3398, 1942, 3172, 7062, },
+
+ {1702, 1266, 3033, 1911, 3101, 4731, },
+ {1671, 1249, 2871, 2920, 1796, 4639, },
+ {1612, 2574, 1221, 1759, 2963, 4979, },
+ {1612, 2574, 1221, 2265, 1505, 3398}, /* 37 (36.993) */ /* AUDIO 16k */
+
+};
+
+const Word16 sigma_MSLVQ_fx[][16] =
+{//Qlog2(2.56)
+ {3},
+ {3},
+ {107, 113, 160, 185, 202, 211, 219, 222, 222, 217, 218, 270, 327, 176, 66, 43},
+ {125, 130, 182, 185, 191, 199, 204, 207, 205, 191, 179, 227, 305, 261, 95, 64},
+ {123, 123, 176, 197, 207, 218, 228, 235, 232, 218, 209, 272, 342, 216, 89, 68},
+ {219, 212, 255, 271, 273, 274, 260, 255, 250, 248, 249, 302, 328, 394, 85, 37},
+ {3},
+ {3},
+ {113, 134, 220, 253, 260, 275, 274, 287, 304, 323, 321, 325, 349, 350, 376, 332},
+ {158, 179, 242, 248, 246, 259, 257, 267, 278, 274, 276, 289, 309, 309, 312, 306},
+ {146, 146, 222, 256, 261, 278, 290, 302, 318, 313, 323, 352, 394, 407, 415, 399},
+ {217, 227, 287, 303, 316, 310, 296, 304, 303, 305, 317, 327, 355, 321, 305, 279},
+ {3},
+ {3},
+ {193, 216, 283, 320, 343, 359, 375, 408, 413, 445, 479, 489, 502, 466, 456, 479},
+ {230, 238, 312, 330, 334, 329, 339, 357, 353, 358, 391, 403, 441, 459, 379, 497},
+ {231, 277, 304, 322, 347, 353, 366, 372, 373, 397, 438, 451, 424, 413, 381, 447},
+ {264, 287, 364, 386, 384, 373, 382, 373, 393, 403, 448, 438, 403, 430, 401, 586},
+ {224, 298, 262, 264, 258, 244, 260, 283, 313, 295, 275, 279, 260, 286, 286, 399},
+ {411, 314, 301, 332, 335, 343, 356, 409, 430, 413, 363, 364, 338, 332, 315, 412},
+ {136, 269, 343, 367, 405, 430, 411, 421, 444, 466, 435, 423, 328, 247, 235, 240},
+ {178, 433, 305, 268, 258, 252, 253, 246, 250, 250, 245, 256, 242, 273, 300, 371},
+ {349, 334, 335, 341, 336, 331, 343, 425, 505, 722, 783, 655,1006, 862, 346, 248},
+ {315, 306, 323, 306, 300, 278, 276, 287, 380, 394, 327, 333, 339, 382, 370, 626},
+ {236, 250, 241, 231, 241, 245, 238, 221, 215, 190, 181, 178, 183, 428, 184, 55},
+ {113, 189, 360, 312, 332, 326, 296, 268, 272, 282, 320, 275, 219, 203, 179, 143},
+ {273, 255, 245, 237, 242, 236, 214, 217, 223, 260, 233, 193, 187, 183, 174, 163},
+ {111, 321, 275, 219, 213, 207, 202, 205, 205, 225, 239, 208, 192, 187, 168, 152},
+ {383, 326, 300, 287, 290, 292, 276, 251, 258, 291, 430, 521, 397, 305, 274, 269},
+ {152, 221, 271, 291, 344, 310, 308, 257, 252, 256, 339, 491, 499, 199, 179, 107},
+ {226, 237, 236, 239, 250, 238, 228, 223, 227, 241, 311, 312, 299, 313, 421, 360},
+ {221, 238, 214, 220, 246, 244, 232, 221, 210, 208, 200, 229, 368, 431, 106, 71},
+ {249, 259, 267, 283, 278, 275, 251, 237, 203, 209, 198, 279, 543, 509, 122, 90},
+ {192, 249, 256, 235, 231, 230, 213, 215, 210, 247, 284, 237, 214, 210, 199, 181},
+};
+
+/* An 16-by-33 matrix in Scale = 32768.00f */
+const Word16 inv_sigma_MSLVQ_fx[][16] =//Q15
+{
+ {32767},
+ {32767},
+ {783, 746, 523, 453, 416, 397, 384, 378, 378, 386, 384, 310, 256, 477, 1273, 1935},
+ {670, 647, 461, 452, 440, 421, 412, 405, 410, 440, 468, 369, 275, 321, 883, 1305},
+ {679, 682, 477, 426, 405, 385, 368, 357, 362, 385, 401, 308, 245, 388, 942, 1231},
+ {383, 395, 329, 309, 307, 307, 322, 329, 335, 338, 337, 278, 256, 213, 989, 2243},
+ {32767},
+ {32767},
+ {740, 628, 382, 332, 322, 305, 306, 292, 276, 259, 261, 258, 240, 240, 223, 253},
+ {530, 469, 346, 338, 341, 323, 326, 314, 302, 306, 304, 290, 271, 272, 269, 274},
+ {576, 576, 378, 327, 322, 302, 289, 278, 264, 268, 259, 238, 213, 206, 202, 210},
+ {386, 370, 292, 277, 266, 271, 284, 276, 276, 275, 264, 257, 236, 262, 275, 300},
+ {32767},
+ {32767},
+ {435, 389, 296, 262, 244, 233, 223, 205, 203, 188, 175, 172, 167, 180, 184, 175},
+ {365, 352, 268, 254, 251, 255, 247, 235, 237, 234, 214, 208, 190, 183, 221, 169},
+ {363, 302, 276, 261, 241, 237, 229, 226, 225, 211, 191, 186, 198, 203, 220, 188},
+ {318, 292, 230, 218, 218, 225, 219, 225, 213, 208, 187, 192, 208, 195, 209, 143},
+ {374, 281, 320, 318, 325, 344, 322, 296, 268, 284, 305, 301, 322, 294, 293, 210},
+ {204, 267, 279, 253, 250, 245, 235, 205, 195, 203, 231, 231, 248, 252, 266, 204},
+ {616, 312, 245, 229, 207, 195, 204, 199, 189, 180, 193, 198, 256, 340, 356, 349},
+ {471, 194, 275, 313, 325, 333, 332, 342, 335, 336, 342, 328, 347, 307, 280, 226},
+ {241, 251, 250, 246, 250, 254, 245, 197, 166, 116, 107, 128, 83, 97, 242, 339},
+ {266, 274, 259, 274, 279, 302, 304, 292, 221, 213, 257, 252, 247, 219, 227, 134},
+ {355, 336, 348, 363, 348, 342, 353, 379, 391, 442, 462, 472, 458, 196, 456,1518},
+ {744, 443, 233, 269, 253, 257, 283, 313, 308, 298, 262, 305, 383, 413, 469, 585},
+ {308, 330, 343, 353, 347, 356, 392, 387, 376, 322, 359, 435, 448, 458, 482, 514},
+ {756, 261, 305, 384, 394, 406, 415, 409, 409, 372, 352, 403, 438, 448, 498, 552},
+ {219, 257, 280, 293, 289, 288, 304, 335, 325, 289, 195, 161, 211, 275, 306, 312},
+ {550, 380, 309, 288, 244, 271, 272, 326, 332, 328, 248, 171, 168, 421, 468, 781},
+ {371, 355, 356, 350, 336, 353, 368, 376, 369, 348, 269, 269, 281, 268, 199, 233},
+ {380, 353, 392, 381, 342, 344, 362, 379, 399, 403, 420, 367, 228, 195, 789,1184},
+ {337, 324, 314, 297, 301, 305, 335, 354, 414, 401, 425, 301, 154, 165, 690, 927},
+ {438, 337, 327, 357, 363, 365, 394, 390, 400, 340, 295, 354, 392, 399, 421, 462},
+};
+
+/* An 16-by-19 matrix in Scale = 32768.00f */
+const Word16 inv_sigma_p_fx[][16] =//Q15
+{
+ {552, 513, 469, 494, 486, 478, 492, 496, 496, 482, 480, 388, 339, 276, 743, 760},
+ {640, 492, 472, 478, 482, 471, 470, 471, 623, 504, 501, 477, 459, 425, 421, 408},
+ {1001, 939, 696, 589, 545, 480, 456, 451, 444, 462, 472, 424, 342, 441, 1567, 3002},
+ {609, 534, 419, 432, 444, 403, 406, 407, 391, 425, 452, 378, 269, 278, 818, 1939},
+ {32767},
+ {574, 507, 459, 432, 425, 415, 440, 442, 449, 450, 490, 443, 299, 270, 1377, 2451},
+ {591, 499, 456, 457, 449, 441, 448, 446, 443, 436, 420, 397, 364, 342, 496, 475},
+ {482, 512, 498, 426, 280, 225, 422, 1411, 404, 404, 402, 385, 364, 342, 355, 361},
+ {917, 831, 572, 507, 482, 430, 406, 399, 385, 365, 364, 344, 313, 309, 311, 335},
+ {533, 436, 371, 399, 398, 368, 367, 348, 343, 342, 338, 319, 306, 305, 311, 334},
+ {32767},
+ {641, 523, 458, 434, 415, 410, 412, 395, 397, 394, 386, 381, 366, 392, 413, 419},
+ {449, 380, 364, 366, 354, 362, 362, 356, 337, 323, 293, 296, 336, 352, 353, 283},
+ {32767},
+ {601, 485, 348, 262, 267, 266, 276, 285, 255, 233, 227, 235, 216, 237, 233, 212},
+ {338, 279, 247, 244, 233, 239, 231, 232, 228, 215, 194, 194, 207, 210, 222, 180},
+ {32767},
+ {594, 466, 394, 376, 362, 358, 346, 350, 336, 332, 313, 329, 343, 358, 370, 419},
+ {471, 409, 323, 325, 308, 295, 305, 290, 281, 280, 271, 262, 251, 255, 266, 312},
+};
+
+const Word16 sigma_p_fx[][16] =
+{//Qlog2(2.56)
+ {152, 164, 179, 170, 172, 176, 171, 169, 169, 174, 175, 216, 247, 304, 113, 110},
+ {131, 171, 178, 176, 174, 178, 178, 178, 135, 166, 167, 176, 183, 197, 199, 206},
+ {84, 89, 120, 142, 154, 175, 184, 186, 189, 181, 178, 198, 245, 190, 54, 28},
+ {138, 157, 200, 194, 189, 208, 207, 206, 214, 197, 186, 222, 311, 302, 103, 43},
+ {3},
+ {146, 165, 183, 194, 197, 202, 191, 190, 187, 186, 171, 189, 281, 311, 61, 34},
+ {142, 168, 184, 183, 187, 190, 187, 188, 189, 193, 200, 212, 231, 245, 169, 177},
+ {174, 164, 168, 197, 300, 372, 199, 59, 208, 208, 209, 218, 231, 246, 237, 232},
+ {91, 101, 147, 165, 174, 195, 207, 210, 218, 230, 230, 244, 268, 272, 269, 250},
+ {157, 192, 226, 210, 211, 228, 228, 241, 245, 246, 248, 263, 274, 275, 270, 251},
+ {3},
+ {131, 160, 183, 193, 202, 205, 203, 212, 212, 213, 217, 220, 229, 214, 203, 200},
+ {187, 221, 231, 229, 237, 232, 232, 236, 249, 259, 286, 284, 250, 238, 238, 296},
+ {3},
+ {140, 173, 241, 320, 314, 315, 304, 295, 329, 359, 369, 357, 388, 354, 359, 396},
+ {248, 300, 339, 344, 360, 350, 363, 361, 368, 391, 431, 433, 406, 400, 377, 467},
+ {3},
+ {141, 180, 213, 223, 232, 234, 242, 240, 250, 253, 268, 255, 245, 235, 227, 200},
+ {178, 205, 259, 258, 273, 285, 275, 289, 299, 300, 310, 320, 335, 329, 316, 269},
+};
+
+const Word16 sigma_p_ivas_fx[][16] =
+{//Qlog2(2.56)
+ {152, 164, 179, 170, 172, 176, 171, 169, 169, 174, 175, 216, 247, 304, 113, 110},
+ {131, 171, 178, 176, 174, 178, 178, 178, 135, 166, 167, 176, 183, 197, 199, 206},
+ {84, 89, 120, 142, 154, 175, 184, 186, 189, 181, 178, 198, 245, 190, 54, 28},
+ {138, 157, 200, 194, 189, 208, 207, 206, 214, 197, 186, 222, 311, 302, 103, 43},
+ {3},
+ {146, 165, 183, 194, 197, 202, 191, 190, 187, 186, 171, 189, 281, 311, 61, 34},
+ {142, 168, 184, 183, 187, 190, 187, 188, 189, 193, 200, 212, 231, 245, 169, 177},
+ {174, 164, 168, 197, 300, 372, 199, 59, 208, 208, 209, 218, 231, 246, 237, 232},
+ {91, 101, 147, 165, 174, 195, 207, 210, 218, 230, 230, 244, 268, 272, 269, 250},
+ {157, 192, 226, 210, 211, 228, 228, 241, 245, 246, 248, 263, 274, 275, 270, 251},
+ {3},
+ {131, 160, 183, 193, 202, 205, 203, 212, 212, 213, 217, 220, 229, 214, 203, 200},
+ {187, 221, 231, 229, 237, 232, 232, 236, 249, 259, 286, 284, 250, 238, 238, 296},
+ {3},
+ {127, 173, 226, 217, 264, 256, 290, 295, 297, 325, 334, 326, 302, 290, 275, 254},
+ {248, 300, 339, 344, 360, 350, 363, 361, 368, 391, 431, 433, 406, 400, 377, 467},
+ {3},
+ {141, 180, 213, 223, 232, 234, 242, 240, 250, 253, 268, 255, 245, 235, 227, 200},
+ {178, 205, 259, 258, 273, 285, 275, 289, 299, 300, 310, 320, 335, 329, 316, 269},
+};
+
+const Word16 inv_sigma_p_ivas_fx[][16] =
+{//Qlog2(2.56)
+ {552, 513, 470, 494, 487, 478, 492, 496, 496, 482, 480, 389, 339, 276, 743, 760},
+ {640, 492, 472, 478, 482, 471, 470, 471, 623, 504, 501, 477, 459, 425, 420, 408},
+ {1002, 939, 696, 589, 545, 480, 456, 450, 444, 462, 472, 424, 342, 441, 1568, 2996},
+ {609, 534, 419, 432, 444, 403, 406, 407, 392, 425, 452, 378, 269, 278, 818, 1940},
+ {32767},
+ {575, 507, 459, 432, 425, 415, 440, 442, 449, 450, 489, 443, 299, 270, 1378, 2449},
+ {591, 499, 456, 457, 449, 441, 448, 446, 444, 435, 420, 397, 364, 342, 496, 475},
+ {482, 512, 498, 426, 280, 225, 422, 1410, 404, 404, 402, 385, 364, 342, 355, 361},
+ {918, 832, 572, 507, 482, 430, 406, 399, 385, 366, 364, 344, 313, 309, 311, 335},
+ {533, 436, 371, 399, 398, 368, 367, 348, 343, 342, 338, 319, 306, 305, 311, 334},
+ {32767},
+ {641, 523, 458, 434, 415, 410, 412, 395, 397, 394, 386, 380, 366, 392, 413, 419},
+ {449, 380, 364, 366, 355, 362, 362, 356, 337, 323, 293, 296, 336, 352, 353, 283},
+ {32767},
+ {659, 486, 371, 386, 318, 328, 289, 284, 283, 258, 251, 257, 278, 290, 305, 330},
+ {338, 279, 247, 244, 233, 239, 231, 232, 228, 215, 194, 194, 207, 210, 222, 180},
+ {32767},
+ {594, 466, 394, 376, 362, 358, 346, 350, 336, 332, 313, 329, 343, 358, 370, 419},
+ {471, 409, 323, 325, 308, 295, 304, 290, 281, 280, 271, 262, 251, 255, 266, 312}
+};
+
+const Word8 leaders_short[][MAX_NO_SCALES] = // Q0
+{{ 0, 0, 0},
+{ 1, 0, 0},
+{ 15, 3, 3},
+{ 2, 2, 0},
+{ 2, 0, 0},
+{ 2, 1, 0},
+{ 4, 0, 0},
+{ 9, 7, 6},
+{ 4, 1, 0},
+{ 5, 2, 0},
+{ 6, 3, 2},
+{ 5, 3, 1},
+{ 8, 3, 0},
+{ 9, 3, 0},
+{ 2, 2, 1},
+{ 9, 8, 5},
+{ 5, 5, 0},
+{ 17, 3, 0},
+{ 5, 2, 1},
+{ 7, 3, 0},
+{ 5, 4, 0},
+{ 5, 5, 1},
+{ 2, 2, 2},
+{ 4, 2, 2},
+{ 5, 2, 2},
+{ 6, 6, 5},
+{ 5, 3, 2},
+{ 6, 3, 0},
+{ 12, 3, 2},
+{ 15, 3, 2},
+{ 19, 3, 2},
+{ 7, 6, 3},
+{ 5, 4, 2},
+{ 9, 8, 2},
+{ 6, 5, 2},
+{ 5, 4, 1},
+{ 9, 9, 3},
+{ 6, 6, 2},
+{ 8, 6, 2},
+{ 8, 7, 2},
+{ 8, 8, 2},
+{ 4, 2, 0},
+{ 11, 8, 2},
+{ 13, 11, 2},
+{ 5, 5, 2},
+{ 16, 13, 2},
+{ 13, 12, 2},
+{ 18, 17, 2},
+{ 21, 17, 2},
+{ 18, 16, 2},
+{ 32, 28, 2},
+{ 8, 8, 4},
+{ 7, 5, 2},
+{ 13, 11, 9},
+{ 38, 31, 2},
+{ 4, 4, 2},
+{ 8, 8, 3},
+{ 9, 8, 3},
+{ 8, 5, 2},
+{ 10, 9, 3},
+{ 11, 10, 3},
+{ 13, 10, 3},
+{ 22, 10, 3},
+{ 23, 10, 3},
+{ 13, 11, 3},
+{ 15, 13, 3},
+{ 35, 15, 3},
+{ 32, 16, 3},
+{ 5, 5, 4},
+{ 8, 7, 4},
+{ 33, 31, 2},
+{ 9, 9, 4},
+{ 16, 12, 4},
+{ 17, 13, 4},
+{ 5, 5, 5},
+{ 7, 5, 5},
+{ 4, 3, 2},
+{ 8, 6, 5},
+{ 9, 6, 5},
+{ 9, 7, 5},
+{ 8, 8, 5},
+{ 3, 2, 0},
+{ 10, 8, 5},
+{ 11, 8, 5},
+{ 12, 8, 5},
+{ 13, 8, 5},
+{ 16, 8, 5},
+{ 18, 8, 5},
+{ 10, 9, 5},
+{ 18, 9, 5},
+{ 23, 21, 2},
+{ 13, 8, 8},
+{ 14, 10, 5},
+{ 11, 11, 5},
+{ 13, 11, 5},
+{ 13, 13, 5},
+{ 14, 13, 5},
+{ 15, 13, 5},
+{ 16, 13, 5},
+{ 17, 13, 5},
+{ 18, 13, 5},
+{ 18, 16, 5},
+{ 18, 17, 5},
+{ 19, 18, 5},
+{ 13, 10, 5},
+{ 21, 21, 5},
+{ 23, 21, 5},
+{ 24, 21, 5},
+{ 25, 23, 5},
+{ 32, 23, 5},
+{ 11, 10, 5},
+{ 8, 8, 6},
+{ 5, 5, 7},
+{ 8, 7, 7},
+{ 8, 8, 7},
+{ 10, 8, 7},
+{ 13, 8, 7},
+{ 10, 9, 7},
+{ 13, 11, 7},
+{ 9, 8, 8},
+{ 12, 8, 8},
+{ 23, 18, 5},
+{ 9, 9, 8},
+{ 11, 9, 8},
+{ 13, 9, 8},
+{ 18, 10, 8},
+{ 26, 10, 8},
+{ 27, 10, 8},
+{ 31, 10, 8},
+{ 40, 21, 11},
+{ 13, 11, 8},
+{ 13, 12, 8},
+{ 14, 12, 8},
+{ 18, 12, 8},
+{ 13, 13, 8},
+{ 14, 13, 8},
+{ 16, 13, 8},
+{ 18, 13, 8},
+{ 18, 16, 8},
+{ 18, 17, 8},
+{ 23, 18, 8},
+{ 23, 21, 8},
+{ 24, 21, 8},
+{ 28, 23, 8},
+{ 31, 31, 8},
+{ 36, 31, 8},
+{ 38, 31, 8},
+{ 11, 9, 9},
+{ 12, 9, 9},
+{ 13, 9, 9},
+{ 12, 11, 9},
+{ 42, 31, 2},
+{ 14, 12, 9},
+{ 13, 13, 9},
+{ 14, 13, 9},
+{ 16, 13, 9},
+{ 17, 13, 9},
+{ 18, 13, 9},
+{ 18, 14, 9},
+{ 18, 18, 9},
+{ 26, 25, 9},
+{ 13, 11, 10},
+{ 18, 12, 10},
+{ 18, 13, 10},
+{ 21, 14, 10},
+{ 22, 16, 10},
+{ 18, 18, 10},
+{ 23, 18, 10},
+{ 24, 18, 10},
+{ 24, 21, 10},
+{ 23, 22, 10},
+{ 24, 23, 10},
+{ 32, 25, 10},
+{ 34, 28, 10},
+{ 42, 31, 10},
+{ 17, 11, 11},
+{ 18, 13, 11},
+{ 21, 13, 11},
+{ 18, 17, 11},
+{ 18, 18, 11},
+{ 48, 35, 24},
+{ 18, 17, 12},
+{ 18, 18, 12},
+{ 20, 18, 12},
+{ 39, 30, 12},
+{ 31, 31, 12},
+{ 43, 34, 12},
+{ 16, 13, 13},
+{ 17, 13, 13},
+{ 16, 16, 13},
+{ 18, 17, 13},
+{ 20, 18, 13},
+{ 22, 18, 13},
+{ 23, 18, 13},
+{ 22, 21, 13},
+{ 23, 23, 13},
+{ 24, 23, 13},
+{ 43, 36, 13},
+{ 43, 40, 13},
+{ 43, 41, 13},
+{ 31, 30, 18},
+{ 24, 21, 14},
+{ 31, 31, 14},
+{ 23, 18, 16},
+{ 23, 23, 16},
+{ 31, 25, 16},
+{ 31, 29, 16},
+{ 45, 35, 16},
+{ 23, 21, 17},
+{ 23, 22, 17},
+{ 23, 23, 17},
+{ 31, 31, 17},
+{ 21, 18, 18},
+{ 23, 21, 18},
+{ 23, 22, 18},
+{ 27, 23, 18},
+{ 29, 23, 18},
+{ 32, 23, 18},
+{ 31, 27, 18},
+{ 30, 28, 18},
+{ 31, 28, 18},
+{ 43, 42, 13},
+{ 31, 31, 18},
+{ 32, 31, 18},
+{ 36, 31, 18},
+{ 46, 48, 18},
+{ 46, 32, 19},
+{ 43, 38, 19},
+{ 43, 42, 19},
+{ 32, 32, 20},
+{ 27, 23, 21},
+{ 31, 23, 21},
+{ 31, 24, 21},
+{ 32, 30, 21},
+{ 32, 31, 21},
+{ 43, 33, 21},
+{ 43, 34, 21},
+{ 24, 23, 23},
+{ 32, 32, 23},
+{ 48, 40, 23},
+{ 48, 46, 23},
+{ 28, 24, 24},
+{ 32, 31, 24},
+{ 34, 32, 24},
+{ 36, 32, 24},
+{ 48, 32, 24},
+{ 35, 10, 8},
+{ 40, 28, 25},
+{ 45, 31, 25},
+{ 44, 32, 25},
+{ 31, 31, 27},
+{ 39, 32, 27},
+{ 44, 32, 27},
+{ 32, 32, 28},
+{ 43, 32, 28},
+{ 48, 32, 28},
+{ 36, 36, 28},
+{ 48, 45, 28},
+{ 40, 32, 29},
+{ 44, 34, 30},
+{ 40, 32, 31},
+{ 41, 32, 31},
+{ 42, 32, 31},
+{ 44, 43, 31},
+{ 48, 37, 32},
+{ 48, 39, 32},
+{ 46, 43, 32},
+{ 48, 48, 34},
+{ 48, 36, 35},
+{ 48, 41, 35},
+{ 47, 43, 36},
+{ 48, 48, 37},
+{ 48, 48, 40},
+{ 48, 48, 45},
+{ 48, 48, 47},
+{ 48, 48, 48}};
+
+const UWord8 no_lead_idx[][2] = { // Q0
+{ 1, 1},
+{ 4, 1},
+{ 41, 1},
+{ 41, 4},
+{ 52, 32},
+{ 56, 38},
+{ 41, 1},
+{ 6, 5},
+{119, 14},
+{ 58, 18},
+{138, 21},
+{169, 40},
+{ 4, 4},
+{ 41, 1},
+{ 35, 1},
+{ 35, 4},
+{ 52, 4},
+{ 18, 8},
+{ 44, 41},
+{ 58, 6},
+{ 58, 9},
+{ 69, 26},
+{ 51, 34},
+{ 85, 34},
+{ 85, 38},
+{ 85, 42},
+{139, 40},
+{142, 33},
+{140, 64},
+{141, 73},
+{236, 124},
+{235, 133},
+{211, 160},
+{ 4, 3},
+{ 41, 1},
+{ 52, 3},
+{ 39, 3},
+{ 42, 3},
+{153, 3},
+{118, 9},
+{158, 44},
+{202, 93},
+{250, 201},
+{ 20, 0},
+{ 52, 0},
+{ 1, 1},
+{ 4, 1},
+{ 4, 4},
+{ 4, 4},
+{ 41, 1},
+{ 41, 4},
+{ 20, 4},
+{ 52, 4},
+{ 39, 4},
+{ 44, 41},
+{ 58, 6},
+{ 80, 41},
+{114, 9},
+{124, 9},
+{130, 21},
+{124, 58},
+{165, 34},
+{164, 39},
+{169, 40},
+{ 35, 0},
+{ 4, 4},
+{ 35, 1},
+{ 35, 4},
+{ 52, 4},
+{ 58, 5},
+{ 15, 5},
+{135, 3},
+{116, 41},
+{124, 24},
+{137, 24},
+{177, 26},
+{194, 44},
+{208, 52},
+{230, 58},
+{ 4, 4},
+{ 41, 1},
+{ 41, 4},
+{ 20, 4},
+{ 8, 6},
+{ 9, 8},
+{ 44, 41},
+{ 58, 6},
+{ 58, 9},
+{114, 9},
+{124, 9},
+{ 92, 21},
+{124, 58},
+{ 92, 51},
+{104, 91},
+{141, 51},
+{121, 91},
+{ 4, 3},
+{ 41, 1},
+{ 52, 3},
+{ 69, 3},
+{ 83, 3},
+{ 87, 3},
+{ 86, 44},
+{143, 74},
+{144, 112},
+{179, 78},
+{196, 78},
+{196, 78},
+{224, 78},
+{ 4, 3},
+{ 41, 1},
+{ 20, 1},
+{ 20, 4},
+{ 52, 4},
+{ 52, 3},
+{111, 5},
+{132, 4},
+{ 57, 41},
+{123, 41},
+{214, 3},
+{183, 81},
+{215, 41},
+{213, 32},
+{219, 44},
+{233, 52},
+{ 7, 52},
+{ 3, 57},
+{ 14, 59},
+{ 11, 53},
+{ 62, 0},
+{ 37, 4},
+{ 37, 3},
+{ 63, 3},
+{ 67, 3},
+{184, 3},
+{123, 41},
+{ 19, 124},
+{ 39, 4},
+{ 44, 41},
+{ 58, 6},
+{ 58, 9},
+{ 58, 44},
+{115, 32},
+{ 95, 16},
+{102, 21},
+{ 99, 38},
+{126, 58},
+{141, 57},
+{206, 56},
+{205, 120},
+{226, 124},
+{226, 133},
+{225, 182},
+{152, 3},
+{ 65, 3},
+{ 17, 14},
+{ 61, 22},
+{135, 3},
+{ 19, 11},
+{ 76, 25},
+{ 41, 36},
+{ 41, 33},
+{ 41, 7},
+{ 27, 10},
+{ 81, 15},
+{ 3, 2},
+{ 41, 36},
+{ 55, 31},
+{ 81, 7},
+};
+const UWord8 no_lead_p_idx[][2] = { // Q0
+ { 5, 0},
+{ 3, 0},
+{ 41, 0},
+{ 35, 0},
+{ 52, 0},
+{ 1, 1},
+{ 4, 1},
+{ 4, 4},
+{ 3, 4},
+{ 41, 1},
+{ 41, 4},
+{ 35, 4},
+{ 52, 4},
+{ 39, 4},
+{ 44, 41},
+{ 58, 6},
+{ 80, 41},
+{ 15, 9},
+{ 94, 9},
+{110, 34},
+{ 96, 52},
+{ 98, 39},
+{105, 58},
+{107, 51},
+{105, 104},
+{109, 94},
+{145, 98},
+{207, 100},
+{239, 103},
+{240, 108},
+{207, 146},
+{ 4, 0},
+{ 41, 4},
+{ 39, 3},
+{ 94, 5},
+{ 80, 41},
+{ 94, 18},
+{ 94, 44},
+{ 96, 52},
+{106, 44},
+{121, 58},
+{107, 51},
+{199, 15},
+{197, 104},
+{198, 156},
+{221, 200},
+{ 4, 1},
+{ 3, 1},
+{ 3, 4},
+{ 41, 1},
+{ 35, 1},
+{ 35, 4},
+{ 52, 4},
+{ 39, 4},
+{ 88, 4},
+{135, 4},
+{135, 3},
+{190, 3},
+{155, 41},
+{135, 20},
+{190, 32},
+{194, 44},
+{231, 44},
+{230, 58},
+{231, 15},
+{242, 83},
+{253, 130},
+{ 4, 1},
+{ 32, 1},
+{ 58, 5},
+{ 39, 3},
+{ 43, 5},
+{ 45, 3},
+{ 48, 3},
+{ 46, 44},
+{ 49, 44},
+{ 90, 44},
+{ 50, 44},
+{ 54, 52},
+{ 70, 51},
+{151, 122},
+{151, 53},
+{ 52, 4},
+{ 39, 4},
+{ 83, 4},
+{ 89, 4},
+{ 80, 41},
+{ 85, 41},
+{100, 8},
+{101, 9},
+{ 85, 38},
+{ 85, 15},
+{195, 52},
+{234, 52},
+{217, 15},
+{254, 15},
+{251, 104},
+{ 10, 153},
+{ 18, 157},
+{ 19, 192},
+{ 19, 237},
+{ 19, 0},
+{ 52, 4},
+{153, 3},
+{159, 3},
+{171, 32},
+{185, 44},
+{186, 68},
+{ 85, 15},
+{220, 44},
+{218, 75},
+{227, 75},
+{ 1, 77},
+{228, 147},
+{ 15, 150},
+{ 18, 187},
+{ 16, 212},
+{ 16, 241},
+{ 17, 248},
+{ 4, 3},
+{ 52, 4},
+{ 52, 3},
+{161, 3},
+{166, 3},
+{149, 9},
+{247, 47},
+{178, 0},
+{ 41, 1},
+{ 20, 1},
+{ 20, 4},
+{ 52, 4},
+{ 58, 5},
+{117, 4},
+{117, 3},
+{153, 3},
+{182, 3},
+{204, 3},
+{162, 9},
+{163, 44},
+{167, 44},
+{173, 44},
+{254, 44},
+{ 12, 52},
+{254, 15},
+{ 13, 82},
+{244, 188},
+{ 3, 4},
+{ 52, 4},
+{ 58, 5},
+{153, 3},
+{190, 3},
+{209, 3},
+{243, 189},
+{ 41, 1},
+{ 20, 1},
+{ 39, 4},
+{ 88, 4},
+{ 97, 4},
+{138, 21},
+{ 6, 44},
+{ 1, 1},
+{ 4, 1},
+{ 4, 4},
+{ 5, 4},
+{ 41, 1},
+{ 41, 4},
+{ 20, 4},
+{ 52, 4},
+{ 39, 4},
+{ 83, 4},
+{135, 4},
+{ 80, 41},
+{116, 41},
+{136, 41},
+{110, 34},
+{ 13, 6},
+{113, 41},
+{114, 18},
+{ 91, 24},
+{125, 24},
+{127, 24},
+{163, 12},
+{168, 13},
+{172, 13},
+{128, 84},
+{174, 28},
+{252, 29},
+{249, 30},
+{246, 129},
+{246, 180},
+{ 9, 66},
+{110, 41},
+{155, 41},
+{154, 20},
+{158, 44},
+{203, 21},
+{232, 44},
+{210, 39},
+{223, 79},
+{222, 123},
+{229, 131},
+{238, 139},
+{238, 170},
+{ 4, 4},
+{ 4, 4},
+{ 41, 1},
+{ 20, 1},
+{ 20, 4},
+{ 52, 4},
+{ 39, 4},
+{ 88, 4},
+{135, 4},
+{ 80, 41},
+{110, 41},
+{136, 41},
+{134, 32},
+{176, 44},
+{193, 44},
+{195, 52},
+{210, 39},
+{242, 39},
+{ 6, 71},
+{ 2, 148},
+{ 4, 175},
+{ 5, 191},
+{110, 41},
+{204, 3},
+{216, 22},
+{210, 23},
+{195, 32},
+{220, 44},
+{210, 39},
+{222, 33},
+{245, 57},
+{255, 60},
+{ 8, 72},
+{ 8, 181},
+};
+
+const Word16 min_lat_bits_SN[] = {-1, -1, 17, 12, 17, 17, -1, -1, 17, 12, 17, 17, -1, -1, 22, -1, 32, 26 };
+//Q0
+const Word16 min_lat_bits_SN_fx[] = { -1, -1, 17, 12, 17, 17, -1, -1, 17, 12, 17, 17, -1, -1, 22, -1, 32, 26 };
+
+const Word16 min_lat_bits_pred[] = {17, 18, 9, 15, -1, 21, 17, 14, 9, 15, -1, 21, 17, -1, 24, 26, -1, 26, 16};
+//Q0
+const Word16 min_lat_bits_pred_fx[] = { 17, 18, 9, 15, -1, 21, 17, 14, 9, 15, -1, 21, 17, -1, 24, 26, -1, 26, 16 };
+
+const Word16 offset_lvq_modes_SN[] = {-1,-1,33,64,96, 129,-1,-1,12,43,79,109,-1,-1,137,-1,107,135,
+ 112
+ }; /* CNG */
+//Q0
+const Word16 offset_lvq_modes_SN_fx[] = { -1,-1,26,51,77,96,-1,-1,12,36,66,90,-1,-1,105,-1,88,102,112 }; /* CNG */
+
+const Word16 offset_lvq_modes_pred[] = {119, 153, 31, 67, -1, 102, 126, 160, 0, 46, -1, 82, 146, -1, 175, 191, -1, 225, 203};
+//Qlog2(1.6)
+const Word16 offset_lvq_modes_pred_fx[] = { 74, 95, 15, 45, -1, 66, 81, 102, 0, 30, -1, 60, 88, -1, 109, 117, -1, 139, 124 };
+
+const Word16 offset_in_lvq_mode_SN[][21] =
+{
+ {0}, /* I NB */
+ {0,1,1,1,1,1,2,3,3,3,3,4,4,4,5}, /* UV NB*/
+ {0,1,1,1,1,2,3,4,5,5,6,6,7,7,7,7,7,8,8,8,9}, /* V NB */
+ {0,0,0,0,1,1,1,2,3,4,5,6,6,7,8,9,10,11,12,13,14}, /* G NB */
+ {0,1,1,1,1,2,3,4,5,5,5,6,6,6,7,8}, /* T NB */
+ {0,0,0,0,1,2,2,2,2,3,4,5}, /* A NB */
+ {0}, /* I WB */
+ {0}, /* UV WB*/
+ {1}, /* V WB */ /* granularity 1 */
+ {1}, /* G WB */ /* granularity 1 */
+ {1}, /* T WB */ /* granularity 1 */
+ {1}, /* A WB */ /* granularity 1 */
+ {0}, /* I 16k */
+ {0}, /* UV 16k */
+ {1}, /* V 16k */ /* granularity 1 */
+ {0}, /* G 16k */
+ {0,1}, /* T 16k */
+ {0}, /* A 16k */
+};
+
+const Word16 offset_in_lvq_mode_SN_fx[][21] =
+{//Q0
+ {0}, /* I NB */
+ {0,1,1,1,1,1,2,3,3,3,3,4,4,4,5}, /* UV NB*/
+ {0,1,1,1,1,2,3,4,5,5,6,6,7,7,7,7,7,8,8,8,9}, /* V NB */
+ {0,0,0,0,1,1,1,2,3,4,5,6,6,7,8,9,10,11,12,13,14}, /* G NB */
+ {0,1,1,1,1,2,3,4,5,5,5,6,6,6,7,8}, /* T NB */
+ {0,0,0,0,1,2,2,2,2,3,4,5}, /* A NB */
+ {0}, /* I WB */
+ {0,1,1,1,2,3,3,3,3,3,3,4,4,4,5}, /* UV WB*/
+ {0,1,1,1,2,3,3,3,4,5,6,7,8,9,9,10,11,12,12,12,13}, /* V WB */
+ {0,0,0,0,1,1,1,2,3,4,5,6,6,7,8,9,10,11,12,13,14}, /* G WB */
+ {0,1,1,1,2,3,3,4,5,5,5,6,6,7,8,9,10}, /* T WB */
+ {0,0,0,0,1,2,2,2,3,4,4,4,4,4,4,4,4,4,4,5}, /* A WB */
+ {0},
+ {0},
+ {0,0,0,0,0,0,1,2,3,3,4,5,6,6,6,7}, /* V 16k */
+ {0}, /* G 16k */
+ {0,1}, /* T 16k */
+ {0}, /*{0,0,0,0,0,0,0,0,0,0,1} */ /* A 16k */
+};
+
+const Word16 offset_in_lvq_mode_pred[][32] =
+{
+ {0,0,0,0,1,2,2,2,3,4,5,5,5,5,5,5,5,5,5,6}, /* I NB */
+ {0,1,1,1,2,3,4,4,4,4,4,5,5,5,6}, /* UV NB */
+ {0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,3,4,4,5,6,7,8,9,10,10,11,12,13,13,13,14}, /* V NB */
+ {0,0,0,0,1,1,1,2,3,4,5,6,6,7,8,9,10,11,12,13,14}, /* G NB */
+ {0}, /* T NB */
+ {0,0,0,0,1,2,2,2,2,3,4,5}, /* A NB */
+ {1}, /* I WB */
+ {1}, /* UV WB */ /* granularity 1 */
+ {1}, /* V WB */ /* granularity 1 */
+ {1}, /* G WB */
+ {0}, /* T WB */
+ {1}, /* A WB */
+ {0,0,0,0,1,2,2,2,3,4,5,5,5,5,5,5,5,5,5,6}, /* I 16k */
+ {0}, /* UV 16k */
+ {1}, /* V 16k */
+ {1}, /* G 16k */
+ {0}, /* T 16k */
+ {1}, /* A 16k */
+ {1}, /* G WB MA*/
+};
+
+const Word16 offset_in_lvq_mode_pred_fx[][32] =
+{//Q0
+ {0,0,0,0,1,2,2,2,3,4,5,5,5,5,5,5,5,5,5,6}, /* I NB */
+ {0,1,1,1,2,3,4,4,4,4,4,5,5,5,6}, /* UV NB */
+ {0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,3,4,4,5,6,7,8,9,10,10,11,12,13,13,13,14}, /* V NB */
+ {0,0,0,0,1,1,1,2,3,4,5,6,6,7,8,9,10,11,12,13,14}, /* G NB */
+ {0}, /* T NB */
+ {0,0,0,0,1,2,2,2,2,3,4,5}, /* A NB */
+ {0,0,0,0,1,2,2,2,3,4,5,5,5,5,5,5,5,5,5,6}, /* I WB */
+ {0,1,1,1,2,3,4,4,4,4,4,5,5,5,6}, /* UV WB */
+ {0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,3,4,4,5,6,7,8,9,10,10,11,12,13,13,13,14}, /* V WB */
+ {0,0,0,0,1,1,1,2,3,4,5,6,6,7,8,9,10,11,12,13,14}, /* G WB */
+ {0}, /* T WB */
+ {0,0,0,0,1,2,2,2,3,4,4,4,4,4,4,4,4,4,4,5}, /* A WB */
+ {0,0,0,0,1,2,2,2,3,4,5,5,5,5,5,5,5,5,5,6}, /* I 16k */
+ {0}, /* UV 16k */
+ {0,0,0,0,0,0,1,2,3,3,4,5,6,6,6,7}, /* V 16k */
+ {0,0,0,0,0,0,1,2,3,4,5,6}, /* G 16k */
+ {0}, /* T 16k */
+ {0,0,0,0,0,0,1,2,3,4,5,6}, /* A 16k */
+ {0,0,0,0,0,1,1,1,2,3,4,5,6,6,7,8,9,10,11,12,13,14}, /* G WB MA*/
+};
+
+/*-----------------------------------------------------------------*
+ * BC-TCVQ frame-end quantization tables (BC-TCVQ is used in Voiced mode for 16kHz isf)
+ *-----------------------------------------------------------------*/
+const Word16 NTRANS[4][NUM_STATE] = {{0,2,4,6,8,10,12,14,0,2,4,6,8,10,12,14}, /* indices of previous state of first branche */
+ {1,3,5,7,9,11,13,15,1,3,5,7,9,11,13,15}, /* indices of previous state of second branches */
+ {4,2,1,3,0,2,1,3,2,0,3,1,7,0,3,1}, /* indices of previous subset of first branch */
+ {2,0,3,6,2,0,3,1,0,2,1,3,0,2,1,5} /* indices of previous subset of second branch */
+}; // Q0
+
+const Word16 NTRANS2[4][NUM_STATE] = {{0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7},
+ {8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15},
+ {4,2,2,0,1,3,3,6,0,2,2,0,1,3,3,1},
+ {2,0,0,2,3,1,1,3,7,0,0,2,3,1,1,5}
+}; // Q0
+
+/* BC-TCQ Bit Allocations */
+const Word16 BC_TCVQ_BIT_ALLOC_40B[M/2+4] = {1, 4, 5,5,4,4, 2,2,2,2, 5,4 }; /*1+39bit Q0*/
+
+const Word16 FixBranch_tbl[4][4][N_STAGE_VQ - 4] =
+{
+ {{0, 0, 0, 0}, {1, 0, 0, 0}, {0, 1, 0, 0}, {1, 1, 0, 0}}, /* incase of initial state 0 */
+ {{0, 0, 1, 0}, {1, 0, 1, 0}, {0, 1, 1, 0}, {1, 1, 1, 0}}, /* incase of initial state 4 */
+ {{0, 0, 0, 1}, {1, 0, 0, 1}, {0, 1, 0, 1}, {1, 1, 0, 1}}, /* incase of initial state 8 */
+ {{0, 0, 1, 1}, {1, 0, 1, 1}, {0, 1, 1, 1}, {1, 1, 1, 1}} /* incase of initial state 12 */
+}; // Q0
+
+/* Intra-Prediction */
+
+const Word16 SN_IntraCoeff_fx[N_STAGE_VQ - 1][2][2] = /* Q15 */
+{
+ {{-14822, 26501}, {-17180, 10012}},
+ {{ 317, 19858}, { -432, 13799}},
+ {{ 4747, 22069}, { 2653, 19016}},
+ {{ 6823, 20747}, { 7077, 19154}},
+ {{ 1665, 25161}, { 2519, 13654}},
+ {{ 166, 18043}, { -221, 9732}},
+ {{ -781, 20026}, { -5332, 18882}}
+};
+
+const Word16 AR_IntraCoeff_fx[N_STAGE_VQ - 1][2][2] = /* Q15 */
+{
+ {{-9584, 22162}, {-13849, 7127}},
+ {{ 1604, 16400}, { 2861, 9414}},
+ {{ 6537, 16475}, { 3498, 13792}},
+ {{ 7879, 14434}, { 7021, 12992}},
+ {{ 6329, 16215}, { 5200, 10052}},
+ {{ 3062, 12146}, { 2147, 4857}},
+ {{ 1226, 11040}, { -794, 6137}}
+};
+
+const Word16 scale_ARSN_fx[M] = /* Q14 */
+{
+ 29994, 30153, 29506, 28534, 28246, 28618, 26388, 27029,
+ 25726, 25474, 25797, 26540, 25613, 24968, 25880, 25584
+};
+
+const Word16 scale_inv_ARSN_fx[M] = /* Q15 */
+{
+ 17898, 17806, 18196, 18815, 19005, 18760, 20342, 19864,
+ 20870, 21076, 20811, 20228, 20962, 21502, 20745, 20985
+};
+
+/* TCVQ Codebook */
+
+const Word16 AR_TCVQ_CB_SUB1_fx[2][128][2] = /* x2.65 */
+{//Qlog2(2.56)
+ {
+ {-435 , -434}, {-233 , 124}, {-381 , 44}, {-274 , -88}, {-332 , -224}, {-563 , -600}, {-332 , 134}, { 53 , -739},
+ {-567 , 0}, { 149 , 316}, {-191 , 541}, {-123 , 317}, {-493 , -634}, {-528 , 268}, {-321 , -386}, {-432 , -220},
+ {-244 , -230}, { -33 , 454}, {-188 , -642}, {-131 , -215}, {-676 , 263}, {-472 , -403}, {-312 , -159}, {-340 , 297},
+ {-121 , -217}, { -6 , 241}, {-203 , -211}, {-126 , -15}, {-734 , -374}, {-458 , -6}, {-297 , -27}, {-307 , -553},
+ {-177 , 3}, {-175 , -273}, { 63 , 363}, { 133 , 527}, {-133 , -185}, {-449 , -1206}, {-287 , -281}, {-131 , 869},
+ {-100 , -105}, { -75 , -179}, {-141 , 131}, { -32 , 108}, { -81 , 161}, {-446 , -230}, {-283 , -884}, {-128 , -165},
+ {-153 , -451}, {-177 , -114}, {-113 , -127}, {-223 , -355}, {-246 , -447}, {-396 , -705}, {-280 , 329}, { -37 , -64},
+ {-118 , 208}, { -82 , 64}, {-339 , -367}, { -58 , -132}, {-458 , 644}, {-381 , -543}, {-272 , 557}, { 62 , 75},
+ {-307 , -829}, { 310 , 445}, { 73 , -26}, { 95 , 219}, { 223 , 611}, { 279 , 195}, { 430 , 575}, { 424 , 221},
+ { -25 , 2}, { 323 , 236}, {-100 , -310}, { 11 , -35}, { 83 , -3}, { 281 , 738}, { 495 , 393}, { 89 , 1284},
+ { 32 , 136}, { 29 , 34}, { 491 , 575}, { 105 , -188}, { 15 , -440}, { 285 , 10}, { 516 , -105}, { 313 , 704},
+ { -6 , -274}, { -62 , -64}, { -12 , -127}, { 170 , 2387}, { 162 , 196}, { 336 , 413}, { 543 , 210}, { 231 , -70},
+ { -2 , 691}, { 98 , 134}, { 25 , 141}, { 261 , 305}, { 312 , -322}, { 336 , 228}, { 561 , 781}, { 766 , 514},
+ { -14 , -117}, { 166 , 905}, { -50 , 1}, { 471 , 369}, { 345 , 247}, { 347 , -383}, { 561 , 1128}, { 513 , 1030},
+ { 100 , -15}, { 185 , 70}, { 167 , 131}, { 122 , 36}, { 561 , 743}, { 401 , 111}, { 595 , -579}, { 674 , 215},
+ { 191 , 189}, { 38 , -78}, { 428 , 0}, { 261 , 136}, { -29 , -99}, { 405 , 308}, { 614 , 574}, {1682 , 1704}
+ },
+ {
+ {-942 , -168}, {-262 , -361}, { -53 , -171}, {-245 , 472}, {-2145 , -2315}, {-1307 , 1261}, {-870 , -1940}, { -652 , -564},
+ {-500 , 447}, {-578 , -198}, {-554 , 111}, { -98 , -84}, {-1315 , 0}, {-1229 , -1618}, {-868 , 230}, { -385 , 1061},
+ {-768 , -998}, {-202 , -60}, {-283 , -197}, {-142 , -325}, { -558 , 755}, {-1217 , 456}, {-803 , 766}, { -982 , 743},
+ {-415 , -357}, { -28 , 1054}, { 114 , -246}, { 81 , 732}, { -804 , -506}, {-1126 , -112}, {-797 , -132}, { -289 , -204},
+ {-347 , -29}, { -37 , -259}, {-142 , -438}, {-249 , 87}, { -874 , 341}, {-1074 , -2635}, {-668 , -1552}, {-1140 , -764},
+ {-245 , -513}, { -48 , 526}, { 14 , 395}, {-452 , -646}, { -441 , -969}, { -953 , -1284}, {-645 , -387}, { -736 , 111},
+ {-163 , 305}, {-349 , 224}, {-225 , 736}, { 94 , -85}, { -302 , -549}, { -937 , -892}, {-605 , -1089}, { -64 , -101},
+ {-161 , -211}, {-392 , -1299}, {-148 , 125}, { 14 , 131}, { -432 , -127}, { -920 , -510}, {-598 , -730}, { 85 , 154},
+ { 25 , -155}, { -57 , 238}, { 471 , 276}, { 421 , 680}, { -173 , 316}, { 597 , 1805}, { 906 , -673}, { 538 , 450},
+ {-267 , -805}, { 2 , -19}, { 222 , 219}, { 185 , 352}, { -33 , -178}, { 606 , 118}, { 959 , -70}, { 350 , -91},
+ { -87 , 42}, { 727 , 905}, { 54 , 33}, { 316 , 44}, { 251 , 15}, { 610 , -122}, { 990 , 1436}, { 82 , 1480},
+ { 181 , 535}, { 177 , 130}, { 700 , 565}, { 626 , 331}, { 279 , 551}, { 680 , 707}, {1012 , 727}, { 1057 , 766},
+ { -13 , -396}, { 364 , 412}, { 442 , -181}, { 202 , -386}, { 565 , 1397}, { 740 , 2621}, {1080 , 361}, { 1118 , 191},
+ { 81 , 266}, { 217 , -130}, { 349 , 1009}, { 678 , -476}, { 1361 , 878}, { 795 , 472}, {1267 , 1034}, { 1040 , 1255},
+ { 351 , 201}, { -69 , -633}, { -36 , -1046}, { 808 , 30}, { 1300 , -198}, { 803 , 1026}, {1390 , -326}, { 2291 , 2479},
+ { 166 , 13}, { 521 , 84}, { 255 , -717}, { 987 , 448}, { 777 , 220}, { 811 , 208}, {1395 , 2021}, { 1499 , 417}
+ }
+};
+const Word16 AR_TCVQ_CB_SUB2_fx[2][64][2] =
+{//Qlog2(2.56)
+ {
+ {-357 , -53}, {-525 , 167}, {-232 , 255}, {-132 , -359}, {-940 , -221}, { -260 , -1296}, {-1197 , -455}, { -833 , 49},
+ {-132 , -1}, {-401 , -280}, {-212 , -217}, {-194 , 92}, {-580 , -710}, { -862 , -750}, { -669 , 430}, { -521 , 719},
+ {-620 , -454}, {-239 , 509}, { -15 , -575}, { 389 , 704}, {-890 , 518}, {-1154 , 84}, { -632 , -1023}, { -620 , -1263},
+ {-268 , -470}, {-326 , -738}, { 44 , 635}, { 73 , 362}, {-226 , -22}, { -625 , -106}, { -720 , -114}, {-1114 , -1070},
+ { 19 , -250}, { 83 , 99}, { 35 , -16}, { 263 , -316}, { 472 , 1096}, { -52 , -328}, { -249 , 971}, { 1387 , 876},
+ { 10 , 203}, { 869 , 649}, { 225 , 170}, { 301 , 83}, {1256 , 482}, { 391 , -777}, { 1064 , -320}, { 52 , 1207},
+ { 309 , 375}, { 469 , 226}, { 619 , 400}, { 60 , -93}, { 335 , 244}, { 316 , -65}, { -45 , -987}, { 648 , -294},
+ { 218 , -66}, {-108 , -133}, { 500 , -19}, { 824 , 163}, { 483 , -443}, { 1297 , 240}, { 1000 , 1205}, { 623 , 1347}
+ },
+ {
+ {-424 , -965}, { -46 , -194}, { 20 , 298}, {-333 , -278}, {-797 , -522}, {-868 , -60}, { -20 , -140}, {-1085 , -904},
+ {-615 , -243}, {-367 , 22}, {-261 , -519}, {-111 , -27}, {-745 , 142}, {-484 , -1519}, { -329 , 13}, {-1077 , 92},
+ {-529 , 218}, {-519 , -597}, {-276 , -72}, { -87 , -398}, { -51 , -1257}, {-291 , 409}, { -883 , 611}, { 176 , -401},
+ {-134 , -245}, { 37 , 506}, { 23 , -10}, {-225 , 293}, {-913 , -1324}, {-174 , -290}, {-1086 , -386}, { -139 , -78},
+ {-123 , 125}, { -26 , -738}, { 113 , -344}, { 175 , 182}, { 754 , -446}, {1207 , 529}, { 932 , 990}, { 136 , 122},
+ { 267 , 327}, { 382 , -182}, { 718 , 471}, { 738 , 108}, { 158 , 130}, { 437 , 401}, { 358 , -667}, { 1380 , 836},
+ { 184 , -17}, { 435 , 231}, { 403 , 63}, { 151 , -125}, {-109 , -237}, { 692 , -241}, { 1247 , 193}, { 885 , 324},
+ {-283 , 661}, { 44 , 105}, { 156 , 911}, { 387 , 588}, { 690 , 1459}, { 664 , 1057}, { -38 , 1455}, { 645 , 909}
+ }
+};
+const Word16 AR_TCVQ_CB_SUB3_fx[4][32][2] =
+{//Qlog2(2.56)
+ {
+ {-487 , 9}, {-456 , -400}, { 96 , 451}, {-239 , 422}, {-685 , -1309}, { 68 , -709}, {-302 , -1185}, { 481 , -287},
+ {-287 , -697}, {-194 , 73}, {-159 , -132}, {-161 , -312}, {-809 , 417}, {-860 , -926}, { -26 , -71}, {-1052 , -432},
+ { 53 , 134}, { 106 , -140}, { 336 , -18}, { 404 , 735}, {-109 , -516}, { 719 , -65}, { -34 , 1336}, { -171 , 905},
+ { 52 , -347}, { 359 , 266}, { 715 , 351}, { 100 , 133}, { 87 , 130}, { 975 , 999}, {1257 , 547}, { 738 , 1372}
+ },
+ {
+ {-340 , -464}, {-216 , -779}, { 104 , -403}, { -92 , -221}, {-760 , -602}, {-914 , -811}, {-661 , -895}, {-1292 , -290},
+ {-317 , 131}, {-575 , -154}, {-228 , -129}, {-257 , 487}, {-286 , -1354}, { -93 , -259}, {-798 , 179}, { -815 , -1368},
+ { 215 , 570}, { -2 , 73}, { 545 , 167}, { 250 , 188}, { 76 , 48}, {-943 , 587}, { 379 , 1232}, { 1070 , 112},
+ { 117 , -27}, { 389 , -142}, { 18 , 214}, { 735 , 581}, {1098 , 1244}, { 451 , 408}, {1482 , 650}, { -174 , 1160}
+ },
+ {
+ {-256 , -485}, { -67 , 571}, { -5 , 161}, {-171 , 153}, {-1188 , -440}, {-1081 , 110}, {-641 , -921}, {-232 , -96},
+ {-511 , 146}, {-288 , -93}, { 484 , 665}, {-610 , -366}, { -357 , -899}, { -861 , -1088}, { -78 , -105}, {-265 , -845},
+ { 15 , 18}, { 79 , -383}, {-205 , -258}, { 306 , 264}, { 28 , 69}, { 34 , 65}, {1170 , 669}, { 133 , 74},
+ { 521 , 183}, { 132 , 84}, { 362 , -90}, { 57 , -181}, { 894 , 456}, { 1147 , 742}, { 212 , 274}, { 891 , 262}
+ },
+ {
+ { 94 , 464}, { 8 , 138}, {-365 , -640}, {-399 , 172}, {-249 , -109}, { -94 , -316}, {-163 , -250}, {-598 , -704},
+ {-185 , 36}, {-470 , -199}, { 65 , 241}, {-104 , -362}, {-220 , -801}, {-866 , -66}, {-931 , -400}, {-172 , -132},
+ {-148 , -494}, { 465 , 251}, {-179 , -72}, { 439 , 287}, { 824 , 559}, { 33 , 134}, { 59 , 134}, { 88 , 146},
+ { 186 , 43}, { 69 , -261}, { 267 , -96}, { 40 , 79}, { 84 , 130}, { 678 , 378}, { 811 , 448}, { 920 , 541}
+ }
+};
+
+
+const Word16 SN_TCVQ_CB_SUB1_fx[2][128][2] =
+{//Qlog2(2.56)
+ {
+ {-639 , 105}, {-488 , -449}, {-530 , -811}, {-419 , -634}, {-781 , -1061}, {-585 , 386}, {-501 , -737}, {-489 , -728},
+ {-702 , -685}, {-510 , -762}, {-390 , -287}, {-379 , -379}, {-573 , -848}, {-583 , -778}, {-500 , -810}, {-671 , -420},
+ {-516 , 802}, {-265 , -492}, {-523 , -568}, {-195 , 2882}, {-600 , -172}, {-568 , -869}, {-497 , 663}, {-643 , -929},
+ {-346 , -378}, {-253 , -313}, {-418 , 595}, {-240 , -465}, {-424 , -546}, {-556 , -305}, {-497 , 2453}, {-451 , -235},
+ {-452 , -670}, {-368 , -624}, {-379 , -662}, {-305 , -85}, {-549 , 399}, {-546 , -644}, {-484 , -426}, {-387 , -546},
+ {-325 , -550}, {-229 , 118}, { -83 , 1004}, {-120 , 465}, {-289 , -222}, {-516 , 155}, {-480 , 1494}, {-415 , 138},
+ {-419 , -100}, {-347 , 1091}, {-434 , 76}, {-138 , -291}, {-434 , -719}, {-514 , 945}, {-473 , -26}, {-144 , -320},
+ {-376 , 1505}, {-329 , 374}, {-316 , -504}, { -58 , -6}, {-270 , -466}, {-507 , -540}, {-466 , -181}, {-256 , -518},
+ {-196 , 726}, { -88 , -356}, {-186 , -394}, { 31 , -201}, { -77 , -319}, { 408 , 136}, { 630 , 680}, { 875 , 1365},
+ {-200 , -190}, { 166 , 1289}, { 600 , 1085}, { 276 , 464}, { 567 , 1575}, { 425 , 278}, { 666 , 377}, {1209 , 2344},
+ {-182 , -409}, { -95 , -141}, { 65 , 507}, { 127 , 212}, { 340 , 235}, { 481 , 408}, { 721 , 1203}, {1112 , 756},
+ { 162 , 362}, { 138 , 753}, {-169 , -128}, { 187 , -32}, { 68 , -93}, { 528 , 2866}, { 786 , 789}, {1247 , 1468},
+ {-476 , 2428}, { 20 , 133}, { 2 , -236}, { 426 , 799}, { 393 , 590}, { 532 , 1562}, { 807 , 534}, {1410 , 1051},
+ { -14 , -263}, { 83 , -158}, { 158 , -38}, { 616 , 550}, { 845 , 543}, { 536 , 238}, { 912 , 1521}, {1635 , 1344},
+ { 115 , -55}, { 263 , 87}, {-126 , 234}, { 376 , 191}, { 459 , 2644}, { 542 , 927}, { 941 , 948}, {1896 , 1528},
+ { -19 , 1853}, { 455 , 366}, { 545 , 283}, { 831 , 835}, {1217 , 846}, { 560 , 542}, {1013 , 650}, {1905 , 2343}
+ },
+ {
+ {-528 , -246}, {-631 , 56}, {-717 , -277}, { -40 , 1327}, {-1011 , -688}, {-827 , -341}, {-656 , -1599}, { -992 , -1559},
+ {-450 , 933}, {-540 , 2109}, {-598 , -1267}, {-387 , -512}, {-1100 , -1979}, {-812 , -617}, {-649 , -147}, { -874 , 586},
+ {-720 , -601}, {-281 , -279}, {-578 , 635}, { 169 , 80}, {-1020 , -134}, {-794 , 259}, {-638 , 821}, { -907 , 42},
+ {-709 , -1525}, {-482 , 1340}, {-232 , -979}, { 104 , 2314}, { -918 , -1179}, {-790 , 1284}, {-609 , 2259}, { -854 , -978},
+ {-624 , 326}, {-194 , 1705}, { -88 , 1060}, { 383 , 1190}, { -415 , 15}, {-789 , -1145}, {-604 , 407}, { -869 , 1136},
+ {-503 , -1047}, {-545 , -794}, {-128 , 471}, { 84 , 638}, { -591 , -1509}, {-699 , 1746}, {-600 , -369}, { -784 , 1642},
+ {-221 , -668}, {-223 , 261}, { -82 , -446}, {-378 , -1215}, { -741 , 969}, {-689 , -863}, {-569 , -595}, {-1012 , -403},
+ {-331 , 518}, {-175 , 787}, {-220 , -3}, { -46 , -841}, { -960 , 297}, {-666 , 68}, {-565 , -1364}, { -265 , -21},
+ { 649 , 767}, { 255 , 360}, { 338 , -342}, {1664 , 1627}, { 205 , -226}, { 967 , 31}, {1217 , 928}, { 1697 , 1233},
+ { 322 , 1445}, { 320 , 1790}, { 413 , 212}, { 994 , 209}, { 766 , 264}, { 974 , 883}, {1228 , 241}, { 1679 , 801},
+ { 75 , 312}, { 754 , 1425}, { 348 , 621}, { 644 , 474}, { 1008 , 763}, {1036 , 2024}, {1354 , 530}, { 1611 , 2129},
+ { 162 , 931}, { 883 , 822}, { 990 , 488}, { 615 , -203}, { 1929 , 1234}, {1059 , 1375}, {1382 , 1426}, { 2048 , 1599},
+ { 602 , 162}, { 380 , 820}, { 709 , 1064}, {1168 , 1374}, { 549 , 583}, {1062 , 470}, {1415 , 1092}, { 2095 , 2234},
+ { 187 , -630}, { 118 , -493}, { 714 , 1787}, {1298 , 673}, { 957 , 1258}, {1082 , 1124}, {1460 , 786}, { 2124 , 1205},
+ { 34 , -189}, { 54 , -35}, { 798 , 0}, { 747 , 2378}, { 1420 , 1152}, {1118 , 1673}, {1492 , 2287}, { 2416 , 1618},
+ {1159 , 1795}, { 389 , -126}, {1194 , 1003}, {1578 , 1002}, { 1294 , 366}, {1148 , 694}, {1513 , 1791}, { 2746 , 2096}
+ }
+};
+
+const Word16 SN_TCVQ_CB_SUB2_fx[2][64][2] =
+{//Qlog2(2.56)
+ {
+ {-709 , -609}, {-615 , -1025}, {-430 , -321}, { -44 , 1032}, {-1050 , -32}, {-1028 , -1856}, {-970 , -109}, { -572 , -1426},
+ {-568 , 154}, {-142 , -189}, { -80 , 533}, { -38 , -632}, { -391 , 1275}, { -986 , -732}, {-479 , -510}, { -966 , 96},
+ {-847 , -1387}, {-895 , 607}, {-368 , -930}, {-386 , 352}, { -290 , 10}, { -833 , 94}, {-528 , 1718}, { -210 , 115},
+ {-529 , 857}, {-727 , -230}, {-128 , 31}, { 133 , 76}, { -275 , -777}, { -615 , -1367}, {-339 , -13}, {-1035 , 1231},
+ { 448 , 851}, { 599 , 106}, {1103 , 1112}, { 635 , 1249}, { 761 , 774}, { 531 , -71}, { 722 , 473}, { 767 , 413},
+ { 258 , 276}, { 346 , -380}, { 487 , 504}, {1114 , 122}, { 882 , 1553}, { 1983 , 1239}, {2126 , 1217}, { 1742 , 1262},
+ { 135 , -252}, { 216 , 545}, { 500 , -125}, {1379 , 1910}, { 304 , 76}, { 1509 , 609}, {1543 , 1385}, { 542 , 1831},
+ {-240 , -467}, { 771 , 652}, { 913 , 280}, {1307 , 716}, { 1834 , 1029}, { 1049 , 491}, {1624 , 733}, { 2495 , 1944}
+ },
+ {
+ {-729 , -852}, {-590 , 306}, {-398 , 295}, { -31 , 13}, {-659 , -75}, {-604 , -1229}, {-519 , -675}, {-823 , 47},
+ {-755 , -207}, {-818 , -424}, {-705 , -1285}, {-258 , -828}, {-807 , -707}, {-182 , -712}, {-928 , 3}, {-455 , -1149},
+ {-844 , 422}, {-596 , -1008}, {-504 , -470}, {-459 , 737}, {-338 , -728}, {-836 , 1028}, {-613 , 1242}, {-609 , 1292},
+ {-285 , 36}, {-280 , -424}, { 100 , 126}, {-459 , -135}, {-159 , -151}, {-287 , 190}, { 56 , -262}, {-264 , -317},
+ { -8 , 603}, { 63 , 301}, { 537 , -155}, { 289 , 569}, { 193 , -412}, { 864 , 79}, { 686 , 399}, { 842 , 1657},
+ { 115 , -211}, { 608 , 340}, { 12 , -650}, { 711 , 1103}, { 101 , 510}, { 358 , -416}, {1266 , 453}, { 532 , 612},
+ {-256 , -680}, { 41 , 1163}, { 597 , 793}, { 484 , -61}, { 476 , 256}, {1729 , 1246}, {1209 , 1483}, {1472 , 1113},
+ { 389 , 330}, { 176 , -388}, {1025 , 317}, {1049 , 732}, {1480 , 1108}, {1285 , 616}, {1730 , 999}, {2001 , 1669}
+ }
+};
+const Word16 SN_TCVQ_CB_SUB3_fx[4][32][2] =
+{//Qlog2(2.56)
+ {
+ {-377 , -872}, {-407 , 801}, {-611 , -449}, {-397 , -87}, {-476 , -1063}, {-797 , -249}, {-263 , -662}, {-473 , 1508},
+ {-716 , 310}, {-616 , -982}, {-742 , -1326}, { 197 , 327}, {-894 , -1556}, {-871 , -1259}, {-708 , -1380}, {-789 , -848},
+ { 64 , -313}, { -59 , -547}, { -2 , 67}, { 363 , -167}, { 633 , 1840}, { 232 , -357}, {1243 , 1492}, {1640 , 973},
+ { 203 , 518}, { 511 , 946}, { 612 , 241}, {1085 , 724}, { 811 , 326}, { 863 , 241}, { 556 , 534}, {1956 , 2087}
+ },
+ {
+ {-948 , 28}, {-827 , -1180}, {-348 , -331}, { -36 , 216}, {-1453 , -1162}, {-682 , -639}, {-747 , -1517}, {-704 , 1228},
+ {-535 , -988}, {-550 , -109}, {-478 , 580}, {-310 , -699}, {-1308 , -225}, {-775 , -1581}, {-831 , -613}, {-120 , -222},
+ { 32 , 200}, { 120 , -221}, { 470 , 466}, { 808 , 313}, { 950 , 711}, { 430 , -576}, {1984 , 1405}, {1645 , 887},
+ { 131 , 1148}, { 286 , 508}, { 342 , -236}, {1003 , 1202}, { 317 , -726}, {1493 , 732}, {1336 , 694}, {2382 , 1772}
+ },
+ {
+ {-874 , -374}, {-237 , 26}, { 15 , 870}, {-710 , 433}, { 40 , -769}, {-1059 , -1350}, { 65 , 208}, {-1012 , -1369},
+ { -79 , -459}, {-671 , -942}, { -12 , 56}, {-162 , -431}, {-820 , -1073}, { -886 , -136}, {-327 , -501}, { -55 , -14},
+ { 652 , 647}, { 365 , 411}, { 614 , 252}, { 154 , 215}, { 12 , 62}, { 226 , 177}, {1689 , 1213}, { 751 , 179},
+ { 31 , 182}, { 281 , -291}, {-354 , -642}, { 939 , 924}, { 619 , 90}, { 1675 , 1130}, { 827 , 272}, { 1550 , 1446}
+ },
+ {
+ {-366 , -916}, {-346 , -234}, {-518 , -140}, { 26 , 305}, {-254 , -92}, {-634 , -976}, {-493 , -1076}, {-334 , -913},
+ {-566 , 68}, { 102 , 216}, {-296 , -927}, {-501 , -1030}, {-437 , -1006}, {-146 , -145}, {-211 , -202}, { 62 , 359},
+ { 163 , -122}, { 759 , 553}, { 82 , 207}, {-177 , -243}, { 163 , 343}, {1152 , 929}, { 197 , 248}, { 43 , -147},
+ { 169 , 371}, {-468 , -1043}, { 686 , 418}, { 563, 245}, {1052 , 843}, { 259 , 341}, {1063 , 637}, { 865 , 654}
+ }
+};
+
+
+const Word16 AR_SVQ_CB1_fx[32][8] = /* x2.56 */
+{//Qlog2(2.56)
+ { -1, 4, 16, 4, 45, -110, 10, 167, },
+ { -3, 2, 8, -12, -7, 23, 279, -46, },
+ { 0, 2, 1, 8, -73, -40, 71, -97, },
+ { 0, 2, 42, 74, -39, 72, 27, 8, },
+ { 0, 1, 9, -6, 40, -65, -55, -128, },
+ { 0, 0, 8, -10, -43, 105, -5, -126, },
+ { 0, 0, 12, -3, -98, -18, -88, -73, },
+ { 0, 1, -6, -12, -49, -179, -30, -15, },
+ { -1, 0, 24, 78, 25, -69, -26, -14, },
+ { 0, 1, -1, -29, 23, -65, -126, 34, },
+ { 2, -4, -23, -7, -13, -2, -22, -4, },
+ { -1, 1, -2, 44, -54, -58, 107, 60, },
+ { 0, 1, -3, -15, -54, 97, -100, 41, },
+ { 0, -2, -81, 93, -13, 18, -31, -75, },
+ { -1, 2, 0, -5, 166, -64, -48, 8, },
+ { -2, 0, -27, -108, 36, 3, 12, -80, },
+ { 0, 0, 0, 4, 82, -1, 79, 54, },
+ { 1, -4, 5, -9, -38, 289, 16, 16, },
+ { -1, 2, 6, -68, 61, 67, -31, 100, },
+ { 3, -6, 2, -2, -1, -6, -217, 273, },
+ { 0, 1, -43, -62, -7, -60, 28, 78, },
+ { -1, 2, 10, 0, 76, 84, -55, -45, },
+ { -1, -2, 4, 5, -32, 75, 70, 176, },
+ { 2, -1, 0, 6, 27, 29, -220, -97, },
+ { -1, 1, 90, -56, -10, -16, 29, 8, },
+ { -1, 3, -10, 0, 2, -24, 49, -336, },
+ { -1, 1, -8, -9, 55, -134, 105, -44, },
+ { 0, 1, -16, 69, 51, 40, -51, 98, },
+ { 0, 2, -12, -32, -140, 49, 50, 26, },
+ { 0, 3, 8, 29, 77, 24, 76, -103, },
+ { -1, 2, -24, -18, 7, 100, 94, 5, },
+ { 0, -1, 10, 26, -87, -34, -56, 103, }
+};
+
+const Word16 AR_SVQ_CB2_fx[16][8] = /* x2.56 */
+{//Qlog2(2.56)
+ { -37, -59, 208, -88, 54, 58, -16, -24, },
+ { 0, -98, 9, -65, -182, -21, 19, 9, },
+ { -1, 110, -8, 59, 201, 9, -38, -22, },
+ { -1, 40, -22, -183, 46, -162, -38, -6, },
+ { 12, 2, -193, 64, -43, -48, 11, 9, },
+ { -83, 175, -8, -55, -65, 66, 26, 6, },
+ { 29, 3, 2, -10, -100, 293, 75, -12, },
+ { 7, -54, -76, -91, 63, 119, -84, -84, },
+ { 3, 7, 6, 6, -30, 15, -176, 168, },
+ { -10, 45, 26, 57, -92, -68, -117, -134, },
+ { 0, -37, -34, -69, 106, 54, 121, 131, },
+ { -25, -64, 7, 205, 1, 93, 27, 6, },
+ { 64, 28, 51, 8, -7, 18, 27, 0, },
+ { -20, 44, 57, 78, -55, -170, 88, 93, },
+ { 12, -125, 12, 56, 100, -160, -87, -3, },
+ { -7, -18, -7, -6, 36, -54, 175, -176, }
+};
+
+
+const Word16 W_DTX_HO_FX[HO_HIST_SIZE] = /* Q15 */
+{
+ 6554, 5243, 4194, 3355, 2684, 2147, 1718, 344
+};
+
+
+const Word16 ENR_ATT_fx[5] = /*Q8*/
+{
+ 459, 357, 281, 255, 255
+};
+
+
+const Word16 HO_ATT_FX[5] = /* Q15 */
+{
+ 17597, 20205, 22410, 23198, 23198
+};
+
+const Word16 uniform_model[] = { MAX_AR_FREQ, MAX_AR_FREQ / 2, 0 }; // Q0
+
+
+/*-----------------------------------------------------------------*
+ * LSF quantization - mid-frame quantization tables
+ *-----------------------------------------------------------------*/
+
+
+const Word16 tbl_mid_gen_wb_2b_fx[] =//Q13
+{
+ 3814, 5145, 5856, 5290, 5277, 4880, 4877, 4273, 3868, 3776, 3392, 3163, 3120, 3019, 3395, 5814,
+ 1482, 861, 1968, 3198, 3105, 3737, 3749, 4525, 4982, 4828, 5023, 5335, 5327, 5296, 5092, 3444,
+ 3955, 3851, 1520, 1666, 1554, 1385, 1537, 1276, 1443, 1526, 1597, 1636, 1867, 2041, 2483, 2059,
+ 7038, 8112, 7324, 6969, 6877, 7028, 6987, 7098, 7003, 6955, 6927, 6808, 6685, 6459, 5871, 6047,
+};
+
+const Word16 tbl_mid_gen_wb_4b_fx[] =
+{//Q13
+ 5532, 5133, 2125, 3516, 4905, 5624, 6338, 6918, 6854, 6354, 5345, 3996, 3603, 5588, 6962, 7511,
+ 4218, 4157, 4892, 6332, 5786, 2931, 2749, 2306, 3420, 4629, 5591, 6249, 6638, 7273, 7904, 8379,
+ 993, 369, 2927, 5138, 4840, 5892, 5331, 5158, 3956, 3130, 3324, 5022, 5292, 3974, 2488, 1119,
+ 1067, 2471, 6356, 4184, 3166, 3224, 3980, 5055, 4965, 4822, 3843, 2328, 1438, 916, 2514, 8248,
+ 3788, 949, 522, 1709, 1932, 3306, 3287, 4521, 5432, 5291, 5644, 6116, 6166, 5943, 5631, 2088,
+ 7865, 8237, 6466, 4043, 3793, 4589, 4885, 5405, 6002, 6746, 7203, 7361, 6982, 6157, 3994, 2143,
+ 2837, 7217, 7926, 7751, 7605, 7549, 6937, 6852, 6270, 5895, 5612, 5245, 4862, 3654, 3139, 6321,
+ 4317, 3387, 1035, 2799, 2769, 3400, 3054, 2246, 2307, 1829, 1456, 1007, 1055, 895, 782, 108,
+ 7164, 8021, 6869, 6458, 6311, 5505, 5577, 4491, 3934, 3760, 3244, 2798, 2498, 2166, 1950, 4759,
+ 5758, 5400, 1203, 687, 647, 963, 1486, 2000, 2998, 3179, 3634, 4296, 4465, 3719, 3275, 4785,
+ 1051, 1802, 6133, 6475, 6875, 6981, 7181, 7303, 7136, 7036, 7276, 7197, 6986, 7118, 6659, 5813,
+ 4095, 6275, 6049, 4850, 3198, 4942, 3257, 1456, 1327, 504, 559, 1472, 3985, 5835, 5772, 7356,
+ 6814, 7430, 4049, 2579, 4315, 2443, 3236, 3107, 2458, 2891, 2553, 1923, 1871, 2068, 3583, -188,
+ 412, 238, 247, 507, 498, 540, 811, 767, 679, 480, 416, 306, 574, 532, 731, 2227,
+ 8495, 9589, 8346, 7953, 7655, 7990, 8089, 8412, 8530, 8482, 8421, 8420, 8464, 8242, 7698, 7341,
+ 3085, 2920, 3059, 3020, 1227, -101, -417, -872, -195, 1126, 1766, 2513, 2649, 3451, 4444, 1734
+};
+
+
+const Word16 tbl_mid_gen_wb_5b_fx[] =
+{//Q13
+ 6510, 8058, 7103, 6095, 6483, 5866, 6026, 6443, 6882, 6907, 7015, 6581, 5649, 4044, 2816, 2519,
+ 3778, 2123, 3580, 4221, 2598, 4631, 2844, 4905, 5446, 4529, 5186, 6228, 6210, 5693, 6213, -4670,
+ 9050, 9934, 8441, 7921, 7546, 7840, 7977, 8335, 8679, 8706, 8703, 8607, 8560, 8375, 7759, 6405,
+ 4243, 5775, 2939, 5887, 4078, 3117, 5267, 5680, 4589, 2401, 731, 1011, 1657, 4733, 7051, 3992,
+ 2508, 3156, 3347, 1605, 4450, 4633, 3476, 6019, 4083, 3824, 5133, 6020, 3253, 1368, 1736, 13507,
+ 5934, 6372, 4494, 2957, 4424, 6667, 8167, 8413, 7957, 7139, 5518, 3059, 2829, 2821, 2773, 3274,
+ 4984, 5566, 5831, 4556, 5732, 6738, 6689, 4683, 2265, 4214, 7242, 9989, 9776, 9068, 4748, 2292,
+ 2601, 4933, 2764, 4923, 3763, 3678, 5596, 2079, 6108, 6824, 5507, 5612, 6793, 5553, 1140, 9993,
+ 7084, 6685, 5313, 5196, 3111, 5337, 3535, 2476, 2477, 1737, 2090, 4033, 5680, 6548, 7310, 11811,
+ 8140, 8602, 7166, 6738, 6018, 5299, 5686, 4722, 4108, 4456, 3713, 3131, 2658, 2336, 2250, 8051,
+ 727, 1865, 6073, 3932, 2258, 2413, 4823, 5733, 5101, 6126, 4690, 1130, 1172, 1479, 3956, 7204,
+ 6042, 1024, 5371, 5997, 4964, 5575, 5078, 5843, 6909, 8465, 8601, 6137, 5699, 8049, 9922, 8318,
+ 2728, 1625, 4750, 5004, 5799, 4938, 6353, 3274, 1781, 3095, 1479, 3136, 5470, 1391, -626, 2422,
+ 4407, 3228, 1266, 1488, 1222, 963, 1148, 1182, 1330, 1770, 860, 381, 813, 1268, 2352, 3956,
+ 1683, -120, 83, 1239, 946, 1609, 1982, 3215, 3950, 4200, 4497, 4898, 4551, 3595, 2345, 2444,
+ 1055, 3207, 7460, 6808, 7103, 6980, 7902, 8196, 6821, 6190, 6405, 7414, 7967, 7506, 6921, 9871,
+ 3164, 7995, 8446, 8770, 8443, 8302, 7372, 7049, 6090, 5698, 5090, 4792, 4996, 4874, 4285, 6685,
+ 3681, 319, 536, 3174, 4495, 5486, 5807, 5751, 5461, 4423, 3556, 3449, 5148, 7560, 6277, 3783,
+ 1987, 4209, 6954, 5880, 7459, 7762, 4326, 4958, 5154, 2150, 2988, 2469, 1175, 1099, 3999, 3950,
+ 1306, 2303, 7748, 8238, 6116, 2824, 1772, 1130, 2538, 3345, 5317, 4773, 3668, 5458, 5519, 5594,
+ 4140, 4329, 3339, 3001, 2669, -79, -582, -1729, -680, 1294, 2752, 3700, 3627, 4428, 4950, 2744,
+ 5309, 3611, 993, 3526, 2043, 3938, 2069, 1434, 4173, 2609, 2704, 3690, 3686, 1894, 1401, -1682,
+ 6091, 4810, 970, 1063, 1707, 3056, 4597, 6742, 7397, 6913, 7359, 7884, 7571, 6830, 6039, 3823,
+ 6599, 6006, 1248, 4330, 6935, 3784, 3535, 3902, 3221, 5384, 5691, 5997, 5975, 6731, 9125, 5385,
+ 204, 242, 2009, 3375, 3412, 3407, 2691, 2547, 598, -150, 67, 250, 618, 1185, 1987, 1157,
+ 4986, 7977, 6971, 1528, 86, 281, 1497, 3002, 4193, 4430, 4721, 5317, 6001, 6181, 6962, 5480,
+ 6914, 7963, 5254, 3050, 5365, 3224, 3781, 3044, 2571, 3155, 2243, 1612, 2157, 2526, 2784, -1629,
+ 7350, 6702, 2435, 1937, 2549, 1978, 2819, 2817, 2059, 2493, 3408, 2344, 1239, 1177, 914, 3763,
+ 4362, 3105, -1457, -1760, 314, 1452, 2603, 1642, 1670, 1652, 2258, 2492, 3844, 4399, 5213, 660,
+ 350, 357, 109, 83, -555, -886, -714, -587, -120, 25, 189, 531, 591, 146, 156, 1435,
+ 498, 211, 3062, 6766, 7150, 8142, 7531, 7527, 7855, 6898, 6613, 6480, 5290, 4310, 5341, 4129,
+ 2753, 6959, 7088, 4622, 2646, 2395, 1756, 325, 488, 259, -125, -577, -553, 615, 557, 4617,
+};
+
+
+
+const Word16 tbl_mid_voi_wb_1b_fx[] = /* Q13*/
+{
+ 4551, 4599, 4754, 5035, 4982, 5228, 5318, 5603, 5699, 5652, 5642, 5766, 5825, 5874, 5819, 6056,
+ 3816, 3355, 2321, 2712, 2900, 2715, 2790, 2508, 2506, 2610, 2617, 2419, 2538, 2622, 3004, 2725,
+};
+const Word16 tbl_mid_voi_wb_4b_fx[] =//Q13
+{
+ 4337, 4235, 3526, 4083, 3514, 5457, 3168, 2509, 4418, 5021, 1313, 2952, 5347, 3893, 8325, 11758,
+ 4180, 4037, 3965, 3481, 4028, 3284, 2644, 4585, 4749, 3076, 3211, 1101, 4175, 7440, 5745, -4105,
+ 4239, 3957, 4450, 4974, 5400, 5734, 6246, 6586, 7774, 2699, 2783, 3474, 1345, -316, 5069, 4904,
+ 3964, 3810, 2673, 3031, 2249, 3168, 3155, 4204, 7316, 7176, 8680, 7147, 4918, 4136, 3142, 3011,
+ 4071, 3853, 3898, 3973, 3464, 2878, 5783, 5341, 1725, 801, 1194, 4239, 6866, 4950, 794, 6270,
+ 3933, 3750, 4931, 3667, 3585, 2550, 4308, 5757, 4503, 7081, 4893, 1076, 109, 1650, 1887, 8861,
+ 4803, 4827, 4969, 5511, 5768, 4327, 5277, 4934, 6909, 7672, 5355, 3940, 9990, 9622, 7457, 4202,
+ 4515, 4259, 2444, 4847, 3728, 4599, 4975, 6144, 4087, 4367, 7025, 5028, 2405, 7014, 13366, 6264,
+ 4746, 4556, 5408, 5866, 4733, 4088, 3965, 3329, 4669, 3105, 5918, 7824, 6026, 9177, 1856, 13229,
+ 4130, 4214, 2516, 3542, 4847, 3751, 3704, 2380, 4190, 4787, 4651, 4981, 5702, -27, -2961, 129,
+ 4461, 4724, 5233, 4680, 6010, 7222, 6351, 3069, 605, 5934, 5627, 3836, 3490, 6060, 3556, 2585,
+ 4628, 4723, 5465, 4180, 4460, 6173, 5915, 7260, 4703, 4114, 3938, 9585, 8085, 3781, 7520, 625,
+ 5002, 5621, 6352, 6914, 7170, 7719, 7585, 8408, 8360, 7883, 7370, 7222, 6616, 6002, 5565, 9394,
+ 4059, 4121, 4178, 4417, 3437, 1460, 1031, 111, 585, 1708, 4219, 5419, 2585, 3195, 6149, 3221,
+ 3394, 2776, 1970, 2707, 2983, 3931, 3247, 1729, 449, -109, -46, -469, 397, 1980, 2305, 1573,
+ 3259, 1870, 242, 392, 748, 615, 1185, 1285, 2259, 2687, 2212, 1762, 2174, 1887, 1847, 2073,
+};
+const Word16 tbl_mid_voi_wb_5b_fx[] =//Q13
+{
+ 4182, 3820, 4103, 5620, 4100, 4478, 3949, 5053, 2918, 3083, 4229, 3732, 1823, 6350, 17230, 4601,
+ 4361, 4077, 2236, 4128, 3216, 4673, 6022, 6522, 5746, 4282, 3121, 4448, 6457, 12573, 4401, 7796,
+ 4228, 4086, 4375, 4320, 4474, 4735, 4427, 5616, 5975, 138, 5887, 3722, 2304, -3430, 4995, 6246,
+ 4320, 4344, 4008, 4327, 3323, 6835, 3627, 3330, 3123, 3971, 2382, 1801, 6422, 3162, 9038, 14129,
+ 4193, 4202, 4413, 2703, 4175, 4330, 2615, 7600, 1717, 3506, 5671, 7170, 3545, 2350, -2738, 7287,
+ 4170, 3912, 4323, 3821, 4450, 6765, 7496, 8107, 7447, 5525, 3088, 1963, 2014, 3330, 976, 1002,
+ 4583, 4419, 3584, 4125, 4783, 5133, 3188, 5000, 4812, 4639, 10038, 7018, 5114, 5567, 3292, -6364,
+ 3926, 4092, 2710, 2721, 1799, 3509, 4542, 3351, 4583, 5877, 6539, 5135, 981, 4029, 7221, 592,
+ 4624, 4567, 4468, 4630, 5710, 5222, 5883, 2562, 8453, 2825, 109, 6491, 1210, 2921, 7292, 7118,
+ 4245, 4160, 5119, 4356, 5544, 3034, 1507, 4179, 5971, 1949, 3388, 613, 4995, 9019, 6755, -628,
+ 4905, 4962, 4529, 7025, 4905, 4470, 5063, 3440, 6348, 6102, 4319, 4395, 7515, 6549, -3697, 6513,
+ 4683, 4592, 5303, 4593, 4171, 5264, 6116, 7434, 4105, 5454, 2544, 8493, 6491, 894, 8983, -2406,
+ 3632, 3435, 3988, 4195, 3684, 2173, 6735, 4552, -339, 763, 308, 3463, 6123, 2895, 2831, 5715,
+ 4316, 4111, 2236, 2682, 1058, 544, 2541, 1677, 3549, 2767, 3376, 5901, 6689, 5811, 6617, 3311,
+ 4487, 4285, 4992, 3656, 5970, 4547, 3975, 5998, 4985, 6614, 4807, 1971, 14937, 4388, 6153, 3352,
+ 4601, 4710, 4957, 4454, 4873, 7207, 5881, 3461, 2282, 1829, 5617, 9926, 10043, 7722, 3232, 4629,
+ 3965, 3837, 2088, 4265, 5042, 3478, 4453, 2804, 4162, 4858, 4315, 4343, 5193, -1823, -5028, -1137,
+ 3439, 2837, 2549, 4062, 2857, 2657, 2662, 5088, 10548, 8913, 6631, 6395, 5568, 3210, 2431, 3400,
+ 4073, 3839, 5806, 5296, 3766, 2342, 2585, 891, 3144, 2988, 6807, 4626, 3700, 5854, 1543, 16158,
+ 4189, 4045, 4293, 4527, 4008, 1413, 4871, 6081, 3297, 6546, 5006, -365, -2369, 1375, 5522, 8787,
+ 4778, 4782, 4941, 4538, 4497, 3129, 4934, 4371, 7175, 6923, 8620, 10236, 8664, 10088, 10923, 7314,
+ 4945, 5016, 6439, 6353, 6624, 6463, 6938, 7547, 7004, 7283, 7655, 7149, 7650, 2747, 3416, 14892,
+ 4776, 5431, 5515, 6194, 5700, 5485, 2795, 5476, 4024, 8891, 2930, 7916, 3428, 8070, 5920, 13440,
+ 4718, 4986, 4800, 5286, 6567, 6554, 6601, 1235, -1216, 6556, 6098, 3962, 4361, 5536, 5517, 3935,
+ 4741, 4679, 5593, 4891, 3849, 5675, 6487, 6239, 7062, 12044, 10918, 2438, 3977, 7296, 8445, 6625,
+ 4859, 5781, 6592, 7399, 8027, 8858, 8139, 8951, 8760, 5506, 6294, 6540, 6516, 7527, 7688, 4084,
+ 4077, 3771, 3650, 3381, 3367, 4048, 3899, 4382, 3017, -2156, -1464, -2207, 828, 4838, 2071, 2363,
+ 3796, 3437, 3558, 3842, 2170, 4311, 2602, 696, 1939, 2576, 1239, 328, -129, -647, 1702, 2893,
+ 4015, 3506, 367, 1350, 3328, 3700, 3827, 2439, 1434, 3887, 2279, 1593, 3673, 5508, 3905, -2973,
+ 4088, 3990, 3732, 3256, 4718, 1375, 152, -99, -254, 1140, 3578, 3316, 2195, 2408, 5027, 999,
+ 3749, 3175, 1475, 686, 2006, 1959, 1558, 3059, 5374, 5014, 2439, 2396, 2467, 2218, 1031, 7866,
+ 2037, 701, 124, 278, 328, 253, 660, 528, 826, 473, 801, 800, 1053, 1330, 804, 967,
+};
+
+
+const Word16 tbl_mid_unv_wb_4b_fx[] =//Q13
+{
+ 5190, 3143, 50, 2521, 5180, 6320, 3890, 3365, 3582, 3517, 3406, 3049, 2864, 1621, 1932, -950,
+ 6813, 6650, 2135, 972, 452, 1453, 3221, 1697, 3165, 4443, 5924, 6297, 3907, 2862, 3586, 4625,
+ 3204, 2673, 6499, 4319, 1054, 559, 4404, 5815, 5072, 6625, 4493, 2479, 1773, 1606, 2099, 8330,
+ 1924, 2666, 4171, 5517, 5898, 7238, 7318, 7696, 7250, 6269, 6164, 6038, 5249, 4284, 4147, 2828,
+ 2834, 788, 77, 2016, 1824, 3224, 3441, 4472, 6286, 6717, 6783, 6743, 6715, 7051, 6562, 2531,
+ 6386, 5634, 5761, 5184, 3523, 4284, 1867, 1045, 579, 1176, 1743, 2599, 5276, 5564, 5368, 7914,
+ 1795, 1380, 5184, 9326, 8023, 3138, 1258, 1729, 3328, 3934, 5169, 5645, 5271, 5894, 5591, 5145,
+ 5734, 5844, 8799, 8753, 5628, 5710, 5255, 4872, 5349, 3431, 3006, 2486, 1418, 974, 1115, 2035,
+ 4194, 8421, 1812, 6078, 3003, 3455, 6719, 7501, 2120, 1892, 2658, 2317, 2296, 5735, 6553, 4485,
+ 8072, 11456, 6455, 5069, 4918, 4936, 4819, 4932, 6029, 6246, 6289, 6704, 6749, 5337, 4526, 3974,
+ 3709, 5584, 4884, -1502, 4864, 2333, 606, 5976, 6438, 2413, 1937, 3663, 5593, 6989, 6450, 3555,
+ 3843, -6887, 3697, 3880, 4448, 4264, 5961, 4198, 3583, 3942, 3606, 3768, 4457, 4374, 4096, 4524,
+ 2551, 6781, 7017, 2902, 9227, 8728, 7130, 1873, 2308, 4393, 3981, 3976, 4002, 4080, 4820, 5611,
+ 220, -174, -43, -542, 449, 1470, 1759, 1893, 1294, 995, 723, 723, 769, 994, 1369, 4413,
+ 1651, 2259, 3079, 2913, 1176, -491, -1262, -827, -217, 908, 1126, 1751, 1901, 1765, 2656, 247,
+ 5380, 7307, 7727, 8135, 8270, 8471, 8792, 8573, 8335, 8420, 8057, 7562, 7119, 7458, 6806, 7385,
+};
+const Word16 tbl_mid_unv_wb_5b_fx[] =
+{//Q13
+ 6237, 6323, 1151, 763, 4218, 6546, 8437, 8701, 7456, 6604, 4631, 2901, 3050, 1793, 1955, 2260,
+ 5542, 4318, 5343, 5521, 5999, 5477, 5265, 5234, 4616, 3329, 3444, 1816, -442, 45, -2, 8922,
+ 6370, 8208, 6583, 5630, 5401, 5458, 5188, 5595, 6637, 6891, 6962, 6967, 7014, 6330, 5445, 3101,
+ 2750, 2858, 5206, 4594, 3310, 3494, 2463, 3410, 3405, 6151, 7682, 8593, 4440, 3715, 2946, -4371,
+ 1157, 661, 3743, 6418, 7515, 8319, 7485, 7298, 7928, 7515, 6812, 5671, 5095, 5122, 4997, 3940,
+ 5133, 3446, 2693, 1620, 1860, 2663, 4603, 6289, 7451, 7255, 7511, 7486, 8869, 8704, 8431, 6632,
+ 2497, 6706, 7036, 3437, 10854, 8893, 6033, 3021, 2936, 4766, 4145, 4097, 5177, 4883, 5920, 7612,
+ -152, -54, 3955, 1170, 5562, 4695, 1370, 8293, 3106, 1942, 5508, 4878, 3495, 1094, 1079, 5401,
+ 482, 373, 220, -355, -236, -328, -426, -147, 244, 563, 567, 915, 1012, 676, 804, 2721,
+ 437, 816, 3208, 3395, 2501, 3795, 4380, 2553, 399, 31, -519, -475, -162, 1755, 2852, 1040,
+ 2067, 2125, 1247, 2393, 2872, 2218, 3502, 3977, 4712, 4275, 2600, 2380, 2314, 2893, 3555, 13929,
+ 3967, -635, -1752, 2490, 303, 969, 1045, 2839, 5670, 4651, 5202, 5248, 4182, 4381, 5492, 53,
+ 3041, 2494, 9264, 4970, 360, -3795, 6296, 6475, 4482, 6667, 5265, 2908, 2381, 2889, 3718, 5160,
+ 3364, 4119, 5929, 3164, -745, 9368, 1652, -719, 6323, 5113, 1919, 1260, 2630, 3585, 2224, 3178,
+ 1643, 837, 8074, 8337, 4237, 2332, 2190, -1176, 1968, 1238, 2354, 4756, 5269, 5759, 4962, 5411,
+ 7590, 6471, 2635, 1869, 1209, 1505, 2118, 892, 1652, 3717, 5010, 3969, 2265, 2428, 3278, 5027,
+ 7289, 8658, 11183, 8913, 6084, 6673, 5961, 4041, 3839, 2643, 2094, 3215, 2956, 2895, 3327, 5063,
+ 5814, -4982, 1120, 2112, 4384, 5288, 6052, 4305, 4724, 5062, 3380, 4200, 5838, 7181, 6383, 4771,
+ 3891, 7361, 4160, 1422, 4971, 939, 281, 3585, 4817, 1176, -306, 260, 3815, 8273, 7095, 1529,
+ 8179, 19416, 3518, 3547, 4619, 4231, 3359, 3606, 5131, 4469, 5204, 5115, 4941, 4772, 4175, 5160,
+ 4539, 5393, 2706, 5371, 1468, 8488, 10356, 2778, 1426, 371, 8093, 7808, 5208, 5996, 6081, 5057,
+ 3266, 3481, -4953, -5638, 4022, 5502, 3586, 3117, 2737, 3826, 3658, 3933, 3602, 4920, 4959, 3483,
+ 3846, 9592, 3360, 6480, 1215, 3170, 5218, 8641, 664, 2695, 3353, 1479, 1687, 6049, 7074, 4696,
+ 2231, 4497, 6761, 6799, 5941, 5445, 8083, 7944, 5879, 3744, 2518, 6482, 6581, 6096, 6379, -133,
+ 3360, 6078, 1064, 13807, 8185, 3605, 4327, 3777, 6211, 4977, 5015, 4871, 5825, 2506, 2130, 4946,
+ 5412, 4507, 952, 4098, 5027, 3949, 3501, 1778, 1955, 2126, 1626, 3669, 4446, -1101, 736, -2708,
+ 4824, 7481, 8884, -2619, -2754, 281, 4158, 3251, 4602, 2946, 3915, 6169, 6075, 3495, 3266, 4375,
+ 6135, 2668, 6784, 10326, 6892, 5479, 1511, 3070, 6410, 9193, 6954, 1084, 2873, 7030, 8139, 5670,
+ 7255, 5764, 5122, 5787, 3129, 5475, -2720, 3770, -827, 872, 1591, 4645, 7218, 5513, 5778, 6323,
+ 1185, -13100, 5560, 5867, 4153, 2591, 4923, 3450, 2062, 4251, 4289, 3397, 3835, 2082, 2343, 3172,
+ 4460, 4411, 3940, 4420, 9410, -2789, -2525, -2877, -1868, 2850, 4490, 4093, 3162, 3889, 3800, 3492,
+ 6408, 8292, 8434, 8544, 8707, 9146, 9377, 9301, 9063, 8945, 8346, 8173, 7175, 7254, 6120, 7420,
+};
+
+
+/*------------------------------------------------------------------------------*
+ * AVQ - RE8 tables
+ *------------------------------------------------------------------------------*/
+
+const Word16 select_table22[5][9] =
+{
+ {1, 1, 1, 1, 1, 1, 1, 1, 1},
+ {0, 1, 2, 3, 4, 5, 6, 7, 8},
+ {0, 0, 1, 3, 6, 10, 15, 21, 28},
+ {0, 0, 0, 1, 4, 10, 20, 35, 56},
+ {0, 0, 0, 0, 1, 5, 15, 35, 70}
+}; // Q0
+
+/* value of leader element */
+const Word16 vals_a[36][4] =
+{
+ {1}, {0,2}, {0,2}, {1,3}, {0,4}, {2,0}, {1,3}, {0,2,4},
+ {2}, {1,3}, {2,0,4}, {0,4}, {1,5}, {1,3}, {2,0,4}, {0,2,4},
+ {1,3,5}, {0,2,6}, {0,4}, {0,2,6}, {0,2,4,6}, {1,7}, {0,8}, {0,6},
+ {0,2,8}, {0,4,8}, {1,9}, {0,2,10}, {0,8}, {0,6,10}, {0,12}, {0,4,12},
+ {0,10}, {0,2,14}, {0,8,12}, {0,16}
+}; // Q0
+
+/* code parameter for every leader */
+const Word16 vals_q[36][4] =
+{
+ {7,1}, {2,2,2}, {4,2,4}, {7,2,1}, {1,2,1}, {6,2,2}, {7,2,2}, {3,3,3,1},
+ {8,1}, {7,2,3}, {5,3,4,1}, {2,2,2}, {7,2,1}, {7,2,4}, {7,3,2,1}, {4,3,4,2},
+ {7,3,2,1}, {2,3,2,1}, {3,2,3}, {4,3,4,1}, {3,4,3,2}, {7,2,1}, {1,2,1}, {2,2,2},
+ {3,3,3,1}, {2,3,2,1}, {7,2,1}, {2,3,2,1}, {2,2,2}, {2,3,2,1}, {1,2,1}, {2,3,2,1},
+ {2,2,2}, {2,3,2,1}, {2,3,2,1}, {1,2,1}
+}; // Q0
+
+/* codebook start address for every leader */
+const UWord16 Is[36] =
+{
+ 0, 128, 256, 1376, 240, 0, 1792, 2400, 5376, 5632, 12800, 3744,
+ 21760, 22784, 31744, 38912, 45632, 3856, 52800, 53248, 57728, 60416, 4080, 61440,
+ 61552, 62896, 63120, 64144, 64368, 64480, 64704, 64720, 64944, 65056, 65280, 65504
+}; // Q0
+
+/* A3 - Number of the absolute leaders in codebook Q3 */
+const Word16 AA3[NB_LDQ3] =
+{
+ 0, 1, 4, 2, 3, 7, 11, 17, 22
+}; // Q0
+
+/* A4 - Number of the absolute leaders in codebook Q4 */
+const Word16 AA4[NB_LDQ4] =
+{
+ 5, 6, 8, 9, 10, 12, 13, 14, 15,
+ 16, 18, 19, 20, 21, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35
+}; // Q0
+
+/* I3 - Cardinality offsets for absolute leaders in Q3 */
+const UWord16 II3[NB_LDQ3] =
+{
+ 0, 128, 240, 256, 1376, 2400, 3744, 3856, 4080
+}; // Q0
+
+/* I4 - Cardinality offset for absolute leaders in Q4 */
+const UWord16 II4[NB_LDQ4] =
+{
+ 0, 1792, 5376, 5632, 12800, 21760, 22784, 31744, 38912,
+ 45632, 52800, 53248, 57728, 60416, 61440, 61552, 62896, 63120,
+ 64144, 64368, 64480, 64704, 64720, 64944, 65056, 65280, 65504
+}; // Q0
+
+ /* Position of the first absolute leader on a spherical shell (or sphere) */
+const Word16 Da_pos[NB_SPHERE] =
+{
+ 0, 2, 5, 8, 13, 18, 20, 22, 23, 25, 26, 27, 27, 28, 28, 28,
+ 29, 30, 31, 31, 32, 32, 32, 32, 32, 34, 35, 35, 35, 35, 35, 35
+}; // Q0
+
+/* Number of absolute leaders on a spherical shell */
+const Word16 Da_nb[NB_SPHERE] =
+{
+ 2, 3, 3, 5, 5, 2, 2, 1, 2, 1, 1, 0, 1, 0, 0, 1,
+ 1, 1, 0, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 1
+}; // Q0
+
+/* Identification code of an absolute leader */
+const Word16 Da_id[NB_LEADER] =
+{
+ 0x0001, 0x0004, 0x0008, 0x000B, 0x0020, 0x000C, 0x0015, 0x0024,
+ 0x0010, 0x001F, 0x0028, 0x0040, 0x004F, 0x0029, 0x002C, 0x0044,
+ 0x0059, 0x00A4, 0x0060, 0x00A8, 0x00C4, 0x012D, 0x0200, 0x0144,
+ 0x0204, 0x0220, 0x0335, 0x04E4, 0x0400, 0x0584, 0x0A20, 0x0A40,
+ 0x09C4, 0x12C4, 0x0C20, 0x2000
+}; // Q0
+
+/* Codebook number for each absolute leader */
+const Word16 Da_nq[NB_LEADER+2] =
+{
+ 2, 2, 3, 3, 2, 4, 4, 3, 4, 4, 4, 3, 4, 4, 4, 4,
+ 4, 3, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 0, 100
+}; // Q0
+
+
+/*------------------------------------------------------------------------------*
+ * SWB TBE tables
+ *------------------------------------------------------------------------------*/
+
+const Word16 skip_bands_SWB_TBE[NUM_SHB_SUBFR+1] = {0, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, 300, 320}; /* bands for SWB TBE quantisation Q0*/
+const Word16 skip_bands_WB_TBE[NUM_SHB_SUBFR/2+1] = {0, 10, 20, 30, 40, 50, 60, 70, 80}; /* bands for WB TBE quantisation Q0*/
+
+const Word16 interpol_frac_shb[NB_SUBFR * 2] =
+{
+ 22938, 9830, 13107, 19660, 3277, 29490, 0, 32767 /* Q15*/
+ /*0.7f, 0.3f, 0.4f, 0.6f, 0.1f, 0.9f, 0.0f, 1.0f */
+};
+/* All pass filter coeffs for interpolation and decimation by a factor of 2 */
+const Word16 AP1_STEEP_FX[ALLPASSSECTIONS_STEEP] = { 1985, 14072, 26500 }; /*Q15 Format */
+const Word16 AP2_STEEP_FX[ALLPASSSECTIONS_STEEP] = { 7230, 20838, 30852 }; /*Q15 Format */
+const Word16 cos_fb_exc_fx[32] = /* Q15 */
+{
+ /*Q35*/
+ 32767, 32138, 30274, 27246, 23170, 18205, 12540, 6393,
+ 0, -6393, -12540, -18205, -23170, -27246, -30274, -32138,
+ -32768, -32138, -30274, -27246, -23170, -18205, -12540, -6393,
+ 0, 6393, 12540, 18205, 23170, 27246, 30274, 32138,
+};
+
+const Word16 Hilbert_coeffs_fx[4 * NUM_HILBERTS][HILBERT_ORDER1 + 1] = /* Q14 */
+{
+ { 0, 14320, 0, -30699, 0, 16384}, /* num_Real[0] */
+ {11897, 0, -28240, 0, 16384, 0}, /* num_Imag[0] */
+ {16384, 0, -30699, 0, 14320, 0}, /* den_Real[0] */
+ {16384, 0, -28240, 0, 11897, 0}, /* den_Imag[0] */
+ {7671, 0, -23855, 0, 16384, 0}, /* num_Real[1] */
+ { 2505, 0, -18139, 0, 16384, 0}, /* num_Imag[1] */
+ {16384, 0, -23855, 0, 7671, 0}, /* den_Imag[1] */
+ {16384, 0, -18139, 0, 2505, 0}, /* den_Imag[1] */
+};
+
+
+/* Overlap add window for SHB excitation used in analysis and synthesis */
+
+const Word16 window_shb_fx[L_SHB_LAHEAD] = /*sin, 1, sin */
+{
+ /*Q15(round) */
+ 1513, 4527, 7502, 10413, 13236, 15945, 18518, 20934, 23170, 25210,
+ 27034, 28627, 29976, 31069, 31898, 32454, 32733, 32767, 32767, 32767,
+};
+
+/* Upsampled overlap add window for SHB excitation used transition generation */
+
+const Word16 window_shb_32k_fx[2 * L_SHB_LAHEAD] =
+{
+ /*Q15(round) */
+ 1513, 3020, 4527, 6015, 7502, 8958, 10413, 11825, 13236, 14590,
+ 15945, 17232, 18518, 19726, 20934, 22052, 23170, 24190, 25210, 26122,
+ 27034, 27830, 28627, 29301, 29976, 30523, 31069, 31483, 31898, 32176,
+ 32454, 32593, 32733, 32751, 32767, 32767, 32767, 32767, 32767, 32767,
+};
+
+/* Short overlap add window for SHB excitation used in anal and synth */
+
+const Word16 subwin_shb_fx[SHB_OVERLAP_LEN + 1] =
+{
+ /*Q15(round) */
+ 0, 202, 802, 1786, 3129,
+ 4799, 6754, 8946, 11321, 13821,
+ 16384,18947, 21447, 23822, 26014,
+ 27969, 29639, 30982, 31966, 32566,
+ 32767
+};
+
+const Word16 window_wb_fx[L_SHB_LAHEAD / 4] =/*sin, 1 */
+{ 7502, 18518, 27034, 31898, 32767 }; /*Q15*/
+
+/* Short overlap add window for SHB excitation used in anal and synth */
+
+const Word16 subwin_wb_fx[SHB_OVERLAP_LEN / 2 + 1] =
+{ 0, 5126, 10126, 14876, 19261, 23170, 26510, 29197, 31164, 32365, 32767 }; // Q15
+
+/* Window for calculating SHB LPC coeffs */
+
+const Word16 win_lpc_shb_fx[(L_LOOK_12k8 + L_SUBFR + L_FRAME) * 5 / 8] =
+{
+ /*Q15 */
+ 1, 4, 10, 18, 28, 40, 54, 71, 89, 110, 134, 159, 186, 216, 248,
+ 282, 318, 357, 397, 440, 485, 532, 581, 632, 686, 741, 799, 859, 921,
+ 984, 1050, 1119, 1189, 1261, 1335, 1411, 1490, 1570, 1652, 1736, 1823,
+ 1911, 2001, 2093, 2187, 2283, 2381, 2481, 2582, 2686, 2791, 2898, 3007,
+ 3118, 3230, 3345, 3461, 3579, 3698, 3819, 3942, 4067, 4193, 4321, 4451,
+ 4582, 4715, 4849, 4985, 5123, 5261, 5402, 5544, 5687, 5832, 5978, 6126,
+ 6275, 6426, 6577, 6730, 6885, 7041, 7197, 7356, 7515, 7676, 7837, 8000,
+ 8164, 8329, 8496, 8663, 8831, 9001, 9171, 9342, 9515, 9688, 9862, 10037,
+ 10213, 10390, 10567, 10745, 10924, 11104, 11285, 11466, 11648, 11830, 12013,
+ 12197, 12381, 12566, 12751, 12937, 13123, 13310, 13497, 13684, 13872, 14060,
+ 14249, 14438, 14627, 14816, 15006, 15195, 15385, 15575, 15765, 15955, 16146,
+ 16336, 16526, 16716, 16907, 17097, 17287, 17477, 17667, 17856, 18046, 18235,
+ 18424, 18612, 18801, 18989, 19176, 19364, 19551, 19737, 19923, 20109, 20294,
+ 20478, 20662, 20846, 21028, 21210, 21392, 21573, 21753, 21932, 22111, 22289,
+ 22466, 22642, 22818, 22992, 23166, 23339, 23510, 23681, 23851, 24020, 24188,
+ 24355, 24520, 24685, 24848, 25011, 25172, 25332, 25491, 25648, 25804, 25960,
+ 26113, 26266, 26417, 26567, 26715, 26862, 27007, 27152, 27294, 27435, 27575,
+ 27713, 27850, 27985, 28119, 28251, 28381, 28510, 28637, 28762, 28886, 29008,
+ 29129, 29248, 29364, 29480, 29593, 29705, 29815, 29923, 30029, 30133, 30236,
+ 30337, 30435, 30532, 30627, 30720, 30811, 30901, 30988, 31073, 31156, 31238,
+ 31317, 31394, 31469, 31543, 31614, 31683, 31750, 31815, 31878, 31938, 31997,
+ 32054, 32108, 32161, 32211, 32259, 32305, 32349, 32390, 32430, 32467, 32502,
+ 32535, 32566, 32595, 32621, 32645, 32667, 32687, 32705, 32720, 32734, 32745,
+ 32753, 32760, 32765, 32767
+};
+
+
+const Word16 win_lpc_hb_wb_fx[(L_LOOK_12k8 + L_SUBFR + L_FRAME) * 5 / 32] =
+{//Q15
+ 17, 70, 157, 279, 435, 625, 849, 1106,
+ 1396, 1718, 2071, 2454, 2867, 3309, 3779, 4276,
+ 4799, 5346, 5917, 6510, 7125, 7759, 8411, 9081,
+ 9766, 10465, 11177, 11900, 12633, 13373, 14120, 14872,
+ 15627, 16384, 17141, 17896, 18648, 19395, 20135, 20868,
+ 21591, 22303, 23002, 23687, 24357, 25009, 25643, 26258,
+ 26851, 27422, 27969, 28492, 28989, 29459, 29901, 30314,
+ 30697, 31050, 31372, 31662, 31919, 32143, 32333, 32489,
+ 32611, 32698, 32751
+};
+
+const Word16 win_lpc_hb_wb_ivas_fx[(L_LOOK_12k8 + L_SUBFR + L_FRAME) * 5 / 32] =
+{//Q15
+ 6, 51, 140, 274,
+ 453, 675, 940, 1247,
+ 1596, 1985, 2414, 2882,
+ 3386, 3926, 4499, 5106,
+ 5743, 6410, 7104, 7823,
+ 8566, 9331, 10114, 10915,
+ 11731, 12559, 13398, 14245,
+ 15099, 15955, 16813, 17669,
+ 18523, 19370, 20209, 21037,
+ 21853, 22654, 23437, 24202,
+ 24945, 25664, 26358, 27025,
+ 27662, 28269, 28842, 29382,
+ 29886, 30354, 30783, 31172,
+ 31521, 31828, 32093, 32315,
+ 32494, 32628, 32717, 32762
+};
+
+
+const Word16 ola_win_shb_switch_fold_fx[L_SUBFR16k] =
+{//Q15
+ 322, 965, 1608, 2250, 2892, 3532, 4171, 4808,
+ 5444, 6077, 6708, 7336, 7962, 8585, 9204, 9819,
+ 10431, 11039, 11643, 12242, 12836, 13426, 14010, 14589,
+ 15162, 15730, 16291, 16846, 17395, 17937, 18472, 18999,
+ 19520, 20033, 20538, 21035, 21525, 22006, 22478, 22942,
+ 23397, 23843, 24279, 24707, 25125, 25533, 25931, 26320,
+ 26698, 27066, 27423, 27770, 28106, 28431, 28746, 29049,
+ 29341, 29622, 29891, 30149, 30395, 30630, 30853, 31063,
+ 31262, 31449, 31624, 31786, 31936, 32074, 32200, 32313,
+ 32413, 32501, 32577, 32640, 32691, 32729, 32754, 32766
+};
+
+/* Window for calculating whitening filter for SHB excitation */
+
+const Word16 win_flatten_fx[L_FRAME16k / 2] = /*Q15 */
+{
+ 3, 13, 28, 50, 78, 113, 154, 200, 254, 313,
+ 378, 450, 528, 611, 701, 797, 899, 1006, 1120, 1239,
+ 1365, 1496, 1632, 1775, 1923, 2076, 2235, 2400, 2569, 2745,
+ 2925, 3110, 3301, 3496, 3697, 3902, 4112, 4327, 4546, 4770,
+ 4999, 5232, 5469, 5710, 5955, 6205, 6458, 6715, 6976, 7240,
+ 7508, 7779, 8054, 8331, 8612, 8896, 9183, 9472, 9764, 10059,
+ 10356, 10655, 10956, 11260, 11566, 11873, 12182, 12493, 12805, 13119,
+ 13434, 13750, 14067, 14385, 14703, 15023, 15342, 15663, 15983, 16304,
+ 16625, 16945, 17265, 17586, 17905, 18224, 18542, 18860, 19176, 19492,
+ 19806, 20119, 20431, 20741, 21049, 21355, 21660, 21963, 22263, 22561,
+ 22857, 23150, 23441, 23729, 24014, 24297, 24576, 24852, 25125, 25395,
+ 25661, 25923, 26182, 26437, 26689, 26936, 27179, 27418, 27653, 27884,
+ 28110, 28332, 28549, 28761, 28969, 29172, 29370, 29563, 29751, 29934,
+ 30112, 30284, 30451, 30613, 30769, 30920, 31065, 31205, 31338, 31467,
+ 31589, 31705, 31816, 31921, 32020, 32113, 32199, 32280, 32355, 32423,
+ 32486, 32542, 32592, 32636, 32673, 32704, 32730, 32748, 32761, 32767
+};
+
+const Word16 win_flatten_4k_fx[L_FRAME16k / 8] = /*Q15 */
+{
+ 13, 114, 315, 615, 1013, 1505, 2089, 2761,
+ 3517, 4353, 5263, 6241, 7282, 8378, 9525, 10713,
+ 11937, 13188, 14458, 15741, 17027, 18310, 19580, 20831,
+ 22055, 23243, 24390, 25486, 26527, 27505, 28415, 29251,
+ 30007, 30679, 31263, 31755, 32153, 32453, 32654, 32755
+};
+
+const Word16 wb_bwe_lsfvq_cbook_8bit_fx[256 * 6] =
+{//Q15
+ 2107, 3430, 5123, 6677, 9403, 13197,
+ 4031, 5069, 7343, 8910, 10647, 12245,
+ 2037, 3542, 6708, 8763, 10505, 12655,
+ 5732, 6373, 7912, 9546, 12584, 14230,
+ 2028, 3337, 5473, 7880, 10269, 12450,
+ 5809, 6497, 8317, 9624, 11497, 14007,
+ 2428, 3962, 5675, 7724, 11361, 13385,
+ 6348, 8307, 8898, 9948, 11058, 13350,
+ 3552, 4421, 5896, 7143, 9975, 13233,
+ 5719, 6344, 7482, 8403, 10765, 13455,
+ 3509, 4379, 5896, 7437, 11765, 14307,
+ 4521, 8122, 8791, 9856, 11232, 14020,
+ 2175, 3970, 7788, 9803, 11334, 12910,
+ 4511, 8156, 8886, 10450, 12686, 14959,
+ 4223, 5285, 7053, 8423, 11317, 14566,
+ 7159, 8379, 9040, 10122, 11799, 14270,
+ 1866, 3064, 4848, 7227, 11225, 13963,
+ 5915, 6631, 8740, 10002, 11385, 12726,
+ 3342, 4547, 6475, 9404, 11994, 13418,
+ 6156, 6880, 8932, 10353, 12380, 13746,
+ 2648, 4972, 7575, 9476, 12117, 13875,
+ 5822, 6526, 8747, 10941, 12671, 13971,
+ 4032, 5110, 7592, 9267, 11374, 14390,
+ 6864, 8384, 9086, 10649, 12944, 15026,
+ 3661, 4636, 6668, 8329, 10374, 12185,
+ 5802, 6444, 8344, 9811, 12234, 14843,
+ 3593, 4436, 6663, 8693, 11539, 14272,
+ 5110, 8270, 9006, 10703, 12269, 13901,
+ 1992, 3229, 5616, 9085, 11419, 13254,
+ 4319, 5859, 9602, 11396, 12836, 14199,
+ 3836, 4822, 8285, 10190, 11728, 13302,
+ 8016, 8698, 10179, 11434, 12944, 14783,
+ 1891, 3329, 6168, 8307, 10818, 14213,
+ 5803, 6442, 7973, 9131, 11090, 12657,
+ 2803, 5499, 8093, 9694, 11223, 12849,
+ 6222, 6981, 8615, 9848, 12016, 13380,
+ 2543, 4747, 7638, 9373, 11129, 13652,
+ 5912, 6615, 9006, 10553, 11959, 13312,
+ 3604, 4520, 7650, 9833, 12161, 14748,
+ 7970, 8729, 9780, 10789, 12483, 13985,
+ 3793, 4716, 7041, 8547, 10610, 13601,
+ 5640, 6235, 7313, 8370, 12057, 14300,
+ 3765, 4699, 6784, 9512, 12663, 14216,
+ 4634, 8363, 9195, 10385, 11477, 13310,
+ 2462, 4816, 8556, 10394, 11920, 13468,
+ 3698, 7974, 9207, 10962, 13507, 15208,
+ 3738, 4667, 7545, 10775, 13024, 14559,
+ 7267, 8610, 9509, 11264, 12821, 14495,
+ 2624, 4295, 6173, 8897, 12343, 14174,
+ 6324, 7135, 8742, 10013, 12598, 14108,
+ 4448, 5839, 8842, 10335, 11737, 13071,
+ 6147, 6988, 9510, 10893, 12240, 13535,
+ 3025, 5140, 7152, 9223, 11404, 13255,
+ 5985, 6782, 9611, 11341, 12723, 14007,
+ 4679, 5958, 8100, 9842, 11835, 13492,
+ 7740, 8565, 9432, 10478, 12611, 14609,
+ 3830, 4784, 7681, 9528, 11134, 12675,
+ 5742, 6527, 8359, 10728, 13195, 14626,
+ 4491, 5635, 7284, 8749, 11594, 13785,
+ 6772, 8490, 9253, 10943, 12476, 13973,
+ 2024, 3588, 7524, 10453, 12198, 13858,
+ 5783, 8882, 9978, 11763, 13237, 14829,
+ 3979, 5009, 8342, 10323, 12231, 14313,
+ 8148, 8903, 10193, 11350, 13246, 14490,
+ 2297, 3810, 5638, 7265, 9162, 11514,
+ 5809, 6518, 7832, 8766, 10327, 11957,
+ 2535, 4591, 7415, 9080, 10623, 12257,
+ 5948, 6598, 8515, 10082, 12721, 14188,
+ 2443, 4278, 6581, 8172, 9883, 11807,
+ 5913, 6535, 8878, 10296, 12141, 14245,
+ 2428, 3925, 6409, 9835, 11962, 13628,
+ 7430, 8531, 9302, 10259, 11444, 12933,
+ 3701, 4694, 6372, 7671, 9445, 11571,
+ 5822, 6470, 7807, 8885, 11506, 14529,
+ 3742, 4580, 6232, 7860, 11252, 13127,
+ 5710, 8330, 8943, 10243, 11696, 14511,
+ 2607, 4197, 6714, 10408, 12714, 14320,
+ 4116, 8438, 9717, 11018, 12156, 13663,
+ 4224, 5318, 7486, 10110, 12779, 14331,
+ 5565, 8413, 9115, 10930, 12588, 14759,
+ 1898, 3150, 5779, 9497, 12432, 14439,
+ 6274, 7186, 9258, 10404, 11733, 12952,
+ 3700, 4591, 7575, 9533, 11461, 13777,
+ 6234, 7104, 9032, 10986, 13088, 14417,
+ 2354, 4579, 7744, 9960, 12629, 14802,
+ 6050, 6729, 9345, 10745, 12436, 14253,
+ 4345, 5529, 8117, 9718, 12433, 14109,
+ 8009, 8701, 9863, 10954, 13046, 14474,
+ 4184, 5186, 6876, 8428, 11236, 12973,
+ 6113, 6842, 8386, 9659, 12892, 14707,
+ 3989, 4936, 7152, 8879, 11743, 13632,
+ 5169, 8411, 9209, 11361, 13452, 15076,
+ 2397, 4387, 7033, 9035, 11821, 13736,
+ 3607, 8128, 10170, 11565, 12819, 14147,
+ 4449, 5805, 8963, 10676, 12596, 14558,
+ 7911, 8741, 10040, 11622, 13579, 15092,
+ 2372, 4290, 6990, 8705, 10637, 13685,
+ 6137, 6917, 8382, 9380, 10859, 12348,
+ 3235, 5973, 8187, 10174, 12420, 14382,
+ 6077, 6764, 8551, 9803, 12150, 14079,
+ 2952, 5097, 6853, 8952, 12066, 14080,
+ 6606, 7683, 9508, 10695, 12182, 13601,
+ 3707, 4638, 7468, 10484, 12295, 13754,
+ 7960, 8715, 10051, 11348, 12757, 14072,
+ 4139, 5241, 7576, 9037, 10912, 13485,
+ 5838, 6444, 7768, 8965, 12867, 14998,
+ 4245, 5338, 7248, 9190, 12328, 14047,
+ 6159, 8874, 9899, 11134, 12150, 13512,
+ 2250, 4288, 8698, 10944, 12624, 14316,
+ 3146, 6848, 9904, 11775, 13534, 14953,
+ 4044, 5161, 8365, 10294, 12945, 14907,
+ 7398, 8724, 9813, 11821, 13246, 14552,
+ 2121, 3890, 6855, 9274, 12059, 14663,
+ 6329, 7182, 8789, 10081, 13001, 14917,
+ 4484, 5761, 8634, 10295, 12111, 14022,
+ 6326, 7208, 9672, 11078, 12830, 14529,
+ 3230, 5564, 7646, 9955, 12011, 13683,
+ 4683, 6896, 10002, 11805, 13329, 14747,
+ 4771, 6044, 8081, 10305, 12526, 14037,
+ 8231, 9203, 10351, 11427, 12926, 14635,
+ 4385, 5774, 7989, 9305, 10751, 12299,
+ 5810, 6658, 9062, 11629, 13359, 14655,
+ 4288, 5388, 7804, 9378, 11781, 13652,
+ 4398, 8560, 9646, 11161, 12701, 14872,
+ 1947, 3440, 7202, 10953, 13222, 14806,
+ 4686, 8972, 10615, 12054, 13260, 14615,
+ 3801, 4849, 8922, 11200, 12882, 14423,
+ 8061, 8813, 10453, 11912, 13335, 14710,
+ 2365, 3888, 5664, 7346, 10407, 14331,
+ 4563, 5839, 7472, 8684, 10572, 12800,
+ 2593, 4197, 6719, 9323, 11229, 12919,
+ 6081, 6774, 8132, 9244, 12202, 13918,
+ 2405, 3981, 6144, 8740, 11347, 13796,
+ 5793, 6444, 8286, 10049, 12152, 13520,
+ 2795, 4727, 6528, 8506, 11323, 13474,
+ 6181, 8598, 9346, 10614, 11725, 13545,
+ 4002, 5001, 6596, 7792, 9987, 13065,
+ 5748, 6365, 7759, 9028, 11818, 13487,
+ 3906, 4863, 6462, 7763, 10705, 14359,
+ 4315, 8428, 9322, 10582, 11942, 14500,
+ 2812, 4622, 7346, 10036, 11745, 13429,
+ 4221, 8338, 9277, 11280, 12869, 14317,
+ 4345, 5427, 7121, 8736, 12787, 14837,
+ 7678, 8614, 9456, 10461, 12024, 13852,
+ 2193, 3662, 5609, 7867, 12276, 14739,
+ 6083, 6864, 8879, 10080, 11623, 13720,
+ 4114, 5125, 7224, 9729, 11808, 13297,
+ 6383, 7232, 9252, 10720, 12622, 14030,
+ 2788, 5189, 8074, 9953, 11795, 14361,
+ 6079, 6987, 8662, 10589, 12444, 14390,
+ 4480, 5690, 7708, 9115, 11800, 14576,
+ 7848, 8763, 9802, 10924, 12515, 14832,
+ 3582, 4575, 6729, 9084, 11139, 12800,
+ 5885, 6534, 8853, 10432, 12664, 14960,
+ 3891, 4850, 7195, 8932, 12097, 14665,
+ 5797, 8545, 9385, 11556, 12997, 14392,
+ 1962, 3544, 7039, 9349, 11272, 13857,
+ 4106, 5493, 9652, 12038, 13603, 14932,
+ 4328, 5413, 7949, 10282, 12164, 13618,
+ 8135, 8918, 10057, 11085, 13190, 15015,
+ 2702, 4627, 6447, 8009, 10197, 13676,
+ 5998, 6656, 8315, 9496, 11597, 13122,
+ 3146, 6293, 8530, 10158, 11798, 13558,
+ 6374, 7289, 8698, 9776, 11885, 14236,
+ 3171, 5794, 7737, 9377, 11312, 13878,
+ 6279, 7150, 9192, 10414, 12052, 14174,
+ 4117, 5195, 7805, 9512, 12450, 14849,
+ 7963, 8955, 10071, 11129, 12324, 13605,
+ 4365, 5505, 7013, 8171, 10488, 13658,
+ 6124, 6894, 8286, 9349, 11859, 14737,
+ 3753, 4673, 6421, 8146, 12726, 14980,
+ 5457, 8706, 9598, 11035, 12294, 14268,
+ 2783, 4916, 7947, 10568, 12395, 14123,
+ 3909, 8145, 9524, 11951, 14052, 15282,
+ 3952, 5139, 8180, 11380, 13699, 15085,
+ 7200, 9031, 10025, 11484, 12924, 14848,
+ 2533, 4412, 6472, 8299, 11405, 14627,
+ 6563, 7530, 9064, 10267, 12560, 14422,
+ 4849, 6618, 8678, 10166, 11983, 13841,
+ 6393, 7569, 9960, 11300, 12644, 13906,
+ 3170, 5117, 7158, 9665, 11687, 14114,
+ 6122, 7071, 10013, 11733, 13170, 14466,
+ 4308, 5441, 7607, 9900, 11904, 14292,
+ 8129, 9024, 10087, 11081, 12670, 14356,
+ 4253, 5392, 8175, 9780, 11353, 12988,
+ 5453, 6638, 8596, 11453, 13885, 15263,
+ 4664, 5903, 7618, 9420, 12198, 13853,
+ 7149, 8859, 9746, 11029, 12219, 14188,
+ 2318, 4251, 7702, 9889, 11778, 14182,
+ 6679, 9280, 10573, 11950, 13100, 14491,
+ 4010, 5176, 8989, 10821, 12250, 13654,
+ 8076, 8886, 10411, 11722, 12992, 14267,
+ 2308, 4017, 6024, 7618, 9736, 13081,
+ 6001, 6751, 7987, 8966, 10964, 13589,
+ 2908, 5350, 7266, 8739, 10442, 12981,
+ 6143, 6839, 9027, 10366, 12881, 14416,
+ 2667, 4224, 6172, 8378, 10717, 12602,
+ 6275, 7120, 9249, 10613, 12580, 14823,
+ 2692, 4586, 6968, 9858, 12120, 14209,
+ 7771, 8769, 9743, 10745, 11943, 13225,
+ 4201, 5355, 7129, 8337, 9975, 11767,
+ 6216, 7100, 8444, 9442, 11298, 13690,
+ 4111, 5040, 6562, 8071, 12034, 13923,
+ 6657, 8599, 9337, 10665, 12040, 14704,
+ 3060, 5215, 7260, 10118, 12577, 14386,
+ 5103, 8913, 10157, 11519, 12669, 14220,
+ 4633, 5920, 7804, 9514, 12741, 14690,
+ 6720, 8585, 9448, 11556, 13510, 15095,
+ 2361, 3970, 6213, 9335, 13270, 15075,
+ 6506, 7440, 9041, 10179, 12024, 13587,
+ 4221, 5405, 8311, 9818, 11579, 14044,
+ 6216, 7224, 9515, 11389, 13545, 15068,
+ 2872, 5507, 8153, 10650, 13065, 14825,
+ 6002, 6676, 9393, 11023, 12965, 14755,
+ 4438, 5642, 8268, 10097, 12295, 14724,
+ 7797, 8622, 9642, 10932, 13287, 15118,
+ 4471, 5638, 7551, 9217, 11440, 12928,
+ 6051, 6890, 8906, 10655, 13437, 15116,
+ 3953, 4934, 7779, 9619, 12204, 14012,
+ 5439, 8649, 9791, 12232, 13899, 15193,
+ 2728, 4495, 6728, 9363, 11344, 14053,
+ 4069, 8460, 9835, 11742, 13366, 14825,
+ 4874, 6937, 9226, 10944, 12845, 14547,
+ 8195, 9093, 10392, 11594, 13355, 15010,
+ 2956, 5192, 7080, 8765, 11014, 14174,
+ 6384, 7287, 8812, 9816, 11336, 12808,
+ 2912, 6122, 9132, 10874, 12583, 14265,
+ 6148, 6925, 8821, 10030, 12212, 14758,
+ 2572, 4778, 7325, 9216, 11620, 14651,
+ 6654, 7718, 9546, 10806, 12633, 14354,
+ 4328, 5514, 8231, 10852, 12821, 14261,
+ 8051, 9205, 10385, 11490, 12674, 13988,
+ 4624, 6013, 7907, 9239, 11160, 13787,
+ 5786, 6531, 8210, 9968, 13410, 15249,
+ 3859, 4898, 7132, 9692, 13395, 15118,
+ 6712, 8944, 10028, 11521, 12690, 14118,
+ 2417, 4875, 9132, 11671, 13382, 14841,
+ 4113, 8355, 10734, 12517, 13905, 15115,
+ 4455, 5753, 7923, 10298, 13343, 15030,
+ 6998, 8878, 10113, 12233, 13768, 15107,
+ 2720, 4801, 6883, 9267, 12694, 14837,
+ 6507, 7496, 9312, 10696, 13185, 14850,
+ 4631, 6341, 9164, 10796, 12325, 13734,
+ 6602, 7817, 9932, 11349, 13132, 14672,
+ 3089, 5561, 7579, 9433, 12256, 14633,
+ 6246, 7715, 10371, 12065, 13563, 14878,
+ 4757, 6352, 8543, 10216, 12748, 14620,
+ 8183, 9366, 10628, 11857, 13185, 14599,
+ 4734, 6314, 8348, 9716, 11274, 12942,
+ 5824, 6871, 9829, 12268, 13874, 15138,
+ 4719, 6142, 8224, 9683, 11915, 14350,
+ 6288, 8774, 9655, 11204, 12696, 14867,
+ 2661, 4586, 7326, 10934, 13501, 15026,
+ 5932, 9323, 10877, 12454, 13715, 15004,
+ 4467, 6039, 8842, 11164, 13356, 14901,
+ 7880, 9158, 10593, 12209, 13609, 14989,
+};
+
+const Word16 swb_tbe_lsfvq_cbook_8b[256 * LPC_SHB_ORDER] = /* Q15 */
+{
+ 1705, 3230, 4202, 5086, 6148, 7221, 8127, 10728, 13656, 15364,
+ 1668, 2958, 4063, 5644, 7356, 9440, 11046, 12261, 13228, 14503,
+ 1546, 2917, 4226, 5477, 6976, 8349, 9709, 11882, 13218, 14715,
+ 1158, 2729, 5177, 6967, 8297, 9611, 10655, 11668, 12757, 14415,
+ 1616, 3005, 4368, 5810, 7107, 8129, 9376, 10457, 12738, 14835,
+ 1232, 2451, 4145, 6446, 7741, 8993, 10377, 11898, 14213, 15314,
+ 1638, 3089, 5134, 6351, 7360, 8304, 9787, 12377, 13755, 15209,
+ 1264, 2543, 5564, 6686, 7958, 9481, 11021, 12517, 13875, 15147,
+ 1304, 2537, 3713, 4863, 6564, 7910, 9400, 11794, 13268, 14834,
+ 1652, 3245, 4686, 6405, 7931, 9223, 10591, 12020, 13193, 14759,
+ 1302, 2619, 4287, 5884, 7166, 8556, 10512, 12471, 13767, 15075,
+ 2034, 3467, 5577, 6530, 7674, 8783, 10920, 12798, 13727, 15002,
+ 2621, 3956, 5275, 6542, 7509, 8517, 9456, 10781, 12456, 14099,
+ 1496, 2653, 4147, 5637, 7370, 9233, 11817, 12986, 13968, 15046,
+ 2224, 3324, 4700, 5868, 7211, 8638, 11369, 12695, 13600, 14559,
+ 1267, 3050, 4707, 6321, 8663, 10140, 11174, 12453, 13425, 14844,
+ 1662, 2980, 4155, 5414, 6639, 7797, 9253, 11360, 12838, 14440,
+ 1521, 2856, 4944, 6367, 7506, 8857, 10971, 12183, 13275, 15006,
+ 1454, 2859, 4563, 5971, 7186, 8569, 10151, 11770, 13396, 14984,
+ 1143, 2942, 5267, 6840, 8377, 9457, 10589, 11615, 13892, 15271,
+ 1674, 3053, 4605, 5768, 7104, 8452, 10094, 11782, 12793, 13758,
+ 1702, 3261, 4723, 6245, 7899, 9494, 11010, 12387, 13680, 15066,
+ 1365, 2796, 5406, 6505, 7488, 8679, 10447, 12000, 13637, 15046,
+ 2090, 3931, 5788, 7157, 8254, 9717, 11007, 12081, 13238, 14880,
+ 1952, 3157, 4132, 5164, 6334, 7389, 9004, 11798, 14096, 15505,
+ 1641, 3212, 4919, 6364, 7863, 9311, 10766, 12234, 13694, 15054,
+ 1653, 3008, 4213, 5354, 6980, 8821, 11185, 12685, 13903, 15251,
+ 1856, 3444, 5146, 6579, 7801, 9250, 11062, 12947, 14145, 15291,
+ 1365, 3567, 5552, 6474, 7332, 8254, 9952, 11364, 13505, 14951,
+ 1488, 2896, 4521, 6279, 7880, 9446, 11418, 12921, 14431, 15465,
+ 1516, 3174, 5364, 6410, 7295, 8285, 10799, 12594, 14172, 15424,
+ 1738, 3416, 5237, 6878, 8440, 10539, 12105, 13063, 13924, 15150,
+ 1431, 2659, 3909, 5328, 6641, 7950, 9347, 11037, 13510, 14992,
+ 1400, 2646, 4233, 6366, 7749, 9220, 10560, 11594, 13046, 14992,
+ 1115, 2198, 3607, 5279, 8055, 9774, 11024, 12426, 13972, 15232,
+ 1360, 3418, 5724, 6973, 7912, 9078, 10810, 12437, 13630, 14826,
+ 1422, 3051, 5132, 6141, 7206, 8275, 9355, 10859, 13814, 15202,
+ 1080, 2227, 4117, 6404, 8080, 9318, 10934, 12404, 13688, 14827,
+ 1611, 3423, 4928, 6214, 7426, 8723, 10502, 11915, 13438, 15105,
+ 1947, 3524, 5198, 7008, 8358, 10006, 11397, 12444, 13583, 15135,
+ 1394, 2672, 4004, 5681, 6953, 8301, 9815, 12000, 13709, 15079,
+ 1788, 3193, 4579, 6221, 7874, 9170, 11186, 12647, 13521, 14538,
+ 1548, 2811, 4058, 5331, 6528, 7769, 10982, 12743, 13822, 15131,
+ 1751, 4007, 5154, 6463, 7935, 9470, 11103, 12406, 13337, 14520,
+ 2004, 3172, 5079, 6116, 7109, 8155, 10351, 12192, 13413, 14773,
+ 1644, 3185, 4750, 6290, 7816, 9271, 11041, 12831, 14139, 15341,
+ 2311, 3779, 5116, 6100, 7321, 9139, 10353, 12134, 13834, 15172,
+ 1723, 3339, 5049, 6754, 8353, 10290, 12048, 13157, 14206, 15460,
+ 2218, 3501, 4639, 5764, 6789, 7834, 9804, 11907, 13182, 14689,
+ 1640, 3173, 4679, 6202, 7660, 9120, 10773, 12395, 13894, 15200,
+ 1591, 3070, 4537, 6005, 7341, 8802, 10480, 12240, 13768, 15130,
+ 1169, 3611, 5983, 7054, 8601, 10022, 10948, 11927, 12834, 14747,
+ 1708, 3191, 4642, 6156, 7396, 8805, 10028, 11733, 13206, 14857,
+ 1519, 3082, 4752, 6484, 7730, 9328, 10796, 12003, 14524, 15513,
+ 2153, 3558, 5162, 6714, 7762, 8857, 10008, 12012, 13725, 15209,
+ 2680, 4053, 5310, 6996, 8309, 9343, 10361, 12333, 14224, 15498,
+ 2356, 3805, 5032, 5970, 6915, 7880, 8924, 12060, 13838, 15185,
+ 1807, 3439, 4962, 6483, 8013, 9556, 10952, 12327, 13686, 15059,
+ 1571, 2900, 4208, 6449, 7675, 8592, 11138, 12775, 14181, 15422,
+ 2006, 4262, 5508, 6414, 7621, 8725, 10788, 12605, 13609, 14776,
+ 1785, 3741, 5267, 6702, 8097, 9460, 10487, 11481, 12889, 14885,
+ 1647, 3223, 4795, 6391, 8007, 9620, 11575, 12955, 14100, 15381,
+ 1518, 3214, 5233, 6509, 7687, 8803, 11778, 13932, 14760, 15491,
+ 2136, 3647, 5373, 7317, 8671, 10261, 11786, 12933, 13820, 15186,
+ 1633, 3265, 4672, 5640, 6776, 7783, 8907, 10184, 12066, 14492,
+ 1690, 3028, 4184, 6049, 7489, 8678, 11045, 12244, 13372, 15016,
+ 1649, 3080, 4358, 5795, 7364, 8601, 10257, 12126, 13328, 15113,
+ 1850, 3286, 5392, 6765, 7826, 9185, 10506, 11776, 13248, 15163,
+ 2111, 3522, 4870, 6087, 7162, 8385, 9645, 10861, 12341, 14302,
+ 1529, 2909, 4136, 6783, 8064, 9325, 10942, 12094, 13886, 15169,
+ 1847, 3281, 4752, 6098, 7310, 8744, 10129, 12278, 13554, 14930,
+ 1149, 2767, 5869, 7479, 8514, 9723, 11235, 12300, 13871, 15068,
+ 1689, 3066, 4325, 5613, 6772, 7936, 9051, 12135, 13730, 15025,
+ 2127, 3394, 5263, 6880, 7874, 9155, 10305, 12136, 13494, 14437,
+ 1682, 3054, 4412, 6053, 7380, 8465, 9817, 12460, 14155, 15285,
+ 1799, 3430, 5123, 6594, 7934, 9609, 11472, 12791, 13686, 14849,
+ 1899, 3656, 5369, 6355, 7516, 8800, 9888, 11646, 13024, 13965,
+ 1410, 3252, 5101, 6050, 7480, 9912, 11739, 12806, 14085, 15186,
+ 1487, 3934, 5351, 6390, 7519, 8890, 11488, 12818, 13787, 14941,
+ 1562, 3156, 5075, 7044, 8872, 10271, 11479, 12632, 13907, 14993,
+ 1548, 2926, 4338, 5796, 7011, 8143, 9336, 11323, 13461, 14904,
+ 1421, 2907, 4736, 6272, 7730, 8977, 10453, 12374, 13840, 15234,
+ 1495, 2996, 4496, 6036, 7545, 9034, 10534, 12014, 13486, 14958,
+ 1388, 3203, 5691, 7076, 8578, 9661, 10874, 12326, 14433, 15423,
+ 1248, 2983, 5304, 6423, 7544, 8611, 10290, 11682, 12904, 14549,
+ 1496, 2988, 4632, 6342, 7852, 9329, 11175, 12546, 13758, 15182,
+ 1373, 3379, 5067, 6179, 7379, 8775, 10005, 11464, 14147, 15386,
+ 2537, 3849, 5533, 7263, 8318, 9657, 11346, 12355, 13955, 15314,
+ 2113, 3405, 4419, 5268, 6436, 8005, 10292, 12442, 13655, 15176,
+ 1620, 3681, 5454, 6406, 7459, 9354, 10872, 12035, 14163, 15279,
+ 1903, 3232, 4517, 5758, 7156, 8851, 10670, 12413, 14518, 15565,
+ 1714, 3779, 5166, 6557, 8107, 9168, 10560, 12854, 14208, 15329,
+ 1926, 3645, 5521, 7072, 7999, 8974, 9806, 11088, 13527, 15298,
+ 1820, 2840, 4726, 7091, 8261, 9758, 11218, 12148, 14064, 15262,
+ 2072, 3303, 5391, 6710, 7504, 8497, 10457, 12394, 14480, 15541,
+ 1627, 3294, 5209, 7432, 8846, 10147, 11517, 12890, 14488, 15411,
+ 2172, 3405, 4580, 5623, 6732, 7648, 8485, 9913, 13396, 15213,
+ 1581, 3058, 4633, 6225, 7724, 9238, 10779, 12240, 13650, 15094,
+ 1675, 2927, 4090, 5753, 7461, 8922, 10277, 11670, 13987, 15336,
+ 1868, 3611, 5256, 6927, 8093, 9434, 10998, 12144, 13380, 15165,
+ 1498, 3635, 5273, 6823, 7825, 8916, 9811, 10903, 12514, 14884,
+ 1448, 2626, 3930, 6895, 8348, 9746, 11404, 12565, 14288, 15325,
+ 1945, 3408, 4987, 6340, 7627, 8954, 10251, 12381, 13481, 14983,
+ 1956, 3759, 5388, 6894, 8466, 9962, 11460, 12759, 14145, 15321,
+ 1670, 3271, 4588, 5970, 7185, 8366, 9640, 12011, 13488, 14833,
+ 1964, 3444, 4826, 6213, 7936, 9097, 10785, 12617, 13612, 15229,
+ 1646, 3390, 4669, 6049, 7001, 7940, 10461, 12478, 14675, 15704,
+ 2202, 3782, 5107, 6754, 8280, 9628, 11687, 13028, 13871, 15207,
+ 2354, 3830, 5174, 6360, 7555, 8997, 10681, 11977, 13066, 14781,
+ 2351, 3525, 4892, 6386, 7616, 9133, 11859, 13061, 13946, 15004,
+ 2252, 3772, 5155, 6485, 7799, 9145, 10769, 12561, 13763, 15241,
+ 1714, 3107, 4725, 6097, 9158, 10459, 11619, 12699, 14346, 15256,
+ 1830, 3506, 4969, 5973, 6900, 7836, 8994, 11088, 13366, 14860,
+ 1856, 3406, 4898, 6367, 7810, 9186, 10422, 12172, 13969, 15331,
+ 2006, 3382, 4743, 6100, 7430, 8753, 10805, 12234, 13673, 15195,
+ 1491, 3607, 5343, 7464, 9179, 10087, 11024, 12099, 13199, 14956,
+ 1749, 3371, 5121, 6500, 7646, 8770, 9968, 11673, 13339, 14931,
+ 1857, 3506, 5083, 6595, 8200, 9739, 11138, 12528, 13884, 15137,
+ 1780, 3860, 5581, 6692, 7837, 8989, 10304, 12318, 13611, 15109,
+ 2164, 4463, 5655, 7632, 9047, 9922, 10784, 12950, 14723, 15589,
+ 2305, 3300, 4366, 5608, 6857, 7795, 10006, 11950, 14376, 15700,
+ 1628, 3408, 5074, 6761, 8312, 9687, 11104, 12332, 13619, 15076,
+ 1842, 3314, 4771, 6460, 7463, 8661, 11191, 12739, 14592, 15633,
+ 1808, 4360, 5904, 6869, 8134, 9174, 10780, 12589, 13995, 15150,
+ 2966, 4354, 5686, 6983, 7938, 9092, 10062, 11747, 13307, 14611,
+ 1932, 3293, 4910, 6818, 7690, 9074, 11715, 13019, 14429, 15478,
+ 1978, 3772, 5429, 6580, 7448, 8496, 11755, 13132, 14549, 15560,
+ 1881, 3635, 5627, 7292, 8573, 10911, 12325, 13200, 14068, 15243,
+ 1436, 2716, 4002, 5347, 6553, 7646, 8955, 10690, 12967, 14784,
+ 1426, 2825, 4206, 5726, 8100, 9391, 10712, 12262, 13506, 14954,
+ 1448, 2767, 4089, 5265, 7185, 8684, 10378, 12257, 13431, 14803,
+ 1669, 3312, 4990, 6887, 8050, 9595, 10943, 12015, 13145, 14920,
+ 1534, 2814, 4191, 5933, 7393, 8687, 9865, 11185, 12958, 14743,
+ 1397, 2706, 4322, 6052, 7618, 9168, 10995, 12433, 13931, 15267,
+ 1717, 3164, 4630, 6329, 7519, 8846, 10088, 12116, 14012, 15197,
+ 1606, 3316, 5165, 6942, 8278, 9625, 11461, 12806, 14095, 15299,
+ 2014, 3357, 4281, 5076, 6191, 7372, 9501, 12414, 13419, 14901,
+ 1322, 3655, 5269, 6494, 7613, 9253, 10752, 11974, 13302, 14833,
+ 1687, 3291, 4718, 5817, 7001, 8136, 10741, 12692, 13884, 15224,
+ 2255, 3723, 5555, 7021, 8101, 9345, 10765, 12705, 13693, 15223,
+ 2376, 3715, 5249, 6505, 7410, 8345, 10176, 11618, 12708, 14488,
+ 1842, 3232, 4371, 5954, 7832, 9126, 11296, 12743, 13862, 15331,
+ 2046, 3597, 5325, 6453, 7353, 8588, 10588, 12082, 13664, 15152,
+ 1970, 3564, 4925, 6547, 8672, 9980, 11383, 12786, 13969, 15234,
+ 1497, 2938, 4909, 6099, 7102, 8072, 9514, 11294, 12761, 14578,
+ 1666, 3164, 5098, 6255, 7350, 8902, 10694, 12503, 13808, 14980,
+ 1467, 2774, 4556, 6308, 7435, 8644, 10040, 12356, 13597, 14776,
+ 1915, 3618, 5160, 6707, 8479, 9521, 10481, 11536, 14163, 15479,
+ 1857, 3466, 4760, 6205, 7312, 8801, 10376, 11978, 13161, 14235,
+ 1615, 3107, 4710, 6452, 8069, 9877, 11348, 12575, 13751, 15049,
+ 1563, 3092, 4977, 6851, 8056, 9025, 10327, 12181, 14039, 15192,
+ 2294, 3843, 5781, 7222, 8505, 9851, 11210, 12802, 13676, 15158,
+ 1931, 3436, 4681, 5837, 6908, 7825, 9440, 12600, 14162, 15305,
+ 1572, 3189, 4879, 6680, 7970, 9293, 10974, 12193, 13506, 15218,
+ 1759, 3172, 4687, 5950, 7484, 8874, 10563, 12821, 14112, 15299,
+ 1461, 4009, 5495, 6608, 7867, 9497, 11307, 12520, 14357, 15467,
+ 1922, 4314, 5736, 6599, 7481, 8598, 9852, 11345, 14012, 15280,
+ 1249, 2609, 4690, 7006, 8061, 9011, 11477, 13214, 14382, 15337,
+ 2251, 3776, 5514, 6458, 7300, 8078, 10961, 12696, 14279, 15567,
+ 1697, 3374, 5134, 6984, 8675, 10700, 12194, 13233, 14184, 15464,
+ 1985, 3326, 4440, 5685, 6870, 8207, 9545, 11223, 13672, 15143,
+ 1453, 2824, 4722, 6476, 7730, 8963, 10217, 11743, 13545, 15152,
+ 1217, 2442, 3821, 5409, 7315, 8949, 10797, 12564, 14281, 15410,
+ 1546, 3204, 5604, 6730, 8040, 9677, 11029, 12107, 13803, 15267,
+ 2042, 3424, 4830, 6328, 7473, 8525, 9386, 10755, 13398, 14998,
+ 1106, 2508, 4816, 7337, 8399, 9630, 11278, 12453, 14067, 15024,
+ 1764, 3305, 4955, 6537, 7767, 9117, 10404, 11961, 13576, 15021,
+ 1604, 3797, 5700, 7128, 8515, 9896, 11389, 12534, 13696, 15136,
+ 1623, 3004, 4355, 6217, 7351, 8437, 9819, 11537, 13974, 15340,
+ 2457, 3890, 4962, 5848, 7311, 9718, 11213, 12292, 13705, 15111,
+ 1601, 3330, 4648, 6043, 7138, 8179, 11247, 13078, 14768, 15641,
+ 2457, 3677, 5174, 6432, 7982, 10024, 11164, 12170, 13704, 15112,
+ 1552, 3777, 5267, 6325, 7532, 8642, 9894, 12404, 13569, 14620,
+ 1961, 3463, 4720, 6498, 8059, 9304, 11486, 12824, 14102, 15458,
+ 2443, 3699, 5252, 6348, 7638, 8733, 10224, 12666, 13768, 15009,
+ 2204, 3657, 5086, 6792, 8300, 10152, 12313, 13306, 14079, 15287,
+ 2360, 3731, 5002, 6094, 6952, 8009, 9152, 11586, 13038, 14158,
+ 1888, 3469, 4880, 6183, 7603, 9244, 10801, 12319, 13657, 15002,
+ 1670, 3283, 4591, 6080, 7801, 8951, 10534, 12572, 13620, 14969,
+ 1304, 4140, 5864, 7008, 8377, 9651, 10825, 11805, 13637, 15300,
+ 2077, 3547, 4890, 6216, 7303, 8608, 9810, 11796, 13525, 14984,
+ 1658, 3252, 4916, 6498, 8069, 9529, 11029, 12538, 13903, 15184,
+ 2206, 3648, 4949, 6636, 7875, 8833, 9853, 12624, 14448, 15475,
+ 3039, 4664, 5792, 7321, 8798, 9724, 10485, 12329, 14465, 15650,
+ 1885, 3201, 5227, 6590, 7343, 8049, 9372, 12313, 14594, 15645,
+ 1826, 3446, 5138, 6665, 8008, 9352, 10668, 12583, 13810, 15065,
+ 1455, 3065, 5233, 6306, 7404, 8776, 11422, 12775, 14032, 15239,
+ 2395, 4674, 5883, 6877, 7900, 9322, 10931, 12537, 13765, 14888,
+ 1840, 4359, 5629, 6875, 7968, 9185, 10266, 11861, 13202, 14464,
+ 1662, 3278, 4865, 6555, 8122, 10011, 11874, 13087, 14128, 15418,
+ 1643, 3366, 5837, 7033, 7854, 8928, 11487, 12972, 14409, 15467,
+ 1878, 3685, 5789, 7325, 8714, 10906, 12273, 13110, 13834, 14837,
+ 2259, 3652, 4995, 6055, 7005, 7900, 8843, 10024, 12609, 14736,
+ 1568, 2949, 4504, 6035, 7428, 9194, 10893, 12444, 13595, 14939,
+ 1678, 3143, 4416, 5872, 7501, 8768, 10418, 12127, 13144, 14622,
+ 1878, 3549, 5481, 7178, 8322, 9347, 10532, 12117, 13554, 15167,
+ 2055, 3346, 4814, 6193, 7418, 8757, 10144, 11365, 12698, 14779,
+ 1486, 2779, 3954, 6134, 8290, 9646, 10767, 12112, 14441, 15428,
+ 1787, 3511, 4962, 6055, 7295, 8858, 10179, 12437, 13813, 15217,
+ 1374, 3184, 5771, 7998, 9354, 10209, 11249, 12469, 14015, 15248,
+ 1627, 2947, 4046, 5182, 6798, 8225, 9770, 12661, 14250, 15408,
+ 2117, 3704, 5007, 6630, 8002, 9222, 10550, 12108, 13472, 15034,
+ 1365, 2885, 4896, 6144, 7426, 9137, 10283, 12727, 14709, 15505,
+ 2073, 3691, 5305, 6800, 8134, 9508, 11139, 12857, 13896, 15239,
+ 1564, 4084, 5497, 6495, 7391, 8539, 10468, 11705, 12804, 14704,
+ 1844, 3180, 4380, 5754, 8181, 9923, 11738, 12995, 14138, 15232,
+ 2157, 3736, 5059, 5932, 7192, 8916, 11216, 12783, 13945, 15189,
+ 1782, 2860, 4362, 7179, 9083, 10438, 11580, 12929, 14789, 15500,
+ 1651, 3273, 4587, 5886, 7069, 8346, 9787, 11277, 13152, 14811,
+ 1549, 3138, 5049, 6704, 7803, 9102, 10748, 12577, 13813, 15215,
+ 1674, 3187, 4709, 6204, 7622, 9024, 10541, 12135, 13576, 15063,
+ 1888, 3562, 5468, 7111, 8694, 9948, 11111, 12286, 14070, 15300,
+ 1905, 3158, 5368, 6372, 7554, 8719, 10568, 12430, 13449, 14427,
+ 1953, 3411, 4718, 6545, 8090, 9298, 11232, 12723, 13668, 15077,
+ 1459, 3444, 5688, 6814, 7843, 8977, 10119, 12107, 14316, 15368,
+ 2450, 4363, 5827, 7349, 8683, 10032, 11143, 12131, 13519, 15058,
+ 2482, 3664, 4763, 5944, 7191, 8390, 10105, 12234, 13702, 15188,
+ 1838, 3465, 5255, 6751, 8016, 9254, 10946, 12321, 13790, 15337,
+ 2497, 3548, 4702, 5987, 7645, 8883, 10740, 12247, 14393, 15540,
+ 1717, 3679, 5335, 6587, 8564, 9808, 10735, 12675, 14672, 15558,
+ 2454, 3997, 5364, 6810, 8026, 8913, 9715, 11315, 14258, 15605,
+ 1906, 3443, 4901, 6363, 8186, 9716, 11074, 13186, 14701, 15474,
+ 1992, 3246, 5488, 6514, 7455, 8324, 10807, 13238, 14763, 15579,
+ 1721, 3438, 5244, 7173, 9106, 10873, 12178, 13181, 14060, 15415,
+ 2191, 3555, 4802, 6108, 7015, 7850, 8947, 11115, 14483, 15593,
+ 1925, 3232, 4601, 6574, 7791, 8989, 11038, 12282, 13630, 15136,
+ 1816, 3167, 4292, 5730, 7588, 9096, 10743, 12341, 13760, 15252,
+ 2069, 3850, 5424, 6815, 8274, 9569, 10910, 12283, 13835, 15185,
+ 2419, 3773, 5288, 6591, 7672, 8909, 9832, 10975, 13163, 14998,
+ 1215, 2710, 4939, 6437, 8745, 9918, 11200, 12553, 14234, 15384,
+ 1867, 3527, 5134, 6496, 7656, 8923, 10602, 12568, 13896, 15276,
+ 2259, 4214, 5751, 7270, 8590, 10120, 11611, 12822, 14130, 15258,
+ 1911, 3261, 4446, 5685, 6897, 8494, 10128, 11970, 13707, 15106,
+ 1762, 3549, 4874, 6153, 8146, 9634, 10690, 11886, 13713, 15057,
+ 2371, 3716, 4778, 6111, 7097, 8063, 10544, 12615, 14716, 15724,
+ 2254, 3759, 5627, 6870, 7896, 9379, 11627, 12889, 13795, 15272,
+ 2516, 4000, 5378, 6444, 7496, 8634, 9767, 12110, 13503, 14640,
+ 2385, 3201, 4283, 6677, 8216, 9689, 11654, 12319, 14142, 15367,
+ 2775, 4055, 5455, 6553, 7821, 8901, 10890, 12775, 13696, 14884,
+ 1568, 3940, 5341, 6824, 9355, 10305, 11405, 12879, 14291, 15334,
+ 2436, 3807, 5183, 6189, 7099, 8116, 9655, 11275, 13641, 15137,
+ 1755, 3340, 4871, 6382, 7790, 9316, 10921, 12432, 13903, 15217,
+ 1932, 3246, 4603, 6454, 7590, 8678, 10609, 12641, 13938, 15245,
+ 1417, 4366, 6289, 7362, 8846, 10151, 11160, 12134, 13593, 15216,
+ 1820, 3378, 4782, 6421, 7788, 9056, 10070, 11271, 13614, 15297,
+ 1855, 3399, 4933, 6526, 8097, 9655, 11043, 12475, 14301, 15370,
+ 1901, 3653, 6053, 7290, 8154, 8986, 10262, 12993, 14405, 15387,
+ 1958, 4295, 5824, 8196, 9580, 10318, 11267, 12551, 13716, 15374,
+ 2082, 4060, 5500, 6423, 7298, 8128, 9713, 12497, 14442, 15562,
+ 1878, 3425, 4781, 7062, 8455, 9625, 10810, 12311, 13948, 15201,
+ 2035, 3727, 4804, 6256, 7248, 9235, 11563, 13120, 14882, 15662,
+ 2143, 3982, 6527, 7709, 8742, 9804, 11240, 12658, 14397, 15409,
+ 2593, 4431, 5861, 7222, 8381, 9351, 10400, 11837, 13286, 15326,
+ 1840, 3798, 5465, 6800, 7919, 9752, 12004, 13265, 14424, 15420,
+ 2157, 4145, 5394, 6454, 7240, 8776, 11093, 12831, 14856, 15708,
+ 1467, 3782, 5811, 8123, 9314, 10456, 11641, 13211, 14562, 15331,
+};
+
+
+const Word16 wac_swb_h[LPC_SHB_ORDER] =
+{//Q15
+ 32758,
+ 32731,
+ 32686,
+ 32622,
+ 32541,
+ 32442,
+ 32325,
+ 32191,
+ 32039,
+ 31870
+};
+
+const Word16 wac_swb_l[LPC_SHB_ORDER] =
+{//Q15
+ 29673,
+ 20874,
+ 7850,
+ 25873,
+ 12831,
+ 5927,
+ 10541,
+ 239,
+ 15037,
+ 30328
+};
+
+const Word16 wac_swb_ivas_h[LPC_SHB_ORDER] =
+{//Q15
+ 32749,
+ 32731,
+ 32686,
+ 32622,
+ 32541,
+ 32442,
+ 32325,
+ 32191,
+ 32039,
+ 31870
+};
+
+const Word16 wac_swb_ivas_l[LPC_SHB_ORDER] =
+{//Q15
+ 2624,
+ 20874,
+ 7850,
+ 25873,
+ 12831,
+ 5927,
+ 10541,
+ 239,
+ 15037,
+ 30328
+};
+
+const Word16 lbr_wb_bwe_lsfvq_cbook_2bit_fx[4 * 4] =
+{
+ /*Q15 */
+ 3876, 5920, 8951, 11884,
+ 6556, 7979, 10835, 13133,
+ 4401, 6781, 10676, 13493,
+ 8453, 9693, 12024, 13921,
+};
+
+const Word16 SHBCB_SubGain5bit_fx[128] =
+{
+ /*Q14 */
+ -2388, -7806, -6576, -6024,
+ -7066, -5430, -4998, -3495,
+ -16722, -15343, -960, -7940,
+ -26291, -5921, -4917, -4378,
+ -1526, -6621, -8475, -9624,
+ -8047, -4086, -8940, -3043,
+ -3630, -5129, -4964, -7381,
+ -270, -18662, -24233, -25418,
+ -9246, -7551, -5584, -2053,
+ -2091, -4622, -9199, -14628,
+ -4645, -2197, -10255, -9697,
+ -2438, -9386, -11737, -4570,
+ -14366, -11436, -8252, -819,
+ -16192, -16332, -17043, -225,
+ -5407, -8588, -7577, -2296,
+ -26309, -21930, -7522, -2514,
+ -3260, -4246, -7947, -6614,
+ -1820, -5520, -15272, -19764,
+ -3706, -3737, -5850, -10520,
+ -10081, -4050, -4065, -5001,
+ -3908, -9909, -2881, -9604,
+ -520, -11156, -12620, -12768,
+ -4539, -5149, -6208, -4462,
+ -4866, -7672, -4235, -4407,
+ -9163, -13411, -2975, -3915,
+ -12267, -7568, -3842, -2827,
+ -7181, -4914, -2608, -9392,
+ -6275, -2868, -5962, -6511,
+ -12962, -1034, -8517, -10992,
+ -8247, -7608, -2502, -5026,
+ -5812, -4998, -3860, -5778,
+ -16907, -5974, -4434, -3276,
+};
+
+
+const Word16 HBCB_SubGain5bit_fx[128] =
+{//Q8
+ -15224, -17789, -9897, -5048, -456, -1232, -2238, -2782,
+ -3391, -3864, -4026, -4045, -2017, -1311, -878, -1973,
+ -12837, -15376, -8273, -4141, -2791, -3037, -2403, -342,
+ -3388, -3646, -3471, -2829, -157, -2025, -2318, -2243,
+ -14652, -16433, -7699, -1188, -2567, -1755, -346, -1682,
+ -2068, -2321, -2344, -2348, -1759, -1038, -1865, -2041,
+ -11396, -13719, -7749, -2734, -809, -1935, -1886, -781,
+ -2136, -1940, -942, -1571, -1926, -2378, -2572, -2145,
+ -17531, -19267, -7721, -2672, -714, -675, -1516, -2071,
+ -1925, -2325, -2523, -2657, -1644, -1674, -2036, -2017,
+ -12781, -14601, -6714, -1380, -2093, -1704, -1124, -756,
+ -2776, -2687, -2066, -1202, -1102, -680, -1956, -2376,
+ -14436, -15846, -4918, -2071, -1613, -744, -1807, -1381,
+ -620, -1294, -2026, -2162, -794, -1755, -1167, -1762,
+ -11627, -13377, -5876, -1959, -1009, -1879, -1027, -1915,
+ -1734, -1265, -2001, -1018, -698, -1733, -2172, -1195,
+
+};
+
+
+const Word32 SHBCB_FrameGain64_fx[64] =
+{
+ /* Q18 */
+ 11553, 19429, 27466, 35948, 45184, 54817, 65050, 76114,
+ 88089, 100815, 114314, 128727, 144236, 160812, 178639, 197656,
+ 217917, 239688, 263098, 288617, 315962, 345380, 376751, 410569,
+ 446867, 485779, 527885, 574220, 624562, 679333, 738912, 803391,
+ 873329, 949299, 1032054, 1121728, 1219559, 1327347, 1446046, 1576547,
+ 1720983, 1881933, 2062979, 2266614, 2496129, 2759206, 3060575, 3409584,
+ 3818114, 4295643, 4868000, 5551295, 6368310, 7329048, 8475924, 9889403,
+ 11649918, 13794493, 16487623, 19979932, 24732260, 31339886, 41958624, 64261100,
+};
+
+/* 4 bit Quantizer table for SHB overall gain */
+
+const Word32 SHBCB_FrameGain16_fx[16] =
+{
+ /*Q18*/
+ 38968, 125277, 254474, 493383, 1043711, 2083177, 3792746, 6395076,
+ 10256080, 15738899, 23269902, 34118236, 48362464, 71128080, 107459896, 192888864
+};
+
+/* 18th order elliptic Bandpass filter at 14.15 to 20 kHz sampled at 48 kHz b0,b1,b2,a0,a1,a2 */
+
+const Word16 full_band_bpf_1_fx[6][5] = /*in Q13*/
+{
+ { 789, 802, 248, 802, 789},
+ { 789, 1199, 838, 1199, 789},
+ { 789, 136, -1123, 136, 789},
+ { 8192, 19654, 24391, 17059, 6561},
+ { 8192, 15339, 20118, 13819, 6190},
+ { 8192, 21155, 26558, 17237, 5599}
+};
+
+/* 12th order elliptic Bandpass filter at 16.3 to 19.8 kHz sampled at 48 kHz b0,b1,b2,a0,a1,a2 */
+
+const Word16 full_band_bpf_2_fx[6][5] = /*in Q13*/
+{
+ { 492, 912, 974, 912, 492},
+ { 492, 1161, 1353, 1161, 492},
+ { 492, 259, -311, 259, 492},
+ { 8192, 22912, 30622, 21214, 7143},
+ { 8192, 20364, 27329, 18844, 6886},
+ { 8192, 23496, 31199, 20826, 6487}
+};
+
+/* 12th order elliptic Bandpass filter at 15.4 to 20.0 kHz sampled at 48 kHz b0,b1,b2,a0,a1,a2 */
+
+const Word16 full_band_bpf_3_fx[6][5] = /*in Q13*/
+{
+ {611, 888, 717, 888, 611},
+ {611, 1211, 1214, 1211, 611},
+ {611, 197, -671, 197, 611},
+ {8192, 21727, 28230, 19588, 6871},
+ {8192, 18438, 24377, 16796, 6567},
+ {8192, 22683, 29442, 19400, 6081}
+};
+
+/* 4-bit/3-bit TD SWB BWE differential LSF scalar quantizer tables */
+
+const Word16 lsf_q_cb_size[NUM_Q_LSF] = {16, 16, 8, 8, 8}; // Q0
+const Word16 lsf_q_num_bits[NUM_Q_LSF] = { 4, 4, 3, 3, 3 }; // Q0
+
+/* Tables for approximation of upper half of SWB LSFs */
+
+const Word16 mirror_point_q_cb_fx[MIRROR_POINT_Q_CB_SIZE] = { 471, 692, 896, 1216 }; // Q15
+
+const Word16 allpass_poles_3_ov_2[9] = /* Q15 */
+{
+ 2368,
+ 20545,
+ 30606,
+ 25520,
+ 7188,
+ 31808,
+ 28575,
+ 14384,
+ 32472
+};
+
+const Word16 decimate_3_ov_2_lowpass_num_fx[3] = /* Q15 */
+{
+ 6399,
+ 12797,
+ 6399
+};
+
+const Word16 decimate_3_ov_2_lowpass_den_fx[3] = /* Q15 */
+{
+ 32767,
+ 0,
+ 5624
+};
+
+
+/*------------------------------------------------------------------------------*
+ * WB BWE tables
+ *------------------------------------------------------------------------------*/
+const Word16 F_2_5_fx[64] = /*Q10 */
+{
+ 1189, 675, -5106, -5293, 10476, -12, 10860, 10026,
+ -382, -616, 6426, 339, 9681, 9068, 3002, 2216,
+ 3208, 3042, 8255, -604, 16133, 5171, 17641, 18769,
+ -2529, -3248, -1447, -1991, 15511, 14855, 11631, 11996,
+ 9654, -124, 7267, -1617, 12799, 3237, 10598, 1555,
+ 5510, -1775, 1149, -2292, 12659, 12425, 4382, -1814,
+ 6305, 5629, 3404, -2632, 19555, 9582, 7835, 7619,
+ -517, -3795, 19031, 11574, 19156, 18748, 23563, 23465,
+};
+/*------------------------------------------------------------------------------*
+ * SWB BWE tables
+ *------------------------------------------------------------------------------*/
+
+const Word16 swb_bwe_trans_subband[SWB_FENV_TRANS+1] = {240, 316, 392, 476, 560}; // Q0
+const Word16 swb_bwe_trans_subband_width[SWB_FENV_TRANS] = {76, 76, 84, 84}; // Q0
+
+const Word16 sqrt_swb_bwe_trans_subband_width_fx[SWB_FENV_TRANS] = { 17854, 17854, 18770, 18770 };/*Q11 */
+
+const Word16 sqrt_swb_bwe_subband_fx_L1[SWB_FENV] = { 16384, 20066, 16384, 20066, 16384, 20066, 16384, 20066, 20066, 20066, 20066, 20066, 23170, 23170 }; /*Q12 */
+
+const Word16 sqrt_swb_bwe_subband_fx_L2[SWB_FENV / 2] = { 25905, 25905, 25905, 25905, 28378, 28378, 32767 }; /*Q12 */
+
+const Word16 swb_bwe_subband[SWB_FENV+1] = {240, 256, 280, 296, 320, 336, 360, 376, 400, 424, 448, 472, 496, 528, 560}; // Q0
+const Word16 fb_bwe_subband[DIM_FB + 1] = { 640, 680, 720, 800 }; // Q0
+const Word16 fb_bwe_sm_subband[DIM_FB] = { 656, 696, 760 }; // Q0
+const Word16 swb_inv_bwe_subband_width_fx[SWB_FENV] = { 2048,1365,2048,1365,2048,1365,2048,1365,1365,1365,1365,1365,1024,1024 };//Q15
+const Word16 swb_bwe_sm_subband[SWB_FENV] = {248, 268, 288, 308, 328, 348, 368, 388, 412, 436, 460, 484, 512, 544}; // Q0
+const Word16 smooth_factor_fx[SWB_FENV - 1] = { 1638, 1638, 1638, 1638, 1638, 1638, 1638, 1366, 1366, 1366, 1366, 1024, 1024 };//Q15
+
+const Word16 fb_bwe_subband_float[DIM_FB+1] = {640, 680, 720, 800}; // Q0
+const Word16 fb_inv_bwe_subband_width_fx[DIM_FB] = { 819, 819, 409 };//Q15
+const Word16 fb_bwe_sm_subband_float[DIM_FB] = {656, 696, 760}; // Q0
+const Word16 fb_smooth_factor_fx[DIM_FB] = { 1024, 819, 512 };//Q15
+
+
+const Word16 EnvCdbk11_fx[N_CB11 * DIM11] = /*Q8 */
+{
+ -2220, 29, 1168, 2124, 2180, 1208, 741,
+ 1521, -312, -843, -1523, -1970, -2205, -2541,
+ 746, 1835, 3461, 4398, 4292, 4184, 3462,
+ 1627, 2475, 2937, 2839, 2198, 1729, 1325,
+ -514, -731, -557, -200, 100, 475, 540,
+ 655, 956, 1272, 1083, 774, 687, 459,
+ 5987, 5460, 4689, 4192, 3845, 3615, 3393,
+ 3571, 4840, 5784, 6266, 5933, 5158, 4433,
+ 2959, 2087, 1180, 979, 1180, 1371, 1636,
+ 6029, 6157, 6431, 6762, 6998, 7153, 7050,
+ -822, 210, 450, 178, -639, -1346, -1577,
+ 4451, 4184, 4111, 4329, 4833, 5232, 5512,
+ 3420, 3994, 4321, 4205, 3684, 3154, 2651,
+ -3734, -2305, -1388, -324, 22, -847, -1141,
+ 850, 510, 896, 1780, 2130, 2688, 2826,
+ 3294, 2823, 2510, 2516, 3029, 3413, 3843,
+ -3563, -3409, -3199, -2917, -2584, -2282, -1981,
+ -2738, -3185, -3752, -4320, -4484, -4524, -4329,
+ -7534, -7481, -7283, -7175, -6757, -6281, -5865,
+ -4868, -4836, -4603, -4422, -4086, -3738, -3323,
+ -13896, -13775, -13484, -13339, -12926, -12399, -11970,
+ 8409, 8420, 8305, 8103, 7954, 7778, 7496,
+ 7180, 6845, 6369, 5971, 5557, 5309, 5027,
+ 4633, 4008, 3267, 2422, 2072, 1778, 1510,
+ 10128, 10432, 10540, 10473, 10176, 9837, 9586,
+ 2933, 2695, 2060, 1286, 424, -254, -825,
+ -10032, -9847, -9544, -9420, -9000, -8508, -8084,
+ 1830, 927, -158, -388, -360, -368, -287,
+ -21962, -21904, -21548, -21471, -21004, -20511, -20064,
+ -6090, -6142, -5937, -5852, -5493, -5104, -4671,
+ -1382, -1640, -2205, -2557, -2785, -3019, -2994,
+ -1300, -1567, -1744, -1642, -1409, -1080, -902,
+};
+
+const Word16 EnvCdbk1st_fx[N_CB1ST * DIM1ST] = /*Q8 */
+{
+ -1819, -1138, 751,
+ -494, 162, -826,
+ -3199, -123, 2479,
+ -2071, 238, -429,
+ -1819, 1780, 1233,
+ 284, 1187, -1123,
+ -1689, -722, -484,
+ -1256, 52, -1336,
+ -604, 3738, -1297,
+ 555, 412, 743,
+ -626, -1685, 1527,
+ 145, 1557, -224,
+ -638, 1370, 1589,
+ -1188, 37, -410,
+ -428, -3320, 1860,
+ 2597, -95, -2876,
+ -742, -583, -684,
+ 1607, -1671, -1874,
+ -1111, -936, -1374,
+ 275, -2314, 518,
+ 2682, 2368, -302,
+ 1809, -555, -579,
+ 3193, -1270, -1208,
+ 750, 84, 154,
+ -1160, 429, 1098,
+ 816, -613, -2897,
+ 2159, -1885, 1245,
+ -671, 426, 3177,
+ 867, -144, -639,
+ 843, -1888, 2271,
+ 1542, 259, -148,
+ -1680, 1027, 285,
+ 162, -763, 1666,
+ -1916, 1175, -1227,
+ -345, -907, -151,
+ 1979, 1062, 402,
+ -1231, 2437, 3130,
+ -2422, 361, 1040,
+ -4314, -4106, -4221,
+ 146, -1200, -1828,
+ 485, 889, -3847,
+ 384, -2461, -2845,
+ 1526, -600, 1599,
+ -838, -571, 1097,
+ 1776, -3393, 4058,
+ -3330, 2429, 1732,
+ 468, -2140, -934,
+ 833, 2292, -1129,
+ -20, -1029, 652,
+ -346, 168, 1834,
+ -1730, 838, 2234,
+ 1622, -1695, -194,
+ -3198, -773, 228,
+ 1070, 1741, 285,
+ 1655, -212, -1628,
+ 2178, 604, 1784,
+ 1801, -3224, -848,
+ -819, 348, 187,
+ 16, 300, 244,
+ 769, 201, 1554,
+ 719, -394, 780,
+ 311, 2853, 185,
+ 1163, 489, -1022,
+ -330, 459, 877,
+ 109, -541, -691,
+ -509, -267, 478,
+ -340, -417, -1403,
+ -860, -675, -2703,
+ 1025, 826, 250,
+ -1043, 1008, -434,
+ -1042, -631, 60,
+ -173, 332, -2084,
+ 984, 919, -2042,
+ -1257, -2287, 339,
+ 366, -1309, -158,
+ 1041, 1039, 1083,
+ 3566, 918, 227,
+ 62, -139, 936,
+ 2424, 730, -1022,
+ -745, 1954, 427,
+ -1091, -1358, -478,
+ -173, 2121, -2367,
+ -2175, 2535, -1946,
+ -880, -1964, -1549,
+ -249, -1203, -927,
+ -2377, -443, -1775,
+ -1439, -582, 2037,
+ -529, -3679, -550,
+ 608, -284, -1566,
+ 201, 63, -344,
+ 1376, 218, 816,
+ 2471, -348, 479,
+ -1388, 988, -2674,
+ 1429, -3538, 1125,
+ 864, -1351, 845,
+ 301, 977, 408,
+ -1122, 3364, 1107,
+ -213, 730, -329,
+ 839, -683, -92,
+ 631, 1172, 2364,
+ 598, 685, -329,
+ -780, -1317, 448,
+ -424, -153, -199,
+ 768, -331, 2825,
+ 882, -1047, -975,
+ -375, -1835, -299,
+ 2861, -3375, -3158,
+ 2099, 2168, -2630,
+ 1602, 1930, 1451,
+ 1294, 1265, -586,
+ -2500, -2570, -2667,
+ -806, -1529, 3272,
+ -522, 1072, 478,
+ 4035, -2491, 480,
+ -1908, 2414, -178,
+ -1563, -143, 438,
+ 205, 861, 1287,
+ -691, 963, -1374,
+ -2359, -2032, -886,
+ 162, -442, 160,
+ 194, 2494, 1960,
+ -2533, -2578, 1924,
+ 267, 1701, 937,
+ 2919, 2950, 2382,
+ -670, 2102, -859,
+ -3147, 1385, -215,
+ 1482, -595, 415,
+ 228, 290, -1060,
+};
+
+const Word16 EnvCdbk2nd_fx[N_CB2ND * DIM2ND] = /*Q8 */
+{
+ 1104, -1833, -1110, -954,
+ 757, 853, -176, 286,
+ -873, -587, -7, 1458,
+ -462, -553, -350, 104,
+ 1938, 1957, -1340, -703,
+ 1202, -779, 21, 1996,
+ -2851, -169, 1049, 940,
+ -1355, -726, -1788, 1076,
+ -767, -641, -646, -880,
+ 135, -832, -197, -889,
+ -826, 3, 279, -502,
+ -714, 544, -526, 375,
+ 291, -1076, -816, -3929,
+ -1175, -475, 2219, -642,
+ 197, -219, -1052, -1601,
+ 1175, -162, -695, -336,
+ 1124, 126, -2326, -1573,
+ 1164, -1323, -1958, 1074,
+ -2080, -2152, 113, 649,
+ -637, -860, 721, 267,
+ -609, 1658, -1006, -1352,
+ 1631, 2225, 2128, 1827,
+ -1112, -1351, 1856, 1656,
+ -2132, 1006, 770, -1294,
+ -472, 776, 1661, 2248,
+ -121, -574, -1481, -316,
+ 2565, -1081, 188, 293,
+ 398, 2598, 704, -1129,
+ 1023, 104, 550, 499,
+ -416, 127, 253, -1894,
+ 456, -2578, 190, 1018,
+ -1488, 286, -1202, -915,
+ -1164, 1874, 1651, 302,
+ -1312, -1547, -1625, -1516,
+ 170, -233, 817, 1209,
+ -1090, 341, 709, 725,
+ 854, 819, -278, -1083,
+ -15, 113, 286, 283,
+ 1166, -906, 1880, 301,
+ 342, -7, -587, 776,
+ -785, -1259, -1166, 3194,
+ -1630, -1071, 300, -1080,
+ -12, 190, -538, -493,
+ 351, 907, 1929, -1534,
+ 480, 36, 593, -526,
+ 813, 1216, 986, 89,
+ 98, 1010, -2272, 268,
+ 2766, -102, -1307, -873,
+ -1660, -467, -365, 47,
+ 1496, 1277, -228, -2791,
+ 1565, -669, 520, -1598,
+ -361, 1078, 457, -364,
+ 543, -950, 28, 248,
+ 1904, 815, -1034, 1125,
+ -13, -1951, 1085, -1005,
+ -2223, 1519, -624, 857,
+ 1121, 831, 872, 1295,
+ 193, 2284, -422, 609,
+ -156, 827, -733, 2065,
+ -3390, -3384, -3197, -3220,
+ 31, 896, 539, 978,
+ -21, 408, 1502, 405,
+ -583, -1662, -665, -164,
+ 2193, 976, 613, -436,
+};
+
+const Word16 EnvCdbk3rd_fx[N_CB3RD * DIM3RD] = /*Q8 */
+{
+ 1031, -2454, 748,
+ 2770, 2442, 1761,
+ -2348, 4079, -959,
+ 1874, -735, -2242,
+ -59, 35, 201,
+ -1518, 162, 1809,
+ -1977, -1063, -103,
+ 2485, 1212, -863,
+ 882, 192, 39,
+ 1356, 851, 979,
+ -1377, -2961, -1477,
+ 497, -808, 593,
+ -394, -748, -1564,
+ -950, -198, -436,
+ -503, -1420, -234,
+ 318, 985, -1905,
+ -118, 1783, 1563,
+ 220, 929, 400,
+ 857, 37, -995,
+ -807, 1943, -409,
+ -743, -524, 552,
+ 940, 1643, -299,
+ 805, -1421, -768,
+ -2330, 705, 156,
+ 61, 203, 1213,
+ -138, 517, -642,
+ 64, -501, -435,
+ 2194, -625, 157,
+ -1600, 341, -1611,
+ 1137, -351, 2353,
+ -811, -1715, 1522,
+ -870, 613, 446,
+};
+
+const Word16 EnvCdbk4th_fx[N_CB4TH * DIM4TH] = /*Q8 */
+{
+ 1024, -210, -207, 591,
+ -280, -2486, -951, 958,
+ 1539, 1136, 411, 1314,
+ 1761, -202, 1339, 203,
+ -2438, -2109, -2028, -2125,
+ 1849, -1408, -670, 144,
+ -469, 2674, -1589, -3604,
+ 1642, -702, 139, 2476,
+ -483, 372, -861, 540,
+ -119, 827, 863, 952,
+ 23, 99, -24, -303,
+ 488, -2233, -1432, -1399,
+ 54, -43, 96, -1527,
+ 1170, 133, -119, -717,
+ 258, -1215, -439, 160,
+ -1049, 793, 970, -770,
+ -1914, -1245, 1281, 422,
+ -1194, 1005, 176, -2368,
+ -1631, 1316, -1125, -361,
+ 1124, 1132, 61, -2186,
+ 790, -2055, 1174, 938,
+ 2974, 3874, 2315, 2040,
+ -300, 2484, 59, -860,
+ 543, 1307, -1868, -725,
+ 389, -115, -945, -146,
+ -1837, -578, -620, 975,
+ 389, 1779, 1732, 296,
+ 377, 897, 1555, 2269,
+ -854, 26, 590, 1413,
+ -780, -985, 1389, 2639,
+ 312, -277, -935, -3289,
+ 1740, 1852, 641, -519,
+ 738, 898, -466, 115,
+ 1187, -286, -1514, -1309,
+ 74, -801, -583, -987,
+ 510, -667, 430, -191,
+ 418, -303, 806, 1258,
+ -1083, -1065, 362, -2114,
+ -1075, 82, 260, 286,
+ -2579, 14, 75, -854,
+ -661, -634, 482, -581,
+ -338, -306, 3255, 388,
+ -230, -24, 1161, 205,
+ 256, 546, -141, 1379,
+ -63, -775, -484, 1478,
+ -517, -546, -451, 86,
+ 1473, -1201, 430, -1892,
+ 394, 831, 620, -664,
+ 334, 64, 1773, -1576,
+ -1783, 1270, 1020, 944,
+ 1023, 98, -1908, 1330,
+ -560, -1044, 380, 707,
+ -427, -708, -1815, -90,
+ -54, 2298, -537, 1151,
+ -499, 703, -1018, 3322,
+ 92, 717, -607, -1032,
+ -1313, -1393, -580, -485,
+ 34, -2192, 788, -860,
+ 2641, 628, -776, -259,
+ -702, -159, -1483, -1638,
+ -33, -63, 97, 553,
+ 692, 523, 548, 349,
+ -913, 54, -456, -702,
+ -341, 944, 157, 100,
+};
+
+
+const Word16 EnvCdbkFB_fx[N_CB_FB * DIM_FB] = /*Q7 */
+{
+ -2126, -1242, -945,
+ 1628, -686, -539,
+ 1230, 2245, 2532,
+ 2822, 3094, 2669,
+ -12376, -11507, -11342,
+ 2678, 3533, 3510,
+ 489, 903, 689,
+ 1930, 2929, 3025,
+ 3424, 4179, 4050,
+ -2500, -1707, -1415,
+ -3511, -2563, -2224,
+ -865, -987, -1212,
+ -424, 891, 1919,
+ 1976, 2520, 2277,
+ 673, 1667, 1945,
+ 5169, 6024, 5983,
+ -1367, -501, -236,
+ -254, 679, 989,
+ -18974, -18088, -17834,
+ -23007, -22053, -22109,
+ 2262, 2301, -625,
+ -124, 431, 372,
+ 1454, 1962, 1791,
+ 200, 1094, 1347,
+ -997, -110, 213,
+ -697, 267, 602,
+ -3066, -2172, -1876,
+ -4358, -3493, -3164,
+ -360, 59, -472,
+ -1813, -919, -601,
+ 4204, 4967, 4913,
+ 953, 1457, 1245
+};
+
+const Word16 Mean_env_fb_fx[DIM_FB] = { 1760, 805, 473 }; /*Q8 */
+
+const Word16 w_NOR_fx[SWB_FENV] = /*Q15 */
+{
+ 32767, 32056, 31374, 30720, 30093, 29491, 28913,
+ 28357, 27822, 27307, 26810, 26331, 25869, 25423,
+};
+const Word16 Mean_env_fx[SWB_FENV] = /*Q8 */
+{
+ 7327, 7414, 7181, 7160, 6889, 6866, 6746,
+ 6651, 6385, 6152, 5873, 5668, 5435, 5222,
+};
+
+const Word16 Env_TR_Cdbk1_fx[N_CB_TR1 * DIM_TR1] = /*Q8 */
+{
+ 229, -2347,
+ 8199, 7726,
+ -312, 1700,
+ 9881, 5949,
+ 8942, 8358,
+ 3865, 3287,
+ 2405, 796,
+ 3664, 1433,
+ 3059, 2215,
+ 618, 874,
+ -5479, -4636,
+ 2237, 2512,
+ 4265, 2428,
+ 6583, 2065,
+ 4548, 6579,
+ 11325, 7340,
+ 10578, 9264,
+ 8491, 6457,
+ -1380, -2484,
+ 3377, 5069,
+ 7393, 5120,
+ 4798, 4440,
+ 5506, 7614,
+ -3371, -3982,
+ 2806, 2959,
+ 2242, 3550,
+ 1334, 3065,
+ 2055, -1350,
+ 815, 5507,
+ 4940, 1457,
+ -1950, -1046,
+ 653, -1133,
+ 872, -3622,
+ -1756, 245,
+ 5792, 5542,
+ 4084, 7696,
+ 4569, 5204,
+ -810, -1555,
+ 10127, 10384,
+ 11341, 11713,
+ 6365, 4996,
+ 8641, 10527,
+ 5914, 3366,
+ 4522, 3266,
+ 5217, 2830,
+ 8107, 8980,
+ 3952, 5858,
+ 5848, 8990,
+ 6424, 5931,
+ 5185, 3823,
+ 6367, 6917,
+ 3548, 2683,
+ 1634, 2098,
+ 2729, -89,
+ 6964, 7664,
+ 3179, 3561,
+ 6388, 4193,
+ 4024, 4828,
+ -378, 434,
+ 9338, 9507,
+ 7593, 3483,
+ -6835, -6317,
+ 5207, 5029,
+ 11326, 10488,
+ 7411, 6086,
+ 10072, 8255,
+ -6099, -5652,
+ 7074, 8702,
+ -12228, -11384,
+ -11471, -10567,
+ -13025, -12253,
+ -12879, -11289,
+ -13952, -13062,
+ -16214, -15389,
+ -11659, -10789,
+ -12351, -11477,
+ -12789, -11947,
+ -15139, -14249,
+ -11326, -11219,
+ -11950, -11093,
+ -11800, -10928,
+ -23738, -22881,
+ 12795, 11890,
+ -3793, -2879,
+ -27373, -26492,
+ -11928, -11531,
+ -12110, -11258,
+ -20492, -19634,
+ -14371, -13608,
+ -12591, -11728,
+ -14055, -11739,
+ 9471, 7272,
+ -11184, -10335,
+ -13313, -11673,
+ -12209, -10610,
+ -13465, -12761,
+ 7690, 7115,
+ 2564, 4496,
+ 5587, 4551,
+ -813, -562,
+ -4483, -5521,
+ 1556, 98,
+ 2, 3468,
+ 1410, 1339,
+ 4049, 161,
+ -4538, -4026,
+ -9866, -9115,
+ -1616, -4727,
+ 2457, 1653,
+ 631, 2155,
+ -17982, -17082,
+ 2628, 6088,
+ -10791, -9933,
+ -12426, -11566,
+ 4322, 4000,
+ -1574, 2162,
+ -7968, -7599,
+ 1523, 4192,
+ 5621, 6537,
+ -2511, -1987,
+ 12471, 9218,
+ 8746, 4971,
+ 3642, 4148,
+ 5089, 5948,
+ 350, -92,
+ 7028, 6683,
+ -2430, -3216,
+ -3974, -886,
+};
+
+const Word16 Env_TR_Cdbk2_fx[N_CB_TR2 * DIM_TR2] = /*Q8 */
+{
+ 2639, 375,
+ -481, 1694,
+ -2400, -3306,
+ 86, -4018,
+ -1301, 47,
+ 734, 299,
+ 957, -1039,
+ 2204, 1486,
+ 361, -1136,
+ 2628, -838,
+ -2010, 1296,
+ 373, 127,
+ -573, 2604,
+ 689, -1554,
+ 1676, -371,
+ 1298, 279,
+ -901, 1086,
+ 1747, -2723,
+ 214, -657,
+ -731, -909,
+ 1545, -1658,
+ -369, -2208,
+ -1276, 1748,
+ 1141, -522,
+ 186, -1893,
+ -1260, -2016,
+ -478, -504,
+ 1287, 1882,
+ -97, -1400,
+ -1372, -1165,
+ 800, -152,
+ 413, -240,
+ -208, -858,
+ -90, -399,
+ 492, 2519,
+ 913, 1368,
+ -344, 282,
+ 305, 526,
+ -251, 860,
+ -1066, 567,
+ -2800, -687,
+ 1, 674,
+ 176, 878,
+ -716, -153,
+ 706, 831,
+ -1083, -424,
+ 419, 1192,
+ -132, 565,
+ 708, -2406,
+ 600, -661,
+ 1712, 2969,
+ -1974, 379,
+ -672, 208,
+ 26, 296,
+ -1821, -501,
+ -513, 635,
+ 266, 1737,
+ -221, 1232,
+ -3498, 1632,
+ -337, -66,
+ -552, -1427,
+ 1329, 850,
+ -718, -2948,
+ -3, 0,
+};
+
+const Word16 Mean_env_tr_fx[5] = { 6971, 6095, 6111, 4995 }; /*Q8 */
+
+/*------------------------------------------------------------------------------*
+ * LR MDCT SWB BWE coding tables
+ *------------------------------------------------------------------------------*/
+
+
+const Word16 gain_table_SWB_BWE_fx[NB_SWB_SUBBANDS] = { -6554/*-0.4f*/, 1638/*0.1f*/, 9830/*0.6f*/, 18022/*1.1f*/ }; /* Q14 */
+
+const Word16 bits_lagIndices_modeNormal[NB_SWB_SUBBANDS] = {2, 2, 1, 1}; // Q0
+const Word16 subband_offsets_12KBPS[NB_SWB_SUBBANDS] = {SWB_SB_OFF0_12KBPS, SWB_SB_OFF1_12KBPS, SWB_SB_OFF2_12KBPS, SWB_SB_OFF3_12KBPS}; // Q0
+const Word16 subband_offsets_16KBPS[NB_SWB_SUBBANDS] = {SWB_SB_OFF0_16KBPS, SWB_SB_OFF1_16KBPS, SWB_SB_OFF2_16KBPS, SWB_SB_OFF3_16KBPS}; // Q0
+
+/* Search offset for the subbands that use a partial search */
+const Word16 subband_search_offsets[NB_SWB_SUBBANDS] =
+{
+ 0, 0, 64, 64
+}; // Q0
+
+
+
+/* SPT : shorten subband length table */
+const Word16 bw_SPT_tbl[2][SPT_SHORTEN_SBNUM]=
+{
+ {15, 31, 31, 31}, /* 13.2kbps: original band_width 53, 66, 82, 102 */
+ {15, 15, 31, 31} /* 16.4kbps: original band_width 51 64, 80, 90 */
+};
+
+
+/* Harmonic Mode */
+const Word16 bits_lagIndices_mode0_Har[NB_SWB_SUBBANDS_HAR_SEARCH_SB] = {1,1}; // Q0
+
+
+/* 13.2 kbps */
+const Word16 subband_offsets_sub5_13p2kbps_Har[NB_SWB_SUBBANDS_HAR] =
+{
+ SWB_SB_OFF0_SUB5_12KBPS_HAR, SWB_SB_OFF1_SUB5_12KBPS_HAR, SWB_SB_OFF2_SUB5_12KBPS_HAR, SWB_SB_OFF3_SUB5_12KBPS_HAR
+}; // Q0
+
+/* Search offset for the subbands that use a partial search */
+const Word16 subband_search_offsets_13p2kbps_Har[NB_SWB_SUBBANDS_HAR_SEARCH_SB] =
+{
+ 120, 210
+}; // Q0
+
+/* 16.4 kbps */
+const Word16 subband_offsets_sub5_16p4kbps_Har[NB_SWB_SUBBANDS_HAR] =
+{
+ SWB_SB_OFF0_SUB5_16KBPS_HAR, SWB_SB_OFF1_SUB5_16KBPS_HAR, SWB_SB_OFF2_SUB5_16KBPS_HAR, SWB_SB_OFF3_SUB5_16KBPS_HAR
+}; // Q0
+
+/* Search offset for the subbands that use a partial search */
+const Word16 subband_search_offsets_16p4kbps_Har[NB_SWB_SUBBANDS_HAR_SEARCH_SB] =
+{
+ 120, 210
+}; // Q0
+
+
+/*------------------------------------------------------------------------------*
+ * HQ core tables
+ *------------------------------------------------------------------------------*/
+const Word16 wscw16q15_fx[240] =/*Q15 */
+{
+ -32768, -32766, -32764, -32759, -32754, -32747, -32738, -32729, -32717, -32705, -32691,
+ -32675, -32658, -32640, -32621, -32600, -32577, -32553, -32528, -32501, -32473, -32444,
+ -32413, -32381, -32348, -32313, -32276, -32239, -32200, -32159, -32117, -32074, -32029,
+ -31984, -31936, -31887, -31837, -31786, -31733, -31679, -31624, -31567, -31508, -31449,
+ -31388, -31326, -31262, -31197, -31131, -31063, -30994, -30924, -30853, -30780, -30705,
+ -30630, -30553, -30475, -30395, -30315, -30232, -30149, -30064, -29979, -29891, -29803,
+ -29713, -29622, -29530, -29436, -29341, -29245, -29148, -29049, -28949, -28848, -28746,
+ -28642, -28537, -28431, -28324, -28216, -28106, -27995, -27883, -27770, -27655, -27540,
+ -27423, -27305, -27186, -27066, -26944, -26821, -26698, -26573, -26447, -26320, -26191,
+ -26062, -25931, -25800, -25667, -25533, -25398, -25262, -25125, -24986, -24847, -24707,
+ -24565, -24423, -24279, -24135, -23989, -23843, -23695, -23546, -23397, -23246, 23095,
+ 22942, 22788, 22634, 22478, 22322, 22164, 22006, 21846, 21686, 21525, 21363,
+ 21199, 21035, 20871, 20705, 20538, 20371, 20202, 20033, 19863, 19692, 19520,
+ 19347, 19174, 18999, 18824, 18648, 18472, 18294, 18116, 17937, 17757, 17576,
+ 17395, 17213, 17030, 16846, 16662, 16477, 16291, 16105, 15917, 15730, 15541,
+ 15352, 15162, 14972, 14781, 14589, 14397, 14204, 14010, 13816, 13621, 13426,
+ 13230, 13033, 12836, 12639, 12441, 12242, 12043, 11843, 11643, 11442, 11241,
+ 11039, 10837, 10634, 10431, 10228, 10024, 9819, 9615, 9409, 9204, 8998,
+ 8791, 8585, 8377, 8170, 7962, 7754, 7545, 7336, 7127, 6918, 6708,
+ 6498, 6288, 6077, 5866, 5655, 5444, 5232, 5020, 4808, 4596, 4383,
+ 4171, 3958, 3745, 3532, 3319, 3105, 2892, 2678, 2464, 2250, 2036,
+ 1822, 1608, 1394, 1179, 965, 751, 536, 322, 107
+};
+const Word16 wscw16q15_8_fx[40] =/*Q15 */
+{
+ -32762, -32711, -32610, -32459, -32258, -32007, -31706, -31357,
+ -30959, -30514, -30022, -29483, -28899, -28270, -27598, -26883,
+ -26127, -25330, -24494, -23621, 22711, 21766, 20788, 19777,
+ 18736, 17666, 16569, 15447, 14300, 13132, 11943, 10736,
+ 9512, 8274, 7022, 5760, 4490, 3212, 1929, 643
+};
+const Word16 wscw16q15_16_fx[80] =/*Q15 */
+{
+ -32766, -32754, -32729, -32691, -32640, -32577, -32501, -32413,
+ -32313, -32200, -32074, -31936, -31786, -31624, -31449, -31262,
+ -31063, -30853, -30630, -30395, -30149, -29891, -29622, -29341,
+ -29049, -28746, -28431, -28106, -27770, -27423, -27066, -26698,
+ -26320, -25931, -25533, -25125, -24707, -24279, -23843, -23397,
+ 22942, 22478, 22006, 21525, 21035, 20538, 20033, 19520,
+ 18999, 18472, 17937, 17395, 16846, 16291, 15730, 15162,
+ 14589, 14010, 13426, 12836, 12242, 11643, 11039, 10431,
+ 9819, 9204, 8585, 7962, 7336, 6708, 6077, 5444,
+ 4808, 4171, 3532, 2892, 2250, 1608, 965, 322
+};
+const Word16 wscw16q15_32_fx[160] =/*Q15 */
+{
+ -32768, -32764, -32758, -32749, -32736, -32720, -32701, -32679, -32654, -32626, -32594,
+ -32559, -32522, -32481, -32437, -32389, -32339, -32286, -32229, -32169, -32107, -32041,
+ -31972, -31900, -31825, -31747, -31665, -31581, -31494, -31403, -31310, -31214, -31114,
+ -31012, -30906, -30798, -30687, -30572, -30455, -30335, -30212, -30086, -29957, -29825,
+ -29690, -29553, -29412, -29269, -29123, -28974, -28823, -28668, -28511, -28351, -28188,
+ -28023, -27855, -27684, -27511, -27335, -27156, -26975, -26791, -26604, -26415, -26223,
+ -26029, -25833, -25633, -25432, -25228, -25021, -24812, -24601, -24387, -24171, -23953,
+ -23732, -23509, -23284, 23056, 22827, 22595, 22361, 22125, 21886, 21646, 21403,
+ 21159, 20912, 20663, 20413, 20160, 19905, 19649, 19390, 19130, 18868, 18604,
+ 18338, 18071, 17802, 17531, 17258, 16984, 16708, 16430, 16151, 15871, 15588,
+ 15305, 15019, 14733, 14445, 14155, 13865, 13572, 13279, 12984, 12688, 12391,
+ 12093, 11793, 11492, 11191, 10888, 10584, 10279, 9973, 9666, 9358, 9049,
+ 8740, 8429, 8118, 7806, 7493, 7180, 6865, 6550, 6235, 5919, 5602,
+ 5285, 4967, 4649, 4330, 4011, 3692, 3372, 3052, 2731, 2411, 2090,
+ 1768, 1447, 1126, 804, 483, 161
+};
+
+/* Codebook for quantization of norms */
+const Word32 dicn_fx[40] = /* Q=14 */
+{
+ 2147483647, 1518500224,
+ 1073741824, 759250112,
+ 536870912, 379625056,
+ 268435456, 189812528,
+ 134217728, 94906264,
+ 67108864, 47453132,
+ 33554432, 23726566,
+ 16777216, 11863283,
+ 8388608, 5931642,
+ 4194304, 2965821,
+ 2097152, 1482910,
+ 1048576, 741455,
+ 524288, 370728,
+ 262144, 185364,
+ 131072, 92682,
+ 65536, 46341,
+ 32768, 23170,
+ 16384, 11585,
+ 8192, 5793,
+ 4096, 2896
+};
+
+const Word32 dicn_pg_fx[45] = /* Q12 */
+{
+ 536870912, 451452834, 379625056, 319225344, 268435456,
+ 225726416, 189812528, 159612672, 134217728, 112863208,
+ 94906264, 67108864, 47453132, 33554432, 23726566,
+ 16777216, 11863283, 8388608, 5931641, 4194304,
+ 2965821, 2097152, 1482910, 1048576, 741455,
+ 524288, 370728, 262144, 185364, 131072,
+ 92682, 65536, 46341, 32768, 23170,
+ 16384, 11585, 8192, 5793, 4096,
+ 2896, 2048, 1448, 1024, 724
+};
+const Word16 expPkEnrg_tbl[45] =
+{
+ 0, 0, 0, 0, 0, 2, 2, 2, 2,
+ 4, 4, 4, 6, 6, 8, 8, 10, 10,
+ 12, 12, 14, 14, 16, 16, 18, 18, 20,
+ 20, 22, 22, 24, 24, 26, 26, 28, 28,
+ 30, 30, 32, 32, 34, 34, 36, 36, 38
+}; // Q0
+
+const Word32 manPkEnrg_tbl[45] =
+{
+ 2147483646, 1518500308, 1073741787, 759250076, 536870912,
+ 1518500294, 1073741787, 759250076, 536870912, 1518500294,
+ 1073741787, 536870912, 1073741787, 536870912, 1073741787,
+ 536870912, 1073741787, 536870912, 1073741606, 536870912,
+ 1073741968, 536870912, 1073741244, 536870912, 1073741244,
+ 536870912, 1073744140, 536870912, 1073744140, 536870912,
+ 1073744140, 536870912, 1073744140, 536870912, 1073697800,
+ 536870912, 1073697800, 536870912, 1073883168, 536870912,
+ 1073512448, 536870912, 1073512448, 536870912, 1073512448
+}; // Q0
+const Word32 E_max5_tbl[40] =
+{
+ 2047999999, 1448154663, 1024000000, 1448154663, 1024000000,
+ 1448154663, 1024000000, 1448154663, 1024000000, 1448154663,
+ 1024000000, 1448154663, 1024000000, 1448154663, 1024000000,
+ 1448154663, 1024000000, 1448154785, 1024000000, 1448154785,
+ 1024000000, 1448154296, 1024000000, 1448154296, 1024000000,
+ 1448156250, 1024000000, 1448156250, 1024000000, 1448156250,
+ 1024000000, 1448156250, 1024000000, 1448125000, 1024000000,
+ 1448125000, 1024000000, 1448250000, 1024000000, 1448000000
+}; // Q0
+
+
+const Word16 resize_huffsizn[32] =
+{
+ 0, 0, 0, 0, 0, 11, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2,
+ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, 0
+}; // Q0
+
+const Word16 huffsizn[32] =
+{
+ 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 4, 4, 3, 3,
+ 3, 3, 4, 4, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7
+}; // Q0
+
+const Word16 huffnorm_tran[32] =
+{
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,122, 10, 6, 1,
+ 0, 3, 2, 26, 58, 186, 442, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+}; // Q0
+
+const Word16 huffsizn_tran[32] =
+{
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 5, 3, 2, 2,
+ 2, 4, 6, 8, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+}; // Q0
+
+const Word16 pgain_huffsizn[32] =
+{
+ 10, 11, 10, 10, 9, 8, 6, 5, 5, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 5, 5, 6, 7, 7, 8, 10, 10, 12, 12
+}; // Q0
+
+const Word16 dicnlg2_float[40] =
+{
+ 34, 33, 32, 31, 30, 29, 28, 27, 26, 25,
+ 24, 23, 22, 21, 20, 19, 18, 17, 16, 15,
+ 14, 13, 12, 11, 10, 9, 8, 7, 6, 5,
+ 4, 3, 2, 1, 0, -1, -2, -3, -4, -5
+}; // Q0
+
+/*** Table for quantization of MLT coefficients ***/
+const Word16 norm_order_48[NB_SFM] =
+{
+ 0, 1, 8, 9, 16, 20, 24, 28, 32, 36, 40, 41, 37, 33, 29, 25, 21, 17, 11, 10, 3, 2,
+ 4, 5, 12, 13, 18, 22, 26, 30, 34, 38, 42, 43, 39, 35, 31, 27, 23, 19, 15, 14, 7, 6
+}; // Q0
+
+const Word16 norm_order_32[SFM_N_SWB] =
+{
+ 0, 1, 8, 9, 16, 20, 24, 28, 32, 36, 37, 33, 29, 25, 21, 17, 11, 10, 3, 2,
+ 4, 5, 12, 13, 18, 22, 26, 30, 34, 38, 35, 31, 27, 23, 19, 15, 14, 7, 6
+}; // Q0
+
+const Word16 norm_order_16[SFM_N_WB] =
+{
+ 0, 1, 8, 9, 16, 20, 24, 21, 17, 11, 10, 3, 2,
+ 4, 5, 12, 13, 18, 22, 25, 23, 19, 15, 14, 7, 6
+}; // Q0
+
+const Word16 intl_bw_16[N_INTL_GRP_16] = {16, 16}; // Q0
+const Word16 intl_bw_32[N_INTL_GRP_32] = {16, 24}; // Q0
+const Word16 intl_bw_48[N_INTL_GRP_48] = {16, 24, 32}; // Q0
+
+const Word16 intl_cnt_16[N_INTL_GRP_16] = {4, 1}; // Q0
+const Word16 intl_cnt_32[N_INTL_GRP_32] = {4, 4}; // Q0
+const Word16 intl_cnt_48[N_INTL_GRP_48] = {4, 3, 2}; // Q0
+
+const Word16 band_start_HQ[44] =
+{
+ 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88,
+ 96, 104, 112, 120, 128, 144, 160, 176, 192, 208, 224, 240,
+ 256, 280, 304, 328, 352, 376, 400, 424, 448, 472, 496, 520,
+ 544, 576, 608, 640, 672, 704, 736, 768
+}; // Q0
+
+const Word16 band_end_HQ[44] =
+{
+ 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96,
+ 104, 112, 120, 128, 144, 160, 176, 192, 208, 224, 240, 256,
+ 280, 304, 328, 352, 376, 400, 424, 448, 472, 496, 520, 544,
+ 576, 608, 640, 672, 704, 736, 768, 800
+}; // Q0
+
+const Word16 band_len_HQ[44] =
+{
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 16, 16,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 32, 32, 32, 32, 32, 32, 32, 32
+}; // Q0
+
+const Word16 band_start_wb[26] =
+{
+ 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88,
+ 96, 104, 112, 120, 128, 144, 160, 176, 192, 208, 224, 240,
+ 256, 288
+}; // Q0
+
+const Word16 band_end_wb[26] =
+{
+ 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96,
+ 104, 112, 120, 128, 144, 160, 176, 192, 208, 224, 240, 256,
+ 288, 320
+}; // Q0
+
+const Word16 band_len_wb[26] =
+{
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 16, 16,
+ 32, 32
+}; // Q0
+const Word16 band_len_harm_float[SFM_N_HARM_FB] = // Q0
+{
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 16, 16, 16, 16, 16, 16, 32, 32, 32, 48, 48, 48, 48, 64, 64, 64, 96
+};
+
+const Word16 band_start_harm[SFM_N_HARM_FB] =//Q0
+{
+ 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120,
+ 128, 144, 160, 176, 192, 208, 224, 256, 288, 320, 368, 416, 464, 512, 576, 640, 704
+};
+
+const Word16 band_end_harm[SFM_N_HARM_FB] =//Q0
+{
+ 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128,
+ 144, 160, 176, 192, 208, 224, 256, 288, 320, 368, 416, 464, 512, 576, 640, 704, 800
+};
+
+const Word16 rat_fx[SFM_N_WB] = { 24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576, 24576,
+ 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 13107, 13107
+};//Q14
+
+const Word16 sfm_width[20] = {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 8}; // Q0
+const Word16 a_map[20] = {8, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 5, 7, 11}; // Q0
+
+
+const Word32 SQRT_DIM_fx[65] = /* sqrt(x) for x = 0, 1, ..., 64. in Q15 */
+{
+ 0, 32768, 46341, 56756, 65536, 73271, 80265, 86696,
+ 92682, 98304, 103622, 108679, 113512, 118147, 122607, 126910,
+ 131072, 135106, 139023, 142832, 146543, 150162, 153696, 157150,
+ 160530, 163840, 167085, 170268, 173392, 176461, 179478, 182445,
+ 185364, 188238, 191069, 193858, 196608, 199320, 201996, 204636,
+ 207243, 209818, 212361, 214874, 217358, 219814, 222243, 224646,
+ 227023, 229376, 231705, 234010, 236293, 238555, 240795, 243014,
+ 245213, 247393, 249554, 251696, 253820, 255926, 258015, 260088,
+ 262144
+};
+
+
+
+/*------------------------------------------------------------------------------*
+ * HQ core tables for SWB signals
+ *------------------------------------------------------------------------------*/
+
+const Word16 short_window_48kHz_fx[L_FRAME48k / 2 / 2] = /* second half is symetric and omitted Q15*/
+{
+ 107, 322, 536, 751, 965, 1179, 1394, 1608, 1822, 2036, 2250, 2464, 2678, 2892, 3105, 3319,
+ 3532, 3745, 3958, 4171, 4383, 4596, 4808, 5020, 5232, 5444, 5655, 5866, 6077, 6288, 6498, 6708,
+ 6918, 7127, 7336, 7545, 7754, 7962, 8170, 8377, 8585, 8791, 8998, 9204, 9409, 9615, 9819, 10024,
+ 10228, 10431, 10634, 10837, 11039, 11241, 11442, 11643, 11843, 12043, 12242, 12441, 12639, 12836, 13033, 13230,
+ 13426, 13621, 13816, 14010, 14204, 14397, 14589, 14781, 14972, 15162, 15352, 15541, 15730, 15917, 16105, 16291,
+ 16477, 16662, 16846, 17030, 17213, 17395, 17576, 17757, 17937, 18116, 18294, 18472, 18648, 18824, 18999, 19174,
+ 19347, 19520, 19692, 19863, 20033, 20202, 20371, 20538, 20705, 20871, 21035, 21199, 21363, 21525, 21686, 21846,
+ 22006, 22164, 22322, 22478, 22634, 22788, 22942, 23095, 23246, 23397, 23546, 23695, 23843, 23989, 24135, 24279,
+ 24423, 24565, 24707, 24847, 24986, 25125, 25262, 25398, 25533, 25667, 25800, 25931, 26062, 26191, 26320, 26447,
+ 26573, 26698, 26821, 26944, 27066, 27186, 27305, 27423, 27540, 27655, 27770, 27883, 27995, 28106, 28216, 28324,
+ 28431, 28537, 28642, 28746, 28848, 28949, 29049, 29148, 29245, 29341, 29436, 29530, 29622, 29713, 29803, 29891,
+ 29979, 30064, 30149, 30232, 30315, 30395, 30475, 30553, 30630, 30705, 30780, 30853, 30924, 30994, 31063, 31131,
+ 31197, 31262, 31326, 31388, 31449, 31508, 31567, 31624, 31679, 31733, 31786, 31837, 31887, 31936, 31984, 32029,
+ 32074, 32117, 32159, 32200, 32239, 32276, 32313, 32348, 32381, 32413, 32444, 32473, 32501, 32528, 32553, 32577,
+ 32600, 32621, 32640, 32658, 32675, 32691, 32705, 32717, 32729, 32738, 32747, 32754, 32759, 32764, 32766, 32767,
+};
+const Word16 short_window_32kHz_fx[L_FRAME32k / 2 / 2] = /* second half is symetric and omitted Q15*/
+{
+ 161, 483, 804, 1126, 1447, 1768, 2090, 2411, 2731, 3052, 3372, 3692, 4011, 4330, 4649, 4967,
+ 5285, 5602, 5919, 6235, 6550, 6865, 7180, 7493, 7806, 8118, 8429, 8740, 9049, 9358, 9666, 9973,
+ 10279, 10584, 10888, 11191, 11492, 11793, 12093, 12391, 12688, 12984, 13279, 13572, 13865, 14155, 14445, 14733,
+ 15019, 15305, 15588, 15871, 16151, 16430, 16708, 16984, 17258, 17531, 17802, 18071, 18338, 18604, 18868, 19130,
+ 19390, 19649, 19905, 20160, 20413, 20663, 20912, 21159, 21403, 21646, 21886, 22125, 22361, 22595, 22827, 23056,
+ 23284, 23509, 23732, 23953, 24171, 24387, 24601, 24812, 25021, 25228, 25432, 25633, 25833, 26029, 26223, 26415,
+ 26604, 26791, 26975, 27156, 27335, 27511, 27684, 27855, 28023, 28188, 28351, 28511, 28668, 28823, 28974, 29123,
+ 29269, 29412, 29553, 29690, 29825, 29957, 30086, 30212, 30335, 30455, 30572, 30687, 30798, 30906, 31012, 31114,
+ 31214, 31310, 31403, 31494, 31581, 31665, 31747, 31825, 31900, 31972, 32041, 32107, 32169, 32229, 32286, 32339,
+ 32389, 32437, 32481, 32522, 32559, 32594, 32626, 32654, 32679, 32701, 32720, 32736, 32749, 32758, 32764, 32767,
+};
+
+const Word16 short_window_16kHz_fx[L_FRAME16k / 2 / 2] = /* second half is symetric and omitted Q15*/
+{
+ 322, 965, 1608, 2250, 2892, 3532, 4171, 4808, 5444, 6077, 6708, 7336, 7962, 8585, 9204, 9819,
+ 10431, 11039, 11643, 12242, 12836, 13426, 14010, 14589, 15162, 15730, 16291, 16846, 17395, 17937, 18472, 18999,
+ 19520, 20033, 20538, 21035, 21525, 22006, 22478, 22942, 23397, 23843, 24279, 24707, 25125, 25533, 25931, 26320,
+ 26698, 27066, 27423, 27770, 28106, 28431, 28746, 29049, 29341, 29622, 29891, 30149, 30395, 30630, 30853, 31063,
+ 31262, 31449, 31624, 31786, 31936, 32074, 32200, 32313, 32413, 32501, 32577, 32640, 32691, 32729, 32754, 32766,
+};
+
+const Word16 short_window_8kHz_fx[L_FRAME8k / 2 / 2] = /* second half is symetric and omitted Q15*/
+{
+ 643, 1929, 3212, 4490, 5760, 7022, 8274, 9512,
+ 10736, 11943, 13132, 14300, 15447, 16569, 17666, 18736,
+ 19777, 20788, 21766, 22711, 23621, 24494, 25330, 26127,
+ 26883, 27598, 28270, 28899, 29483, 30022, 30514, 30959,
+ 31357, 31706, 32007, 32258, 32459, 32610, 32711, 32762,
+};
+
+const Word16 inv_jp2[64] =//Q15
+{
+ 16384, 10923, 8192, 6554, 5461, 4681, 4096, 3641, 3277, 2979, 2731, 2521, 2341, 2185, 2048, 1928,
+ 1820, 1725, 1638, 1560, 1489, 1425, 1365, 1311, 1260, 1214, 1170, 1130, 1092, 1057, 1024, 993,
+ 964, 936, 910, 886, 862, 840, 819, 799, 780, 762, 745, 728, 712, 697, 683, 669,
+ 655, 643, 630, 618, 607, 596, 585, 575, 565, 555, 546, 537, 529, 520, 512, 504
+};
+const Word16 subf_norm_groups[4][11] =
+{
+ {0,1,8,9,16,20,24,28,32,36,40},
+ {2,3,10,11,17,21,25,29,33,37,41},
+ {4,5,12,13,18,22,26,30,34,38,42},
+ {6,7,14,15,19,23,27,31,35,39,43}
+}; // Q0
+
+const Word16 gain_att_fx[40] = /* Q=15 */
+{
+ 15711, 19367, 21781, 23743, 24899, 25929, 26758, 27514,
+ 28059, 28562, 28994, 29398, 29693, 29970, 30213, 30442,
+ 30619, 30786, 30936, 31077, 31190, 31298, 31395, 31488,
+ 31564, 31637, 31704, 31768, 31822, 31873, 31920, 31966,
+ 32005, 32042, 32077, 32111, 32140, 32168, 32195, 32220
+};
+
+const Word16 stab_trans_fx[10] = /* Q15 */
+{
+ 16384, 11381, 7232, 4292, 2433,
+ 1341, 728, 391, 209, 112
+};
+
+const Word16 env_stab_tp_fx[2][2] = /* Q15 */
+{
+ {32735, 16384},
+ {33, 16384}
+};
+
+const Word16 att_step_fx[4] = /* Q=13 */
+{
+ 32767, 16384, 10923, 8192
+};
+
+const Word32 table_logcum_fx[563] =//Q16
+{
+ 0, 0, 0, 65536, 169408, 300480, 452650, 622058, 806041,
+ 1002649, 1210393, 1428099, 1654816, 1889761, 2132272, 2381791, 2637833,
+ 2899977, 3167853, 3441134, 3719526, 4002767, 4290623, 4582876, 4879332,
+ 5179812, 5484152, 5792200, 6103816, 6418871, 6737244, 7058822, 7383500,
+ 7711180, 8041769, 8375181, 8711333, 9050150, 9391557, 9735485, 10081869,
+ 10430647, 10781759, 11135150, 11490766, 11848556, 12208469, 12570461, 12934487,
+ 13300503, 13668469, 14038345, 14410092, 14783676, 15159061, 15536214, 15915101,
+ 16295692, 16677956, 17061866, 17447390, 17834504, 18223180, 18613394, 19005122,
+ 19398338, 19793020, 20189146, 20586692, 20985640, 21385968, 21787658, 22190686,
+ 22595040, 23000696, 23407638, 23815850, 24225314, 24636014, 25047934, 25461060,
+ 25875374, 26290862, 26707510, 27125304, 27544232, 27964278, 28385428, 28807674,
+ 29231000, 29655392, 30080844, 30507338, 30934866, 31363416, 31792978, 32223540,
+ 32655092, 33087624, 33521126, 33955588, 34391000, 34827352, 35264636, 35702840,
+ 36141960, 36581988, 37022908, 37464716, 37907404, 38350964, 38795388, 39240668,
+ 39686792, 40133760, 40581560, 41030188, 41479632, 41929888, 42380948, 42832808,
+ 43285456, 43738892, 44193104, 44648088, 45103840, 45560348, 46017612, 46475624,
+ 46934376, 47393864, 47854080, 48315024, 48776684, 49239060, 49702144, 50165928,
+ 50630412, 51095588, 51561452, 52028000, 52495224, 52963124, 53431688, 53900916,
+ 54370808, 54841348, 55312540, 55784380, 56256856, 56729972, 57203720, 57678096,
+ 58153096, 58628716, 59104952, 59581800, 60059256, 60537316, 61015980, 61495236,
+ 61975084, 62455524, 62936548, 63418156, 63900340, 64383100, 64866428, 65350328,
+ 65834792, 66319816, 66805396, 67291536, 67778224, 68265456, 68753240, 69241560,
+ 69730424, 70219816, 70709744, 71200208, 71691192, 72182704, 72674736, 73167280,
+ 73660344, 74153920, 74648008, 75142600, 75637704, 76133296, 76629400, 77125992,
+ 77623080, 78120656, 78618728, 79117280, 79616320, 80115840, 80615832, 81116312,
+ 81617256, 82118680, 82620568, 83122920, 83625744, 84129024, 84632768, 85136968,
+ 85641624, 86146728, 86652288, 87158304, 87664760, 88171664, 88679008, 89186792,
+ 89695016, 90203680, 90712776, 91222304, 91732256, 92242648, 92753464, 93264704,
+ 93776368, 94288448, 94800952, 95313872, 95827208, 96340960, 96855120, 97369696,
+ 97884672, 98400064, 98915856, 99432048, 99948648, 100465640, 100983040, 101500832,
+ 102019016, 102537592, 103056568, 103575928, 104095672, 104615808, 105136328, 105657232,
+ 106178520, 106700184, 107222232, 107744656, 108267456, 108790632, 109314176, 109838096,
+ 110362384, 110887040, 111412064, 111937448, 112463208, 112989320, 113515800, 114042640,
+ 114569832, 115097392, 115625304, 116153568, 116682184, 117211160, 117740480, 118270152,
+ 118800168, 119330536, 119861248, 120392312, 120923712, 121455448, 121987536, 122519960,
+ 123052720, 123585816, 124119248, 124653016, 125187120, 125721552, 126256320, 126791416,
+ 127326840, 127862592, 128398664, 128935072, 129471800, 130008856, 130546224, 131083920,
+ 131621936, 132160272, 132698920, 133237888, 133777176, 134316768, 134856688, 135396912,
+ 135937440, 136478288, 137019440, 137560912, 138102688, 138644768, 139187152, 139729840,
+ 140272832, 140816128, 141359712, 141903616, 142447808, 142992304, 143537104, 144082192,
+ 144627568, 145173248, 145719232, 146265504, 146812064, 147358912, 147906048, 148453488,
+ 149001200, 149549216, 150097504, 150646096, 151194960, 151744112, 152293536, 152843264,
+ 153393264, 153943536, 154494096, 155044944, 155596064, 156147456, 156699120, 157251072,
+ 157803296, 158355792, 158908560, 159461616, 160014928, 160568512, 161122368, 161676496,
+ 162230896, 162785568, 163340496, 163895696, 164451168, 165006896, 165562896, 166119152,
+ 166675664, 167232448, 167789504, 168346816, 168904368, 169462208, 170020288, 170578624,
+ 171137232, 171696080, 172255200, 172814560, 173374192, 173934064, 174494192, 175054576,
+ 175615216, 176176096, 176737232, 177298608, 177860256, 178422128, 178984256, 179546640,
+ 180109264, 180672128, 181235248, 181798608, 182362208, 182926064, 183490144, 184054480,
+ 184619056, 185183872, 185748928, 186314224, 186879760, 187445520, 188011536, 188577776,
+ 189144272, 189710992, 190277936, 190845136, 191412560, 191980208, 192548112, 193116224,
+ 193684592, 194253168, 194821984, 195391040, 195960320, 196529824, 197099568, 197669520,
+ 198239712, 198810144, 199380784, 199951648, 200522752, 201094080, 201665616, 202237392,
+ 202809376, 203381600, 203954032, 204526688, 205099568, 205672672, 206246000, 206819536,
+ 207393296, 207967280, 208541472, 209115888, 209690528, 210265376, 210840432, 211415712,
+ 211991216, 212566912, 213142848, 213718976, 214295328, 214871888, 215448672, 216025664,
+ 216602864, 217180272, 217757888, 218335712, 218913760, 219492000, 220070464, 220649120,
+ 221228000, 221807072, 222386368, 222965856, 223545552, 224125456, 224705568, 225285872,
+ 225866400, 226447120, 227028032, 227609168, 228190496, 228772016, 229353760, 229935680,
+ 230517824, 231100160, 231682688, 232265424, 232848352, 233431472, 234014800, 234598336,
+ 235182048, 235765968, 236350080, 236934400, 237518896, 238103600, 238688496, 239273600,
+ 239858880, 240444352, 241030032, 241615888, 242201952, 242788192, 243374640, 243961264,
+ 244548096, 245135104, 245722304, 246309696, 246897280, 247485056, 248073008, 248661152,
+ 249249488, 249838016, 250426720, 251015616, 251604704, 252193968, 252783424, 253373056,
+ 253962880, 254552896, 255143088, 255733472, 256324032, 256914768, 257505696, 258096800,
+ 258688096, 259279568, 259871216, 260463056, 261055056, 261647264, 262239632, 262832192,
+ 263424928, 264017840, 264610928, 265204192, 265797632, 266391264, 266985072, 267579040,
+ 268173200, 268767520, 269362048, 269956736, 270551584, 271146624, 271741824, 272337216,
+ 272932768, 273528480, 274124384, 274720480, 275316704, 275913120, 276509728, 277106496,
+ 277703424, 278300544, 278897824, 279495264, 280092896, 280690688, 281288640, 281886752,
+ 282485056, 283083520
+};
+const Word32 pow_getbitsfrompulses_fx[16] = /*Q21 */
+{
+ 2097152, 2190001, 2286961, 2388214, 2493948, 2604365, 2719671, 2840081,
+ 2965822, 3097129, 3234251, 3377442, 3526976, 3683128, 3846194, 4016480
+};
+const Word16 DDP_fx[4] = { 3, 0, 1, 2 };//Q0
+
+const Word16 step_tcq[8][STATES] = { {0,4}, {0,4}, {1,5}, {1,5}, {2,6}, {2,6}, {3,7}, {3,7} }; // Q0
+const Word16 denc[8][STATES] = { {0,2}, {2,0}, {1,3}, {3,1}, {2,0}, {0,2}, {3,1}, {1,3} }; /* enc trellis Q0*/
+const Word16 ddec[8][STATES] = { {0,2}, {1,3}, {2,0}, {3,1}, {2,0}, {3,1}, {0,2}, {1,3} }; /* dec trellis Q0*/
+
+
+const Word16 step_LSB[STATES_LSB][2] = { {0,1}, {2,3}, {0,1}, {2,3} }; // Q0
+const Word16 denc_LSB[STATES_LSB][2] = { {0,3}, {2,1}, {3,0}, {1,2} }; // Q0
+const Word16 dqnt_LSB[STATES_LSB][4] = { {0,8,1,8}, {0,8,1,8}, {8,0,8,1}, {8,0,8,1} }; // Q0
+
+const Word16 dstep_LSB[4][2] = { {0,2}, {0,2}, {1,3}, {1,3} }; // Q0
+const Word16 ddec_LSB[4][2] = { {0,3}, {3,0}, {2,1}, {1,2} }; // Q0
+
+
+const Word16 nextstate[STATES][2] = {{0, 1}, {2, 3}, {4, 5}, {6, 7}, {0, 1}, {2, 3}, {4, 5}, {6, 7}};/*current state points to next two states Q0*/
+
+/*------------------------------------------------------------------------------*
+ * PVQ tables
+ *------------------------------------------------------------------------------*/
+
+const Word16 fine_gain_bits[8] = {0, 0, 0, 1, 2, 2, 4, 5}; // Q0
+const Word16 finegain_1_fx[2] = { -12204, 12647 }; /* Q14 */
+const Word16 finegain_2_fx[4] = { -17773, -5925, 6010, 18769 }; /* Q14 */
+const Word16 finegain_3_fx[8] = { -16384, -11703, -7022, -2341, 2341, 7022, 11703, 16384 }; /* Q14 */
+const Word16 finegain_4_fx[16] = /* Q14 */
+{
+ -21683, -18292, -14998, -11876, -8936, -6239, -3702, -1371,
+ 945, 3275, 6088, 9079, 12450, 15999, 19796, 23868
+};
+const Word16 finegain_5_fx[32] = /* Q14 */
+{
+ -21462, -18895, -16284, -14135, -12605, -11307, -10139, -8910,
+ -8028, -6792, -5638, -4812, -3672, -2681, -1725, -479,
+ 449, 1390, 2364, 3433, 4579, 5516, 6769, 7767,
+ 9085, 10152, 11009, 12535, 14765, 17093, 20094, 24716
+};
+const Word16* finegain_fx[5] = { finegain_1_fx, finegain_2_fx, finegain_3_fx, finegain_4_fx, finegain_5_fx };/* Q14 */
+
+
+const UWord8 hBitsMinus1_N01[2] = {1, 7}; // Q0
+
+const UWord8 hBitsMinus1_N02[65]=
+{
+ 64, 15, 23, 28, 31, 34, 36, 38, 39, 41, 42, 43, 44, 45, 46, 47,
+ 47, 48, 49, 49, 50, 51, 52, 53, 54, 54, 55, 56, 57, 57, 58, 59,
+ 60, 61, 62, 63, 63, 64, 65, 65, 67, 68, 69, 69, 70, 71, 72, 72,
+ 73, 74, 75, 76, 77, 78, 79, 80, 80, 81, 82, 83, 84, 85, 86, 87,
+ 87
+}; // Q0
+
+const UWord8 hBitsMinus1_N03[65]=
+{
+ 64, 20, 33, 41, 48, 53, 57, 61, 64, 66, 69, 71, 73, 75, 76, 78,
+ 80, 81, 82, 83, 85, 86, 88, 90, 92, 93, 95, 96, 98, 99, 100, 102,
+ 104, 106, 108, 110, 111, 113, 114, 115, 118, 120, 122, 123, 125, 127, 128, 129,
+ 131, 133, 135, 137, 139, 141, 142, 144, 145, 146, 149, 151, 153, 155, 157, 158,
+ 160
+}; // Q0
+
+const UWord8 hBitsMinus1_N04[65]=
+{
+ 64, 23, 39, 51, 60, 67, 73, 79, 83, 87, 91, 94, 97, 100, 102, 105,
+ 107, 109, 111, 113, 115, 116, 119, 122, 125, 127, 130, 132, 134, 136, 138, 141,
+ 144, 147, 150, 152, 154, 156, 158, 160, 164, 167, 170, 173, 175, 177, 180, 182,
+ 184, 187, 190, 193, 196, 199, 201, 203, 205, 207, 211, 214, 217, 220, 222, 225,
+ 227
+}; // Q0
+
+const UWord8 hBitsMinus1_N05[54]=
+{
+ 53, 26, 45, 59, 70, 79, 87, 94, 100, 105, 110, 114, 118, 122, 125, 128,
+ 131, 134, 136, 139, 141, 144, 148, 152, 155, 158, 161, 164, 167, 170, 172, 176,
+ 181, 184, 188, 191, 194, 197, 200, 202, 207, 211, 215, 219, 222, 225, 228, 231,
+ 233, 238, 242, 246, 250, 253
+}; // Q0
+
+const UWord8 hBitsMinus1_N06[42]=
+{
+ 41, 28, 49, 65, 78, 89, 99, 107, 114, 120, 126, 132, 136, 141, 145, 149,
+ 153, 156, 159, 162, 165, 168, 173, 178, 183, 187, 191, 194, 198, 201, 204, 209,
+ 214, 219, 224, 228, 231, 235, 238, 241, 247, 253
+}; // Q0
+
+const UWord8 hBitsMinus1_N07[34]=
+{
+ 33, 30, 52, 70, 85, 98, 109, 118, 126, 134, 141, 147, 153, 158, 163, 168,
+ 172, 176, 180, 184, 188, 191, 197, 203, 208, 213, 218, 222, 226, 230, 233, 240,
+ 246, 252
+}; // Q0
+
+const UWord8 hBitsMinus1_N08[29]=
+{
+ 28, 31, 55, 75, 91, 105, 117, 128, 138, 146, 154, 161, 168, 174, 180, 185,
+ 190, 195, 200, 204, 208, 212, 219, 226, 232, 238, 243, 248, 253
+}; // Q0
+
+const UWord8 hBitsMinus1_N09[25]=
+{
+ 24, 33, 58, 79, 97, 112, 125, 137, 148, 157, 166, 174, 182, 189, 195, 201,
+ 207, 212, 217, 222, 227, 231, 240, 247, 254
+}; // Q0
+
+const UWord8 hBitsMinus1_N10[22]=
+{
+ 21, 34, 61, 83, 101, 118, 132, 145, 157, 167, 177, 186, 194, 202, 209, 216,
+ 222, 228, 234, 239, 245, 250
+}; // Q0
+
+const UWord8 hBitsMinus1_N11[19]=
+{
+ 18, 35, 63, 86, 106, 123, 139, 152, 165, 176, 187, 197, 206, 214, 222, 230,
+ 237, 243, 250
+}; // Q0
+
+const UWord8 hBitsMinus1_N12[17]=
+{
+ 16, 36, 65, 89, 110, 128, 144, 159, 173, 185, 196, 207, 217, 226, 234, 242,
+ 250
+}; // Q0
+
+const UWord8 hBitsMinus1_N13[16]=
+{
+ 15, 37, 67, 92, 113, 133, 150, 165, 180, 193, 205, 216, 227, 237, 246, 254,
+}; // Q0
+
+const UWord8 hBitsMinus1_N14[14]=
+{
+ 13, 38, 68, 94, 117, 137, 155, 171, 186, 200, 213, 225, 236, 247
+}; // Q0
+
+const UWord8 hBitsMinus1_N15[13]=
+{
+ 12, 39, 70, 97, 120, 141, 160, 177, 193, 207, 221, 233, 245
+}; // Q0
+
+const UWord8 hBitsMinus1_N16[13]=
+{
+ 12, 39, 71, 99, 123, 144, 164, 182, 198, 214, 228, 241, 253
+}; // Q0
+
+const UWord8 hBitsMinus1_N17[12]=
+{
+ 11, 40, 73, 101, 126, 148, 168, 187, 204, 220, 234, 248
+}; // Q0
+
+const UWord8 hBitsMinus1_N18[12]=
+{
+ 11, 41, 74, 103, 128, 151, 172, 191, 209, 225, 241, 255
+}; // Q0
+
+const UWord8 hBitsMinus1_N19[11]=
+{
+ 10, 41, 75, 105, 131, 154, 176, 196, 214, 231, 247
+}; // Q0
+
+const UWord8 hBitsMinus1_N20[11]=
+{
+ 10, 42, 77, 107, 133, 157, 179, 200, 219, 236, 253
+}; // Q0
+
+const UWord8 hBitsMinus1_N21[10]=
+{
+ 9, 43, 78, 108, 135, 160, 183, 204, 223, 241
+}; // Q0
+
+const UWord8 hBitsMinus1_N22[10]=
+{
+ 9, 43, 79, 110, 138, 163, 186, 207, 227, 246
+}; // Q0
+
+const UWord8 hBitsMinus1_N23[10]=
+{
+ 9, 44, 80, 111, 140, 165, 189, 211, 231, 250
+}; // Q0
+
+const UWord8 hBitsMinus1_N24[10]=
+{
+ 9, 44, 81, 113, 142, 168, 192, 214, 235, 255
+}; // Q0
+
+const UWord8 hBitsMinus1_N25[9]=
+{
+ 8, 45, 82, 114, 143, 170, 195, 217, 239
+}; // Q0
+
+const UWord8 hBitsMinus1_N26[9]=
+{
+ 8, 45, 83, 116, 145, 172, 197, 221, 242
+}; // Q0
+
+const UWord8 hBitsMinus1_N27[9]=
+{
+ 8, 46, 84, 117, 147, 175, 200, 224, 246
+}; // Q0
+
+const UWord8 hBitsMinus1_N28[9]=
+{
+ 8, 46, 84, 118, 149, 177, 202, 227, 249
+}; // Q0
+const UWord8 hBitsMinus1_N29[9]=
+{
+ 8, 46, 85, 119, 150, 179, 205, 229, 252
+}; // Q0
+const UWord8 hBitsMinus1_N30[8]=
+{
+ 7, 47, 86, 121, 152, 181, 207, 232
+}; // Q0
+const UWord8 hBitsMinus1_N31[8]=
+{
+ 7, 47, 87, 122, 153, 182, 209, 235
+}; // Q0
+const UWord8 hBitsMinus1_N32[8]=
+{
+ 7, 47, 87, 123, 155, 184, 212, 237
+}; // Q0
+const UWord8 hBitsMinus1_N33[8]=
+{
+ 7, 48, 88, 124, 156, 186, 214, 240
+}; // Q0
+const UWord8 hBitsMinus1_N34[8]=
+{
+ 7, 48, 89, 125, 158, 188, 216, 242
+}; // Q0
+const UWord8 hBitsMinus1_N35[8]=
+{
+ 7, 49, 90, 126, 159, 189, 218, 245
+}; // Q0
+const UWord8 hBitsMinus1_N36[8]=
+{
+ 7, 49, 90, 127, 160, 191, 220, 247
+}; // Q0
+const UWord8 hBitsMinus1_N37[8]=
+{
+ 7, 49, 91, 128, 162, 193, 222, 249
+}; // Q0
+const UWord8 hBitsMinus1_N38[8]=
+{
+ 7, 49, 91, 129, 163, 194, 224, 251
+}; // Q0
+const UWord8 hBitsMinus1_N39[8]=
+{
+ 7, 50, 92, 130, 164, 196, 225, 253
+}; // Q0
+const UWord8 hBitsMinus1_N40[8]=
+{
+ 7, 50, 93, 131, 165, 197, 227, 255
+}; // Q0
+const UWord8 hBitsMinus1_N41[7]=
+{
+ 6, 50, 93, 131, 166, 199, 229
+}; // Q0
+const UWord8 hBitsMinus1_N42[7]=
+{
+ 6, 51, 94, 132, 167, 200, 230
+}; // Q0
+const UWord8 hBitsMinus1_N43[7]=
+{
+ 6, 51, 94, 133, 168, 201, 232
+}; // Q0
+const UWord8 hBitsMinus1_N44[7]=
+{
+ 6, 51, 95, 134, 170, 203, 234
+}; // Q0
+const UWord8 hBitsMinus1_N45[7]=
+{
+ 6, 51, 95, 135, 171, 204, 235
+}; // Q0
+const UWord8 hBitsMinus1_N46[7]=
+{
+ 6, 52, 96, 135, 172, 205, 237
+}; // Q0
+const UWord8 hBitsMinus1_N47[7]=
+{
+ 6, 52, 96, 136, 173, 206, 238
+}; // Q0
+const UWord8 hBitsMinus1_N48[7]=
+{
+ 6, 52, 97, 137, 174, 208, 240
+}; // Q0
+const UWord8 hBitsMinus1_N49[7]=
+{
+ 6, 52, 97, 138, 175, 209, 241
+}; // Q0
+const UWord8 hBitsMinus1_N50[7]=
+{
+ 6, 53, 98, 138, 175, 210, 243
+}; // Q0
+const UWord8 hBitsMinus1_N51[7]=
+{
+ 6, 53, 98, 139, 176, 211, 244
+}; // Q0
+const UWord8 hBitsMinus1_N52[7]=
+{
+ 6, 53, 99, 140, 177, 212, 245
+}; // Q0
+const UWord8 hBitsMinus1_N53[7]=
+{
+ 6, 53, 99, 140, 178, 213, 247
+}; // Q0
+const UWord8 hBitsMinus1_N54[7]=
+{
+ 6, 54, 100, 141, 179, 214, 248
+}; // Q0
+const UWord8 hBitsMinus1_N55[7]=
+{
+ 6, 54, 100, 142, 180, 216, 249
+}; // Q0
+const UWord8 hBitsMinus1_N56[7]=
+{
+ 6, 54, 100, 142, 181, 217, 250
+}; // Q0
+const UWord8 hBitsMinus1_N57[7]=
+{
+ 6, 54, 101, 143, 181, 218, 252
+};
+const UWord8 hBitsMinus1_N58[7]=
+{
+ 6, 54, 101, 143, 182, 219, 253
+}; // Q0
+const UWord8 hBitsMinus1_N59[7]=
+{
+ 6, 55, 102, 144, 183, 220, 254
+}; // Q0
+const UWord8 hBitsMinus1_N60[7]=
+{
+ 6, 55, 102, 145, 184, 221, 255
+}; // Q0
+const UWord8 hBitsMinus1_N61[6]=
+{
+ 5, 55, 102, 145, 185, 221
+}; // Q0
+const UWord8 hBitsMinus1_N62[6]=
+{
+ 5, 55, 103, 146, 185, 222
+}; // Q0
+const UWord8 hBitsMinus1_N63[6]=
+{
+ 5, 55, 103, 146, 186, 223
+}; // Q0
+const UWord8 hBitsMinus1_N64[6]=
+{
+ 5, 55, 103, 147, 187, 224
+}; // Q0
+const Word16 dsHighDiracsTab[PVQ_MAX_BAND_SIZE - DS_INDEX_LINEAR_END ] =
+{
+ 23, 25, 27, 29, 31, 33, 35, 37, 39,
+ 43, 47, 51, 55, 59, 63, 67, 71, 75,
+ 83, 91, 99, 107, 115, 123, 131, 139, 147,
+ 163, 179, 195, 211, 227, 243, 259, 275, 291,
+ 323, 355, 387, 419, 451, 483, 512
+}; // Q0
+
+const UWord32 intLimCDivInvDQ31[67+1] =
+{
+ 0x00000000, 0x80000000, 0x40000000, 0x2aaaaaab, 0x20000000, 0x1999999a, 0x15555556, 0x12492493,
+ 0x10000000, 0x0e38e38f, 0x0ccccccd, 0x0ba2e8bb, 0x0aaaaaab, 0x09d89d8a, 0x0924924a, 0x08888889,
+ 0x08000000, 0x07878788, 0x071c71c8, 0x06bca1b0, 0x06666667, 0x06186187, 0x05d1745e, 0x0590b217,
+ 0x05555556, 0x051eb852, 0x04ec4ec5, 0x04bda130, 0x04924925, 0x0469ee59, 0x04444445, 0x04210843,
+ 0x04000000, 0x03e0f83f, 0x03c3c3c4, 0x03a83a84, 0x038e38e4, 0x03759f23, 0x035e50d8, 0x03483484,
+ 0x03333334, 0x031f3832, 0x030c30c4, 0x02fa0be9, 0x02e8ba2f, 0x02d82d83, 0x02c8590c, 0x02b93106,
+ 0x02aaaaab, 0x029cbc15, 0x028f5c29, 0x02828283, 0x02762763, 0x026a43a0, 0x025ed098, 0x0253c826,
+ 0x02492493, 0x023ee090, 0x0234f72d, 0x022b63cc, 0x02222223, 0x02192e2a, 0x02108422, 0x02082083,
+ 0x02000000, 0x01f81f82, 0x01f07c20, 0x01e9131b
+}; // Q0
+
+const UWord8 obtainEnergyQuantizerDensity_f[57] =
+ {
+ 1, 1, 1, 1, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 4, 4, 4,
+ 4, 4, 4, 6, 6, 6, 6, 8,
+ 8, 8, 10,10,12,12,14,14,
+ 16,18,20,20,22,24,26,30,
+ 32,34,38,42,46,50,54,58,
+ 64,70,76,82,90,98,108,118, 128
+}; // Q0
+
+
+/* (char)ceil(log2(hBitsN[N][0])) - 2) */
+const UWord8 f_log2_n[ PVQ_MAX_BAND_SIZE + 1] =
+{
+ 0xff, 0xff, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
+ 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02,
+ 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
+ 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01}; // Q0
+
+const UWord8 * const hBitsN[ PVQ_MAX_BAND_SIZE + 1 ]=
+{
+f_log2_n/*N=0*/, hBitsMinus1_N01, hBitsMinus1_N02, hBitsMinus1_N03, hBitsMinus1_N04,
+hBitsMinus1_N05, hBitsMinus1_N06, hBitsMinus1_N07, hBitsMinus1_N08, hBitsMinus1_N09,
+hBitsMinus1_N10, hBitsMinus1_N11, hBitsMinus1_N12, hBitsMinus1_N13, hBitsMinus1_N14,
+hBitsMinus1_N15, hBitsMinus1_N16, hBitsMinus1_N17, hBitsMinus1_N18, hBitsMinus1_N19,
+hBitsMinus1_N20, hBitsMinus1_N21, hBitsMinus1_N22, hBitsMinus1_N23, hBitsMinus1_N24,
+hBitsMinus1_N25, hBitsMinus1_N26, hBitsMinus1_N27, hBitsMinus1_N28, hBitsMinus1_N29,
+hBitsMinus1_N30, hBitsMinus1_N31, hBitsMinus1_N32, hBitsMinus1_N33, hBitsMinus1_N34,
+hBitsMinus1_N35, hBitsMinus1_N36, hBitsMinus1_N37, hBitsMinus1_N38, hBitsMinus1_N39,
+hBitsMinus1_N40, hBitsMinus1_N41, hBitsMinus1_N42, hBitsMinus1_N43, hBitsMinus1_N44,
+hBitsMinus1_N45, hBitsMinus1_N46, hBitsMinus1_N47, hBitsMinus1_N48, hBitsMinus1_N49,
+hBitsMinus1_N50, hBitsMinus1_N51, hBitsMinus1_N52, hBitsMinus1_N53, hBitsMinus1_N54,
+hBitsMinus1_N55, hBitsMinus1_N56, hBitsMinus1_N57, hBitsMinus1_N58, hBitsMinus1_N59,
+hBitsMinus1_N60, hBitsMinus1_N61, hBitsMinus1_N62, hBitsMinus1_N63, hBitsMinus1_N64,
+}; // Q0
+
+const Word16 lim_neg_inv_tbl_fx[MAX_SPLITS + 1 ] =
+{ /* 1 = optimized inv_tbl_fx constant for div by 1, Q15 */
+ /* 2-10 = negated inv_tbl_fx Q15*/
+ 0,
+ -32768, -16384, -10923, -8192, -6554,
+ -5462, -4681, -4096, -3641, -3277
+};
+
+const Word16 Idx2Freq_Tbl[] = { 6554/*12.8*512*/, 48 * 512, 13108/*25.6*512*/, 32 * 512, 16 * 512, 8 * 512 }; /* in Q9 */
+
+const Word16 fg_inv_tbl_fx [HQ_MAX_BAND_LEN/8 + 1 ] =
+{ /* i/8 , slice of inv_tbl_fx , Q15 */
+ 0,
+ 4096, 2048, 1366, 1024, 820, 683,
+ 586, 512, 456, 410, 373, 342
+};
+
+
+const UWord32 exactdivodd[ODD_DIV_SIZE] =
+{
+ /* exactdivodd[0]=1/1, exactdivodd[1]=1/3, exactdivodd[n]=1/(2*n+1), exactdivodd[47]=1/95 ) */
+ 1U, 2863311531U, 3435973837U, 3067833783U, 954437177U, 3123612579U, 3303820997U, 4008636143U,
+ 4042322161U, 678152731U, 1022611261U, 3921491879U, 3264175145U, 1749801491U, 1332920885U, 3186588639U,
+ 1041204193U, 2331553675U, 2437684141U, 2532929431U, 3247414297U, 799063683U, 2767867813U, 1736263375U,
+ 438261969U, 4210752251U, 2350076445U, 1483715975U, 3089362441U, 2693454067U, 3238827797U, 3204181951U,
+ 3237744577U, 128207979U, 2738819725U, 3811027319U, 3353604601U, 2519714147U, 1059797125U, 1631000239U,
+ 2014922929U, 724452315U, 4244438269U, 1875962727U, 4198451177U, 3539808211U, 1062196213U, 3571604383U
+}; // Q0
+
+const Word16 gain_cb_size[MAX_GAIN_BITS] = {2, 4, 8, 16, 32}; // Q0
+
+const Word16 inner_frame_tbl[4] = {L_FRAME8k, L_FRAME16k, L_FRAME32k, L_FRAME48k}; /* corresponds to NB, WB, SWB, FB Q0*/
+const Word16 hq_nominal_scaling_inv[7] = { 0, 8192, 11585, 0, 16384, 0, 20066 }; /*Q13 */
+const Word16 hq_nominal_scaling[7] = { 0, 32767, 23170, 0, 16384, 0, 13377 }; /*Q15 */
+
+const Word16 l_spec_tbl[4] = {L_SPEC8k, L_SPEC16k, L_SPEC32k, L_SPEC48k}; /* corresponds to NB, WB, SWB, FB Q0*/
+const Word16 l_spec_ext_tbl[4] = {0, L_SPEC16k_EXT, L_SPEC32k_EXT, L_SPEC48k_EXT}; /* corresponds to NB, WB, SWB, FB Q0*/
+const Word16 sinq_16k[3 * L_FRAME16k / 20] =/*Q15 */
+{
+ 536, 1608, 2678, 3745, 4808, 5866, 6918, 7962,
+ 8998, 10024, 11039, 12043, 13033, 14010, 14972, 15917,
+ 16846, 17757, 18648, 19520, 20371, 21199, 22006, 22788,
+ 23546, 24279, 24986, 25667, 26319, 26944, 27540, 28106,
+ 28642, 29147, 29622, 30064, 30475, 30852, 31197, 31508,
+ 31786, 32029, 32238, 32413, 32553, 32658, 32728, 32763
+};
+const Word16 sinq_32k[3 * L_FRAME32k / 20] =/*Q15 */
+{
+ 268, 804, 1340, 1876, 2411, 2945, 3479, 4011, 4543, 5073, 5602, 6130,
+ 6655, 7180, 7702, 8222, 8740, 9255, 9768, 10279, 10786, 11291, 11793, 12292,
+ 12787, 13279, 13767, 14252, 14733, 15210, 15683, 16151, 16616, 17075, 17531, 17981,
+ 18427, 18868, 19304, 19734, 20160, 20580, 20994, 21403, 21806, 22203, 22595, 22980,
+ 23359, 23732, 24098, 24459, 24812, 25159, 25499, 25832, 26159, 26478, 26790, 27095,
+ 27393, 27684, 27967, 28243, 28511, 28771, 29024, 29269, 29506, 29735, 29956, 30170,
+ 30375, 30572, 30761, 30941, 31114, 31278, 31433, 31580, 31719, 31849, 31971, 32084,
+ 32189, 32285, 32372, 32451, 32521, 32582, 32634, 32678, 32713, 32740, 32757, 32766
+};
+const Word16 sinq_48k[3 * L_FRAME48k / 20] =/*Q15 */
+{
+ 179, 536, 893, 1251, 1608, 1965, 2321, 2678, 3034, 3390, 3745, 4100,
+ 4454, 4808, 5161, 5514, 5866, 6217, 6568, 6918, 7267, 7615, 7962, 8308,
+ 8654, 8998, 9341, 9683, 10024, 10364, 10702, 11039, 11375, 11710, 12043, 12375,
+ 12705, 13033, 13361, 13686, 14010, 14332, 14653, 14972, 15289, 15604, 15918, 16229,
+ 16539, 16846, 17152, 17455, 17757, 18056, 18353, 18648, 18941, 19232, 19520, 19806,
+ 20090, 20371, 20650, 20926, 21200, 21471, 21740, 22006, 22269, 22530, 22789, 23044,
+ 23297, 23547, 23794, 24038, 24280, 24519, 24754, 24987, 25217, 25444, 25667, 25888,
+ 26106, 26320, 26531, 26740, 26945, 27147, 27345, 27541, 27733, 27921, 28107, 28289,
+ 28468, 28643, 28815, 28984, 29149, 29310, 29468, 29623, 29774, 29922, 30066, 30206,
+ 30343, 30476, 30606, 30732, 30854, 30973, 31087, 31199, 31306, 31410, 31510, 31606,
+ 31699, 31788, 31873, 31954, 32031, 32105, 32175, 32241, 32303, 32361, 32415, 32466,
+ 32513, 32556, 32595, 32630, 32661, 32688, 32712, 32731, 32747, 32759, 32766, 32767
+};
+/*------------------------------------------------------------------------------*
+ * LR-MDCT tables
+ *------------------------------------------------------------------------------*/
+
+/* subband width tables */
+
+/* NB short win: 7200/8000/9600, 13200/16400/24400 */
+const Word16 band_width_40_4_6_0_0_0[4] = { 6, 8, 11, 15 }; // Q0
+const Word16 band_width_40_5_6_0_0_0[5] = { 6, 7, 7, 9, 11 }; // Q0
+
+/* NB long win: 7200, 8000, 9600, 13200, 16400 */
+const Word16 band_width_160_13_6_2_0_0[13] = { 6, 6, 6, 6, 7, 8, 9, 10, 13, 15, 19, 24, 31 }; // Q0
+const Word16 band_width_160_14_6_3_0_0[14] = { 6, 6, 6, 6, 6, 7, 8, 9, 10, 12, 15, 18, 22, 29 }; // Q0
+const Word16 band_width_160_17_6_3_0_0[17] = { 6, 6, 6, 6, 6, 6, 7, 7, 8, 8, 9, 10, 11, 13, 15, 17, 19 }; // Q0
+const Word16 band_width_160_18_6_4_0_0[18] = { 6, 6, 6, 6, 6, 6, 6, 7, 7, 8, 8, 9, 10, 11, 12, 14, 15, 17 }; // Q0
+
+/* WB short win: 13200/16400/24400 */
+const Word16 band_width_80_7_6_0_0_0[7] = { 6, 7, 8, 10, 12, 16, 21 }; // Q0
+
+/* WB long win: 13200, 16400 */
+const Word16 band_width_320_18_6_3_0_0[18] = { 6, 6, 6, 6, 6, 7, 7, 8, 10, 11, 13, 16, 19, 24, 30, 37, 47, 61 }; // Q0
+const Word16 band_width_320_20_6_3_0_0[20] = { 6, 6, 6, 6, 6, 6, 7, 8, 8, 9, 11, 12, 14, 17, 20, 23, 28, 34, 42, 51 }; // Q0
+
+/* SWB short win: 13200, 16400 */
+const Word16 band_width_142_8_8_0_0_0[8] = {7,8,10,11,15,21,29,41}; // Q0
+const Word16 band_width_160_8_8_0_0_0[8] = { 8, 9, 11,13,17,23,32,47}; // Q0
+
+/* SWB long win: 13200, 16400 */
+const Word16 band_width_568_22_6_2_0_0[22] = { 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 13, 16, 19, 23, 28, 34, 42, 55, 68, 84, 105}; // Q0
+const Word16 band_width_640_24_6_4_0_0[24] = { 6, 6, 6, 6, 6, 6, 7,7,8,9,10,11,13,15,18,21,26,32,39,48,59, 74,92,115}; // Q0
+
+/* LR-MDCT: NB configuration tables */
+const Xcore_Config xcore_config_8kHz_007200bps_long = { 13, L_FRAME8k, band_width_160_13_6_2_0_0, 536870912L, 24576, 24576/*eref*/, 13107, 13107/*bit_alloc_weight*/, 2, 2, 0, 0 /*p2a_th*/, 13107/*pd_thresh*/, 4260/*ld_slope*/, 19661/*ni_coef*/ };
+const Xcore_Config xcore_config_8kHz_008000bps_long = { 14, L_FRAME8k, band_width_160_14_6_3_0_0, 536870912L, 24576, 24576/*eref*/, 13107, 13107/*bit_alloc_weight*/, 2, 2, 0, 0 /*p2a_th*/, 13107/*pd_thresh*/, 4260/*ld_slope*/, 19661/*ni_coef*/ };
+const Xcore_Config xcore_config_8kHz_013200bps_long = { 17, L_FRAME8k, band_width_160_17_6_3_0_0, 429496730L, 24576, 24576/*eref*/, 13107, 13107/*bit_alloc_weight*/, 2, 4, 2, 24576/*p2a_th*/, 13107/*pd_thresh*/, 4260/*ld_slope*/, 19661/*ni_coef*/ };
+const Xcore_Config xcore_config_8kHz_016400bps_long = { 18, L_FRAME8k, band_width_160_18_6_4_0_0, 322122547L, 24576, 24576/*eref*/, 13107, 13107/*bit_alloc_weight*/, 2, 2, 0, 0 /*p2a_th*/, 13107/*pd_thresh*/, 4260/*ld_slope*/, 19661/*ni_coef*/ };
+
+const Xcore_Config xcore_config_8kHz_007200bps_short = { 4, L_FRAME8k / NUM_TIME_SWITCHING_BLOCKS, band_width_40_4_6_0_0_0, 966367642L, 24576, 24576/*eref*/, 13107, 13107/*bit_alloc_weight*/, 2, 2, 0, 0/*p2a_th*/,9830 /*pd_thresh*/, 2949/*ld_slope*/, 19661/*ni_coef*/ };
+const Xcore_Config xcore_config_8kHz_008000bps_short = { 4, L_FRAME8k / NUM_TIME_SWITCHING_BLOCKS, band_width_40_4_6_0_0_0, 1181116006L, 24576, 24576/*eref*/, 13107, 13107/*bit_alloc_weight*/, 2, 4, 0, 0/*p2a_th*/,9830 /*pd_thresh*/, 2949/*ld_slope*/, 19661/*ni_coef*/ };
+const Xcore_Config xcore_config_8kHz_013200bps_short = { 5, L_FRAME8k / NUM_TIME_SWITCHING_BLOCKS, band_width_40_5_6_0_0_0, 751619276L, 24576, 24576/*eref*/, 11469, 11469/*bit_alloc_weight*/, 2, 4, 0, 0/*p2a_th*/,22938/*pd_thresh*/, 3604/*ld_slope*/, 19661/*ni_coef*/ };
+const Xcore_Config xcore_config_8kHz_016400bps_short = { 5, L_FRAME8k / NUM_TIME_SWITCHING_BLOCKS, band_width_40_5_6_0_0_0, 536870912L, 24576, 24576/*eref*/, 11469, 11469/*bit_alloc_weight*/, 2, 6, 0, 0/*p2a_th*/,22491/*pd_thresh*/, 3604/*ld_slope*/, 19661/*ni_coef*/ };
+
+/* LR-MDCT: WB configuration tables */
+const Xcore_Config xcore_config_16kHz_013200bps_long = { 18, L_FRAME16k, band_width_320_18_6_3_0_0, 429496730L, 24576, 24576/*eref*/, 13106, 13106/*bit_alloc_weight*/, 2, 6, 3, 24576/*p2a_th*/, 13107/*pd_thresh*/, 3932/*ld_slope*/, 18022/*ni_coef*/ };
+const Xcore_Config xcore_config_16kHz_016400bps_long = { 20, L_FRAME16k, band_width_320_20_6_3_0_0, 429496730L, 24576, 24576/*eref*/, 13106, 13106/*bit_alloc_weight*/, 2, 6, 3, 24576/*p2a_th*/, 13107/*pd_thresh*/, 3932/*ld_slope*/, 19660/*ni_coef*/ };
+
+const Xcore_Config xcore_config_16kHz_013200bps_short = { 7, L_FRAME16k / NUM_TIME_SWITCHING_BLOCKS, band_width_80_7_6_0_0_0, 966367642L, 24576, 24576/*eref*/, 9830, 9830/*bit_alloc_weight*/, 2, 4, 0, 0 /*p2a_th*/, 9830 /*pd_thresh*/, 4258/*ld_slope*/, 18022/*ni_coef*/ };
+const Xcore_Config xcore_config_16kHz_016400bps_short = { 7, L_FRAME16k / NUM_TIME_SWITCHING_BLOCKS, band_width_80_7_6_0_0_0, 966367642L, 24576, 24576/*eref*/, 11468, 11468/*bit_alloc_weight*/, 2, 8, 0, 0 /*p2a_th*/, 9830 /*pd_thresh*/, 4258/*ld_slope*/, 19660/*ni_coef*/ };
+
+/* LR-MDCT: SWB configuration tables */
+const Xcore_Config xcore_config_32kHz_013200bps_long = { 22, 568, band_width_568_22_6_2_0_0, 322122547L, 24576, 24576/*eref*/, 6554, 6554/*bit_alloc_weight*/, 2, 4, 5, 28672/*p2a_th*/, 13107 /*pd_thresh*/, 4260/*ld_slope*/, 19661/*ni_coef*/ };
+const Xcore_Config xcore_config_32kHz_016400bps_long = { 24, 640, band_width_640_24_6_4_0_0, 322122547L, 24576, 24576/*eref*/, 8192, 8192/*bit_alloc_weight*/, 2, 4, 5, 28672/*p2a_th*/, 13107 /*pd_thresh*/, 4260/*ld_slope*/, 19661/*ni_coef*/ };
+const Xcore_Config xcore_config_32kHz_013200bps_short = { 8, 568 / NUM_TIME_SWITCHING_BLOCKS, band_width_142_8_8_0_0_0, 1610612736L, 24576, 24576/*eref*/, 13107, 13107/*bit_alloc_weight*/, 2, 4, 0, 0 /*p2a_th*/, 16384 /*pd_thresh*/, 3604/*ld_slope*/, 19661/*ni_coef*/ };
+const Xcore_Config xcore_config_32kHz_016400bps_short = { 8, 640 / NUM_TIME_SWITCHING_BLOCKS, band_width_160_8_8_0_0_0, 644245094L, 24576, 24576/*eref*/, 8192, 8192/*bit_alloc_weight*/, 2, 4, 0, 0 /*p2a_th*/, 9830 /*pd_thresh*/, 4260/*ld_slope*/, 19661/*ni_coef*/ };
+
+/* bandwidths */
+const Word16 Nb[ NB_SFM] =
+{
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16,
+ 16, 16, 16, 16, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 32, 32, 32, 32, 32, 32, 32, 32
+}; // Q0
+
+/* log2(Nb) to calculate minimum bits for one pulse in PVQ */
+const Word16 LNb[ NB_SFM] =
+{
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4,
+ 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5
+}; // Q0
+
+
+/*------------------------------------------------------------------------------*
+ * GSC tables
+ *------------------------------------------------------------------------------*/
+
+const Word16 gsc_sfm_start[MBANDS_GN] = {0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240}; // Q0
+
+const Word16 gsc_sfm_end[MBANDS_GN] = {16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256}; // Q0
+
+const Word16 gsc_sfm_size[MBANDS_GN] = {16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16}; // Q0
+
+const Word16 sm_table_fx[] =
+{
+ 32767, 32126, 31480, 30838, 30196, 29557, 28918, 28279, 27643, 27007,
+ 26375, 25746, 25120, 24494, 23875, 23255, 22643, 22033, 21427, 20824,
+ 20228, 19638, 19048, 18468, 17891, 17321, 16758, 16197, 15647, 15103,
+ 14562, 14031, 13507, 12989, 12481, 11980, 11488, 11000, 10525, 10056,
+ 9598, 9146, 8706, 8274, 7851, 7438, 7035, 6642, 6259, 5885,
+ 5521, 5171, 4830, 4499, 4178, 3870, 3572, 3287, 3011, 2746,
+ 2494, 2254, 2025, 1809, 1602, 1412, 1229, 1062, 904, 760,
+ 629, 511, 403, 308, 226, 157, 102, 56, 26, 7,
+}; // Q15
+
+const Word16 GSC_freq_bits[] =
+{
+ 21, 66, -6, 25, 15, 11, 10, 5, 0, 0, 5, 4, 0, 0, 4, 0, 0, /* ACELP_5k00*/
+ 21, 66, -6, 25, 15, 11, 10, 5, 0, 0, 5, 4, 0, 0, 4, 0, 0, /* ACELP_6k15*/
+ 21, 66, -6, 25, 15, 11, 10, 5, 0, 0, 5, 4, 0, 0, 4, 0, 0, /* ACELP_7k20*/
+ 21, 74, -4, 26, 16, 12, 11, 9, 0, 0, 4, 4, 1, 1, 3, 0, 0, /* ACELP_8k00*/
+ 26, 80, -3, 28, 18, 13, 12, 9, 0, 0, 4, 4, 1, 1, 3, 0, 0, /* ACELP_9k60*/
+ 26, 96, -4, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_11k60*/
+ 26, 96, -4, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_12k15*/
+ 26, 96, -4, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_12k85*/
+ 26, 96, -4, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_13k20*/
+ 26, 96, -1, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_14k80*/
+ 26, 96, -1, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_16k40*/
+ 26, 96, 0, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_22k60*/
+ 26, 96, 0, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4 /* ACELP_24k40*/
+}; // Q0
+const Word32 GSC_freq_bits_fx[] =/*Q18*/
+{
+ 5505024, 17563648, -1572864, 6553600, 3932160, 2883584, 2621440, 1310720, 0, 0, 1310720, 1048576, 0, 0, 1048576, 0, 0, /* ACELP_5k00*/
+ 5505024, 17563648, -1572864, 6553600, 3932160, 2883584, 2621440, 1310720, 0, 0, 1310720, 1048576, 0, 0, 1048576, 0, 0, /* ACELP_6k15*/
+ 5505024, 17563648, -1572864, 6553600, 3932160, 2883584, 2621440, 1310720, 0, 0, 1310720, 1048576, 0, 0, 1048576, 0, 0, /* ACELP_7k20*/
+ 5505024, 19660800, -1048576, 6815744, 4194304, 3145728, 2883584, 2359296, 0, 0, 1048576, 1048576, 262144, 262144, 786432, 0, 0, /* ACELP_8k00*/
+ 6815744, 20971520, -786432, 7340032, 4718592, 3407872, 3145728, 2359296, 0, 0, 1048576, 1048576, 262144, 262144, 786432, 0, 0, /* ACELP_8k00*/
+ 6815744, 25165824, -1048576, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576, /* ACELP_11k60*/
+ 6815744, 25165824, -1048576, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576, /* ACELP_12k15*/
+ 6815744, 25165824, -1048576, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576, /* ACELP_12k85*/
+ 8126464, 25165824, -1048576, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576, /* ACELP_13k20*/ 26, 96, -1, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_14k80*/
+ 8126464, 25165824, -262144, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576, /* ACELP_13k20*/ 26, 96, -1, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_16k40*/
+ 8126464, 25165824, 0, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576, /* ACELP_22k60*/ 26, 96, -1, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_16k40*/
+ 8126464, 25165824, 0, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576, /* ACELP_22k60*/ 26, 96, -1, 28, 18, 13, 12,10,10, 5, 4, 4, 1, 0, 1, 3, 4, /* ACELP_16k40*/
+};
+
+const Word32 GSC_freq_bits_fx_Q18[] =/*Q18*/
+{
+ 5505024, 17301504, -1572864, 6553600, 3932160, 2883584, 2621440, 1310720, 0, 0, 1310720, 1048576, 0, 0, 1048576, 0, 0,
+ 5505024, 17301504, -1572864, 6553600, 3932160, 2883584, 2621440, 1310720, 0, 0, 1310720, 1048576, 0, 0, 1048576, 0, 0,
+ 5505024, 17301504, -1572864, 6553600, 3932160, 2883584, 2621440, 1310720, 0, 0, 1310720, 1048576, 0, 0, 1048576, 0, 0,
+ 5505024, 19398656, -1048576, 6815744, 4194304, 3145728, 2883584, 2359296, 0, 0, 1048576, 1048576, 262144, 262144, 786432, 0, 0,
+ 6815744, 20971520, -786432, 7340032, 4718592, 3407872, 3145728, 2359296, 0, 0, 1048576, 1048576, 262144, 262144, 786432, 0, 0,
+ 6815744, 25165824, -1048576, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576,
+ 6815744, 25165824, -1048576, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576,
+ 6815744, 25165824, -1048576, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576,
+ 6815744, 25165824, -1048576, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576,
+ 6815744, 25165824, -262144, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576,
+ 6815744, 25165824, -262144, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576,
+ 6815744, 25165824, 0, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576,
+ 6815744, 25165824, 0, 7340032, 4718592, 3407872, 3145728, 2621440, 2621440, 1310720, 1048576, 1048576, 262144, 0, 262144, 786432, 1048576,
+};
+const Word16 Compl_GSC_freq_bits[] =
+{
+ 5, 10, 10, 10 /* bitrate > ACELP_16k40 && FS = 16kHz */
+}; // Q0
+
+const Word16 mfreq_bindiv_loc[] = { 8, 8, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 32, 32, 32 }; // Q0
+
+const Word16 mean_gp_fx[] = { 9590 }; /*Q14*/
+
+const Word16 dic_gp_fx[] = /*Q14*/
+{
+ -9580, -7692, -6385, -4474, -3254, -2038, -806, -82,
+ 1034, 2259, 3457, 4684, 5290, 6544, 8548, 10052,
+ -8964, -8338, -7021, -5754, -5118, -3850, -2654, -1429,
+ 408, 1660, 2852, 4071, 5915, 7170, 7825, 9249
+};
+const Word16 Gain_meanNB_fx[] =
+{
+ 9852,
+};/* Q12 */
+
+const Word16 Gain_mean_dicNB_fx[1 * 64] = /*Q12 */
+{
+ -1309, -931, -568, -396, -54, 807, 1174, 1533,
+ 1901, 2092, 2286, 2493, 2698, 3130, 2909, 286,
+ -748, 990, 631, -1119, -1697, -2114, -2788, -5399,
+ -9841, -1902, -3270, -7975, -7438, -6926, -7192, -2325,
+ -1504, -2549, -3022, -3532, -3818, -4136, -4751, -5071,
+ -5756, -6093, -8998, -6389, -8765, -9438, 3369, 3917,
+ 3619, 4684, -8264, 4255, -4433, -6662, -9230, -7678,
+ 5859, 118, 457, -227, 1717, 1353, -8499, -9649
+};
+
+const Word16 Mean_dic_NB_fx[1 * 10] = /*Q12 */
+{
+ -444, -100, -120, -37, 25,
+ 70, 148, 63, 170, 229
+};
+
+const Word16 Gain_dic1_NB_fx[3 * 64] = /*Q12 */
+{
+ -606, -92, 5,
+ -1965, 294, 666,
+ -440, 119, 661,
+ -106, 267, 108,
+ -1213, 345, -136,
+ -1251, 618, 566,
+ -1905, -750, 648,
+ -1043, -360, -498,
+ -18, -322, 96,
+ 334, 116, -247,
+ -1929, 660, 23,
+ -1845, 1178, 485,
+ -180, 836, 167,
+ -1892, -922, -321,
+ 416, -437, -344,
+ 595, -548, 158,
+ -265, -807, -338,
+ -1065, -1015, -20,
+ -626, 595, -333,
+ -569, 1090, 651,
+ 27, 587, -331,
+ -184, -85, -503,
+ -1902, -1807, 326,
+ -1861, -159, -989,
+ -666, 143, -1163,
+ -1718, 1031, -744,
+ 847, 301, -59,
+ 720, -1001, -216,
+ 1380, -866, -969,
+ 803, -4, -608,
+ 233, 408, -998,
+ 1459, 87, 263,
+ 345, -615, -1026,
+ 877, -148, -7,
+ 68, -1075, 270,
+ 802, 329, 475,
+ -1923, -126, -38,
+ 1275, -419, -349,
+ 401, 926, 575,
+ 846, -233, 547,
+ 693, -1880, 356,
+ -362, -1683, -219,
+ 231, -339, 598,
+ 1227, -616, 267,
+ 1116, 91, -1316,
+ -551, -650, 530,
+ 444, 32, 181,
+ -384, 1207, -775,
+ -993, 1163, 41,
+ 784, -1018, 538,
+ 635, 636, -424,
+ 1373, -1367, 149,
+ 1442, 401, -444,
+ 1094, 888, 123,
+ 874, 1113, -1082,
+ -646, -1112, -1103,
+ 539, -1632, -683,
+ 402, 571, 99,
+ -1778, -1809, -849,
+ -732, -1691, 700,
+ -678, 526, 274,
+ 320, 1227, -118,
+ -1222, -180, 454,
+ 173, 349, 530
+};
+
+const Word16 Gain_dic2_NB_fx[3 * 32] = /*Q12 */
+{
+ 28, 0, -66,
+ -557, 4, 206,
+ 281, -642, 36,
+ -417, 81, -494,
+ -380, 684, 450,
+ 521, -1544, 258,
+ -1119, 613, -1151,
+ 514, 24, 797,
+ 292, -84, -526,
+ 296, 418, -231,
+ -419, -68, 976,
+ 2, -308, 398,
+ -456, -1007, 263,
+ -1221, -371, 446,
+ -221, -390, -181,
+ -1210, 588, 751,
+ -1093, 528, -174,
+ 590, 372, -1271,
+ -79, -251, -1241,
+ -1016, -487, -512,
+ 542, 581, 338,
+ -265, 456, -105,
+ 490, -71, 89,
+ 42, 235, 379,
+ 31, 1194, -202,
+ 173, -839, 850,
+ -46, 500, -802,
+ 152, 933, 1073,
+ 980, 345, -263,
+ 807, -580, -521,
+ -23, -992, -585,
+ 876, -576, 411
+};
+
+const Word16 Gain_dic3_NB_fx[4 * 16] = /*Q12 */
+{
+ -16, 65, -227, 11,
+ -214, 553, 366, 185,
+ 137, -338, -300, -625,
+ -122, 82, 538, -797,
+ 160, 285, -1103, 35,
+ -594, 312, -379, -423,
+ 169, -642, -395, 363,
+ 351, -1166, 630, -261,
+ -1190, 217, 416, 187,
+ -577, 244, -636, 858,
+ 580, 482, -220, 635,
+ 475, -188, 372, 27,
+ -65, -369, 504, 910,
+ -423, -442, 124, -40,
+ 480, 575, -41, -651,
+ 682, 680, 910, 489
+};
+
+const Word16 Gain_dic2_NBHR_fx[3 * 64] = /*Q12 */
+{
+ 29, 0, -94,
+ -605, -202, -174,
+ 324, -380, -163,
+ -126, -301, -306,
+ -288, 124, 112,
+ -86, 524, -115,
+ 234, 18, -464,
+ -55, -281, 179,
+ 161, 446, 632,
+ 366, -82, 97,
+ 228, -1149, 270,
+ 293, 286, -143,
+ -123, -35, -896,
+ -540, -675, 175,
+ 331, -483, -687,
+ -779, 204, -668,
+ -492, 768, -510,
+ -1215, -620, -483,
+ 681, -76, -296,
+ -671, 396, -45,
+ -759, 298, 564,
+ -284, 589, 321,
+ -1366, -592, 496,
+ -448, -585, -712,
+ 12, -756, -90,
+ 513, 167, -927,
+ -1172, 1060, -1198,
+ -477, 748, 1006,
+ 42, 103, 1277,
+ -940, 1049, 138,
+ -924, -14, -1469,
+ 684, 679, -1580,
+ 417, -374, -1572,
+ 607, 270, 256,
+ 567, 778, 843,
+ 1414, -223, -542,
+ 97, 200, 251,
+ 222, 1074, -547,
+ -714, -285, 1046,
+ 386, -684, 984,
+ 338, 674, 116,
+ -274, 171, -368,
+ 581, -1871, 342,
+ 94, 442, -597,
+ -293, -1205, 851,
+ -127, 501, -1247,
+ 175, 1700, 1357,
+ -24, 1224, 285,
+ 707, -952, -293,
+ 668, 492, -407,
+ 1164, 751, 201,
+ 381, -595, 288,
+ -1570, 481, -531,
+ -597, -160, 326,
+ -578, -1311, -40,
+ -118, -523, 576,
+ -1513, 527, 757,
+ -184, 40, 609,
+ -1215, 98, 68,
+ -65, -1324, -836,
+ 821, -299, 204,
+ 796, 21, 840,
+ 310, -133, 542,
+ 1042, -974, 537
+};
+
+const Word16 Gain_dic3_NBHR_fx[4 * 128] = /*Q12 */
+{
+ 293, 7, -202, -95,
+ 535, 110, 542, -512,
+ -578, 65, -560, -345,
+ 206, 332, 10, -533,
+ -76, 356, -14, 83,
+ 149, -372, -195, -490,
+ -478, -241, -55, 113,
+ -293, -470, -606, 62,
+ 797, -1448, 625, -1128,
+ 173, 464, -1686, -49,
+ -392, -295, -159, -464,
+ -715, 420, -146, -984,
+ -36, 28, -484, 119,
+ 472, 272, -729, -116,
+ 68, -87, -628, -429,
+ 429, -918, -158, -191,
+ -545, 230, -435, 261,
+ -128, 15, -791, 612,
+ 268, -387, -1258, 102,
+ 378, 238, 301, 3,
+ -494, 149, 131, -124,
+ 634, -308, 99, 24,
+ 572, 711, 754, -1137,
+ -1109, 400, 1093, 369,
+ -831, -423, 1583, 1089,
+ -83, 156, -105, 1078,
+ -930, 476, 152, 380,
+ 776, 1162, 788, -43,
+ 279, 50, 408, 597,
+ 476, 483, 73, 749,
+ 903, 686, 80, -411,
+ 195, -768, 280, 344,
+ -263, -999, -46, -284,
+ -66, 263, 315, -1239,
+ 435, 578, -234, -1169,
+ 199, -1669, 188, 114,
+ -57, 419, -509, -633,
+ 98, -119, 129, -816,
+ -157, -365, -249, 537,
+ 67, -624, 121, 1153,
+ 1444, 142, -584, 38,
+ 1086, -84, 162, 994,
+ 392, -384, -124, 533,
+ 252, 183, -1161, -885,
+ -431, -829, 102, 432,
+ -708, 987, -1021, -644,
+ -64, 120, -1684, 985,
+ 210, -494, -906, 1302,
+ 50, -186, 177, 185,
+ -256, 872, -1004, 387,
+ 564, -80, -679, 515,
+ -763, -40, -1174, 228,
+ -1029, 199, -59, -297,
+ 30, -47, 198, -264,
+ -396, -1435, 913, -1018,
+ -141, 962, 36, 458,
+ 36, -388, 776, -1000,
+ -74, 489, 1137, 140,
+ -970, -766, 666, -117,
+ 90, 599, 1665, 1405,
+ -313, -685, -764, -615,
+ 563, -462, -627, -768,
+ 792, 560, -1445, 556,
+ -581, 721, -559, 1137,
+ -699, -273, 274, -846,
+ 940, -690, 747, -253,
+ -177, -541, 1355, -217,
+ -586, 427, 1196, -868,
+ 147, 532, -550, 405,
+ 258, 677, -245, -166,
+ 772, 1062, -331, 482,
+ 388, 1870, -576, 1585,
+ 462, 865, 454, 1212,
+ 570, 528, -681, 1229,
+ -386, 607, 599, 865,
+ -154, -20, -211, -231,
+ 96, 736, 408, -259,
+ 763, -1533, 1094, 249,
+ 705, -1132, 1757, -1082,
+ 310, -481, 329, -395,
+ 194, -781, 59, -954,
+ -933, -957, -25, 1866,
+ -852, -224, -482, 822,
+ -1438, 490, 221, 1281,
+ 392, 677, 539, 347,
+ 884, -614, 1844, 678,
+ -773, 484, -928, 2477,
+ -274, -461, 378, -263,
+ -283, -312, 583, 342,
+ 453, -1541, 378, 1266,
+ 778, 1095, 1290, 824,
+ -958, -443, -208, -71,
+ 985, -1001, -123, 473,
+ 56, -1003, -513, 474,
+ -259, 1435, 975, 315,
+ -59, -169, 724, 961,
+ -210, 1030, 341, -977,
+ 1054, 2917, -7, -877,
+ -852, -228, 330, 625,
+ 9, -524, -97, -14,
+ 16, -50, 476, 2406,
+ 264, -238, 768, 56,
+ 187, 108, -169, 446,
+ 673, 238, 992, 671,
+ -218, 285, 485, 181,
+ 669, -526, 639, 571,
+ 650, 20, -188, -516,
+ 1031, 165, 526, 136,
+ -333, 307, 102, -569,
+ -157, 309, -934, -121,
+ -336, 141, 39, 536,
+ 662, 364, -133, 222,
+ -1284, 637, -636, 77,
+ 1241, 846, 467, 638,
+ 842, 328, 1330, -320,
+ 152, -1009, 550, -215,
+ -772, 13, 594, -122,
+ 336, -410, -547, -2,
+ 869, -106, 321, -1180,
+ 516, 1247, -828, -577,
+ -670, 873, 367, -132,
+ -415, 630, -287, -164,
+ -105, 138, 657, -441,
+ -160, -1085, 940, 704,
+ -128, -68, -369, -1052,
+ -1434, 594, 546, -665,
+ -1849, 75, 175, 174,
+ -1283, 729, -1590, 1032
+};
+
+const Word16 YG_mean16_fx[1 * 16] = /*Q12 */
+{
+ -396, -192, -168, -136, -60, -17, 45, 39,
+ 120, 81, 90, 67, 147, 34, 163, 184
+};
+
+const Word16 YG_dicMR_1_fx[4 * 64] = /*Q12 */
+{
+ -1879, 826, 539, -210,
+ -120, 267, -137, -142,
+ -798, -473, 434, 243,
+ 297, -896, 369, 307,
+ -1883, -1333, 416, 510,
+ -1955, -660, -471, 224,
+ -905, -804, -517, 433,
+ -961, 20, -258, -224,
+ 209, 977, -213, -17,
+ 536, -244, 159, 97,
+ -265, 775, 412, -327,
+ 337, -391, -237, -472,
+ -1962, -1836, -692, 471,
+ 625, 173, -463, -15,
+ -965, 263, 62, 600,
+ -782, 889, -433, 211,
+ -1791, 852, -453, -776,
+ -182, -177, -1078, 80,
+ -364, 350, 280, 293,
+ -902, 1119, 295, -1194,
+ 16, 440, -342, 459,
+ -1825, -1584, -1382, -798,
+ 723, 57, -1235, -661,
+ 888, -1638, 277, 234,
+ 340, 345, 141, -610,
+ 1280, -23, 17, 144,
+ -639, -852, -520, -553,
+ 1032, 843, 149, 435,
+ 581, 783, 519, -196,
+ 457, 945, 498, -1289,
+ -1897, -41, 425, 514,
+ 787, 161, 506, 385,
+ -559, 1079, 319, 515,
+ 500, 340, 60, 106,
+ 251, -997, -1163, -960,
+ 261, -1288, -631, 335,
+ 1241, -620, -387, -662,
+ 167, 194, 476, 67,
+ 830, -261, 430, -1201,
+ -479, -123, 71, -1162,
+ 225, -1482, 132, -802,
+ 680, 763, -1010, 429,
+ 200, -125, 261, 590,
+ 771, -740, -183, 229,
+ -1860, -348, 278, -549,
+ -1768, 967, 281, 594,
+ -1727, -1697, 87, -764,
+ 1169, 631, -114, -471,
+ -1636, -101, -1324, -91,
+ 821, -745, 458, -264,
+ 1014, -576, 390, 470,
+ 1041, -517, -1018, 367,
+ 826, 17, 426, -326,
+ -467, -1641, 201, 325,
+ -1906, 428, -338, 222,
+ -1021, 630, 419, -75,
+ -86, -379, -203, 234,
+ 659, 527, -491, -1507,
+ -564, -1745, -979, -173,
+ -1764, -433, -743, -1090,
+ 242, 709, 269, 497,
+ 716, 74, -208, 618,
+ -297, 645, -864, -805,
+ -46, -326, 412, -296
+};
+const Word16 YG_dicMR_2_fx[4 * 32] = /*Q12 */
+{
+ 93, 217, -122, 37,
+ -13, -83, 105, -491,
+ -398, -592, 399, -160,
+ 543, -81, -470, 408,
+ 394, -630, -94, -258,
+ -665, 133, -136, -125,
+ 397, -351, 630, -148,
+ -1166, 406, -865, 554,
+ -136, -302, -263, 81,
+ -674, -657, -571, -691,
+ -206, 381, -699, 122,
+ 272, -1506, 356, 15,
+ 451, -961, 638, -1133,
+ 316, -787, 165, 585,
+ 312, -144, 185, 274,
+ 39, -706, -997, 250,
+ -915, -871, -114, 458,
+ -834, 348, 364, -1188,
+ 450, 723, -256, 412,
+ 369, 468, -1371, 416,
+ 344, 164, 290, -1094,
+ 664, 122, 34, -218,
+ 555, 254, 559, 825,
+ 312, 492, 496, -27,
+ -399, 315, 690, -330,
+ -458, 710, 206, 415,
+ 290, 89, -662, -467,
+ -72, 593, -108, -460,
+ -217, 46, 319, 189,
+ -1366, 199, 365, 62,
+ -552, -166, 772, 861,
+ -159, 120, -215, 775
+};
+const Word16 YG_dicMR_3_fx[4 * 32] = /*Q12 */
+{
+ -103, -143, -85, -19,
+ -404, 182, -795, 84,
+ 398, -594, -55, -256,
+ 283, 128, -472, 279,
+ -246, -628, 281, 297,
+ -853, 468, 358, -915,
+ 272, 149, 209, -443,
+ -168, -504, 452, -525,
+ 624, -427, 779, 117,
+ 1079, 404, -98, 80,
+ 136, 165, 142, -1394,
+ 513, -566, -150, 822,
+ 124, 646, 199, 272,
+ -165, -702, -615, 165,
+ 333, 810, -457, 1038,
+ -360, 105, -110, 537,
+ -224, 125, 562, -26,
+ 699, -1105, 809, -1323,
+ -1229, 841, -767, 571,
+ -310, 437, -114, -230,
+ -1045, 630, 564, 322,
+ 282, 1170, -723, -306,
+ -328, -247, -251, -598,
+ 354, 332, -1593, 499,
+ 332, -23, 219, 304,
+ 325, -1511, 378, 299,
+ -94, -54, 679, 956,
+ 507, 830, 861, -739,
+ -895, -135, 16, -34,
+ 677, 650, 961, 714,
+ 816, -665, -1741, -671,
+ 274, 93, -617, -433
+};
+const Word16 YG_dicMR_4_fx[4 * 16] = /*Q12 */
+{
+ -163, -44, -108, 32,
+ 556, 153, 115, 120,
+ 617, 818, 802, 719,
+ -639, -665, 122, 664,
+ 353, -555, -352, -86,
+ -1162, 833, -1034, 326,
+ -511, -406, -478, -523,
+ 491, -1473, 404, -21,
+ 148, 288, -45, -544,
+ -61, 172, -791, -44,
+ 715, -449, 861, 504,
+ -108, 263, 610, 118,
+ 962, 826, -1013, -37,
+ -32, -495, 362, -214,
+ -37, 661, -75, 289,
+ -835, 243, 85, -105
+};
+
+
+const Word16 mean_m_fx[1 * 1] = /*Q12 */
+{
+ 11762
+};
+
+const Word16 mean_gain_dic_fx[1 * 64] =
+{
+ -739, -519, -76, 147, 574, 779, 983, 1185,
+ 1384, 1580, 1784, 1989, 2204, 2643, 2864, 2422,
+ 362, -295, -1197, -1936, -2757, -11755, -8216, 3083,
+ 3311, -1434, -1682, -3341, -9284, -9057, -8616, -7783,
+ -7359, -6964, -6592, -6233, -5470, -5050, -4651, -3954,
+ -2470, -963, -2199, -3042, -3643, -4292, -5854, -10199,
+ 4103, 3548, 4390, 4717, 3817, -10525, -11521, -9570,
+ -9899, -9171, -10841, -11165, 5500, 5079, 6139, 6993
+}; /* Q12 */
+
+const Word16 YGain_mean_LR_fx[1 * 12] =/* Q12 */
+{
+ -385, -178, -143, -116, -46, -12,
+ 64, 50, 118, 68, 133, 151
+};
+
+const Word16 YGain_dic1_LR_fx[3 * 32] = /*Q12 */
+{
+ -1909, 159, -90,
+ -155, 416, -15,
+ -99, -84, 396,
+ -1832, -848, -320,
+ -779, 1024, 45,
+ -1860, -1761, 273,
+ 81, -341, -309,
+ -819, -3, -315,
+ 483, 215, -194,
+ 242, 937, -76,
+ -1830, -1753, -1102,
+ -1589, 868, -657,
+ -911, 389, 421,
+ -1834, 915, 390,
+ -144, 564, -869,
+ 878, -1544, 301,
+ 446, 332, 376,
+ -540, -822, -1001,
+ 548, -192, 232,
+ 920, -589, -175,
+ 869, 717, -564,
+ 797, -103, -1047,
+ -335, -1732, -186,
+ -1840, -345, 566,
+ 1205, 109, 43,
+ 985, -456, 570,
+ 650, -1223, -874,
+ 928, 752, 390,
+ -124, 833, 575,
+ -1811, -249, -1142,
+ -711, -767, 185,
+ 344, -876, 267,
+};
+
+const Word16 YGain_dic2_LR_fx[4 * 32] = /*Q12 */
+{
+ -294, -73, -41, 11,
+ 276, 330, -1316, 173,
+ 26, -712, 86, 1,
+ -841, -539, 246, -479,
+ 43, -207, 709, 116,
+ 104, -197, 227, -548,
+ 261, -228, 165, 606,
+ 613, 403, -122, -420,
+ 14, 182, -544, -669,
+ -734, 392, -492, -131,
+ -1316, 274, 116, 331,
+ -1339, 535, -1261, 608,
+ -346, 277, -426, 729,
+ -1067, -836, -571, 388,
+ 643, 503, 484, 532,
+ -148, 447, 120, -392,
+ -600, 263, 519, -75,
+ 686, -346, 379, 23,
+ 130, 239, 376, -1366,
+ 68, 656, -361, 92,
+ 608, 286, -405, 487,
+ -1031, 507, 523, -971,
+ 51, -44, -521, 172,
+ -573, -500, 398, 632,
+ 240, 147, 104, 51,
+ -319, -680, -890, -398,
+ -195, 503, 306, 459,
+ 335, 368, 662, -389,
+ 378, -788, -537, 680,
+ 433, -1129, 472, -883,
+ 472, -312, -301, -207,
+ 378, -1346, 433, 408,
+};
+
+const Word16 YGain_dic3_LR_fx[5 * 32] = /*Q12 */
+{
+ -332, -191, -122, -455, -210,
+ 364, -48, -664, 408, 225,
+ -576, -342, 367, 52, 270,
+ -392, -157, -77, 625, -224,
+ -183, -652, -406, 99, 266,
+ 24, 65, 74, 525, 613,
+ -805, 306, -383, -21, 247,
+ 16, 133, -416, -4, -567,
+ 294, -750, 443, -367, 228,
+ 536, 816, 767, 562, 594,
+ -54, 200, -1108, -582, 227,
+ 123, -43, 414, -376, -649,
+ 592, -652, -674, -386, -356,
+ 100, -58, -45, -108, 103,
+ -727, -194, -1170, 931, 1096,
+ 512, 758, -440, -769, -1051,
+ 362, 787, -276, -139, 149,
+ -218, 387, 457, -414, 265,
+ -202, 663, -1104, 882, -338,
+ -57, 405, 269, 257, -221,
+ 335, 864, 1164, -611, -618,
+ 1275, 494, -1783, 119, 1222,
+ 752, 76, 270, 73, -57,
+ 376, -1255, 145, 724, 603,
+ -989, 618, 659, 675, 560,
+ 128, -147, -138, -368, 963,
+ 140, -170, 866, 538, 127,
+ 122, -616, 166, 236, -396,
+ 374, 279, 407, 650, -1269,
+ -861, 613, -755, -1334, -972,
+ -922, 314, 416, -114, -648,
+ 265, 85, 61, -1110, 45
+};
+
+const Word16 YG_mean16HR_fx[] =
+{
+ //Q12
+ -396, -191, -167, -135,
+ -60, -17, 45, 39,
+ 120, 81, 89, 67,
+ 146, 33, 163, 183,
+};
+
+const Word16 YG_dicHR_1_fx[] =
+{
+ //Q12
+ -1955, 412, 133, 32,
+ -340, 88, -42, 20,
+ -999, 314, -144, 456,
+ -429, -190, 186, 547,
+ -1057, 160, 243, -197,
+ -46, -81, -491, -223,
+ 143, 986, -113, 15,
+ 286, -313, 77, 3,
+ 249, -1251, 380, 305,
+ -1909, -258, 481, 86,
+ 902, 59, 42, -186,
+ -1969, -992, -335, 223,
+ -1913, -163, -465, -167,
+ -806, 1201, 24, 481,
+ -564, -1943, 212, 380,
+ -120, -691, -162, 138,
+ -966, 1009, 437, -464,
+ 434, 147, 185, 158,
+ -1944, -133, -313, 602,
+ -1029, 236, -612, -373,
+ -749, -571, -1008, -399,
+ 666, -954, -111, 88,
+ 186, -16, -174, 338,
+ -235, -314, 403, -244,
+ 285, 133, 85, -349,
+ -1981, -1506, -1290, 338,
+ -1977, -1925, -368, 876,
+ -1930, 256, 453, 667,
+ -1884, 259, -123, -779,
+ -813, 1087, -595, -1014,
+ 396, 66, -876, 412,
+ -543, 907, -657, 301,
+ -485, 612, 515, 777,
+ -362, 420, 417, -518,
+ -1754, 1307, 65, -1202,
+ -618, 705, -56, -56,
+ -1938, 1005, 561, 59,
+ 62, 521, -440, 319,
+ -1776, 1011, -279, -165,
+ 558, 357, -444, -47,
+ 801, -1998, 313, 319,
+ -1873, -826, -1691, -978,
+ -588, -294, -328, -1021,
+ -91, 513, -288, -530,
+ -1945, -1964, -350, -293,
+ -307, -1057, 203, -631,
+ 94, -1713, -548, -62,
+ 616, -11, -510, -780,
+ 682, -1574, 260, -441,
+ 507, -778, 522, -88,
+ 1321, -635, -432, -619,
+ 369, -615, -335, -1646,
+ 1026, -572, 265, -256,
+ 779, 127, -155, 356,
+ -462, -180, -637, 405,
+ 1329, 1071, 543, 784,
+ 434, -468, 120, -581,
+ 1293, -532, 60, 377,
+ 63, -1290, -336, 708,
+ 756, 42, 412, 607,
+ 731, 1003, 598, -1388,
+ -1818, -1666, 547, 185,
+ -1915, -802, 485, 789,
+ 907, 437, 455, 108,
+ 507, -102, 573, -109,
+ 1037, -1292, -691, 512,
+ 1428, 159, 20, 271,
+ 111, -826, -607, -563,
+ -622, -1328, -1391, -1000,
+ -15, 1094, 339, -684,
+ 448, 790, -439, -1617,
+ -1765, -943, -657, -675,
+ 107, -835, -1140, 241,
+ 33, 122, 520, 242,
+ 194, 204, 313, -1080,
+ 1308, 548, -711, -850,
+ 1520, 474, 334, -516,
+ 1091, -42, 347, -1543,
+ 1098, -219, 680, 139,
+ 855, -895, 613, -985,
+ -1631, -1550, 539, -1277,
+ 672, 905, -1057, 430,
+ 555, 659, -38, 450,
+ -1118, -53, 536, 487,
+ 563, -485, -204, 650,
+ -678, -930, 470, 425,
+ 1180, -259, -990, 319,
+ 993, 319, -362, 926,
+ 782, -254, -1447, -534,
+ -1946, 964, 86, 617,
+ -1651, 727, -813, 514,
+ -552, 395, 522, 124,
+ -1710, 579, 831, -542,
+ 34, 463, 143, 2,
+ -1742, -207, -642, -1517,
+ -1967, -740, 272, -606,
+ 663, 670, 58, -620,
+ 229, 274, 122, 677,
+ 65, 1144, 24, 693,
+ -1383, 1061, 630, 894,
+ 536, 539, 106, -31,
+ 1080, 774, -267, 67,
+ 355, 518, 609, -336,
+ 777, -735, 412, 551,
+ 219, -424, 392, 451,
+ -543, -1909, -189, -933,
+ -938, -178, 489, -1008,
+ -749, -1216, -440, -157,
+ 681, -355, -423, -19,
+ 299, 1053, -913, -506,
+ -258, 360, -1457, -38,
+ -264, 967, 519, 58,
+ -718, -1676, -1184, 185,
+ 741, -314, 184, 210,
+ -1780, -305, -1299, 167,
+ -1912, -1932, -1292, -970,
+ -1017, -520, -96, -136,
+ -1829, 500, -1244, -625,
+ -1041, -791, -461, 591,
+ 708, -1386, -1078, -956,
+ 339, 636, 509, 408,
+ -131, 106, -1202, -1118,
+ 818, 18, 477, -676,
+ 668, 1176, 422, -36,
+ 1074, -1259, 425, 267,
+ -281, 539, 31, 430,
+ -1196, 756, 338, 236,
+ -568, 1030, 421, -1589,
+};
+
+const Word16 YG_dicHR_2_fx[] =
+{
+ //Q12
+ 146, -73, -67, -101,
+ -11, 330, -176, -609,
+ -283, -31, -381, -191,
+ -208, -81, 142, 234,
+ 141, -376, -66, -646,
+ 568, -38, -429, 160,
+ 166, 831, 89, -103,
+ 280, -881, -296, -82,
+ -117, -4, 340, -956,
+ 286, -136, -679, -410,
+ 141, 181, -197, 511,
+ -685, 648, 246, -365,
+ 625, -670, 591, 190,
+ -7, -296, -454, 235,
+ 840, 126, 652, 1064,
+ -428, -570, -18, -77,
+ -298, -973, 637, 380,
+ -774, -31, -333, -902,
+ -1509, 167, 471, -369,
+ 431, -1437, 124, 610,
+ -917, 511, 518, -1488,
+ -97, 262, -872, 247,
+ 549, -166, 602, -590,
+ 644, -1030, 796, -1279,
+ 525, -37, 212, 197,
+ 141, 345, 195, 211,
+ 91, -71, 674, 223,
+ -1343, -902, -27, 234,
+ -467, -981, -427, 725,
+ 176, -527, 85, 275,
+ -654, -859, 473, -873,
+ 671, -457, -326, 742,
+ 699, 613, -78, 457,
+ -487, 505, 231, 578,
+ -194, 927, -493, 529,
+ 635, 554, -917, 532,
+ -554, -12, -314, 611,
+ 172, 667, 532, -874,
+ 594, 270, -27, -378,
+ 388, -530, -1307, 274,
+ 647, 451, 670, 24,
+ 745, -470, 8, -260,
+ -725, -292, -1018, -32,
+ 95, 184, 330, -280,
+ -761, -135, 552, 250,
+ -415, -3, 197, -307,
+ 142, 702, 584, 755,
+ 450, 595, -1010, -525,
+ -455, -1143, -775, -639,
+ 228, 496, -1676, 399,
+ 82, 242, -532, 1222,
+ 125, -214, 319, 804,
+ -292, 380, -126, 70,
+ 96, -480, 407, -259,
+ -636, -148, 890, 1241,
+ 213, 404, -382, -7,
+ -315, 509, 660, 61,
+ 505, 18, 33, -1385,
+ -568, 716, -623, -338,
+ -440, 38, 972, -455,
+ -1420, 576, -1125, 668,
+ -1391, 481, 229, 593,
+ 335, -1464, 430, -375,
+ -918, 124, -155, 34,
+};
+
+const Word16 YG_dicHR_3_fx[] =
+{
+ //Q12
+ -174, -82, -158, -12,
+ 155, -403, 114, -132,
+ 188, 2, -231, -470,
+ 448, -222, -598, -103,
+ -353, 304, -1173, 420,
+ -43, -77, -533, 386,
+ 526, -57, 360, -247,
+ -837, -219, -344, 42,
+ -236, 88, -664, -226,
+ -1218, 66, 362, -529,
+ -398, 496, -300, 299,
+ 212, 508, -521, 80,
+ -267, -522, 45, 286,
+ -65, -1143, 154, -169,
+ 725, -1483, 883, -1459,
+ 9, -109, 334, -752,
+ -38, 860, -22, -333,
+ -487, 340, 202, -1529,
+ -349, 387, 645, -464,
+ -106, 73, 170, 427,
+ 180, 384, -292, 989,
+ 178, -505, 618, 375,
+ 481, 539, -1777, 1050,
+ 680, -792, 65, 136,
+ -1388, 798, -1090, 670,
+ -377, -507, -139, -580,
+ 301, 614, 194, 392,
+ -218, -1155, 341, 834,
+ 338, -1071, -1177, 673,
+ -406, 188, -92, -546,
+ -58, -656, 773, -540,
+ 461, 649, 840, -108,
+ -775, -352, 620, 233,
+ -390, 666, 601, 438,
+ -394, 1594, -299, 1009,
+ 367, 448, 291, -886,
+ 788, 76, 479, 531,
+ -77, -655, -500, -14,
+ 514, -1745, 497, 217,
+ 904, -963, 630, 1261,
+ 775, 224, -795, 520,
+ 291, -435, -112, 679,
+ 494, 1380, -1018, -186,
+ -75, 86, 731, 1048,
+ 65, 74, 617, 99,
+ 512, -46, 709, -1636,
+ -926, 1237, 1090, -812,
+ 40, 297, 97, -131,
+ 656, 770, 1176, 920,
+ 1313, -582, -1832, -912,
+ 490, -648, -43, -805,
+ -449, -882, -1473, -698,
+ 1028, 421, -151, -289,
+ 1089, 1107, -144, 760,
+ 188, 357, -638, -1027,
+ -337, -210, 300, -194,
+ 319, 223, -1587, -64,
+ 972, 1384, 786, -1026,
+ 928, -468, 1116, -198,
+ -1489, 642, 269, 385,
+ -627, 250, 153, 50,
+ -906, 613, -518, -436,
+ 379, 18, -68, 218,
+ -648, -85, -110, 765,
+};
+
+const Word16 YG_mean16HR_16kHz_fx[] =
+{
+ //Q12
+ 342, 152, 373, 359
+};
+
+const Word16 YG_dicHR_4_16kHz_fx[] =
+{
+ //Q12
+ 137, 109, 215, 21,
+ 328, -26, 537, -270,
+ -137, -851, -385, -703,
+ -537, -81, -244, -23,
+ -174, -425, -175, -351,
+ 861, 1100, 696, 574,
+ -150, -14, -390, -241,
+ -828, 166, 164, -151,
+ -226, 541, 204, -110,
+ 184, 820, -89, 264,
+ -26, 889, 709, 520,
+ 83, -176, -713, -276,
+ -149, -1318, 731, -193,
+ -324, -55, 118, 182,
+ 474, -493, -411, 52,
+ 156, -1459, -370, -71,
+ 513, 451, 973, 283,
+ 903, -296, 309, 121,
+ 1261, 296, 886, 702,
+ 984, -1204, 915, 15,
+ -401, 456, -316, 136,
+ 458, -1779, 335, -788,
+ 471, -796, 239, -331,
+ -390, -2265, 493, -305,
+ 469, -1946, 389, 280,
+ 150, 463, -725, 114,
+ -411, 99, -906, -128,
+ 628, 888, 1299, 1039,
+ 1454, 1377, 1415, 1350,
+ -1, 242, -164, -11,
+ 632, 621, 416, 695,
+ 396, -1030, 356, 492,
+ 48, -279, -98, -30,
+ -568, -212, -376, -571,
+ 275, 570, 382, 152,
+ 443, 75, 521, 418,
+ -1366, -1566, -2460, -2925,
+ -1059, 64, -585, -231,
+ 134, 489, -296, -380,
+ -1453, -890, -1200, -1157,
+ -27, 240, -1694, 47,
+ 464, 86, -204, -79,
+ 746, 462, 234, 57,
+ 1087, -738, 1095, 1050,
+ 922, 619, -412, 409,
+ -261, 35, 124, -313,
+ -794, 842, -992, 314,
+ 280, -465, 1028, 196,
+ 233, -346, 257, 183,
+ -1640, 244, -110, 28,
+ 377, 171, -57, 392,
+ -89, 368, 195, 456,
+ 501, 1327, 119, 980,
+ -64, -84, -417, 262,
+ -414, -558, -638, -102,
+ -1785, 392, -1756, -430,
+ -705, -299, -1189, -730,
+ -477, 347, -400, -367,
+ -93, -825, -20, -13,
+ -710, -540, 45, -265,
+ -151, -487, 380, -243,
+ -269, 32, 702, 143,
+ 206, -145, -27, -474,
+ -694, 777, 287, 357,
+};
+
+const Word16 YG_meanL2G_16kHz_fx[] =
+{
+ //Q12
+ 424, 651,
+};
+
+const Word16 YG_dicL2G_16kHz_fx[] =//Q12
+{
+ -255, 122,
+ 296, 314,
+ -226, -333,
+ 668, 668,
+ 101, -53,
+ -579, -647,
+ -1202, -1244,
+ 1213, 1254,
+};
+
+const Word16 Odx_fft64[64] =
+{
+ 0,59,54,49,44,39,34,29,24,19,14,9,4,63,58,53,48,43,38,33,28,23,18,13,8,3,62,57,52,47,42,37,
+ 32,27,22,17,12,7,2,61,56,51,46,41,36,31,26,21,16,11,6,1,60,55,50,45,40,35,30,25,20,15,10,5
+}; // Q0
+
+const Word16 Ip_fft64[6] = { 32,1,0,64,32,96 }; // Q0
+
+const Word16 Odx_fft32_15[32] = { 0,17,2,19,4,21,6,23,8,25,10,27,12,29,14,31,16,1,18,3,20,5,22,7,24,9,26,11,28,13,30,15 }; // Q0
+
+const Word32 w_fft32_16fx[16] =//Q30
+{
+ 1073741824, 0, 759250113, 759250113, 992008059, 410903236, 410903236, 992008059,
+ 1053110143, 209476636, 596539003, 892783685, 892783685, 596539003, 209476636, 1053110143
+};
+const Word16 Ip_fft32[6] = { 16,1,0,32,16,48 }; // Q0
+
+const Word16 Odx_fft32_5[32] = { 0,27,22,17,12,7,2,29,24,19,14,9,4,31,26,21,16,11,6,1,28,23,18,13,8,3,30,25,20,15,10,5 }; // Q0
+
+const Word16 Odx_fft16[16] = {0,11,6,1,12,7,2,13,8,3,14,9,4,15,10,5}; // Q0
+
+const Word16 Ip_fft16[6] = {8,1,0,16,8,24}; // Q0
+
+const Word16 Ip_fft8[6] = {4,1,0,8,4,12}; // Q0
+
+const Word16 Idx_dortft80[80] =
+{
+ 0,65,50,35,20,5,70,55,40,25,10,75,60,45,30,15,16,1,66,51,36,21,6,71,56,41,26,11,76,61,
+ 46,31,32,17,2,67,52,37,22,7,72,57,42,27,12,77,62,47,48,33,18,3,68,53,38,23,8,73,58,43,
+ 28,13,78,63,64,49,34,19,4,69,54,39,24,9,74,59,44,29,14,79
+}; // Q0
+
+const Word16 Idx_dortft120[120] =
+{
+ 0,105,90,75,60,45,30,15,16,1,106,91,76,61,46,31,32,17,2,107,92,77,62,47,
+ 48,33,18,3,108,93,78,63,64,49,34,19,4,109,94,79,80,65,50,35,20,5,110,95,
+ 96,81,66,51,36,21,6,111,112,97,82,67,52,37,22,7,8,113,98,83,68,53,38,23,
+ 24,9,114,99,84,69,54,39,40,25,10,115,100,85,70,55,56,41,26,11,116,101,86,
+ 71,72,57,42,27,12,117,102,87,88,73,58,43,28,13,118,103,104,89,74,59,44,29,14,119
+}; // Q0
+
+const Word16 Idx_dortft160[160] =
+{
+ 0,65,130,35,100,5,70,135,40,105,10,75,140,45,110,15,80,145,
+ 50,115,20,85,150,55,120,25,90,155,60,125,30,95,96,1,66,131,
+ 36,101,6,71,136,41,106,11,76,141,46,111,16,81,146,51,116,21,
+ 86,151,56,121,26,91,156,61,126,31,32,97,2,67,132,37,102,7,
+ 72,137,42,107,12,77,142,47,112,17,82,147,52,117,22,87,152,57,
+ 122,27,92,157,62,127,128,33,98,3,68,133,38,103,8,73,138,43,
+ 108,13,78,143,48,113,18,83,148,53,118,23,88,153,58,123,28,93,
+ 158,63,64,129,34,99,4,69,134,39,104,9,74,139,44,109,14,79,
+ 144,49,114,19,84,149,54,119,24,89,154,59,124,29,94,159
+}; // Q0
+
+const Word16 Idx_dortft320[320] =
+{
+ 0,65,130,195,260,5,70,135,200,265,10,75,140,205,270,15,80,145,210,275,20,85,150,215,280,25,90,155,220,285,30,95,
+ 160,225,290,35,100,165,230,295,40,105,170,235,300,45,110,175,240,305,50,115,180,245,310,55,120,185,250,315,60,125,
+ 190,255,256,1,66,131,196,261,6,71,136,201,266,11,76,141,206,271,16,81,146,211,276,21,86,151,216,281,26,91,156,221,
+ 286,31,96,161,226,291,36,101,166,231,296,41,106,171,236,301,46,111,176,241,306,51,116,181,246,311,56,121,186,251,
+ 316,61,126,191,192,257,2,67,132,197,262,7,72,137,202,267,12,77,142,207,272,17,82,147,212,277,22,87,152,217,282,27,
+ 92,157,222,287,32,97,162,227,292,37,102,167,232,297,42,107,172,237,302,47,112,177,242,307,52,117,182,247,312,57,122,
+ 187,252,317,62,127,128,193,258,3,68,133,198,263,8,73,138,203,268,13,78,143,208,273,18,83,148,213,278,23,88,153,218,
+ 283,28,93,158,223,288,33,98,163,228,293,38,103,168,233,298,43,108,173,238,303,48,113,178,243,308,53,118,183,248,313,
+ 58,123,188,253,318,63,64,129,194,259,4,69,134,199,264,9,74,139,204,269,14,79,144,209,274,19,84,149,214,279,24,89,154,
+ 219,284,29,94,159,224,289,34,99,164,229,294,39,104,169,234,299,44,109,174,239,304,49,114,179,244,309,54,119,184,249,
+ 314,59,124,189,254,319
+}; // Q0
+
+const Word16 Idx_dortft480[480] =
+{
+ 0,225,450,195,420,165,390,135,360,105,330,75,300,45,270,15,240,465,210,435,180,405,150,375,120,345,
+ 90,315,60,285,30,255,256,1,226,451,196,421,166,391,136,361,106,331,76,301,46,271,16,241,466,211,436,
+ 181,406,151,376,121,346,91,316,61,286,31,32,257,2,227,452,197,422,167,392,137,362,107,332,77,302,47,
+ 272,17,242,467,212,437,182,407,152,377,122,347,92,317,62,287,288,33,258,3,228,453,198,423,168,393,138,
+ 363,108,333,78,303,48,273,18,243,468,213,438,183,408,153,378,123,348,93,318,63,64,289,34,259,4,229,454,
+ 199,424,169,394,139,364,109,334,79,304,49,274,19,244,469,214,439,184,409,154,379,124,349,94,319,320,
+ 65,290,35,260,5,230,455,200,425,170,395,140,365,110,335,80,305,50,275,20,245,470,215,440,185,410,155,
+ 380,125,350,95,96,321,66,291,36,261,6,231,456,201,426,171,396,141,366,111,336,81,306,51,276,21,246,471,
+ 216,441,186,411,156,381,126,351,352,97,322,67,292,37,262,7,232,457,202,427,172,397,142,367,112,337,82,
+ 307,52,277,22,247,472,217,442,187,412,157,382,127,128,353,98,323,68,293,38,263,8,233,458,203,428,173,
+ 398,143,368,113,338,83,308,53,278,23,248,473,218,443,188,413,158,383,384,129,354,99,324,69,294,39,264,
+ 9,234,459,204,429,174,399,144,369,114,339,84,309,54,279,24,249,474,219,444,189,414,159,160,385,130,355,
+ 100,325,70,295,40,265,10,235,460,205,430,175,400,145,370,115,340,85,310,55,280,25,250,475,220,445,190,
+ 415,416,161,386,131,356,101,326,71,296,41,266,11,236,461,206,431,176,401,146,371,116,341,86,311,56,281,
+ 26,251,476,221,446,191,192,417,162,387,132,357,102,327,72,297,42,267,12,237,462,207,432,177,402,147,372,
+ 117,342,87,312,57,282,27,252,477,222,447,448,193,418,163,388,133,358,103,328,73,298,43,268,13,238,463,
+ 208,433,178,403,148,373,118,343,88,313,58,283,28,253,478,223,224,449,194,419,164,389,134,359,104,329,74,
+ 299,44,269,14,239,464,209,434,179,404,149,374,119,344,89,314,59,284,29,254,479
+}; // Q0
+
+const Word16 Ip_fft128[10] = { 64, 1, 0, 128, 64, 192, 32, 160, 96, 224 }; // Q0
+
+const Word32 w_fft128_16fx[64] =
+{
+ 1073741824, 0, 759250112, 759250112, 992008064, 410903232, 410903232, 992008064,
+ 1053110144, 209476640, 596539008, 892783680, 892783680, 596539008, 209476640, 1053110144,
+ 1068571456, 105245104, 681174592, 830013632, 946955712, 506158400, 311690816, 1027506880,
+ 1027506880, 311690816, 506158400, 946955712, 830013632, 681174592, 105245104, 1068571456,
+ 1072448448, 52686008, 721080960, 795590208, 970651136, 459083776, 361732736, 1010975232,
+ 1041563136, 260897968, 552013632, 920979072, 862437504, 639627264, 157550640, 1062120192,
+ 1062120192, 157550640, 639627264, 862437504, 920979072, 552013632, 260897968, 1041563136,
+ 1010975232, 361732736, 459083776, 970651136, 795590208, 721080960, 52686008, 1072448448,
+}; // Q30
+
+const Word16 Ip_fft256[10] = {128, 1, 0, 256, 128, 384, 64, 320,192, 448}; // Q0
+
+const Word16 Ip_fft512[18] = {256, 1, 0, 512, 256, 768, 128, 640,384, 896, 64, 576, 320, 832, 192, 704,448, 960}; // Q0
+
+const Word16 w_fft512_fx_evs[256] =//Q14
+{
+ 16384, 0, 11585, 11585, 15137, 6270, 6270, 15137,
+ 16069, 3196, 9102, 13623, 13623, 9102, 3196, 16069,
+ 16305, 1606, 10394, 12665, 14449, 7723, 4756, 15679,
+ 15679, 4756, 7723, 14449, 12665, 10394, 1606, 16305,
+ 16364, 804, 11003, 12140, 14811, 7005, 5520, 15426,
+ 15893, 3981, 8423, 14053, 13160, 9760, 2404, 16207,
+ 16207, 2404, 9760, 13160, 14053, 8423, 3981, 15893,
+ 15426, 5520, 7005, 14811, 12140, 11003, 804, 16364,
+ 16379, 402, 11297, 11866, 14978, 6639, 5897, 15286,
+ 15986, 3590, 8765, 13842, 13395, 9434, 2801, 16143,
+ 16261, 2006, 10080, 12916, 14256, 8076, 4370, 15791,
+ 15557, 5139, 7366, 14635, 12406, 10702, 1205, 16340,
+ 16340, 1205, 10702, 12406, 14635, 7366, 5139, 15557,
+ 15791, 4370, 8076, 14256, 12916, 10080, 2006, 16261,
+ 16143, 2801, 9434, 13395, 13842, 8765, 3590, 15986,
+ 15286, 5897, 6639, 14978, 11866, 11297, 402, 16379,
+ 16383, 201, 11442, 11727, 15059, 6455, 6084, 15213,
+ 16029, 3393, 8935, 13733, 13510, 9269, 2999, 16107,
+ 16284, 1806, 10238, 12792, 14354, 7900, 4563, 15736,
+ 15619, 4948, 7545, 14543, 12537, 10549, 1406, 16324,
+ 16353, 1005, 10853, 12274, 14724, 7186, 5330, 15493,
+ 15843, 4176, 8250, 14155, 13039, 9921, 2205, 16235,
+ 16176, 2603, 9598, 13279, 13949, 8595, 3786, 15941,
+ 15357, 5708, 6823, 14896, 12004, 11151, 603, 16373,
+ 16373, 603, 11151, 12004, 14896, 6823, 5708, 15357,
+ 15941, 3786, 8595, 13949, 13279, 9598, 2603, 16176,
+ 16235, 2205, 9921, 13039, 14155, 8250, 4176, 15843,
+ 15493, 5330, 7186, 14724, 12274, 10853, 1005, 16353,
+ 16324, 1406, 10549, 12537, 14543, 7545, 4948, 15619,
+ 15736, 4563, 7900, 14354, 12792, 10238, 1806, 16284,
+ 16107, 2999, 9269, 13510, 13733, 8935, 3393, 16029,
+ 15213, 6084, 6455, 15059, 11727, 11442, 201, 16383
+};
+const Word16 Idx_dortft40[40] =
+{
+ 0, 25, 10, 35, 20, 5, 30, 15, 16, 1, 26, 11, 36, 21, 6, 31, 32, 17, 2, 27,
+ 12, 37, 22, 7, 8, 33, 18, 3, 28, 13, 38, 23, 24, 9, 34, 19, 4, 29, 14, 39
+}; // Q0
+
+const Word16 Odx_fft8_5[8] = {0, 3, 6, 1, 4, 7, 2, 5}; // Q0
+const Word16 Idx_dortft20[20] = {0, 5, 10, 15, 16, 1, 6, 11, 12, 17, 2, 7, 8, 13, 18, 3, 4, 9, 14, 19}; // Q0
+const Word16 Odx_fft4_5[4] = {0, 3, 2, 1}; // Q0
+const Word16 Ip_fft4[6] = {2,1,0,4,2,6}; // Q0
+const Word16 ip_edct2_64[6] = {16, 64, 0, 32, 16, 48}; // Q0
+
+const Word16 w_edct2_64_fx[80] = /*Q14 */
+{
+ 16384, 0, 11585, 11585, 15137, 6270, 6270, 15137,
+ 16069, 3196, 9102, 13623, 13623, 9102, 3196, 16069,
+ 11585, 8190, 8182, 8170, 8153, 8130, 8103, 8071,
+ 8035, 7993, 7946, 7895, 7839, 7779, 7713, 7643,
+ 7568, 7489, 7405, 7317, 7225, 7128, 7027, 6921,
+ 6811, 6698, 6580, 6458, 6333, 6203, 6070, 5933,
+ 5793, 5649, 5501, 5351, 5197, 5040, 4880, 4717,
+ 4551, 4383, 4212, 4038, 3862, 3683, 3503, 3320,
+ 3135, 2948, 2760, 2570, 2378, 2185, 1990, 1795,
+ 1598, 1401, 1202, 1003, 803, 603, 402, 201
+};
+
+/* HVQ */
+const Word16 hvq_thr_adj_fx[5] = { 23170, 16384, 8192, 16384, 23170 }; /* Q15 */
+
+const Word16 hvq_index_mapping_fx[4] = { 0, 1, 3, 4 };
+
+const Word16 hvq_class_c_fx[16] = /* Q15 */
+{
+ -7617, -14387, 2136, 6914,
+ 4821, -4428, 14131, -4538,
+ -4538, 14131, -4428, 4821,
+ 6914, 2136, -14387, -7617
+};
+
+const Word16 hvq_cb_search_overlap24k[17] =
+{
+ 0, 8, 17, 27,
+ 39, 53, 69, 89,
+ 113, 128, 128, 128,
+ 128, 128, 128, 128,
+ 128
+}; // Q0
+
+const Word16 hvq_cb_search_overlap32k[21] =
+{
+ 0, 6, 13, 21,
+ 30, 40, 51, 64,
+ 78, 96, 116, 128,
+ 128, 128, 128, 128,
+ 128, 128, 128, 128,
+ 128
+}; // Q0
+
+const Word16 hvq_peak_cb_fx[1024] = /* Q15 */
+{
+ -22652,-20549,-23019, 13968,-25496,-27493, -6957, 5753,-19678,-20274,
+ -6119, 18297, -5329,-22843,-21254, 13929,-27525,-29034, 563, 7265,
+ -26138,-13138, -9678, 7972, -517,-20830,-10703, 26832,-27818,-21449,
+ 208, 6297,-14803,-28396, -7655, 5118, 15134,-24005,-21776, 25330,
+ -11282,-23669,-20340, -2006,-16212,-24127, 9075, 22581,-20047,-25695,
+ -254, 6509,-17174,-29714, 1589, 7104,-17683, -4117, -4049, 22347,
+ -28338,-13898, 671, 6777,-18368,-17925, -7409, 5169,-22093,-19561,
+ 702, 5969, -6610,-27398, -4875, 8773,-29634, -5552, 272, 6992,
+ -9167,-19887, -9136, 6447,-23125,-25612, 9760, 5749,-10410,-29816,
+ 1606, 7019,-13758,-24849, 2084, 7129,-17795,-16160, 596, 7287,
+ -22276,-11145, 521, 6474,-13471,-20705, -74, 6740, 1891,-16245,
+ -12763, 13602, -1617,-27384, -9648, 2511,-21802,-11734, -4836, -1602,
+ -9670,-27913, 6456, 6338,-23227, -4603, 754, 5830, -7699,-24416,
+ 2204, 6518,-27591, 2763, 1885, 6839,-15248,-10500, 344, 6942,
+ -13247, -9761, -4486, 4294,-12097,-15164, 637, 6142,-25994,-16384,
+ 17277, 6511,-10346,-26179, 923, -2374,-13316,-18125, 6841, 7100,
+ -21083,-24251, 4207, -9464,-22914, -7057, 8647, 8026, 2488,-20731,
+ -799, 13754, -3451,-12872, 2545, 17315, 2576,-19594,-10340, 4361,
+ -7007,-19401, 1937, 6751, 17502,-24923,-16948, 8534, -3436,-29004,
+ 6315, 6467,-16936, -4957, 591, 6604, 1099,-26790, -708, 5543,
+ -5949,-14167, -4750, 4068,-10682,-14990, -7489, -5197, 169, -6472,
+ -5143, 16200,-20331, 1722, 395, 6233,-15661,-22913, 24689, 14221,
+ -3892,-22862, 5154, 6301, -8786,-10120, 216, 6831,-12390,-11062,
+ 4824, 6473, -7705, -4195, -5326, 6572, -560,-20773, -2777, 1822,
+ -6703,-14413, 2409, 6083,-10595,-25038, 14291, 4825, 2064,-25736,
+ 16863, 20463, -2752,-29103, 12609, 7539, -7638,-18024, 1948, 689,
+ -10961, -5839, 683, 6170,-26004, 12209, 10742, 15580, -2105, -8625,
+ -4932, 6977, -9940,-15129, 12160, 9806,-13921, -55, 440, 6315,
+ -305, -6080, 11303, 25730,-12423, -3161, 6875, 9836, -2780,-16434,
+ 4128, 5778, 17790,-10991, -6633, 21111, 12367,-26550,-10581, -2530,
+ -6713,-10210, 4804, 6280, -5932, 2832, 4978, 18330, 2696,-23822,
+ -11870,-13313, 5266,-10870, -7933, 4455, -3155,-10994, 2225, 5803,
+ 820,-11966, -1397, 5344, -5027, -7230, 1236, 5812, -1649,-21007,
+ 8948, 5539,-16246, -801, -533, -3132, -8272, -1302, 367, 5958,
+ -26574, -3470, 7126, -8876, -4819, -5380, -3923, 1466, 1929,-20655,
+ 4419, 3663, 2437,-26758, 10897, 5616, -6601,-10394, 2148, 137,
+ 15007,-22909, -3948, 6197, -9059,-27702, 23041, 4088, 8312, -267,
+ 2973, 25579, -3795, -3612, -489, 5401, 7711,-25887, 3443, 2623,
+ -24306, 3091, 13248, 3273, -3113, -1410, 3541, 12047, 306,-11933,
+ -4493, -1997,-18725, 8257, 7593, 7218,-13588, -8411, 8715, -1137,
+ -12028, 5907, 17904, 21327, -2223,-22989, 9863, -1633, -723, -5944,
+ 714, 5170, 2128,-15199, 2081, 1626, -482, -8521, 8131, 10765,
+ 53,-12020, 5152, 5033, 2361,-13747, 24714, 26357, 1074,-28538,
+ 18087, 4333, 1067,-22148, 14277, 5540, 729,-15049, 7936, 4648,
+ -16646, -6350, 23646, 9628, -91, -8477, 3298, 4297, 3499, -7417,
+ -2214, 2931, -4795, -4424, 6487, 4264, -9333, 3377, 6570, 5734,
+ 1733,-17598, 11163, 4167, -2713,-16183, 14693, 4188,-23780, 9825,
+ 25701, 15331, 586,-19288, 21576, 12040, 11328,-15656, 2944, 7335,
+ 9203,-16906, -5723, -5371, -7906, -4632, 12470, 5724, -123,-16520,
+ 976, -8288, 1262, -3966, -3014, -148, 230, -2169, 505, 3954,
+ -2256,-11474, 9990, 2644, 4841, -8017, -4617, -2959, 24226,-22733,
+ 7475, 17722, 6747, -5782, 4877, 8664, -6893,-24218, 12181,-14683,
+ 2839, -7574, 4815, 2376, 2680, -3986, 1749, 2061, -563, 3232,
+ 3039, 5761, 343, -4150, 6600, 3792, 6356, 7199, 10702, 24266,
+ -25636,-12157, 22874,-14633, 2438, -8680, 8312, 3091, 7135, -3110,
+ 268, 4547, 4272, 4886, 5861, 14177, 11382,-10386, -767, 1448,
+ 1770,-28758, 27658, 4643, -3008,-10314, 18024, 5252, 6999,-17854,
+ 9789, 909, 1556,-21532, 20929, 3182, 26836,-23774, -2868, 3509,
+ -9884,-14471, 24685, 193, -3300, -5891, 5237, -5722, -9043,-14338,
+ 17448, -7167, -683, 26, 4002, -235, 3072,-12689, 13537, 2670,
+ 3577,-10477, 10097, 1435, 17713,-24555, 7486, 1713, 6633, -6645,
+ 1863, -783, 3185, -8349, 3975, -3967, 8090,-23915, 7470, -8732,
+ 2793,-16733, 17412, 1948, -5975,-14195, 1741,-22095, 3376, -782,
+ 18258, 16642, 3845, -3536, 5136, 335, 3267, -719, 10538, 7756,
+ -10993, 5165, 17885, 4767, 4733, -7751, 15643, 8215, 3678, 1686,
+ 3571, 2189,-11186, 1470, 6152,-11489, 4353, -2197, 1357, -3164,
+ 4258, -6029, 8420, -230, 6220, -1478, 2105, -787, -4229, -4632,
+ 15095, -1672, 1986,-16134, 14035, -6088, 7849,-14512, 2875,-10127,
+ 4796,-14269, -8761,-25428, 1192,-24490, 22001, -6216, 258,-10418,
+ 27459, 10524, -754, 7182, 7574, 3444, 5995, 3253, 25190, 25483,
+ 6379, -6363, 409, -8435, -3319, 3253, 12035, 1358, 3184, -6482,
+ 12864, -216, 25363, -7652, -2971, 5718, 4969, -3415, 7040, -2605,
+ 2616,-21129, 28211, 1289, 2553,-15075, 23833, 1871, 14598, -6793,
+ 7189, 4535, 5581, -1997, 4257, -4337, 6027,-10630, 9913, -5633,
+ 3695,-11614, 19091, 585, 4415, -8798, 15569, -1099, -879, 752,
+ 19480, 5412, 5743, 448, 9863, 1342, 20634,-16941, -7404,-16938,
+ -11946, 17852, 19422, 5918, 12538,-20829, 22707, 1113, 4715, -4341,
+ 12573, -3709, 4015, -8219, 3349,-17549, 6395, -1551, 4414, -8302,
+ 24598,-24474, 21909, 9778, 5346, 1386, 6942, -4708, -1507, 2077,
+ 8224,-10420, 6088, -3411, 8824, -6355, 7219, 17353, 22325, 25889,
+ 6666, -1811, 1964,-13461, 8123, -4454, 26614, 11418, 4582, -7133,
+ 18420, -3918, -264, 10545, 24810, 12821, 6936,-22880, 10241,-24118,
+ 3108, -7220, 11991,-12963, 4237,-10392, 23417, -2591, 4624,-14780,
+ 29121, -1235, 7543, -1157, 17358, 1244, 20161, -6319, 2575, -5204,
+ 4384, 5974, 10993, -2909, 1619, -4017, 26017, 722, 4659, 11545,
+ 14463, 4774, -2892, 10593, 15058, -4543, 1972,-15782, 26652,-10199,
+ 6046, -562, 11992, -8022, 6197, -349, 7928,-12070, 21399,-13670,
+ 15116, 99, 5829, -4061, 16713, -7200, -8904, 4170, 24814, -7599,
+ 12177, 6080, 19388, 11094, 4262, 1544, 17090, -4775, -6957, -5908,
+ 19576,-23176, 7126,-23499, 24889,-17683, 5514, -5416, 23284, -5830,
+ 6388, -1788, 14378,-11597, 5099, -8771, 28791, -4573, 6029, -4164,
+ 3217,-26929, 6427, 145, 9306,-17874, 5544, 3835, 25432, -15,
+ 8297,-10673, 21003,-15084, 6019, -7628, 13891,-22535, 27144, 1685,
+ 10077, 4230, 5211, -1543, 22179,-10638, 6385, 5710, 13476,-12976,
+ 5272, 17571, 23747, 5084, -2100, 9127, 13746,-20852,-16310, 15716,
+ 21422,-23074, 6532, -31, 17127,-16620, 5397, -3362, 28477, -9453,
+ 6238, 1258, 13189,-22475, 12895, -4568, 8062,-26648, 2873, 5975,
+ 22151,-15208, 6319, -507, 23117,-17415, 24129,-14207, 12908,-21101,
+ 7262, 8470, 25405, -9450, 5424, -1162, 29494,-16114, 21373, 22875,
+ 24554, 16783, 6684, 2453, 15785,-28885, 6504, 1085, 21619,-24241,
+ 21468, 620, 23222, -7235, 10917, 8863, 18570,-21606, 6710, -2091,
+ 28961,-25837, 6884, 20869, 27603, -8999, 6798, 5617, 28706,-21501,
+ 6066, 4720, 25084,-28951
+};
+
+const Word16 hvq_pg_huff_offset[NUM_PG_HUFFLEN] = {0,2,3,8,9,11,13,15,19}; // Q0
+const Word16 hvq_pg_huff_thres[NUM_PG_HUFFLEN] = {0,0x2,0x4,0x18,0x20,0x40,0x80,0x100,0x300}; // Q0
+
+const Word16 hvq_pg_huff_tab[32] =
+{
+ 30, 31, 1, 0, 2, 3, 28, 29, 4, 5, 27, 25, 26, 6, 24, 7, 8, 22, 23, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21
+}; // Q0
+
+const Word16 hvq_cp_huff_len[52] =
+{
+ 3, 4, 5, 6, 6, 6, 6, 6, 4, 4, 5, 5, 5, 5, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 8,
+ 8, 8, 8, 8, 9, 10, 10, 11, 11, 11, 10, 10, 10, 10, 11, 12, 12, 13, 13, 12, 12, 11, 12
+}; // Q0
+
+const Word16 hvq_cp_huff_val[52] =
+{
+ 7, 8, 6, 3, 4, 5, 6, 7, 9, 10, 7, 8, 9, 10, 11, 12, 13, 11, 12, 13, 14, 15, 8, 9, 10,
+ 11, 4, 5, 3, 4, 5, 6, 7, 5, 4, 5, 3, 4, 5, 6, 7, 8, 9, 6, 1, 2, 0, 1, 3, 4, 7, 5
+}; // Q0
+
+const Word16 hvq_cp_layer1_map5[HVQ_CP_MAP_LEN] = { 16, 8, 4, 2, 1, 18, 17, 9 }; // Q0
+
+const Word16 hvq_cp_huff_thres[HVQ_CP_HUFF_NUM_LEN] = { 0x0, 0x2, 0xC, 0x20, 0x50, 0x60, 0x100, 0x180, 0x600, 0x1000, 0x1C00 }; // Q0
+const Word16 hvq_cp_huff_offset[HVQ_CP_HUFF_NUM_LEN] = { 0, 2, 7, 12, 18, 19, 24, 26, 35, 45, 51 }; // Q0
+
+const Word16 hvq_cp_huff_tab[52] =
+{
+ 46, 47, 44, 45, 48, 49, 51, 36, 37, 38, 43, 50, 34, 35, 39, 40, 41, 42, 33, 28, 29, 30, 31, 32, 26, 27,
+ 3, 4, 5, 6, 7, 22, 23, 24, 25, 2, 10, 11, 12, 13, 17, 18, 19, 20, 21, 1, 8, 9, 14, 15, 16, 0
+}; // Q0
+
+/*----------------------------------------------------------------------------------*
+ * FEC for HQ core
+ *----------------------------------------------------------------------------------*/
+
+const Word16 Num_bands_NB[MAX_SB_NB] = {8,8,2}; // Q0
+
+const Word16 SmoothingWin_NB875_fx[70] = /*Q15*/
+{
+ 0, 16, 66, 148, 263, 411, 590, 802, 1045, 1318,
+ 1623, 1956, 2319, 2710, 3129, 3574, 4046, 4542, 5062, 5604,
+ 6169, 6754, 7358, 7981, 8620, 9275, 9945, 10627, 11321, 12025,
+ 12738, 13459, 14185, 14915, 15649, 16384, 17119, 17853, 18583, 19309,
+ 20030, 20743, 21447, 22141, 22823, 23493, 24148, 24787, 25410, 26014,
+ 26599, 27164, 27706, 28226, 28722, 29194, 29639, 30058, 30449, 30812,
+ 31145, 31450, 31723, 31966, 32178, 32357, 32505, 32620, 32702, 32752
+};
+
+const Word16 SmoothingWin_NB2_fx[16] =
+{/* Q15 */
+ 0, 315, 1247, 2761, 4799, 7282, 10114, 13188, 16384, 19580, 22654, 25486, 27969, 30007, 31521, 32453
+};
+/*----------------------------------------------------------------------------------*
+ * SC-VBR
+ *----------------------------------------------------------------------------------*/
+
+const Word16 bp1_num_coef_wb_fx[5] = { 15286, 0, -30572, 0, 15286, }; /* Q14 */
+const Word16 bp1_den_coef_wb_fx[5] = { 16384, 0, -30498, 0, 14262, }; /* Q14 */
+
+const Word16 shape1_num_coef_fx[11] = /* Q15 */
+{
+ 31437, -2443, -13636, 4316,
+ -10188, 48, 2639, -3575,
+ -776, 1046, 399
+};
+
+const Word16 shape1_den_coef_fx[11] = { 32767, /* Q15 */
+ 2940, -12237, 4032, -9609,
+ -1998, 2335, -3900, -1595,
+ 857, 253
+};
+
+const Word16 shape2_num_coef_fx[11] = /* Q15 */
+{
+ 30760, 31, -9699, 9516,
+ -5878, -7249, -10468, 442,
+ 3278, -63, 1115
+};
+
+const Word16 shape2_den_coef_fx[11] = { 32767, /* Q15 */
+ 16019, -890, 12799, 2346,
+ -6985, -13192, -5795, -949,
+ -1492, -304
+};
+
+const Word16 shape3_num_coef_fx[11] = /* Q15 */
+{
+ 30685, -383, -9937, -9605,
+ -5997, 7611, -10393, -355,
+ 3239, 12, 1196
+};
+
+const Word16 shape3_den_coef_fx[11] = { 32767, /* Q15 */
+ -16498, -911, -12947, 2286,
+ 7430, -13385, 6066, -1182,
+ 1580, -273
+};
+
+const Word16 txlpf1_num_coef_fx[11] = /* Q13 */
+{
+ 138, 198, 514, 681, 921,
+ 964, 921, 681, 514, 198,
+ 138,
+};
+
+
+const Word16 txlpf1_den_coef_fx[11] = /* Q13 */
+{
+ 8192,-18945, 31613,-31149, 24494,
+ -12753, 5528, -1436, 347, -25,
+ 4,
+};
+
+
+const Word16 txhpf1_num_coef_fx[11] = /* Q13 */
+{
+ 138, -198, 514, -681, 921,
+ -964, 921, -681, 514, -198,
+ 138,
+};
+
+const Word16 txhpf1_den_coef_fx[11] = /* Q13 */
+{
+ 8192, 18945, 31613, 31149, 24494,
+ 12753, 5528, 1436, 347, 25,
+ 4,
+};
+
+/* NELP filter coefficients */
+const Word16 bp1_num_coef_nb_fx_order7[8] =
+{
+ /* Q = BP1_COEF_NB_QF_ORDER7 = 13 */
+ 1481, 6730, 15579, 22923, 22923, 15579, 6730, 1481,
+
+};
+
+const Word16 bp1_den_coef_nb_fx_order7[8] =
+{
+ /* Q = BP1_COEF_NB_QF_ORDER7 = 13 */
+ 8192, 16156, 23814, 21855, 14620, 6614, 1907, 268,
+};
+
+/* NELP gain tables */
+const Word16 UVG1CB_WB_FX[UVG1_CBSIZE][2] = /* Q13 */
+{
+ { -2224, -2114, },
+ { 12666, 12314, },
+ { 3723, 9690, },
+ { 17880, 17978, },
+ { 4136, 3946, },
+ { 11605, 21280, },
+ { 9777, 9340, },
+ { 21701, 21627, },
+ { 1088, 1679, },
+ { 13993, 13697, },
+ { 10443, 5214, },
+ { 19702, 19692, },
+ { 5458, 5317, },
+ { 17051, 16918, },
+ { 14206, 8503, },
+ { 24330, 24271, },
+ { -118, -279, },
+ { 11615, 14863, },
+ { 6898, 6544, },
+ { 18913, 18637, },
+ { 1142, 6811, },
+ { 15995, 16070, },
+ { 6921, 13182, },
+ { 22857, 22741, },
+ { 3017, 2260, },
+ { 14952, 14992, },
+ { 8176, 8093, },
+ { 20721, 20549, },
+ { 7441, 2370, },
+ { 17897, 13988, },
+ { 10986, 10966, },
+ { 26098, 25992, },
+};
+
+const Word16 UVG1CB_NB_FX[UVG1_CBSIZE][2] = /* Q13 */
+{
+ { -4791, -5157, },
+ { 4824, 4937, },
+ { -3443, 3610, },
+ { 5539, 15293, },
+ { -469, -3986, },
+ { 7977, 8157, },
+ { 2748, 2492, },
+ { 14070, 14014, },
+ { -2486, -2863, },
+ { 6033, 5892, },
+ { 2678, -441, },
+ { 11741, 11804, },
+ { -256, -847, },
+ { 9153, 8922, },
+ { -106, 5979, },
+ { 16876, 16741, },
+ { -3584, -3873, },
+ { 3511, 9538, },
+ { 401, 416, },
+ { 11082, 10550, },
+ { -1418, -1725, },
+ { 8988, 5255, },
+ { 6275, 1137, },
+ { 15372, 15247, },
+ { -3899, 301, },
+ { 6976, 7095, },
+ { 1581, 1453, },
+ { 12988, 12824, },
+ { 2692, -3093, },
+ { 9778, 10153, },
+ { 3938, 3628, },
+ { 18823, 18695, },
+};
+
+const Word16 UVG2CB1_WB_FX[UVG2_CBSIZE][5] = /* Q12 */
+{
+ { 914, 990, 1490, 5954, 2618, },
+ { 5599, 4621, 4078, 3493, 3057, },
+ { 4930, 4031, 2999, 2150, 1706, },
+ { 7722, 3021, 1804, 1478, 1452, },
+ { 1171, 1390, 6895, 2592, 1486, },
+ { 4155, 4287, 4409, 4515, 4577, },
+ { 3633, 3661, 3694, 3711, 3736, },
+ { 13212, 5009, 2611, 2175, 2048, },
+ { 3716, 2887, 2253, 1965, 1723, },
+ { 7141, 4567, 3434, 2970, 2396, },
+ { 2856, 3038, 3259, 3481, 3709, },
+ { 5929, 5459, 4923, 4448, 4084, },
+ { 980, 1024, 1550, 5686, 8038, },
+ { 3516, 7354, 10392, 3619, 2856, },
+ { 2598, 3093, 3582, 4780, 5965, },
+ { 1962, 10993, 5020, 2861, 2587, },
+ { 796, 916, 1010, 1175, 7720, },
+ { 4445, 4406, 4344, 4249, 4175, },
+ { 1454, 6493, 2611, 1758, 1765, },
+ { 6296, 7686, 4763, 2945, 2203, },
+ { 1502, 1573, 1895, 2981, 5464, },
+ { 4750, 4829, 4909, 4929, 4895, },
+ { 3644, 3774, 3922, 4037, 4116, },
+ { 9051, 7403, 6003, 4746, 4081, },
+ { 1558, 1869, 2331, 3000, 3595, },
+ { 4671, 4646, 4614, 4553, 4482, },
+ { 2262, 2608, 3158, 3890, 4468, },
+ { 5556, 5441, 6824, 7146, 5724, },
+ { 1470, 1550, 2016, 11169, 3828, },
+ { 5488, 6270, 6771, 8202, 9281, },
+ { 3477, 3693, 4113, 4460, 4705, },
+ { 10877, 17984, 10194, 7291, 2824, },
+ { 1327, 1498, 1476, 1667, 2138, },
+ { 4463, 4299, 4094, 3880, 3731, },
+ { 3188, 3164, 3156, 3104, 3140, },
+ { 9757, 5690, 3366, 2296, 1792, },
+ { 1731, 1753, 12406, 4082, 2247, },
+ { 3866, 4060, 5007, 5274, 5225, },
+ { 3998, 3957, 3900, 3839, 3789, },
+ { 18040, 9417, 5567, 3465, 2504, },
+ { 2160, 2532, 2895, 2577, 2321, },
+ { 5052, 4789, 4490, 4203, 3953, },
+ { 3381, 3415, 3458, 3496, 3536, },
+ { 6166, 5811, 5440, 5035, 4650, },
+ { 2839, 3389, 5057, 7558, 10414, },
+ { 3875, 4431, 5183, 6310, 7166, },
+ { 4311, 4130, 3571, 3070, 8555, },
+ { 8791, 8260, 7299, 6243, 5421, },
+ { 1191, 1237, 1368, 1814, 11819, },
+ { 2486, 5729, 6150, 4222, 3667, },
+ { 4018, 3825, 3600, 3388, 3256, },
+ { 7504, 5817, 4989, 4065, 3322, },
+ { 1430, 1962, 5546, 4096, 4681, },
+ { 5393, 5378, 5324, 5230, 5052, },
+ { 4041, 4090, 4132, 4159, 4181, },
+ { 12469, 9221, 5735, 3617, 2501, },
+ { 2482, 2565, 2768, 3088, 3461, },
+ { 5209, 5080, 4905, 4706, 4522, },
+ { 3139, 3362, 3647, 3910, 4156, },
+ { 7139, 6588, 5941, 5251, 4674, },
+ { 1719, 1866, 7993, 7634, 3987, },
+ { 3587, 5289, 7882, 13519, 16095, },
+ { 2409, 2515, 2749, 7316, 4636, },
+ { 30391, 18493, 13798, 4799, 2283, },
+};
+
+const Word16 UVG2CB2_WB_FX[UVG2_CBSIZE][5] = /* Q12 */
+{
+ { 1565, 1391, 1635, 5228, 2681, },
+ { 2156, 2558, 6205, 5561, 3944, },
+ { 2039, 2406, 3094, 3409, 3968, },
+ { 5090, 5065, 4989, 4858, 4764, },
+ { 1436, 1736, 2816, 2362, 2400, },
+ { 4375, 4425, 4465, 4478, 4493, },
+ { 4648, 4081, 3550, 2981, 2667, },
+ { 1705, 1950, 3679, 7828, 9895, },
+ { 2839, 1826, 1443, 1210, 1245, },
+ { 1387, 1410, 1768, 8873, 4383, },
+ { 4022, 3784, 3565, 3316, 3096, },
+ { 9983, 7147, 5225, 3742, 3027, },
+ { 6769, 2357, 1531, 1448, 1556, },
+ { 4591, 4671, 4735, 4765, 4789, },
+ { 4308, 4198, 4052, 3896, 3769, },
+ { 2288, 2550, 4922, 8294, 14878, },
+ { 1361, 1480, 1511, 1991, 10450, },
+ { 2933, 3131, 3694, 4687, 5201, },
+ { 3984, 3048, 2479, 2644, 5514, },
+ { 5353, 5480, 5488, 5434, 5437, },
+ { 3319, 2881, 2528, 2152, 1927, },
+ { 4873, 4748, 4578, 4407, 4257, },
+ { 6185, 4396, 3751, 3400, 2899, },
+ { 2159, 8067, 7534, 5121, 3640, },
+ { 2265, 10177, 3803, 2588, 2441, },
+ { 2188, 2206, 4293, 12691, 5893, },
+ { 3587, 3651, 3760, 3864, 3960, },
+ { 13158, 9752, 7171, 5431, 5364, },
+ { 5710, 4173, 2928, 2090, 1774, },
+ { 3531, 3831, 4641, 5787, 6622, },
+ { 4395, 4356, 4281, 4194, 4111, },
+ { 2243, 2476, 5814, 3965, 27176, },
+ { 1575, 1667, 7544, 3005, 1984, },
+ { 2583, 2511, 11684, 5765, 4807, },
+ { 3632, 3458, 3277, 3114, 2971, },
+ { 8569, 6778, 5866, 5515, 5141, },
+ { 3267, 3035, 2940, 2782, 2691, },
+ { 3929, 4249, 4577, 4877, 5162, },
+ { 4443, 4173, 3864, 3590, 3337, },
+ { 3998, 4725, 5728, 6873, 7885, },
+ { 4369, 2824, 2237, 1648, 1404, },
+ { 1000, 1022, 1477, 2682, 15276, },
+ { 3916, 3851, 3766, 3664, 3591, },
+ { 13206, 4485, 3230, 3897, 3648, },
+ { 10002, 3515, 2393, 2233, 2211, },
+ { 4603, 4836, 5071, 5259, 5411, },
+ { 3919, 4035, 4177, 4304, 4419, },
+ { 3046, 8332, 16475, 11172, 10858, },
+ { 1027, 1007, 1196, 1578, 5937, },
+ { 1892, 2422, 3227, 3920, 7400, },
+ { 3584, 3532, 3508, 3470, 3437, },
+ { 5363, 6155, 6805, 6854, 6811, },
+ { 4038, 3512, 3030, 2636, 2332, },
+ { 6760, 6124, 5235, 4299, 3687, },
+ { 4125, 6528, 4068, 3238, 3483, },
+ { 5020, 5905, 7082, 8554, 9623, },
+ { 1399, 5868, 3069, 1726, 1655, },
+ { 4691, 4234, 3974, 3757, 9616, },
+ { 3978, 4003, 4003, 3983, 3960, },
+ { 2103, 16858, 9252, 4860, 4727, },
+ { 8043, 5294, 3970, 3098, 2583, },
+ { 4680, 5109, 5576, 5965, 6275, },
+ { 4867, 4584, 4276, 3958, 3682, },
+ { 1213, 3115, 6552, 22778, 20977, },
+};
+
+const Word16 UVG2CB1_NB_FX[UVG2_CBSIZE][5] = /* Q12 */
+{
+ { 773, 785, 785, 785, 860, },
+ { 3560, 3521, 3410, 3265, 3167, },
+ { 1766, 2982, 10273, 3790, 2248, },
+ { 4986, 4753, 4496, 4172, 3922, },
+ { 2036, 2030, 2009, 1973, 1897, },
+ { 3291, 3554, 3868, 4126, 4345, },
+ { 3207, 3122, 3026, 2913, 2797, },
+ { 13220, 6844, 3967, 2746, 2466, },
+ { 1553, 1627, 1392, 1766, 3679, },
+ { 5379, 4640, 3844, 3254, 2635, },
+ { 1600, 1622, 2430, 9446, 4214, },
+ { 5115, 5200, 5311, 5365, 5343, },
+ { 6229, 3008, 1989, 1622, 1597, },
+ { 1726, 2114, 7046, 6162, 4301, },
+ { 1004, 1056, 1841, 6006, 7101, },
+ { 6388, 9659, 4510, 2774, 2113, },
+ { 1060, 1153, 1400, 1733, 2121, },
+ { 3448, 3523, 3612, 3683, 3770, },
+ { 1496, 2045, 2910, 3563, 4058, },
+ { 4419, 4592, 4795, 4921, 4978, },
+ { 1407, 5314, 2788, 1675, 1350, },
+ { 4210, 4225, 4227, 4186, 4169, },
+ { 2247, 8245, 4392, 2522, 1709, },
+ { 7211, 6741, 6110, 5397, 4680, },
+ { 3602, 2286, 1577, 1229, 1148, },
+ { 6674, 5227, 3576, 2448, 1901, },
+ { 954, 1035, 1079, 1683, 9558, },
+ { 4011, 5853, 8979, 7138, 4484, },
+ { 2784, 2702, 2637, 2546, 2471, },
+ { 4414, 4065, 4627, 4208, 9275, },
+ { 2771, 3012, 3357, 3735, 4066, },
+ { 19742, 8603, 3943, 2546, 2085, },
+ { 1132, 1123, 1107, 1093, 1114, },
+ { 3913, 3838, 3733, 3630, 3548, },
+ { 948, 1565, 6063, 2654, 1667, },
+ { 6159, 5567, 4884, 4241, 3770, },
+ { 925, 1164, 1585, 6062, 3090, },
+ { 3818, 4037, 4322, 4536, 4726, },
+ { 4291, 3894, 3441, 3006, 2733, },
+ { 8544, 6487, 4962, 3812, 2970, },
+ { 1744, 1758, 1704, 1633, 1576, },
+ { 4416, 4259, 4044, 3810, 3628, },
+ { 1919, 2159, 3323, 13977, 7898, },
+ { 5952, 5731, 5419, 5061, 4732, },
+ { 2775, 2812, 2507, 2540, 6585, },
+ { 3436, 3960, 4661, 5975, 6274, },
+ { 3082, 3150, 3246, 3337, 3404, },
+ { 4089, 16018, 8285, 4116, 2704, },
+ { 1419, 1425, 1400, 1371, 1363, },
+ { 3825, 3890, 3953, 3993, 4015, },
+ { 2498, 2689, 2846, 3011, 3213, },
+ { 5122, 5024, 4881, 4691, 4524, },
+ { 2285, 2325, 2317, 2313, 2271, },
+ { 4493, 4529, 4517, 4478, 4443, },
+ { 9138, 3969, 2522, 2222, 2415, },
+ { 10009, 8719, 7292, 5837, 4532, },
+ { 831, 908, 1039, 1656, 6813, },
+ { 2070, 5478, 5174, 3911, 3694, },
+ { 1577, 1565, 1635, 2583, 13154, },
+ { 5590, 5788, 5922, 6752, 7063, },
+ { 4061, 3497, 2710, 2099, 1716, },
+ { 2750, 3118, 16574, 7891, 3651, },
+ { 2598, 3072, 3809, 4906, 5172, },
+ { 15348, 10948, 7740, 4979, 3446, },
+};
+
+const Word16 UVG2CB2_NB_FX[UVG2_CBSIZE][5] = /* Q12 */
+{
+ { 961, 867, 812, 771, 775, },
+ { 2544, 2686, 3010, 3605, 5048, },
+ { 1524, 1818, 2889, 3029, 3046, },
+ { 4195, 4301, 4421, 4497, 4580, },
+ { 2026, 1990, 1965, 1943, 1939, },
+ { 4338, 4156, 3963, 3750, 3590, },
+ { 7732, 2904, 1804, 1407, 1513, },
+ { 1613, 2353, 11315, 5764, 4291, },
+ { 1519, 1462, 1434, 1341, 1294, },
+ { 1627, 1710, 2163, 9654, 5615, },
+ { 2322, 7293, 3251, 2020, 2066, },
+ { 4967, 5112, 5174, 5203, 5230, },
+ { 1590, 1449, 1943, 5947, 3563, },
+ { 7747, 5170, 3268, 2392, 2082, },
+ { 3970, 3559, 3164, 2774, 2493, },
+ { 1993, 2210, 3204, 3717, 23534, },
+ { 1185, 1236, 1423, 2115, 4772, },
+ { 3935, 3840, 3714, 3583, 3477, },
+ { 1640, 1550, 1800, 2609, 10880, },
+ { 4067, 4437, 4811, 5108, 5536, },
+ { 1472, 1367, 1533, 2132, 7352, },
+ { 4310, 4284, 4216, 4117, 4057, },
+ { 10817, 4587, 2611, 2066, 2037, },
+ { 2089, 2427, 4698, 14635, 7517, },
+ { 2529, 1561, 1209, 976, 945, },
+ { 2908, 3070, 4055, 5862, 6448, },
+ { 2676, 2861, 3115, 3295, 3408, },
+ { 2932, 14330, 6533, 3739, 3462, },
+ { 3681, 3079, 2559, 2151, 1903, },
+ { 5636, 5316, 4978, 4690, 4425, },
+ { 2298, 7228, 6976, 4251, 3347, },
+ { 2504, 3421, 6784, 8483, 15064, },
+ { 1253, 1180, 1136, 1094, 1076, },
+ { 3451, 3524, 3600, 3646, 3707, },
+ { 1701, 2030, 6574, 4746, 4451, },
+ { 4688, 4751, 4762, 4727, 4722, },
+ { 2977, 2363, 1883, 1563, 1399, },
+ { 5080, 4685, 4275, 3835, 3513, },
+ { 5445, 3828, 2851, 2242, 1948, },
+ { 1929, 5037, 17760, 8346, 6300, },
+ { 1839, 1782, 1680, 1586, 1534, },
+ { 3086, 3472, 4031, 4950, 9695, },
+ { 3199, 3052, 2896, 2751, 2622, },
+ { 5822, 5782, 5727, 5566, 5478, },
+ { 1548, 2234, 6748, 2562, 1722, },
+ { 6699, 5216, 4475, 3531, 3028, },
+ { 3773, 3628, 3460, 3279, 3155, },
+ { 1581, 1672, 2929, 20221, 16432, },
+ { 1210, 1215, 1389, 1678, 2177, },
+ { 3863, 3886, 3937, 3961, 3989, },
+ { 1541, 1745, 1829, 3479, 15563, },
+ { 4444, 4952, 5573, 6056, 6545, },
+ { 2460, 2397, 2284, 2133, 2041, },
+ { 4808, 4676, 4493, 4322, 4213, },
+ { 15031, 6644, 3315, 2900, 2885, },
+ { 4003, 4760, 6946, 8274, 8401, },
+ { 5001, 2495, 1594, 1337, 1365, },
+ { 3428, 3706, 4073, 4457, 4670, },
+ { 3326, 3277, 3222, 3142, 3088, },
+ { 6162, 6317, 6494, 6459, 6530, },
+ { 2659, 2599, 2537, 2482, 2546, },
+ { 8554, 6902, 5233, 4116, 3650, },
+ { 4643, 4099, 3616, 3201, 2895, },
+ { 9589, 26630, 15412, 12532, 8715, },
+};
+
+const Word16 frac_4sf_fx[NB_SUBFR + 2] = { 4,8,12,16,16,16 }; /* Q4 */
+
+/* ERB table for PPP-ampl-quant */
+const Word16 erb_WB_fx[NUM_ERB_WB + 1] = { 0, 238, 475, 713, 950, 1188, 1426, 1663, 1911, 2185, 2490, 2826, 3205, 3624, 4094, 4620, 5210, 5875, 6626, 7478, 8448, 9558, 11264, 13568, 16387 };//Q(log2(2.56)
+
+
+/* ERB table for PPP-ampl-quant */
+const Word16 erb_NB_fx[NUM_ERB_NB + 1] = { 0, 238, 475, 713, 950, 1188, 1426, 1663, 1911, 2185, 2490, 2826, 3205, 3624, 4094, 4620, 5210, 5875, 6626, 7478, 8448, 9558, 10243 };//Q(log2(2.56)
+
+
+
+/*Amplitude and power tables for PPP*/
+
+const Word16 AmpCB1_WB_fx[640] =
+{//Q13
+ 5655, 1589, -653, 3568, -3173, -1852, -3204, -4623, -2100, -5103,
+ -923, -67, -7152, -4958, -2019, -1810, -8532, -648, 6581, 8043,
+ 160, 778, -1535, 863, 5482, 1674, -3576, 123, -3163, -3595,
+ -852, -53, -1080, -2683, -3199, -950, -1353, 6258, -1431, 1249,
+ 2059, 677, 146, 1011, 956, -2022, -25, 300, 421, -5859,
+ 1027, -452, -7343, -1052, 3818, 1099, -1005, 659, -511, -658,
+ 2091, 720, -600, 145, -1504, -1716, -442, -2172, -1505, 2702,
+ 731, 1473, -213, -4120, -2976, 688, 3205, 1213, 679, 232,
+ 3672, 4770, -1198, -298, -1714, -3669, -2833, -664, -1859, -2380,
+ -1169, -1593, -453, 295, -1225, -3110, -1776, 2112, 2710, 3333,
+ 1022, 1248, 1091, 1164, 1200, 1782, -809, -2306, -3124, -2194,
+ -1567, 465, 2223, -1301, -463, -2157, 729, 2279, -1938, 610,
+ 437, -803, -1025, 775, -171, -637, 163, 2251, 316, -1663,
+ -4123, -20, -2827, -1529, -1436, 3447, 79, -274, 1650, 4097,
+ 2369, 927, 448, -449, 293, -239, -1028, -4805, 1354, 431,
+ -2219, -490, -3849, 1639, -2925, 817, 1485, 2527, 5444, -1994,
+ 1476, 506, -1643, 2003, -1676, -788, -1681, -2011, 1389, 452,
+ 593, 3, -1200, -3987, -1634, -4310, -686, 882, 6235, 2420,
+ -196, -1257, -2038, -498, 1394, 671, -2302, -809, -446, 3644,
+ -1643, -2304, -828, 105, -323, -3906, -960, 7324, 3095, -786,
+ 95, 633, 1266, 750, 1509, -2033, -3134, 432, 1028, -1825,
+ 1258, 256, -3249, -6868, -523, -325, -1779, 4313, 2524, 3433,
+ -600, -410, -88, 410, -1182, -1140, -1448, -1344, -5074, 6054,
+ 2194, 1505, -681, -2408, 1376, 1389, 1209, 1048, -4199, -2939,
+ 1855, 1744, -1344, -1431, -1955, -1805, -4992, 512, 624, 2749,
+ -3446, -1215, -3764, -2169, -3601, -1321, 67, 4326, 6624, 5816,
+ -334, -1746, -441, -754, 1853, 3889, -595, -493, 441, -811,
+ -48, -764, -1473, -683, 603, -1754, 780, 698, 1084, 1713,
+ 560, -808, -754, -2890, -1205, -318, -1021, 3195, 5693, -4603,
+ 1343, -1061, -2441, -1784, 721, 267, 227, -622, 3013, -768,
+ -472, 90, 13, 290, 1055, 948, 1617, -2368, -1087, 1103,
+ -4784, -3872, 5125, -2518, -215, 6962, 1095, -1521, 2091, -2962,
+ 2285, 1117, 1174, 2635, -1907, -1012, 814, -417, -2162, -2805,
+ -1188, -707, -808, -1757, 260, -1093, -3957, -3266, 4132, 5980,
+ 177, -1478, 960, 2029, 3989, 597, -3062, -3940, -1688, 236,
+ -1559, 150, 2432, 348, -242, -2014, -1027, 6298, -2957, -3960,
+ 1090, 1014, -1261, -744, -954, -938, -3713, -3272, 5356, -2356,
+ -1439, 3808, -2330, -4437, 5177, -3606, -1382, 1824, 407, 325,
+ 649, 330, 85, 206, -415, 183, -646, 602, -2656, 808,
+ 1039, 29, -3202, -6168, -3640, 3736, 4183, 3959, 330, 339,
+ 2701, 343, 1501, 1879, -3194, -4648, -1630, 1656, -1578, -84,
+ -3065, -4126, 24, -260, 263, -1705, -1289, 2432, 1229, 7481,
+ 2586, 1696, 646, -1773, -792, 1932, -1908, -1897, -1129, 112,
+ -5667, -1592, 2253, -980, 1581, 211, 5277, 4846, -288, -159,
+ 956, 1196, 771, -973, -1785, -516, -1015, 847, 614, -791,
+ -442, -1594, -4632, -4392, -416, 1398, 2570, 752, 264, 6570,
+ 1655, 546, 1238, -1362, -1330, -2005, 3590, -2155, -184, -1224,
+ -1452, -1533, -534, 1010, -1707, 801, 3628, -289, 2414, 132,
+ 2643, -2813, -4524, 5092, -7362, 740, 428, -510, 81, -1209,
+ 616, 1454, 1861, -3958, -4084, 189, -1219, -875, 3764, 2086,
+ -1554, -2071, 1515, 3392, 12, -686, -2414, -1382, 176, 1685,
+ 2055, -5698, 1582, 4117, -4846, -2922, 610, 2082, 4682, -2487,
+ 348, 2258, -338, -1379, 1472, 618, -202, -1122, -76, -2468,
+ -1216, -986, -327, -1441, 102, 403, -2105, 2411, 1510, 1288,
+ -715, -577, 1074, 2533, -3521, -3449, 2140, -751, -307, 3805,
+ 158, -1385, -404, -1378, -1948, 3785, 4216, 2667, -1894, -1559,
+ 1037, 1371, 989, -205, -333, -4784, -3429, -1283, 3299, 859,
+ -4922, -5481, -1196, -1748, -720, 516, 113, 4590, 7071, 4345,
+ -5729, -3862, 3590, 1463, 7094, 4991, 854, -66, -1630, -686,
+ -923, -3266, -1988, 2345, 785, -1420, 3004, 2934, -1245, -65,
+ -2696, -3088, -1438, 614, 1584, -239, -1552, 580, 6285, -1673,
+ -1598, -4018, -1909, 747, 3191, 366, 1467, -1933, 2759, 2804,
+ 518, 193, -1149, -3108, 441, 1458, 2791, -4131, 2694, 3372,
+ -5023, -6491, 1794, 2739, 1463, 5843, 2869, 1993, -1409, 4832
+};
+
+const Word16 AmpCB2_WB_fx[64 * (NUM_ERB_WB - 13)] =
+{//Q13
+ -5276, -7711, -3518, -2416, -382, 319, -1900, -900, 1725, 884,
+ 4071, -4052, -2430, -336, 2136, 3006, 591, -3893, -2731, 2625,
+ 2390, -1047, -883, -3368, -4235, -3726, 189, -1803, 784, 2336,
+ 206, -2140, 3001, -730, -2279, 85, -3395, 4367, 2214, -254,
+ -3114, -2348, 2763, 686, -7495, -6618, 3164, -3957, -2681, -2049,
+ 1659, 3634, 2962, 1574, 379, -2478, 2861, 616, 1124, 205,
+ -3075, -348, -2006, -90, 761, 1157, -114, -9460, -2786, -3254,
+ -1120, -1500, -446, 2835, -314, 3205, 2115, -837, -261, 36,
+ 80, -485, 1133, 2124, -1031, -401, -3166, 1145, -1616, -3425,
+ -3071, -6891, -4198, 2292, 5160, -46, 1430, 280, 1378, 1700,
+ -1673, -1126, 5270, 5096, -975, -1070, 1314, -2389, -2982, 20,
+ -3218, -892, -636, -876, -302, -2923, -3240, 4121, 1625, -557,
+ 994, 544, 2657, 7133, -273, -3530, -1419, 1431, -936, -2622,
+ 303, 75, -5444, -5549, 4183, 1248, 3474, -789, 2375, -1778,
+ 1660, 1520, -1433, -4047, 531, 7001, 695, 1889, 4261, -2791,
+ -1557, -2980, -316, 415, 1134, 1501, -6923, 521, -3134, -1812,
+ 1848, 676, -1733, 734, 2207, 2029, -476, -1976, -161, 29,
+ 7147, -1774, 720, -1070, -372, -1626, -6473, -2448, -5235, -2651,
+ -1800, -1477, -767, 1335, 471, 4857, 888, 593, -370, 196,
+ 907, 174, 557, -720, -1339, 1590, 37, -1247, -1307, 276,
+ -1739, -6032, -3088, -2499, -497, -393, -569, 3003, 2694, 3751,
+ 4652, -258, -1305, 175, 189, -344, -2381, -1992, 463, 529,
+ -6375, 3966, -3558, -3001, -640, 3117, 1120, 966, 1316, -561,
+ 27, 2794, 2831, 3512, 3453, -418, -2319, -6741, -3443, 80,
+ 1281, 1691, 1500, -591, -739, 2385, -4676, -5822, -1437, 730,
+ 3593, -437, 1090, 3497, -1932, 2854, 4858, 2654, 947, 1879,
+ -4115, 2700, -3092, -1524, 225, -8272, -6736, -1277, 2991, 2983,
+ 1129, -1661, 2817, 468, 491, -744, 390, 677, 8129, -3130,
+ -687, -433, 1488, -3763, -177, -581, -764, 39, 1537, -2203,
+ -1678, 263, -1214, 2175, -1857, 3097, -894, 4207, -1943, -834,
+ 1513, -4123, 3981, 6041, 653, -757, -313, -3024, -4614, -3139,
+ -2966, 178, 4956, -427, -41, 2376, 1008, -1351, -92, 978,
+ 1998, 5146, 2069, 117, -1754, -2756, 4425, 168, -1807, -1761,
+ -1215, 178, -1562, -3369, -919, -2576, 3614, 4968, -30, -396,
+ -1151, -1146, 868, 1073, -359, 2732, 546, 4431, -321, -1081,
+ 1410, -3214, -2316, -4889, -2460, -3844, -7323, -1438, -1488, 1849,
+ 4037, 2421, 2697, -2372, -1877, 670, 3674, -907, 888, -3703,
+ 375, -1278, -1477, 2501, -936, -1682, -1353, -335, -4440, 383,
+ -2730, -2130, -1105, 1588, 3340, 4816, -4023, 502, -4146, 236,
+ 4481, 589, -3696, 826, -97, 222, -8037, -2244, 142, 810,
+ -2195, 1315, 656, 1901, -485, 317, 1512, 1465, -2026, 1853,
+ 929, 1670, -2736, -463, -836, -4946, -134, 2769, 2972, -5148,
+ -3147, 913, -1483, 267, -1560, 3903, 1507, 1105, -1496, 210,
+ -1196, 3764, 601, 1630, 3842, 6374, -1293, -4555, -3087, 199,
+ -1917, -3331, -2317, -1774, 479, 3712, 2729, 1309, -3047, -514,
+ 861, -213, 1317, -2035, 4369, 5228, 942, -3052, -2316, -3377,
+ 1123, -65, 2507, 2711, -2096, -2164, -2634, -5215, -3919, 1551,
+ -47, 1990, 2370, 2025, -2401, 4833, -3879, -162, -3081, 501,
+ -510, 2744, -907, 253, -1746, -2520, 3418, -1461, 2140, 2507,
+ 135, 1457, 3195, -1277, -2558, -66, 10850, -1633, -1051, -3436,
+ -1617, 1438, -1231, -1744, 696, -348, 3434, 2121, -1629, -2460,
+ -4065, 1159, -1288, 2843, 697, -862, 4, 966, -444, -1860,
+ 1450, 6426, 5544, 1456, -2826, -1303, -2778, -1278, -6656, -3241,
+ -7083, 2234, 204, 1753, 803, 499, 1641, 87, 1471, -1325,
+ 398, 2983, 4340, -1382, 735, -600, -4671, -254, 2327, -1008,
+ -144, -1453, -1806, -1669, 395, -3285, -1803, -2119, 1232, 2914,
+ 1480, 8610, 1788, 2644, 1359, 3783, -110, -1339, -1337, -3427,
+ -630, -1189, -2560, 976, 483, -2744, -3653, -1289, 2910, -2437,
+ 3171, 1479, 157, 823, 4631, -1910, 3736, -424, -155, -5470,
+ -741, 3829, -2794, -55, -1447, -3469, -1947, 2914, -61, -3430,
+ 3544, -1867, 2986, 1009, -1051, 725, 2933, 2926, 5849, 257,
+ -2666, 6286, -2282, -2998, -2576, -975, -3655, -1867, -5040, -1440,
+ 3542, -603, 4806, -2808, -1633, 1388, 1149, -1616, -1851, 2122,
+ 4477, 2485, 1376, 721, 2174, -3072, 1378, -2574, -37, 1322,
+ -1646, -3612, 4443, 1612, -3403, 711, 132, 119, -227, 5059,
+ 2892, 840, 5462, -3471, -1340, 2097, 143, 1750, -3052, -1932,
+ -6352, -4166, -645, 4317, 633, 3681, 2811, 2346, 2374, -2999,
+ -1265, -210, 5115, 4652, 1305, 3704, -1456, -307, -457, -1455,
+ -3580, 674, 2215, 2458, -3021, -66, 2535, -652, 1226, 685,
+ 875, -1753, -1164, -609, 3444, 563, 3826, 1607, 3798, 1385,
+ 3902, -1990, -4078, -2509
+};
+
+const Word16 AmpCB1_NB_fx[640] =
+{//Q13
+ -1355, 185, -222, -221, 1976, 3119, 540, 1333, -3646, -2511,
+ -979, 1664, 2087, 951, 787, -1687, -855, 1594, 1264, -4990,
+ -1957, -215, -850, 1369, -113, 2541, -2904, 743, 634, -657,
+ -3438, -2047, 706, 85, -596, -50, 212, 944, 118, 1380,
+ -1203, -78, -213, -1811, -781, -1970, 6607, -2971, 147, -1483,
+ 38, 5607, 5222, -4567, -4040, -2259, -3110, -2120, 932, -236,
+ -1052, 1039, -872, 334, -919, 2761, 3320, -5828, 53, 1063,
+ -1064, -75, -1015, -2137, -722, 565, 629, 1961, -454, 866,
+ -888, 2652, 1996, -2170, -885, 3325, -645, -1898, -984, -643,
+ -1008, 2472, 2400, -3708, -2408, -1051, 2029, 1357, -636, -470,
+ -1307, 655, 663, 29, 892, -95, -91, -2966, -1610, 2657,
+ -2175, -3170, -3799, -3065, 1130, 1351, 3814, 2791, 1478, 1520,
+ -1326, -520, -692, 899, 1979, -397, -407, 450, -569, -611,
+ -1228, 864, 2549, 3067, -2511, -4737, -2701, -304, 680, 1426,
+ -1070, -19, -1582, -2813, -1832, 3010, 250, -613, 3390, -171,
+ -1450, -417, -773, -651, -405, -2304, -780, 6656, -3270, -1322,
+ 70, 5105, 3202, -83, -925, -458, 1203, -1582, -4158, -3630,
+ -1702, -849, -55, -986, -1963, -1140, -1942, 3347, 3526, -435,
+ -1429, -2089, -1620, -1271, 2851, 2184, -2472, 3216, 2885, -2922,
+ -1217, 86, -186, -279, -746, 1288, 3016, -651, -2719, 317,
+ -1307, -127, -1110, 1389, 212, 1783, 2619, -1718, 1795, -4086,
+ -1295, 743, 301, -1823, -223, -651, -1774, -405, 1687, 2031,
+ -865, 1059, -391, 505, -2739, -2773, 16, -2960, 3071, 3325,
+ -791, 2301, 435, 107, -4039, 801, -1224, 1854, -1039, 507,
+ -518, 997, 837, 3311, 506, 1026, -232, -1920, -3904, 406,
+ -1857, -529, -776, -700, -663, -1520, 1699, 814, 2084, -477,
+ -1341, -1123, -2564, -2784, 2457, 3223, -959, 385, -1864, 3754,
+ -1351, -1347, -2229, -2882, -1061, -1499, -3028, 3302, 2250, 5539,
+ -957, -340, 27, 1508, 167, -3513, 1689, 2577, -1810, -516,
+ -1061, 2171, 1774, 2031, 923, -1933, -1640, -2881, 859, -834,
+ 408, 2462, 2073, 2107, -2671, 1140, -3497, -2497, 2984, -2707,
+ -1762, -2524, -2196, 279, -2580, 477, 2306, 4645, 693, -909,
+ -1089, 1952, 3034, -1790, 786, -1149, -3117, 3605, -1933, -1886,
+ -959, 934, 246, -2177, -2440, 1356, 871, 3472, 2558, -4512,
+ -782, 1262, 893, 1979, 2386, -1809, -4357, -392, -1928, 1576,
+ -1751, -327, -1018, -617, -2370, -2910, 4230, -90, -1361, 3596,
+ -1069, -315, -162, -339, -313, 33, 4684, 2811, -2717, -3684,
+ 695, 4567, -745, -2311, -776, -2600, -827, -1040, -997, 2480,
+ -1549, -748, -622, -260, 1460, 1116, -302, -2529, 2156, -42,
+ -1318, -568, -266, -446, -2212, 2690, -4669, 5325, -2022, 1358,
+ -1312, 2293, 1528, 706, 970, -291, 383, -683, -1532, -1843,
+ -1379, 845, 1218, 395, -1884, 14, 676, -1711, 795, 290,
+ -742, 386, -435, 411, 1311, 549, -4181, -4922, 1497, 4465,
+ -1722, -699, -1958, -4126, -3727, -655, 1553, 1793, 4933, 3055,
+ -1260, -618, 535, -2008, 3802, -3784, 2527, -833, 193, -1062,
+ -866, 823, 1562, 147, -623, -1808, -1099, 694, -577, 745,
+ -2282, -4139, -3171, 76, 25, -1077, 477, 545, 6081, 3244,
+ -1332, -785, 98, -1681, -3603, -3937, 524, 4648, 1114, 2547,
+ -1145, 407, 2030, 3120, -1739, -513, -518, 1325, -1700, -2860,
+ -1427, 520, -1040, -792, -366, -2174, -522, -240, 5660, -3163,
+ -1449, -1653, -1507, 581, 1338, -2627, -1863, 1831, 1301, 2106,
+ -1252, 974, 199, 68, -69, -869, 864, 2373, -5818, 2873,
+ 26, 972, 359, -561, -390, 376, 225, 517, 649, -1767,
+ -653, 2167, 882, -698, 214, -4084, -4134, 2092, 2798, -523,
+ -1002, 486, 648, -1082, 404, -1490, 1560, -4984, 5614, -1441,
+ -1024, -311, 427, 356, -2342, 215, -2312, 445, -2378, 5111,
+ -568, 85, 1328, 1847, 3506, 1183, -2521, -2070, -794, -1881,
+ -485, 1121, 1242, 1301, -4365, -2222, 2602, -387, 1498, -1344,
+ -1272, -1365, -2207, -213, -1877, 2858, 849, -915, 333, 2488,
+ -2019, -2048, -1461, -1930, -1409, -400, 490, -2222, 1276, 7305,
+ -1530, -1741, -2663, 3159, 1162, -1490, 1516, -1498, 1222, 838,
+ 1325, 5387, 3888, 1944, -1706, -2890, -1905, -3901, -3207, 206,
+ -1411, -959, -292, -396, -1547, -84, -4405, -1073, 5532, 1796,
+ 3160, 48, -2339, -5884, -184, -52, 129, 5398, 378, -321
+};
+
+const Word16 AmpCB2_NB_fx[64 * (NUM_ERB_NB - 13)] =
+{//Q13
+ -2681, -4389, -4270, -4727, -239, 1938, 1748, 2311, 4300, -3957,
+ -1299, 3487, 1595, -377, 295, -1193, -1588, 2112, -1573, -6362,
+ -504, 1796, -2521, -68, 1322, 1223, 2263, -503, -3906, 3686,
+ -3899, -139, 2086, 48, 349, 547, -6387, 1340, -1467, -1062,
+ -193, 1325, -1190, 2394, 1671, -1982, -2597, -390, -1504, 2271,
+ -379, -2350, 4071, 70, -955, -883, -1770, -1065, -2443, -1779,
+ -1101, -661, 6325, 1871, -2673, 3596, 3773, -681, 3340, -1418,
+ 701, -4253, -3931, -1840, -2388, -2677, -3545, -41, 3675, 3843,
+ 2198, -1713, -324, 599, 1323, 1827, -4909, -1668, 616, 2608,
+ 360, -1769, -5263, -1278, 3490, 1935, 1355, -1298, 952, 1801,
+ 449, 251, -1021, -3666, 479, 3497, 1542, -2234, -3414, -4483,
+ -5785, 1406, 1207, 2984, 1767, 3262, -799, -3124, 5237, 460,
+ 2007, -1525, -2106, -770, 546, 137, 401, -1308, 969, 204,
+ -1626, -589, -4257, 1744, 2836, 2383, 2740, -423, 3166, 1920,
+ -690, -3000, -4489, 2523, -6693, -5135, -739, -1919, 1228, 2354,
+ 3340, 1902, 1069, -3185, -2614, 2764, -212, -2061, -1377, 698,
+ 3694, -125, -954, -4132, -404, 4297, 1294, 1765, 2446, -2287,
+ -1387, -14, 508, 1149, 9, -437, 519, -420, 450, -751,
+ -1632, -1391, -2208, -1955, -1170, 4818, 1112, 1086, -782, 1337,
+ 846, -3434, 569, 1721, -776, -2723, 1207, 982, -1432, -887,
+ 315, -3031, 3452, 765, -1263, -2146, 2959, -2619, 1507, 1312,
+ 4087, 3125, 1637, -1402, -45, -3193, 1397, -2611, -3641, -2478,
+ -1706, 588, 199, 3721, 1217, -1249, -1196, 7228, 996, 879,
+ -1339, 11, -971, -1680, 716, -39, 233, 1945, 1548, -1476,
+ 550, -2277, 307, 7413, 2094, -1631, -569, -1351, -198, -483,
+ -515, -1347, -212, -2649, -519, 195, 2944, -795, 1470, 654,
+ -1448, 3156, 1369, 3966, 3382, -2782, -4255, -1157, -212, 392,
+ 861, 5064, 4740, -2513, -3413, -552, -2298, -575, 1130, 1178,
+ 1568, 4591, 1238, 367, 1626, 600, -5889, 163, -3742, -3650,
+ -3911, 716, 919, -1501, 55, 1807, 3801, -5571, -4635, 1225,
+ 3211, 3804, 1491, -906, 100, 404, -1742, -1878, -2140, 1651,
+ 1640, 3976, -3432, -1149, 1365, 2042, 392, 768, -1534, 1096,
+ 3811, -211, -2067, -1315, -4167, 1145, -2747, -149, 5296, -735,
+ 438, 56, -404, -159, -2164, -959, 3492, -690, -688, -1081,
+ 2762, -1191, 654, 2051, -2144, -3210, -1823, 743, 686, -751,
+ 2483, 160, 1279, 3246, 1874, 2488, 1192, -5977, -478, 120,
+ -349, -65, -2350, -222, -1678, -3584, 1114, 3269, 1462, -1114,
+ -138, 2360, -2762, 720, -3822, 2523, 216, 1170, 4398, -4229,
+ -1850, 1272, 383, 1736, -383, -1295, 85, -132, 1133, 1505,
+ 1467, -2389, -2175, 4028, -2752, 241, -4353, -2103, -562, 817,
+ 3959, 5471, 1941, -1598, -2349, 201, 1412, -796, 2791, -4226,
+ 3227, -1992, -159, -159, 4085, -1549, 1020, -2179, -776, -2088,
+ -147, -42, 1880, -1029, 4982, -2056, 111, 1420, 2141, 302,
+ -2574, -986, -477, -3697, -2349, -2064, -335, -220, 5857, 57,
+ -7, -5407, -546, -353, 2866, 137, -136, 3508, 992, -2059,
+ -2034, -1127, -189, -300, -2153, 3606, 2523, -3727, 1526, -3797,
+ 2134, 4352, -920, -459, 2722, 1784, -71, -3030, -877, 1967,
+ -1645, -4432, 512, 39, 1757, 2875, -947, 1842, 1365, 1500,
+ 851, 594, -2892, -404, 3327, -3078, -1575, -1258, -973, -191,
+ -390, 45, 627, -227, 1624, -143, 215, 2157, 4846, 5335,
+ 3397, -199, -4443, -3091, -283, -216, 1237, -1478, -5639, -775,
+ 525, 2107, 2469, 2934, -255, 2438, 824, 5973, -1820, -1330,
+ -1202, -2433, 900, 650, -5654, 2891, -1539, -453, 1662, 231,
+ -145, 1661, 741, -332, 1221, 1809, 943, 4831, -1588, -4619,
+ 65, -790, -985, -893, 3374, 3148, 289, 2947, -4980, -661,
+ -427, 1441, 7696, 158, -1914, -2069, -1717, -418, 2657, 4219,
+ 1505, -1096, 601, -1466, -1754, -479, -159, 3378, 5252, 5060,
+ 4001, 1301, 420, -1268, -2813, -4196
+};
+
+const Word16 PowerCB_WB_fx[128] = /* Q11 */
+{
+ -3371, -1712,
+ -170, 350,
+ -638, -939,
+ 56, 1074,
+ -1559, -626,
+ 200, 344,
+ -397, 238,
+ 284, 1415,
+ -1323, -1880,
+ -544, 1170,
+ -619, -255,
+ 587, 974,
+ -1262, -98,
+ 327, 151,
+ 41, -302,
+ 941, 1876,
+ -2257, -1233,
+ 28, 202,
+ -520, -561,
+ 338, 1048,
+ -1080, -495,
+ 190, 582,
+ -284, -24,
+ 578, 1585,
+ -1324, -1089,
+ -71, 568,
+ -471, -26,
+ 1140, 909,
+ -856, -128,
+ 425, 740,
+ 140, 12,
+ 1595, 1891,
+ -2176, -2310,
+ -308, 541,
+ -315, -859,
+ -80, 1314,
+ -1782, 510,
+ 403, 450,
+ -607, 582,
+ 145, 1837,
+ -920, -1386,
+ -225, 872,
+ -395, -258,
+ 829, 981,
+ -945, 345,
+ 643, 241,
+ -56, -23,
+ 1211, 1482,
+ -1793, -1459,
+ 40, 400,
+ -239, -471,
+ 532, 1238,
+ -774, -516,
+ 244, 831,
+ -157, 152,
+ 576, 2287,
+ -928, -844,
+ 41, 759,
+ -161, -198,
+ 873, 1353,
+ -640, 105,
+ 695, 623,
+ 364, -184,
+ 1238, 2446
+};
+
+const Word16 PowerCB_NB_fx[128] = /* Q11 */
+{
+ -3349, -2784,
+ -784, 385,
+ -891, -562,
+ 126, 915,
+ -1518, -1438,
+ 304, 53,
+ -314, -447,
+ 687, 1219,
+ -2585, -1807,
+ -65, 153,
+ -1219, -337,
+ 497, 700,
+ -894, -1051,
+ 161, 451,
+ -46, -516,
+ 987, 1519,
+ -2277, -2303,
+ -354, 445,
+ -532, -540,
+ 5, 1271,
+ -1047, -1433,
+ 672, -225,
+ -335, -75,
+ 1007, 1056,
+ -1362, -1879,
+ -93, 367,
+ -468, -259,
+ 1800, -290,
+ -1118, -793,
+ 412, 472,
+ -9, -197,
+ 1471, 1634,
+ -2627, -2847,
+ -269, 164,
+ -689, -373,
+ 432, 940,
+ -1601, -839,
+ 311, 271,
+ -212, -251,
+ 543, 1714,
+ -2014, -1336,
+ 109, 241,
+ -789, -110,
+ 729, 888,
+ -418, -1277,
+ 256, 674,
+ 218, -217,
+ 1027, 2065,
+ -1769, -2293,
+ -276, 853,
+ -360, -764,
+ 376, 1247,
+ -1274, -1122,
+ 602, 272,
+ -133, -32,
+ 1374, 1118,
+ -1860, -1795,
+ -23, 620,
+ -525, 60,
+ 1070, 548,
+ -691, -799,
+ 701, 572,
+ 81, 18,
+ 1949, 2120
+};
+
+
+const Word16 sinc_fx[8][12] = /* sinc for warp/extrapolate, in Q14 */
+{
+ {0,0,0,0,0,16384,0,0,0,0,0,0,},
+ {-388,484,-638,939,-1773,15966,2281,-1063,694,-514,409,-339,},
+ {-701,868,-1134,1639,-2949,14751,4917,-2106,1341,-982,776,-640,},
+ {-895,1101,-1427,2029,-3503,12849,7709,-2964,1835,-1328,1042,-856,},
+ {-947,1159,-1489,2086,-3476,10430,10430,-3476,2086,-1489,1159,-947,},
+ {-856,1042,-1328,1835,-2964,7709,12849,-3503,2029,-1427,1101,-895,},
+ {-640,776,-982,1341,-2106,4917,14751,-2949,1639,-1134,868,-701,},
+ {-339,409,-514,694,-1063,2281,15966,-1773,939,-638,484,-388,},
+};
+/*----------------------------------------------------------------------------------*
+ * Highrate SWB BWE tables
+ *----------------------------------------------------------------------------------*/
+const Word16 overlap_coefs_48kHz_fx[NSV_OVERLAP*WIDTH_BAND] = /* in Q15 */
+{
+ 9830, 11141, 11796, 12780, 13763, 14418, 15073, 15565, 16056, 16712, 17695, 18678, 20316, 23593, 27197, 31130
+};
+
+const Word16 overlap_coefs_fx[NSV_OVERLAP*WIDTH_BAND] = /* in Q15 */
+{
+ 8847, 10027, 10617, 11502, 12386, 12976, 13566, 14008, 14451, 15041, 15925, 16810, 18285, 21234, 24478, 28017
+};
+
+
+const Word16 swb_hr_env_code1_fx[NUM_ENVLOPE_CODE_HR1 * 2] = /* in Q9 */
+{
+ 23, 21, 268, 240, 344, 310, 504, 438,
+ 629, 580, 856, 734, 1305, 1209, 1637, 1693,
+ 1321, 2671, 2154, 3709, 1801, 890, 2243, 1410,
+ 2436, 2404, 3496, 3127, 2279, 5187, 3715, 6394,
+ 3435, 1000, 3381, 1894, 5434, 1299, 4806, 2171,
+ 3645, 4240, 4640, 3628, 4567, 4999, 5785, 6023,
+ 6032, 3010, 7194, 4949, 5735, 4609, 7391, 6777,
+ 7341, 1999, 10276, 2220, 9270, 4210, 11444, 4917,
+ 3708, 8481, 6030, 9814, 5694, 7913, 7457, 8888,
+ 9124, 6090, 8943, 7832, 10925, 6889, 10519, 8768,
+ 4637, 11437, 5754, 14762, 6791, 12873, 8317, 14468,
+ 7818, 11028, 8696, 12646, 10031, 11617, 10315, 13255,
+ 9112, 9960, 10901, 10336, 12338, 9772, 12090, 11543,
+ 12125, 8360, 13766, 9934, 13317, 8004, 14817, 8315,
+ 12848, 6332, 14189, 6791, 14505, 5289, 15684, 6580,
+ 12940, 3143, 14948, 3698, 16472, 2570, 16373, 4851
+};
+
+const Word16 swb_hr_env_code2_fx[NUM_ENVLOPE_CODE_HR2 * 2] = /* in Q9 */
+{
+ 262, 242, 686, 568, 1303, 901, 1600, 1559,
+ 2505, 1905, 2053, 2944, 2617, 1108, 3414, 1993,
+ 4329, 1409, 5695, 1801, 3391, 3052, 4384, 2562,
+ 4567, 3985, 5509, 3051, 6374, 4280, 7003, 5750,
+ 7000, 2794, 8434, 2006, 10706, 3294, 13034, 4412,
+ 8402, 3878, 9510, 5269, 11309, 6406, 10839, 8811,
+ 2701, 4927, 4656, 5773, 6116, 7956, 8474, 7704,
+ 3255, 8984, 6818, 11144, 3915, 13367, 1255, 16350
+};
+
+const Word16 swb_hr_env_code3_fx[NUM_ENVLOPE_CODE_HR_TR*N_BANDS_TRANS_BWE_HR] = /* in Q9 */
+{
+ 409, 347, 898, 622, 1457, 1033, 2242, 1012,
+ 3039, 1508, 2017, 2161, 4137, 1348, 3881, 2553,
+ 2538, 5306, 3962, 4430, 4730, 3610, 5225, 2877,
+ 5450, 2240, 5970, 1779, 5553, 1364, 6003, 838
+};
+const Word32 thren_HQ_fx[39] =
+{//Q14
+ 1805811328,
+ 1276901376,
+ 902905664,
+ 638450688,
+ 451452832,
+ 319225344,
+ 225726416,
+ 159612672,
+ 112863208,
+ 79806336,
+ 56431604,
+ 39903168,
+ 28215802,
+ 19951584,
+ 14107901,
+ 9975792,
+ 7053950,
+ 4987896,
+ 3526975,
+ 2493948,
+ 1763487,
+ 1246974,
+ 881743,
+ 623487,
+ 440871,
+ 311743,
+ 220435,
+ 155871,
+ 110217,
+ 77935,
+ 55108,
+ 38967,
+ 27554,
+ 19483,
+ 13777,
+ 9741,
+ 6888,
+ 4870,
+ 3444,
+};
+
+/*----------------------------------------------------------------------------------*
+ * ACELP/HQ core switching
+ *----------------------------------------------------------------------------------*/
+
+/* short filters for BWE of ACELP->HQ switching frame */
+const Word16 hp12800_16000_fx[21] =
+{//Q15
+ -0, 70, -207, 380, -405, 0, 1041, -2668, 4505,
+ -5968, 6526, -5968, 4505, -2668, 1041, 0, -405, 380,
+ -207, 70, -0
+};
+
+const Word16 hp12800_32000_fx[41] =
+{//Q15
+ -0, 45, 35, -47, -104, 0, 191, 156,
+ -203, -422, -0, 675, 523, -656, -1341, 0,
+ 2264, 1943, -2999, -9872, 19678, -9872, -2999, 1943,
+ 2264, 0, -1341, -656, 523, 675, -0, -422,
+ -203, 156, 191, 0, -104, -47, 35, 45, -0
+};
+
+const Word16 hp12800_48000_fx[61] =//Q15
+{
+ -0, 22, 33, 23, -10, -51, -69, -37, 45, 127,
+ 140, 40, -136, -271, -238, 0, 326, 507, 349, -143,
+ -696, -894, -450, 535, 1509, 1696, 521, -1998, -5136, -7735,
+ 24039, -7735, -5136, -1998, 521, 1696, 1509, 535, -450, -894,
+ -696, -143, 349, 507, 326, 0, -238, -271, -136, 40,
+ 140, 127, 45, -37, -69, -51, -10, 23, 33, 22, -0,
+};
+
+const Word16 hp16000_32000_fx[33] =//Q15
+{
+ -0, 62, -0, -127, -0, 270, -0, -523, -0, 940,
+ -0, -1662, -0, 3212, -0, -10353, 16407, -10353, -0, 3212,
+ -0, -1662, -0, 940, -0, -523, -0, 270, -0, -127,
+ -0, 62, -0
+};
+
+const Word16 hp16000_48000_fx[49] =//Q15
+{
+ -0, 33, 39, -0, -64, -83, -0, 138, 175, 0,
+ -272, -334, -0, 493, 596, 0, -870, -1059, -0, 1636,
+ 2120, 0, -4448, -9003, 21858, -9003, -4448, 0, 2120, 1636,
+ -0, -1059, -870, 0, 596, 493, -0, -334, -272, 0,
+ 175, 138, -0, -83, -64, -0, 39, 33, -0
+};
+
+const Word16 ct2[7][13] =
+{
+ /* accepted configurations */
+ /*input 12.8, output :*/
+ /*8*/ {30, 22, 30, 16, 25, 30, 19, 30, 30, 0, 8, 4, 15},
+ /*16*/ {25, 22, 19, 16, 16, 0, 0, 0, 12, 1, 4, 4, 15},
+ /*32*/ {19, 16, 19, 16, 16, 0, 0, 0, 6, 2, 2, 4, 15},
+ /*48*/ {17, 14, 15, 16, 16, 0, 0, 0, 4, 3, 4, 4, 15},
+
+ /*input 16, output :*/
+ /*12*/ { 9, 3, 4, 5, 9, 0, 0, 0, 5, 0, 5, 5, 4},
+ /*32*/ { 4, 4, 4, 4, 4, 0, 0, 0, 2, 1, 1, 4, 4},
+ /*48*/ {18, 18, 18, 18, 18, 0, 0, 0, 5, 2, 1, 4, 15},
+}; // Q0
+const Word16 ct2_fx[7][14] =
+{
+ /* accepted configurations */
+ /*input 12.8, output : fout/fin Q13*/
+ /*8*/ {30, 22, 30, 16, 25, 30, 19, 30, 30, 0, 8, 4, 15, 5120},
+ /*16*/ {25, 22, 19, 16, 16, 0, 0, 0, 12, 1, 4, 4, 15, 10240},
+ /*32*/ {19, 16, 19, 16, 16, 0, 0, 0, 6, 2, 2, 4, 15, 20480},
+ /*48*/ {17, 14, 15, 16, 16, 0, 0, 0, 4, 3, 4, 4, 15, 30720},
+
+ /*input 16, output :*/
+ /*12*/ { 9, 3, 4, 5, 9, 0, 0, 0, 5, 0, 5, 5, 4, 6554},
+ /*32*/ { 4, 4, 4, 4, 4, 0, 0, 0, 2, 1, 1, 4, 4, 16384},
+ /*48*/ {18, 18, 18, 18, 18, 0, 0, 0, 5, 2, 1, 4, 15, 24576},
+};
+
+const Word16 cu15_fx[28][3] = /*Q13*/
+{
+ /* xx/3, xx*xx/3, xx*xx*xx/3 xx v */
+ /* 0:*/ { 182, 12, 1 }, /* 1/15 */
+ /* 1:*/ { 364, 49, 6 }, /* 2/15 */
+ /* 2:*/ { 546, 109, 22 }, /* 3/15 */
+ /* 3:*/ { 728, 194, 52 }, /* 4/15 */
+ /* 4:*/ { 910, 303, 101 }, /* 5/15 */
+ /* 5:*/ { 1092, 437, 175 }, /* 6/15 */
+ /* 6:*/ { 1274, 595, 278 }, /* 7/15 */
+ /* 7:*/ { 1456, 777, 414 }, /* 8/15 */
+ /* 8:*/ { 1638, 983, 590 }, /* 9/15 */
+ /* 9:*/ { 1820, 1214, 809 }, /* 10/15 */
+ /*10:*/ { 2002, 1468, 1077 }, /* 11/15 */
+ /*11:*/ { 2185, 1748, 1398 }, /* 12/15 */
+ /*12:*/ { 2367, 2051, 1778 }, /* 13/15 */
+ /*13:*/ { 2549, 2379, 2220 }, /* 14/15 */
+ /*14:*/ { 2913, 3107, 3314 }, /* 16/15 */
+ /*15:*/ { 3095, 3507, 3975 }, /* 17/15 */
+ /*16:*/ { 3277, 3932, 4719 }, /* 18/15 */
+ /*17:*/ { 3459, 4381, 5550 }, /* 19/15 */
+ /*18:*/ { 3641, 4855, 6473 }, /* 20/15 */
+ /*19:*/ { 3823, 5352, 7493 }, /* 21/15 */
+ /*20:*/ { 4005, 5874, 8615 }, /* 22/15 */
+ /*21:*/ { 4187, 6420, 9844 }, /* 23/15 */
+ /*22:*/ { 4369, 6991, 11185 }, /* 24/15 */
+ /*23:*/ { 4551, 7585, 12642 }, /* 25/15 */
+ /*24:*/ { 4733, 8204, 14221 }, /* 26/15 */
+ /*25:*/ { 4915, 8847, 15925 }, /* 27/15 */
+ /*26:*/ { 5097, 9515, 17761 }, /* 28/15 */
+ /*27:*/ { 5279, 10207, 19733 }, /* 29/15 */
+};
+
+const Word16 cu4_fx[6][3] = /*Q13*/
+{
+ /* xx/3, xx*xx/3, xx*xx*xx/3 xx v */
+ /* 0:*/ { 683, 171, 43 }, /* 1/4 */
+ /* 1:*/ { 1365, 683, 341 }, /* 2/4 */
+ /* 2:*/ { 2048, 1536, 1152 }, /* 3/4 */
+ /* 3:*/ { 3413, 4267, 5333 }, /* 5/4 */
+ /* 4:*/ { 4096, 6144, 9216 }, /* 6/4 */
+ /* 5:*/ { 4779, 8363, 14635 }, /* 7/4 */
+};
+
+
+/*----------------------------------------------------------------------------------*
+ * hp filter for filtering random part of excitation in frame error concealment
+ * Used in lib_dec\syn_bfi.c
+ *----------------------------------------------------------------------------------*/
+
+const Word16 h_high_fx[5] = { -410, -3572, 25602, -3572, -410 };//Q15
+
+const Word16 sincos_t_rad3_fx[T_SIN_PI_2 + 1] =
+{//Q15
+ 0, 134, 268, 402, 536, 670, 804, 938,
+ 1072, 1206, 1340, 1474, 1608, 1742, 1876, 2009,
+ 2143, 2277, 2411, 2544, 2678, 2811, 2945, 3078,
+ 3212, 3345, 3479, 3612, 3745, 3878, 4011, 4144,
+ 4277, 4410, 4543, 4675, 4808, 4941, 5073, 5205,
+ 5338, 5470, 5602, 5734, 5866, 5998, 6130, 6261,
+ 6393, 6524, 6655, 6787, 6918, 7049, 7180, 7310,
+ 7441, 7571, 7702, 7832, 7962, 8092, 8222, 8351,
+ 8481, 8610, 8740, 8869, 8998, 9127, 9255, 9384,
+ 9512, 9640, 9768, 9896, 10024, 10151, 10279, 10406,
+ 10533, 10660, 10786, 10913, 11039, 11165, 11291, 11417,
+ 11543, 11668, 11793, 11918, 12043, 12167, 12292, 12416,
+ 12540, 12664, 12787, 12910, 13033, 13156, 13279, 13401,
+ 13524, 13646, 13767, 13889, 14010, 14131, 14252, 14373,
+ 14493, 14613, 14733, 14852, 14972, 15091, 15210, 15328,
+ 15447, 15565, 15683, 15800, 15917, 16035, 16151, 16268,
+ 16384, 16500, 16616, 16731, 16846, 16961, 17075, 17190,
+ 17304, 17417, 17531, 17644, 17757, 17869, 17981, 18093,
+ 18205, 18316, 18427, 18538, 18648, 18758, 18868, 18978,
+ 19087, 19195, 19304, 19412, 19520, 19627, 19735, 19841,
+ 19948, 20054, 20160, 20265, 20371, 20475, 20580, 20684,
+ 20788, 20891, 20994, 21097, 21199, 21301, 21403, 21504,
+ 21605, 21706, 21806, 21906, 22006, 22105, 22204, 22302,
+ 22400, 22498, 22595, 22692, 22788, 22884, 22980, 23076,
+ 23170, 23265, 23359, 23453, 23546, 23640, 23732, 23824,
+ 23916, 24008, 24099, 24189, 24279, 24369, 24459, 24548,
+ 24636, 24724, 24812, 24900, 24986, 25073, 25159, 25245,
+ 25330, 25415, 25499, 25583, 25667, 25750, 25833, 25915,
+ 25997, 26078, 26159, 26239, 26320, 26399, 26478, 26557,
+ 26635, 26713, 26791, 26868, 26944, 27020, 27096, 27171,
+ 27246, 27320, 27394, 27467, 27540, 27612, 27684, 27756,
+ 27827, 27897, 27967, 28037, 28106, 28175, 28243, 28311,
+ 28378, 28445, 28511, 28577, 28642, 28707, 28771, 28835,
+ 28899, 28962, 29024, 29086, 29148, 29209, 29269, 29329,
+ 29389, 29448, 29506, 29564, 29622, 29679, 29736, 29792,
+ 29847, 29902, 29957, 30011, 30064, 30118, 30170, 30222,
+ 30274, 30325, 30375, 30425, 30475, 30524, 30572, 30620,
+ 30668, 30715, 30761, 30807, 30853, 30897, 30942, 30986,
+ 31029, 31072, 31114, 31156, 31197, 31238, 31278, 31318,
+ 31357, 31396, 31434, 31471, 31508, 31545, 31581, 31617,
+ 31651, 31686, 31720, 31753, 31786, 31818, 31850, 31881,
+ 31912, 31942, 31972, 32001, 32029, 32058, 32085, 32112,
+ 32138, 32164, 32190, 32214, 32239, 32262, 32286, 32308,
+ 32330, 32352, 32373, 32393, 32413, 32433, 32452, 32470,
+ 32488, 32505, 32522, 32538, 32553, 32568, 32583, 32597,
+ 32610, 32623, 32635, 32647, 32658, 32669, 32679, 32689,
+ 32698, 32706, 32714, 32722, 32729, 32735, 32741, 32746,
+ 32750, 32755, 32758, 32761, 32764, 32766, 32767, 32767,
+ 32767
+};
+
+/*----------------------------------------------------------------------------------*
+ * TCX
+ *----------------------------------------------------------------------------------*/
+
+const Word16 gain_corr_fac[3] = { 0x4155, 0x40A9, 0x4055 }; /* pow(10, 2^(-n-2)/28) (1Q14) */
+const Word16 gain_corr_inv_fac[3] = { 0x7D67, 0x7EB2, 0x7F59 }; /* pow(10,-2^(-n-2)/28) (0Q15) */
+
+const Word16 inter4_2tcx2[4][4] =
+{
+ { 7620/*0.2325402f Q15*/, 17528/*0.5349195f Q15*/, 7620/*0.2325402f Q15*/, 0/*0.0000000f Q15*/ },
+ { 4434/*0.1353017f Q15*/, 16694/*0.5094465f Q15*/, 11141/*0.3400065f Q15*/, 500/*0.0152453f Q15*/ },
+ { 1995/*0.0608774f Q15*/, 14389/*0.4391226f Q15*/, 14389/*0.4391226f Q15*/, 1995/*0.0608774f Q15*/ },
+ { 500/*0.0152453f Q15*/, 11141/*0.3400065f Q15*/, 16694/*0.5094465f Q15*/, 4434/*0.1353017f Q15*/ }
+};
+const Word16 inter6_2tcx2[6][4] =
+{
+ { 7345/*0.2241379f Q15*/, 18079/*0.5517241f Q15*/, 7345/*0.2241379f Q15*/, 0/*0.0000000f Q15*/ },
+ { 5119/*0.1562044f Q15*/, 17657/*0.5388595f Q15*/, 9798/*0.2990011f Q15*/, 194/*0.0059349f Q15*/ },
+ { 3249/*0.0991379f Q15*/, 16444/*0.5018346f Q15*/, 12288/*0.3750000f Q15*/, 787/*0.0240275f Q15*/ },
+ { 1800/*0.0549361f Q15*/, 14584/*0.4450639f Q15*/, 14584/*0.4450639f Q15*/, 1800/*0.0549361f Q15*/ },
+ { 787/*0.0240275f Q15*/, 12288/*0.3750000f Q15*/, 16444/*0.5018346f Q15*/, 3249/*0.0991379f Q15*/ },
+ { 194/*0.0059349f Q15*/, 9798/*0.2990011f Q15*/, 17657/*0.5388595f Q15*/, 5119/*0.1562044f Q15*/ }
+};
+
+const Word16 inter_core_12_8kHz_output_8kHz[] =
+{
+ 17528/*0.5349196f Q15*/, 16694/*0.5094466f Q15*/, 14389/*0.4391227f Q15*/, 11141/*0.3400065f Q15*/,
+ 7620/*0.2325402f Q15*/, 4434/*0.1353016f Q15*/, 1995/*0.0608773f Q15*/, 500/*0.0152453f Q15*/,
+ 0/*0.0000000f Q15*/
+};
+const Word16 inter_core_12_8kHz_output_16kHz[] =
+{
+ 14023/*0.4279357f Q15*/, 13592/*0.4147958f Q15*/, 12367/*0.3774199f Q15*/, 10533/*0.3214508f Q15*/,
+ 8350/*0.2548195f Q15*/, 6096/*0.1860321f Q15*/, 4017/*0.1225801f Q15*/, 2291/*0.0699165f Q15*/,
+ 1023/*0.0312127f Q15*/, 256/*0.0078047f Q15*/, 0/*0.0000000f Q15*/, 0/*0.0000000f Q15*/,
+ 0/*0.0000000f Q15*/
+};
+const Word16 inter_core_12_8kHz_output_32kHz[] =
+{
+ 7011/*0.2139679f Q15*/, 6957/*0.2123089f Q15*/, 6796/*0.2073979f Q15*/, 6535/*0.1994284f Q15*/,
+ 6184/*0.1887100f Q15*/, 5756/*0.1756491f Q15*/, 5267/*0.1607254f Q15*/, 4734/*0.1444646f Q15*/,
+ 4175/*0.1274097f Q15*/, 3608/*0.1100939f Q15*/, 3048/*0.0930161f Q15*/, 2511/*0.0766219f Q15*/,
+ 2008/*0.0612900f Q15*/, 1551/*0.0473253f Q15*/, 1146/*0.0349583f Q15*/, 798/*0.0243509f Q15*/,
+ 511/*0.0156063f Q15*/, 288/*0.0087817f Q15*/, 128/*0.0039024f Q15*/, 32/*0.0009753f Q15*/,
+ 0/*0.0000000f Q15*/
+};
+const Word16 inter_core_12_8kHz_output_48kHz[] =
+{
+ 4674/*0.1426452f Q15*/, 4658/*0.1421528f Q15*/, 4610/*0.1406841f Q15*/, 4531/*0.1382653f Q15*/,
+ 4422/*0.1349386f Q15*/, 4285/*0.1307618f Q15*/, 4122/*0.1258066f Q15*/, 3937/*0.1201564f Q15*/,
+ 3732/*0.1139041f Q15*/, 3511/*0.1071503f Q15*/, 3277/*0.1000000f Q15*/, 3033/*0.0925607f Q15*/,
+ 2783/*0.0849398f Q15*/, 2531/*0.0772420f Q15*/, 2280/*0.0695677f Q15*/, 2032/*0.0620107f Q15*/,
+ 1791/*0.0546572f Q15*/, 1559/*0.0475844f Q15*/, 1339/*0.0408600f Q15*/, 1132/*0.0345417f Q15*/,
+ 940/*0.0286774f Q15*/, 764/*0.0233055f Q15*/, 605/*0.0184558f Q15*/, 464/*0.0141503f Q15*/,
+ 341/*0.0104042f Q15*/, 237/*0.0072274f Q15*/, 152/*0.0046257f Q15*/, 85/*0.0026016f Q15*/,
+ 38/*0.0011560f Q15*/, 9/*0.0002890f Q15*/, 0/*0.0000000f Q15*/, 0/*0.0000000f Q15*/,
+ 0/*0.0000000f Q15*/
+};
+const Word16 inter_core_16kHz_output_8kHz[] =
+{
+ 18079/*0.5517241f Q15*/, 17657/*0.5388595f Q15*/, 16444/*0.5018346f Q15*/, 14584/*0.4450639f Q15*/, 12288/*0.3750000f Q15*/, 9798/*0.2990011f Q15*/,
+ 7345/*0.2241379f Q15*/, 5119/*0.1562044f Q15*/, 3249/*0.0991379f Q15*/, 1800/*0.0549361f Q15*/, 787/*0.0240275f Q15*/, 194/*0.0059349f Q15*/,
+ 0/*0.0000000f Q15*/
+};
+const Word16 inter_core_16kHz_output_16kHz[] =
+{
+ 18079/*0.5517241f Q15*/, 17657/*0.5388595f Q15*/, 16444/*0.5018346f Q15*/, 14584/*0.4450639f Q15*/, 12288/*0.3750000f Q15*/, 9798/*0.2990011f Q15*/,
+ 7345/*0.2241379f Q15*/, 5119/*0.1562044f Q15*/, 3249/*0.0991379f Q15*/, 1800/*0.0549361f Q15*/, 787/*0.0240275f Q15*/, 194/*0.0059349f Q15*/,
+ 0/*0.0000000f Q15*/
+};
+const Word16 inter_core_16kHz_output_32kHz[] =
+{
+ 9039/*0.2758621f Q15*/, 8986/*0.2742414f Q15*/, 8829/*0.2694298f Q15*/, 8571/*0.2615753f Q15*/, 8222/*0.2509173f Q15*/, 7791/*0.2377748f Q15*/,
+ 7292/*0.2225320f Q15*/, 6738/*0.2056203f Q15*/, 6144/*0.1875000f Q15*/, 5526/*0.1686403f Q15*/, 4899/*0.1495006f Q15*/, 4277/*0.1305132f Q15*/,
+ 3672/*0.1120690f Q15*/, 3097/*0.0945060f Q15*/, 2559/*0.0781022f Q15*/, 2067/*0.0630725f Q15*/, 1624/*0.0495690f Q15*/, 1235/*0.0376861f Q15*/,
+ 900/*0.0274680f Q15*/, 620/*0.0189188f Q15*/, 394/*0.0120137f Q15*/, 220/*0.0067120f Q15*/, 97/*0.0029675f Q15*/, 24/*0.0007394f Q15*/,
+ 0/*0.0000000f Q15*/
+};
+const Word16 inter_core_16kHz_output_48kHz[] =
+{
+ 6026/*0.1839080f Q15*/, 6011/*0.1834272f Q15*/, 5963/*0.1819912f Q15*/, 5886/*0.1796198f Q15*/, 5778/*0.1763457f Q15*/, 5643/*0.1722133f Q15*/,
+ 5481/*0.1672782f Q15*/, 5296/*0.1616061f Q15*/, 5088/*0.1552712f Q15*/, 4861/*0.1483546f Q15*/, 4618/*0.1409433f Q15*/, 4362/*0.1331275f Q15*/,
+ 4096/*0.1250000f Q15*/, 3823/*0.1166535f Q15*/, 3545/*0.1081796f Q15*/, 3266/*0.0996670f Q15*/, 2988/*0.0912002f Q15*/, 2715/*0.0828579f Q15*/,
+ 2448/*0.0747126f Q15*/, 2190/*0.0668293f Q15*/, 1942/*0.0592649f Q15*/, 1706/*0.0520681f Q15*/, 1484/*0.0452794f Q15*/, 1276/*0.0389306f Q15*/,
+ 1083/*0.0330460f Q15*/, 906/*0.0276422f Q15*/, 745/*0.0227295f Q15*/, 600/*0.0183120f Q15*/, 472/*0.0143894f Q15*/, 359/*0.0109575f Q15*/,
+ 262/*0.0080092f Q15*/, 181/*0.0055360f Q15*/, 116/*0.0035286f Q15*/, 65/*0.0019783f Q15*/, 29/*0.0008771f Q15*/, 7/*0.0002189f Q15*/,
+ 0/*0.0000000f Q15*/
+};
+const Word16 inter_core_25_6kHz_output_8kHz[] =
+{
+ 17528/*0.5349196f Q15*/, 16694/*0.5094466f Q15*/, 14389/*0.4391227f Q15*/, 11141/*0.3400065f Q15*/,
+ 7620/*0.2325402f Q15*/, 4434/*0.1353016f Q15*/, 1995/*0.0608773f Q15*/, 500/*0.0152453f Q15*/,
+ 0/*0.0000000f Q15*/
+};
+const Word16 inter_core_25_6kHz_output_16kHz[] =
+{
+ 17528/*0.5349196f Q15*/, 16694/*0.5094466f Q15*/, 14389/*0.4391227f Q15*/, 11141/*0.3400065f Q15*/,
+ 7620/*0.2325402f Q15*/, 4434/*0.1353016f Q15*/, 1995/*0.0608773f Q15*/, 500/*0.0152453f Q15*/,
+ 0/*0.0000000f Q15*/
+};
+const Word16 inter_core_25_6kHz_output_32kHz[] =
+{
+ 14023/*0.4279357f Q15*/, 13592/*0.4147958f Q15*/, 12367/*0.3774199f Q15*/, 10533/*0.3214508f Q15*/,
+ 8350/*0.2548195f Q15*/, 6096/*0.1860321f Q15*/, 4017/*0.1225801f Q15*/, 2291/*0.0699165f Q15*/,
+ 1023/*0.0312127f Q15*/, 256/*0.0078047f Q15*/, 0/*0.0000000f Q15*/, 0/*0.0000000f Q15*/,
+ 0/*0.0000000f Q15*/
+};
+const Word16 inter_core_25_6kHz_output_48kHz[] =
+{
+ 9349/*0.2852965f Q15*/, 9220/*0.2813740f Q15*/, 8843/*0.2698819f Q15*/, 8245/*0.2516166f Q15*/,
+ 7465/*0.2278099f Q15*/, 6554/*0.2000000f Q15*/, 5567/*0.1698781f Q15*/, 4559/*0.1391327f Q15*/,
+ 3582/*0.1093111f Q15*/, 2678/*0.0817166f Q15*/, 1879/*0.0573517f Q15*/, 1209/*0.0369093f Q15*/,
+ 682/*0.0208069f Q15*/, 303/*0.0092505f Q15*/, 76/*0.0023118f Q15*/, 0/*0.0000000f Q15*/,
+ 0/*0.0000000f Q15*/
+};
+
+const TCX_LTP_FILTER tcxLtpFilters[12] =
+{
+ { inter_core_12_8kHz_output_8kHz, 2 },
+ { inter_core_12_8kHz_output_16kHz, 3 },
+ { inter_core_12_8kHz_output_32kHz, 5 },
+ { inter_core_12_8kHz_output_48kHz, 8 },
+ { inter_core_16kHz_output_8kHz, 2 },
+ { inter_core_16kHz_output_16kHz, 2 },
+ { inter_core_16kHz_output_32kHz, 4 },
+ { inter_core_16kHz_output_48kHz, 6 },
+ { inter_core_25_6kHz_output_8kHz, 2 },
+ { inter_core_25_6kHz_output_16kHz, 2 },
+ { inter_core_25_6kHz_output_32kHz, 3 },
+ { inter_core_25_6kHz_output_48kHz, 4 },
+};
+
+
+
+const SCALE_TCX_SETUP scaleTcxTable[SIZE_SCALE_TABLE_TCX] =
+{
+ { 0, 0, 8000, /* 0.67f ,*/ 21955/*0.67f Q15*/ },
+ { 0, 8000, 9600, /* 0.70f ,*/ 22938/*0.70f Q15*/ },
+ { 0, 9600, 13200, /* 0.76f ,*/ 24904/*0.76f Q15*/ },
+ { 0, 13200, 16400, /* 0.86f ,*/ 28180/*0.86f Q15*/ },
+ { 0, 16400, 24400, /* 0.90f ,*/ 29491/*0.90f Q15*/ },
+ { 0, 24400, 64000, /* 0.96f ,*/ 31457/*0.96f Q15*/ },
+ { 1, 0, 8000, /* 1.f ,*/ 32767/*1.f Q15*/ },
+ { 1, 8000, 9600, /* 1.f ,*/ 32767/*1.f Q15*/ },
+ { 1, 9600, 13200, /* 1.f ,*/ 32767/*1.f Q15*/ },
+ { 1, 13200, 16400, /* 0.85f ,*/ 27853/*0.85f Q15*/ },
+ { 1, 16400, 24400, /* 0.88f ,*/ 28836/*0.88f Q15*/ },
+ { 1, 24400, 32000, /* 0.90f ,*/ 29491/*0.90f Q15*/ },
+ { 1, 32000, 32400, /* 0.95f ,*/ 31130/*0.95f Q15*/ },
+};
+
+
+/*----------------------------------------------------------------------------------*
+ * Arithmetic coder
+ *----------------------------------------------------------------------------------*/
+
+const UWord8 ari_lookup_s17_LC[4096] = // Q0
+{
+ 0x01,0x04,0x29,0x13,0x0A,0x0D,0x05,0x10,
+ 0x10,0x0D,0x00,0x0D,0x2A,0x2A,0x22,0x25,
+ 0x25,0x28,0x2B,0x2E,0x31,0x34,0x34,0x0E,
+ 0x21,0x21,0x21,0x36,0x38,0x38,0x36,0x10,
+ 0x10,0x08,0x09,0x0B,0x0C,0x0E,0x0E,0x21,
+ 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x10,
+ 0x10,0x1A,0x09,0x1D,0x0C,0x20,0x20,0x21,
+ 0x36,0x36,0x36,0x36,0x36,0x0A,0x36,0x16,
+ 0x1A,0x1A,0x2D,0x0C,0x20,0x20,0x21,0x21,
+ 0x21,0x36,0x38,0x38,0x38,0x38,0x36,0x16,
+ 0x16,0x1A,0x3F,0x1F,0x20,0x21,0x24,0x06,
+ 0x36,0x36,0x36,0x38,0x00,0x0A,0x36,0x22,
+ 0x3E,0x3E,0x3F,0x30,0x20,0x21,0x06,0x06,
+ 0x06,0x38,0x36,0x36,0x36,0x26,0x36,0x1C,
+ 0x1C,0x3E,0x3F,0x02,0x20,0x21,0x06,0x36,
+ 0x36,0x38,0x0A,0x0A,0x0A,0x0A,0x05,0x16,
+ 0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+ 0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+ 0x16,0x3F,0x3F,0x0E,0x35,0x14,0x38,0x38,
+ 0x05,0x05,0x05,0x0D,0x13,0x13,0x1C,0x16,
+ 0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
+ 0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
+ 0x3F,0x3F,0x3F,0x20,0x35,0x14,0x27,0x38,
+ 0x38,0x0A,0x2A,0x2A,0x2A,0x16,0x05,0x10,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x3F,0x02,0x0E,0x02,0x14,0x13,0x0A,
+ 0x0D,0x0D,0x0D,0x13,0x00,0x00,0x16,0x19,
+ 0x19,0x3F,0x3F,0x02,0x02,0x14,0x38,0x36,
+ 0x0A,0x0A,0x0A,0x0D,0x0D,0x0D,0x1C,0x22,
+ 0x22,0x3F,0x3F,0x02,0x17,0x26,0x26,0x1C,
+ 0x1C,0x10,0x16,0x16,0x16,0x19,0x22,0x25,
+ 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+ 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+ 0x39,0x39,0x15,0x2C,0x2E,0x2E,0x2E,0x31,
+ 0x31,0x31,0x31,0x31,0x31,0x31,0x34,0x39,
+ 0x39,0x39,0x15,0x2C,0x2E,0x2E,0x0C,0x34,
+ 0x34,0x34,0x36,0x36,0x36,0x36,0x36,0x36,
+ 0x36,0x39,0x15,0x3C,0x2E,0x31,0x34,0x34,
+ 0x31,0x31,0x31,0x1F,0x1E,0x1E,0x1E,0x1E,
+ 0x1E,0x39,0x28,0x2C,0x2E,0x31,0x37,0x34,
+ 0x01,0x01,0x01,0x01,0x01,0x00,0x39,0x39,
+ 0x39,0x39,0x39,0x2C,0x2E,0x31,0x1E,0x34,
+ 0x34,0x35,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x39,0x39,0x3C,0x2E,0x03,0x07,0x34,
+ 0x34,0x0F,0x39,0x39,0x39,0x39,0x39,0x39,
+ 0x39,0x39,0x39,0x15,0x2B,0x31,0x1E,0x34,
+ 0x34,0x01,0x39,0x39,0x39,0x39,0x39,0x39,
+ 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+ 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+ 0x39,0x39,0x39,0x2C,0x39,0x2F,0x2E,0x2E,
+ 0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+ 0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+ 0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+ 0x2E,0x39,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
+ 0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
+ 0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
+ 0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
+ 0x1E,0x1E,0x1E,0x1E,0x1E,0x0F,0x2E,0x2E,
+ 0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+ 0x2E,0x2E,0x39,0x15,0x39,0x39,0x39,0x39,
+ 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+ 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+ 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+ 0x19,0x1C,0x16,0x22,0x22,0x25,0x25,0x25,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x3E,0x3E,0x2F,0x3D,0x21,0x36,0x38,0x05,
+ 0x0D,0x0D,0x0D,0x10,0x16,0x16,0x16,0x25,
+ 0x2D,0x2D,0x37,0x3D,0x33,0x38,0x05,0x0D,
+ 0x0D,0x10,0x16,0x16,0x16,0x16,0x16,0x25,
+ 0x2F,0x2F,0x30,0x12,0x06,0x05,0x0A,0x0D,
+ 0x0D,0x10,0x16,0x16,0x16,0x22,0x22,0x25,
+ 0x1F,0x1F,0x32,0x3B,0x29,0x0A,0x0A,0x10,
+ 0x16,0x16,0x16,0x16,0x22,0x22,0x22,0x25,
+ 0x02,0x02,0x14,0x29,0x05,0x0D,0x2A,0x10,
+ 0x16,0x16,0x16,0x22,0x22,0x22,0x22,0x25,
+ 0x35,0x35,0x14,0x29,0x0A,0x2A,0x2A,0x10,
+ 0x16,0x16,0x16,0x22,0x22,0x22,0x22,0x25,
+ 0x17,0x17,0x26,0x05,0x0D,0x10,0x10,0x16,
+ 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x25,
+ 0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+ 0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+ 0x26,0x26,0x26,0x1C,0x0D,0x16,0x16,0x16,
+ 0x22,0x22,0x22,0x22,0x22,0x22,0x25,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x26,0x1C,0x1C,0x10,0x16,0x16,0x22,
+ 0x22,0x22,0x22,0x22,0x22,0x25,0x25,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x1C,0x1C,0x1C,0x16,0x16,0x16,0x22,
+ 0x22,0x22,0x22,0x25,0x25,0x25,0x25,0x00,
+ 0x00,0x26,0x1C,0x1C,0x16,0x16,0x16,0x22,
+ 0x22,0x22,0x22,0x25,0x25,0x25,0x25,0x00,
+ 0x16,0x16,0x16,0x16,0x16,0x22,0x22,0x22,
+ 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,
+ 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+ 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+ 0x15,0x15,0x3C,0x1E,0x0F,0x06,0x27,0x2A,
+ 0x2A,0x10,0x16,0x16,0x16,0x16,0x16,0x22,
+ 0x2C,0x2C,0x0B,0x37,0x23,0x27,0x13,0x2A,
+ 0x10,0x10,0x10,0x16,0x16,0x16,0x16,0x22,
+ 0x1B,0x1B,0x1D,0x0F,0x24,0x13,0x13,0x2A,
+ 0x00,0x10,0x16,0x16,0x16,0x16,0x16,0x22,
+ 0x1F,0x1F,0x03,0x24,0x07,0x0A,0x0A,0x10,
+ 0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x22,
+ 0x22,0x35,0x06,0x27,0x13,0x2A,0x2A,0x10,
+ 0x16,0x16,0x16,0x16,0x16,0x22,0x22,0x22,
+ 0x22,0x06,0x27,0x27,0x13,0x2A,0x2A,0x10,
+ 0x16,0x16,0x16,0x16,0x16,0x16,0x22,0x22,
+ 0x22,0x05,0x0A,0x2A,0x2A,0x10,0x10,0x16,
+ 0x16,0x16,0x16,0x16,0x16,0x22,0x22,0x22,
+ 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+ 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+ 0x22,0x0D,0x2A,0x10,0x10,0x10,0x10,0x16,
+ 0x16,0x16,0x16,0x16,0x16,0x22,0x22,0x25,
+ 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+ 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+ 0x10,0x10,0x10,0x10,0x10,0x16,0x16,0x16,
+ 0x16,0x16,0x16,0x22,0x22,0x22,0x22,0x25,
+ 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+ 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+ 0x10,0x10,0x10,0x10,0x16,0x16,0x16,0x16,
+ 0x16,0x22,0x22,0x22,0x22,0x22,0x22,0x25,
+ 0x0D,0x0D,0x10,0x10,0x10,0x16,0x16,0x16,
+ 0x16,0x22,0x22,0x22,0x22,0x22,0x22,0x25,
+ 0x0D,0x0D,0x0D,0x0D,0x0D,0x10,0x10,0x16,
+ 0x16,0x16,0x16,0x22,0x22,0x22,0x22,0x25,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x11,0x11,0x3A,0x11,0x11,0x11,0x18,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x3A,0x11,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x18,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x18,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x18,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x11,0x3A,0x3A,0x3A,0x11,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x11,0x18,
+ 0x00,0x11,0x3A,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x11,0x11,0x11,0x18,0x18,0x18,0x18,
+ 0x18,0x25,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x3A,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x3A,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x18,0x18,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x18,0x18,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x18,0x18,0x18,0x18,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x11,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x11,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x3A,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x3A,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x11,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x11,0x11,0x11,0x3A,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x18,0x3A,0x3A,0x11,0x11,0x11,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x11,0x11,0x11,0x3A,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x11,0x11,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+ 0x18,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,0x18,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x11,0x11,0x11,0x11,0x11,0x18,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x11,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x2A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x18,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x11,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x11,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+ 0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A
+};
+
+const UWord16 ari_pk_s17_LC_ext[64][18] = // Q0
+{
+ {
+ 16384, 16368,16337,16231,16143,16115,16059,15916,15793,15710,15586,15472,15367,15302,15201,15107,15020,
+ 0
+ },
+ {
+ 16384, 8983, 8540, 8498, 8485, 4319, 3666, 3594, 3579, 2285, 1908, 1851, 1835, 1326, 1120, 1085, 1074,
+ 0
+ },
+ {
+ 16384, 12022,10039, 9520, 9346, 7347, 5335, 4648, 4382, 3815, 3083, 2728, 2562, 2363, 2050, 1869, 1777,
+ 0
+ },
+ {
+ 16384, 13429,11201,10562,10371, 8231, 5713, 4770, 4441, 3798, 2844, 2359, 2152, 1947, 1614, 1406, 1304,
+ 0
+ },
+ {
+ 16384, 13229,11403,10769,10529, 8415, 6431, 5645, 5311, 4448, 3547, 3176, 3001, 2617, 2181, 1984, 1886,
+ 0
+ },
+ {
+ 16384, 15168,13754,13120,12826,11553, 9705, 8723, 8227, 7675, 6762, 6180, 5842, 5585, 5141, 4816, 4607,
+ 0
+ },
+ {
+ 16384, 14625,12743,12034,11772,10059, 7706, 6652, 6223, 5594, 4594, 4023, 3742, 3501, 3089, 2818, 2664,
+ 0
+ },
+ {
+ 16384, 15275,13679,12951,12652,11158, 8852, 7652, 7121, 6406, 5242, 4542, 4196, 3894, 3398, 3063, 2864,
+ 0
+ },
+ {
+ 16384, 4860, 3338, 3214, 3193, 1428, 676, 571, 547, 356, 222, 189, 180, 139, 102, 89, 84,
+ 0
+ },
+ {
+ 16384, 8357, 5798, 5475, 5410, 3093, 1523, 1227, 1152, 849, 560, 470, 441, 370, 294, 261, 248,
+ 0
+ },
+ {
+ 16384, 15550,14350,13710,13387,12297,10541, 9493, 8929, 8354, 7371, 6696, 6299, 6008, 5491, 5107, 4856,
+ 0
+ },
+ {
+ 16384, 10346, 7298, 6933, 6865, 4052, 1863, 1471, 1381, 1055, 673, 536, 491, 429, 339, 293, 273,
+ 0
+ },
+ {
+ 16384, 11652, 8699, 8030, 7839, 5667, 3460, 2766, 2532, 2093, 1542, 1301, 1203, 1070, 893, 802, 759,
+ 0
+ },
+ {
+ 16384, 15639,14601,14037,13729,12847,11421,10520, 9978, 9521, 8720, 8136, 7750, 7493, 7033, 6676, 6426,
+ 0
+ },
+ {
+ 16384, 12427, 9590, 8715, 8386, 6641, 4708, 3886, 3515, 3071, 2490, 2198, 2052, 1886, 1670, 1549, 1478,
+ 0
+ },
+ {
+ 16384, 13605,10996,10363,10183, 7802, 5032, 4124, 3840, 3267, 2403, 1976, 1804, 1633, 1345, 1171, 1086,
+ 0
+ },
+ {
+ 16384, 15936,15224,14759,14464,13808,12678,11866,11331,10910,10150, 9549, 9122, 8853, 8352, 7938, 7626,
+ 0
+ },
+ {
+ 16384, 16383,16382,14829,14138,14137,14136,12895,12272,10935, 9788, 9082, 8674, 8073, 7508, 7118, 6867,
+ 0
+ },
+ {
+ 16384, 13888,11474,10840,10662, 8335, 5585, 4695, 4411, 3801, 2917, 2506, 2337, 2150, 1847, 1672, 1581,
+ 0
+ },
+ {
+ 16384, 15463,14162,13504,13196,11977,10063, 8978, 8429, 7811, 6768, 6088, 5705, 5406, 4882, 4504, 4266,
+ 0
+ },
+ {
+ 16384, 13764,11941,11367,11151, 9312, 7171, 6301, 5943, 5335, 4430, 3942, 3708, 3466, 3074, 2819, 2679,
+ 0
+ },
+ {
+ 16384, 5179, 3300, 3206, 3197, 1220, 374, 303, 293, 171, 81, 63, 59, 44, 29, 24, 22,
+ 0
+ },
+ {
+ 16384, 16026,15468,15096,14842,14329,13447,12790,12322,11985,11367,10860,10477,10248, 9811, 9443, 9148,
+ 0
+ },
+ {
+ 16384, 12809,11291,10848,10649, 8976, 7199, 6506, 6196, 5657, 4887, 4451, 4219, 3974, 3590, 3365, 3218,
+ 0
+ },
+ {
+ 16384, 16383,16382,15744,15348,15347,15346,14714,14288,13688,13097,12652,12328,11967,11584,11278,11045,
+ 0
+ },
+ {
+ 16384, 15415,14987,14866,14806,13751,13046,12818,12709,12187,11720,11527,11427,11096,10759,10601,10510,
+ 0
+ },
+ {
+ 16384, 5926, 4280, 4090, 4053, 2138, 1120, 947, 903, 632, 413, 353, 334, 264, 198, 174, 166,
+ 0
+ },
+ {
+ 16384, 9206, 6640, 6345, 6291, 3683, 1772, 1423, 1342, 1024, 652, 515, 467, 406, 314, 267, 245,
+ 0
+ },
+ {
+ 16384, 15086,13966,13505,13271,12238,10875,10157, 9763, 9331, 8629, 8155, 7845, 7608, 7198, 6892, 6670,
+ 0
+ },
+ {
+ 16384, 11427, 8599, 8132, 8027, 5406, 3012, 2429, 2270, 1823, 1244, 1006, 920, 814, 654, 564, 524,
+ 0
+ },
+ {
+ 16384, 11561, 8220, 7814, 7737, 4780, 2215, 1731, 1621, 1279, 830, 657, 599, 532, 424, 366, 339,
+ 0
+ },
+ {
+ 16384, 11649, 9374, 8867, 8724, 6398, 4154, 3470, 3253, 2718, 2010, 1695, 1570, 1412, 1172, 1042, 980,
+ 0
+ },
+ {
+ 16384, 13021,10503, 9726, 9443, 7520, 5271, 4369, 4016, 3495, 2741, 2365, 2181, 1990, 1719, 1561, 1478,
+ 0
+ },
+ {
+ 16384, 13815,11388,10605,10316, 8467, 6133, 5175, 4782, 4255, 3466, 3063, 2864, 2688, 2408, 2229, 2125,
+ 0
+ },
+ {
+ 16384, 16175,15807,15536,15338,15006,14402,13919,13549,13312,12871,12491,12182,12010,11681,11390,11143,
+ 0
+ },
+ {
+ 16384, 14310,12047,11336,11110, 9065, 6381, 5318, 4938, 4279, 3272, 2732, 2499, 2284, 1920, 1693, 1574,
+ 0
+ },
+ {
+ 16384, 14765,12824,12096,11834,10003, 7429, 6282, 5841, 5145, 4022, 3402, 3123, 2868, 2426, 2150, 2003,
+ 0
+ },
+ {
+ 16384, 16295,16127,15943,15802,15650,15360,15059,14816,14668,14401,14162,13954,13839,13634,13443,13275,
+ 0
+ },
+ {
+ 16384, 14182,12821,12340,12120,10698, 9040, 8284, 7908, 7378, 6549, 6053, 5772, 5520, 5080, 4785, 4597,
+ 0
+ },
+ {
+ 16384, 15164,13583,12892,12600,11161, 8997, 7888, 7386, 6744, 5673, 5015, 4673, 4391, 3898, 3555, 3349,
+ 0
+ },
+ {
+ 16384, 3758, 2571, 2481, 2467, 988, 478, 412, 397, 245, 154, 133, 127, 95, 69, 61, 58,
+ 0
+ },
+ {
+ 16384, 14805,13193,12553,12285,10706, 8596, 7623, 7178, 6542, 5563, 4996, 4703, 4426, 3967, 3662, 3482,
+ 0
+ },
+ {
+ 16384, 15787,14870,14320,14005,13147,11705,10747,10171, 9651, 8735, 8068, 7629, 7332, 6785, 6361, 6061,
+ 0
+ },
+ {
+ 16384, 7111, 4622, 4304, 4233, 2346, 1174, 938, 870, 659, 455, 389, 365, 316, 260, 236, 226,
+ 0
+ },
+ {
+ 16384, 7146, 4703, 4532, 4512, 2078, 740, 583, 556, 371, 201, 153, 141, 118, 87, 72, 66,
+ 0
+ },
+ {
+ 16384, 9593, 7184, 6853, 6790, 4144, 2206, 1832, 1745, 1320, 878, 741, 697, 599, 476, 424, 401,
+ 0
+ },
+ {
+ 16384, 9209, 5969, 5479, 5351, 3346, 1763, 1382, 1261, 1017, 733, 622, 578, 520, 446, 410, 392,
+ 0
+ },
+ {
+ 16384, 11324, 8681, 8252, 8159, 5450, 3114, 2606, 2473, 1987, 1412, 1211, 1142, 1017, 847, 765, 730,
+ 0
+ },
+ {
+ 16384, 12663,10073, 9527, 9392, 6827, 4204, 3489, 3286, 2713, 1966, 1666, 1554, 1400, 1172, 1051, 994,
+ 0
+ },
+ {
+ 16384, 10413, 7096, 6340, 6115, 4393, 2704, 2156, 1947, 1634, 1254, 1091, 1010, 925, 805, 742, 707,
+ 0
+ },
+ {
+ 16384, 13337,11073,10477,10306, 8045, 5534, 4705, 4438, 3804, 2942, 2530, 2360, 2164, 1850, 1668, 1574,
+ 0
+ },
+ {
+ 16384, 14323,12104,11391,11156, 9183, 6649, 5649, 5287, 4676, 3778, 3302, 3089, 2886, 2548, 2341, 2223,
+ 0
+ },
+ {
+ 16384, 11646, 8435, 7504, 7150, 5603, 3882, 3170, 2853, 2487, 2029, 1791, 1666, 1549, 1386, 1288, 1231,
+ 0
+ },
+ {
+ 16384, 13147,11339,10752,10524, 8775, 6682, 5776, 5398, 4813, 3908, 3406, 3154, 2933, 2554, 2310, 2176,
+ 0
+ },
+ {
+ 16384, 14551,12495,11707,11356, 9962, 8005, 7006, 6500, 6034, 5298, 4839, 4575, 4381, 4057, 3825, 3673,
+ 0
+ },
+ {
+ 16384, 12395, 9526, 9032, 8925, 6130, 3448, 2813, 2649, 2144, 1489, 1231, 1142, 1020, 836, 738, 694,
+ 0
+ },
+ {
+ 16384, 14921,13187,12475,12164,10758, 8775, 7752, 7257, 6727, 5864, 5306, 5004, 4777, 4393, 4119, 3942,
+ 0
+ },
+ {
+ 16384, 2151, 1301, 1276, 1274, 315, 84, 70, 68, 32, 14, 11, 10, 7, 4, 3, 2,
+ 0
+ },
+ {
+ 16384, 16383,16382,13774,13091,13090,13089,11287,10713, 7917, 6052, 5265, 4947, 4161, 3534, 3199, 3039,
+ 0
+ },
+ {
+ 16384, 14374,12331,11688,11474, 9505, 6993, 5998, 5634, 4991, 4008, 3498, 3265, 3036, 2658, 2417, 2285,
+ 0
+ },
+ {
+ 16384, 8798, 5867, 5626, 5593, 2841, 1038, 807, 765, 538, 302, 234, 215, 182, 139, 119, 111,
+ 0
+ },
+ {
+ 16384, 13325,10612,10015, 9860, 7343, 4583, 3802, 3571, 3023, 2269, 1945, 1817, 1670, 1440, 1309, 1243,
+ 0
+ },
+ {
+ 16384, 7741, 5790, 5571, 5528, 3110, 1698, 1464, 1409, 1034, 704, 613, 585, 487, 381, 342, 327,
+ 0
+ },
+ {
+ 16384, 9664, 7506, 7059, 6917, 4820, 3136, 2640, 2455, 2000, 1504, 1297, 1217, 1073, 896, 815, 777,
+ 0
+ }
+};
+
+const Word16 NumRatioBits[2][17] =
+{
+ /* NB */
+ {
+ 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2
+ },
+
+ /* WB */
+ {
+ 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2
+ }
+}; // Q0
+
+/* 7Q8 */
+const Word16 Ratios_WB_2_fx[32] =
+/* 2 */{ 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, 4096, 4352, 4608, 4864, 5120, 5376, 5632, 6144, 6656, 7168, 7680, 8192, 8704, 9216, 9728, 10240, 15360, 16384, 18432 };
+const Word16 Ratios_WB_3_fx[32] =/* 7Q8 */
+/* 3 */{ 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 3584, 4096, 4608, 5120, 5632, 6144, 6656, 7168, 7680, 8192, 8704, 9216, 9728, 10240, 11264, 12288, 13824, 15360, 17408, 19968, 20480 };
+const Word16 Ratios_WB_4_fx[32] =/* 7Q8 */
+/* 4 */{ 384, 512, 640, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 3584, 4096, 4608, 5120, 5632, 6144, 6656, 7168, 7680, 8192, 8704, 9216, 9728, 10240, 10752, 11264, 12288, 13312, 13824, 17408 };
+const Word16 Ratios_WB_5_fx[32] =/* 7Q8 */
+/* 5 */{ 256, 384, 512, 640, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, 4096, 4608, 5120, 5632, 6144, 6656, 7168, 7680, 8192, 8704, 9216, 10240, 11264, 12288, 13824 };
+const Word16 Ratios_WB_6_fx[32] =/* 7Q8 */
+/* 6 */{ 256, 384, 512, 640, 768, 896, 1024, 1152, 1280, 1408, 1536, 1664, 1792, 1920, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, 4096, 4608, 5120, 5632, 6144, 6656, 7168, 8704, 10240, 10496 };
+const Word16 Ratios_WB_7_fx[32] =/* 7Q8 */
+/* 7 */{ 256, 384, 512, 640, 768, 896, 1024, 1152, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, 4096, 4352, 4608, 4864, 5120, 5376, 5760, 6144, 6400, 6912, 7168, 7680, 8960 };
+const Word16 Ratios_WB_8_fx[16] =/* 7Q8 */
+/* 8 */{ 128, 256, 384, 512, 640, 768, 896, 1024, 1152, 1280, 1408, 1536, 1792, 2048, 2304, 2560 };
+const Word16 Ratios_WB_9_fx[16] =/* 7Q8 */
+/* 9 */{ 256, 512, 640, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 3840, 4096, 4608, 6912 };
+const Word16 Ratios_WB_10_fx[16] =/* 7Q8 */
+/* 10 */{ 256, 384, 512, 640, 768, 896, 1024, 1280, 1536, 2048, 2560, 3840, 4608, 5632, 6144, 6656 };
+const Word16 Ratios_WB_11_fx[16] =/* 7Q8 */
+/* 11 */{ 256, 384, 512, 640, 768, 896, 1024, 1280, 1536, 2048, 2560, 3072, 3328, 3584, 4608, 5376 };
+const Word16 Ratios_WB_12_fx[16] =/* 7Q8 */
+/* 12 */{ 128, 256, 384, 512, 640, 768, 1024, 1280, 1536, 2048, 2304, 2816, 3072, 3456, 4096, 5120 };
+const Word16 Ratios_WB_13_fx[16] =/* 7Q8 */
+/* 13 */{ 128, 256, 384, 512, 640, 768, 1024, 1280, 1536, 1792, 2048, 2560, 2816, 3072, 3584, 5120 };
+const Word16 Ratios_WB_14_fx[16] =/* 7Q8 */
+/* 14 */{ 128, 256, 384, 512, 640, 768, 1024, 1152, 1536, 1920, 2304, 2560, 3072, 3584, 3840, 4608 };
+const Word16 Ratios_WB_15_fx[16] =/* 7Q8 */
+/* 15 */{ 128, 256, 320, 384, 448, 512, 640, 768, 896, 1024, 1152, 1280, 1536, 2048, 2304, 3584 };
+const Word16 Ratios_WB_16_fx[4] =/* 7Q8 */
+/* 16 */{ 128, 256, 512, 1024 };
+const Word16 Ratios_WB_17_fx[4] =/* 7Q8 */
+/* 17 */{ 256, 384, 512, 1024 };
+const Word16 Ratios_WB_18_fx[4] =/* 7Q8 */
+/* 18 */{ 256, 512, 768, 1024 };
+
+/******************************************************************************/
+
+/* 7Q8 */
+const Word16 Ratios_NB_2_fx[32] =
+/* 2 */{ 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, 4096, 4352, 4608, 4864, 5120, 5376, 5632, 5888, 6144, 6400, 6656, 6912, 7168, 7680, 8192, 8704, 9216, 9728, 10240 };
+const Word16 Ratios_NB_3_fx[16] =/* 7Q8 */
+/* 3 */{ 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 4096, 5120, 6144, 7680 };
+const Word16 Ratios_NB_4_fx[16] =/* 7Q8 */
+/* 4 */{ 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 3584, 4096, 4608, 5120, 6144, 7680 };
+const Word16 Ratios_NB_5_fx[16] =/* 7Q8 */
+/* 5 */{ 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 3584, 4096, 4608, 5120, 6144, 7680 };
+const Word16 Ratios_NB_6_fx[16] =/* 7Q8 */
+/* 6 */{ 512, 640, 768, 896, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 3584, 4096, 4608, 5120 };
+const Word16 Ratios_NB_7_fx[16] =/* 7Q8 */
+/* 7 */{ 256, 512, 640, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 3584, 4096, 4608, 5120 };
+const Word16 Ratios_NB_8_fx[16] =/* 7Q8 */
+/* 8 */{ 256, 384, 512, 640, 768, 896, 1024, 1152, 1280, 1536, 1792, 2048, 2304, 2560, 3072, 4096 };
+const Word16 Ratios_NB_9_fx[8] =/* 7Q8 */
+/* 9 */{ 256, 512, 768, 1024, 1280, 1536, 2048, 2560 };
+const Word16 Ratios_NB_10_fx[8] =/* 7Q8 */
+/* 10 */{ 256, 512, 768, 1024, 1280, 1536, 2048, 2560 };
+const Word16 Ratios_NB_11_fx[8] =/* 7Q8 */
+/* 11 */{ 256, 384, 512, 768, 1024, 1280, 1536, 2048 };
+const Word16 Ratios_NB_12_fx[8] =/* 7Q8 */
+/* 12 */{ 256, 512, 640, 768, 1024, 1280, 1536, 2048 };
+const Word16 Ratios_NB_13_fx[4] =/* 7Q8 */
+/* 13 */{ 256, 512, 768, 1024 };
+const Word16 Ratios_NB_14_fx[4] =/* 7Q8 */
+/* 14 */{ 256, 512, 1024, 1536 };
+const Word16 Ratios_NB_15_fx[4] =/* 7Q8 */
+/* 15 */{ 256, 512, 768, 1024 };
+const Word16 Ratios_NB_16_fx[4] =/* 7Q8 */
+/* 16 */{ 256, 384, 512, 1024 };
+const Word16 Ratios_NB_17_fx[4] =/* 7Q8 */
+/* 17 */{ 256, 384, 512, 768 };
+const Word16 Ratios_NB_18_fx[4] =/* 7Q8 */
+/* 18 */{ 128, 256, 512, 768 };
+
+/******************************************************************************/
+
+const Word16 *const Ratios_fx[2][17] =/* 7Q8 */
+{
+ /* NB */
+ {
+ Ratios_NB_2_fx,
+ Ratios_NB_3_fx,
+ Ratios_NB_4_fx,
+ Ratios_NB_5_fx,
+ Ratios_NB_6_fx,
+ Ratios_NB_7_fx,
+ Ratios_NB_8_fx,
+ Ratios_NB_9_fx,
+ Ratios_NB_10_fx,
+ Ratios_NB_11_fx,
+ Ratios_NB_12_fx,
+ Ratios_NB_13_fx,
+ Ratios_NB_14_fx,
+ Ratios_NB_15_fx
+ , Ratios_NB_16_fx
+ , Ratios_NB_17_fx
+ , Ratios_NB_18_fx
+ },
+
+ /* WB */
+ {
+ Ratios_WB_2_fx,
+ Ratios_WB_3_fx,
+ Ratios_WB_4_fx,
+ Ratios_WB_5_fx,
+ Ratios_WB_6_fx,
+ Ratios_WB_7_fx,
+ Ratios_WB_8_fx,
+ Ratios_WB_9_fx,
+ Ratios_WB_10_fx,
+ Ratios_WB_11_fx,
+ Ratios_WB_12_fx,
+ Ratios_WB_13_fx,
+ Ratios_WB_14_fx,
+ Ratios_WB_15_fx
+ , Ratios_WB_16_fx
+ , Ratios_WB_17_fx
+ , Ratios_WB_18_fx
+ }
+};
+#define QGC(x) FL2WORD16_SCALE(x, 4)
+const Word16 qGains[2][1 << kTcxHmNumGainBits] =
+{
+ /* GC */ { QGC(0.75f) },
+ /* VC */ { QGC(0.6f), QGC(1.4f), QGC(4.5f), QGC(10.0f) }
+};
+
+
+/*----------------------------------------------------------------------------------*
+ * TNS
+ *----------------------------------------------------------------------------------*/
+
+const struct TnsParameters tnsParametersIGF32kHz_LowBR[1] =
+{
+ { 600, 3, /*1.85f, 0.075f, 4.4f,*/ 237/*1.85f Q7*/, 15518925/*1.85f Q23*/, 2458/*0.075f Q15*/,563 /*4.4f Q7*/ }
+};
+
+const struct TnsParameters tnsParameters32kHz[2] =
+{
+ { 4500, 3, /*1.35f, 0.0300f, 1.0f ,*/ 173/*1.35f Q7*/,11324621/*1.35f Q23*/, 983/*0.0300f Q15*/, 128/*1.0f Q7*/},
+ { 600, 1, /*1.75f, 0.0625f, 4.4f ,*/ 224/*1.75f Q7*/,14680064/*1.75f Q23*/, 2048/*0.0625f Q15*/, 563 /*4.4f Q7*/ }
+};
+
+const struct TnsParameters tnsParameters32kHz_grouped[2] =
+{
+ { 8400, 3, /*1.375f, 0.03125f, 1.0f ,*/ 176/*1.375f Q7*/,11534336/*1.375f Q23*/, 1024/*0.03125f Q15*/ , 128/*1.0f Q7*/ },
+ { 800, 3, /*1.375f, 0.03125f, 1.0f ,*/ 176/*1.375f Q7*/,11534336/*1.375f Q23*/, 1024/*0.03125f Q15*/ , 128/*1.0f Q7*/}
+};
+
+const struct TnsParameters tnsParameters16kHz[1] =
+{
+ { 600, 3, /*1.5f, 0.05f, 4.4f,*/ 192/*1.5f Q7*/, 12582912/*1.5f Q23*/, 1638/*0.05f Q15*/ ,563 /*4.4f Q7*/ }
+};
+
+const struct TnsParameters tnsParameters16kHz_grouped[2] =
+{
+ { 4400, 3, /*1.5f, 0.05f, 1.0f,*/ 192/*1.5f Q7*/, 12582912/*1.5f Q23*/, 1638/*0.05f Q15*/ , 128/*1.0f Q7*/},
+ { 800, 3, /*1.5f, 0.05f, 1.0f,*/ 192/*1.5f Q7*/, 12582912/*1.5f Q23*/, 1638/*0.05f Q15*/ , 128/*1.0f Q7*/}
+};
+
+const struct TnsParameters tnsParameters48kHz_grouped[2] =
+{
+ { 10400, 3, /*1.375f, 0.03125f, 1.0f,*/ 176/*1.375f Q7*/,11534336/*1.375f Q23*/, 1024/*0.03125f Q15*/ , 128/*1.0f Q7*/},
+ { 800, 3, /*1.375f, 0.03125f, 1.0f,*/ 176/*1.375f Q7*/,11534336/*1.375f Q23*/, 1024/*0.03125f Q15*/ , 128/*1.0f Q7*/ }
+};
+
+const struct TnsParameters tnsParameters32kHz_Stereo[2]=
+{
+ { 4500, 3, /*1.35f, 0.0300f, 1.0f ,*/ 173/*1.35f Q7*/, 11324621/*1.35f Q23*/, 983/*0.0300f Q15*/ , 128/*1.0f Q7*/},
+ { 600, 3, /*1.75f, 0.0625f, 4.4f ,*/ 224/*1.75f Q7*/,14680064/*1.75f Q23*/, 2048/*0.0625f Q15*/ ,563 /*4.4f Q7*/ }
+};
+
+const Word16 tnsAcfWindow_fx[TNS_MAX_FILTER_ORDER] =
+{
+ 32696/*0.997803f Q15*/, 32480/*0.991211f Q15*/, 32120/*0.980225f Q15*/, 31616/*0.964844f Q15*/, 30968/*0.945068f Q15*/, 30176/*0.920898f Q15*/, 29240/*0.892334f Q15*/, 28160/*0.859375f Q15*/
+};
+
+
+/* Definition of the mapping between TNS parameters and a bitstream */
+/* Helper structures for hufmann table coding */
+
+const Coding codesTnsCoeff0TCX20[] =
+{
+ { -8+INDEX_SHIFT, 609, 11 }, /* 01001100001 */
+ { -7+INDEX_SHIFT, 305, 10 }, /* 0100110001 */
+ { -6+INDEX_SHIFT, 77, 8 }, /* 01001101 */
+ { -5+INDEX_SHIFT, 39, 7 }, /* 0100111 */
+ { -4+INDEX_SHIFT, 8, 5 }, /* 01000 */
+ { -3+INDEX_SHIFT, 21, 5 }, /* 10101 */
+ { -2+INDEX_SHIFT, 11, 4 }, /* 1011 */
+ { -1+INDEX_SHIFT, 3, 3 }, /* 011 */
+ { 0+INDEX_SHIFT, 3, 2 }, /* 11 */
+ { 1+INDEX_SHIFT, 0, 2 }, /* 00 */
+ { 2+INDEX_SHIFT, 4, 3 }, /* 100 */
+ { 3+INDEX_SHIFT, 5, 4 }, /* 0101 */
+ { 4+INDEX_SHIFT, 20, 5 }, /* 10100 */
+ { 5+INDEX_SHIFT, 18, 6 }, /* 010010 */
+ { 6+INDEX_SHIFT, 153, 9 }, /* 010011001 */
+ { 7+INDEX_SHIFT, 608, 11 } /* 01001100000 */
+};
+
+const Coding codesTnsCoeff0TCX10[] =
+{
+ { -8+INDEX_SHIFT, 441, 9 }, /* 110111001 */
+ { -7+INDEX_SHIFT, 111, 7 }, /* 1101111 */
+ { -6+INDEX_SHIFT, 8, 4 }, /* 1000 */
+ { -5+INDEX_SHIFT, 9, 4 }, /* 1001 */
+ { -4+INDEX_SHIFT, 14, 4 }, /* 1110 */
+ { -3+INDEX_SHIFT, 15, 4 }, /* 1111 */
+ { -2+INDEX_SHIFT, 3, 3 }, /* 011 */
+ { -1+INDEX_SHIFT, 5, 3 }, /* 101 */
+ { 0+INDEX_SHIFT, 0, 2 }, /* 00 */
+ { 1+INDEX_SHIFT, 2, 3 }, /* 010 */
+ { 2+INDEX_SHIFT, 12, 4 }, /* 1100 */
+ { 3+INDEX_SHIFT, 26, 5 }, /* 11010 */
+ { 4+INDEX_SHIFT, 54, 6 }, /* 110110 */
+ { 5+INDEX_SHIFT, 221, 8 }, /* 11011101 */
+ { 6+INDEX_SHIFT, 881, 10 }, /* 1101110001 */
+ { 7+INDEX_SHIFT, 880, 10 } /* 1101110000 */
+};
+
+const Coding codesTnsCoeff1TCX20[] =
+{
+ { -8+INDEX_SHIFT, 30018, 15 }, /* 111010101000010 */
+ { -7+INDEX_SHIFT, 30019, 15 }, /* 111010101000011 */
+ { -6+INDEX_SHIFT, 7505, 13 }, /* 1110101010001 */
+ { -5+INDEX_SHIFT, 3753, 12 }, /* 111010101001 */
+ { -4+INDEX_SHIFT, 939, 10 }, /* 1110101011 */
+ { -3+INDEX_SHIFT, 235, 8 }, /* 11101011 */
+ { -2+INDEX_SHIFT, 28, 5 }, /* 11100 */
+ { -1+INDEX_SHIFT, 6, 3 }, /* 110 */
+ { 0+INDEX_SHIFT, 0, 1 }, /* 0 */
+ { 1+INDEX_SHIFT, 2, 2 }, /* 10 */
+ { 2+INDEX_SHIFT, 15, 4 }, /* 1111 */
+ { 3+INDEX_SHIFT, 59, 6 }, /* 111011 */
+ { 4+INDEX_SHIFT, 116, 7 }, /* 1110100 */
+ { 5+INDEX_SHIFT, 468, 9 }, /* 111010100 */
+ { 6+INDEX_SHIFT, 1877, 11 }, /* 11101010101 */
+ { 7+INDEX_SHIFT, 15008, 14 } /* 11101010100000 */
+};
+
+const Coding codesTnsCoeff1TCX10[] =
+{
+ { -8+INDEX_SHIFT, 2818, 12 }, /* 101100000010 */
+ { -7+INDEX_SHIFT, 2819, 12 }, /* 101100000011 */
+ { -6+INDEX_SHIFT, 705, 10 }, /* 1011000001 */
+ { -5+INDEX_SHIFT, 353, 9 }, /* 101100001 */
+ { -4+INDEX_SHIFT, 177, 8 }, /* 10110001 */
+ { -3+INDEX_SHIFT, 45, 6 }, /* 101101 */
+ { -2+INDEX_SHIFT, 10, 4 }, /* 1010 */
+ { -1+INDEX_SHIFT, 3, 3 }, /* 011 */
+ { 0+INDEX_SHIFT, 6, 3 }, /* 110 */
+ { 1+INDEX_SHIFT, 0, 2 }, /* 00 */
+ { 2+INDEX_SHIFT, 7, 3 }, /* 111 */
+ { 3+INDEX_SHIFT, 4, 3 }, /* 100 */
+ { 4+INDEX_SHIFT, 2, 3 }, /* 010 */
+ { 5+INDEX_SHIFT, 23, 5 }, /* 10111 */
+ { 6+INDEX_SHIFT, 89, 7 }, /* 1011001 */
+ { 7+INDEX_SHIFT, 1408, 11 } /* 10110000000 */
+};
+
+const Coding codesTnsCoeff2TCX20[] =
+{
+ { -8+INDEX_SHIFT, 13312, 14 }, /* 11010000000000 */
+ { -7+INDEX_SHIFT, 13313, 14 }, /* 11010000000001 */
+ { -6+INDEX_SHIFT, 3329, 12 }, /* 110100000001 */
+ { -5+INDEX_SHIFT, 833, 10 }, /* 1101000001 */
+ { -4+INDEX_SHIFT, 209, 8 }, /* 11010001 */
+ { -3+INDEX_SHIFT, 53, 6 }, /* 110101 */
+ { -2+INDEX_SHIFT, 12, 4 }, /* 1100 */
+ { -1+INDEX_SHIFT, 2, 2 }, /* 10 */
+ { 0+INDEX_SHIFT, 0, 1 }, /* 0 */
+ { 1+INDEX_SHIFT, 7, 3 }, /* 111 */
+ { 2+INDEX_SHIFT, 27, 5 }, /* 11011 */
+ { 3+INDEX_SHIFT, 105, 7 }, /* 1101001 */
+ { 4+INDEX_SHIFT, 417, 9 }, /* 110100001 */
+ { 5+INDEX_SHIFT, 1665, 11 }, /* 11010000001 */
+ { 6+INDEX_SHIFT, 13314, 14 }, /* 11010000000010 */
+ { 7+INDEX_SHIFT, 13315, 14 } /* 11010000000011 */
+};
+
+const Coding codesTnsCoeff2TCX10[] =
+{
+ { -8+INDEX_SHIFT, 512, 12 }, /* 001000000000 */
+ { -7+INDEX_SHIFT, 513, 12 }, /* 001000000001 */
+ { -6+INDEX_SHIFT, 65, 9 }, /* 001000001 */
+ { -5+INDEX_SHIFT, 17, 7 }, /* 0010001 */
+ { -4+INDEX_SHIFT, 5, 5 }, /* 00101 */
+ { -3+INDEX_SHIFT, 0, 3 }, /* 000 */
+ { -2+INDEX_SHIFT, 6, 3 }, /* 110 */
+ { -1+INDEX_SHIFT, 1, 2 }, /* 01 */
+ { 0+INDEX_SHIFT, 2, 2 }, /* 10 */
+ { 1+INDEX_SHIFT, 7, 3 }, /* 111 */
+ { 2+INDEX_SHIFT, 3, 4 }, /* 0011 */
+ { 3+INDEX_SHIFT, 9, 6 }, /* 001001 */
+ { 4+INDEX_SHIFT, 33, 8 }, /* 00100001 */
+ { 5+INDEX_SHIFT, 129, 10 }, /* 0010000001 */
+ { 6+INDEX_SHIFT, 514, 12 }, /* 001000000010 */
+ { 7+INDEX_SHIFT, 515, 12 } /* 001000000011 */
+};
+
+const Coding codesTnsCoeff3TCX20[] =
+{
+ { -8+INDEX_SHIFT, 13318, 14 }, /* 11010000000110 */
+ { -7+INDEX_SHIFT, 13319, 14 }, /* 11010000000111 */
+ { -6+INDEX_SHIFT, 6656, 13 }, /* 1101000000000 */
+ { -5+INDEX_SHIFT, 1665, 11 }, /* 11010000001 */
+ { -4+INDEX_SHIFT, 417, 9 }, /* 110100001 */
+ { -3+INDEX_SHIFT, 105, 7 }, /* 1101001 */
+ { -2+INDEX_SHIFT, 27, 5 }, /* 11011 */
+ { -1+INDEX_SHIFT, 7, 3 }, /* 111 */
+ { 0+INDEX_SHIFT, 0, 1 }, /* 0 */
+ { 1+INDEX_SHIFT, 2, 2 }, /* 10 */
+ { 2+INDEX_SHIFT, 12, 4 }, /* 1100 */
+ { 3+INDEX_SHIFT, 53, 6 }, /* 110101 */
+ { 4+INDEX_SHIFT, 209, 8 }, /* 11010001 */
+ { 5+INDEX_SHIFT, 833, 10 }, /* 1101000001 */
+ { 6+INDEX_SHIFT, 6657, 13 }, /* 1101000000001 */
+ { 7+INDEX_SHIFT, 6658, 13 } /* 1101000000010 */
+};
+
+const Coding codesTnsCoeff3TCX10[] =
+{
+ { -8+INDEX_SHIFT, 1284, 12 }, /* 010100000100 */
+ { -7+INDEX_SHIFT, 1285, 12 }, /* 010100000101 */
+ { -6+INDEX_SHIFT, 1286, 12 }, /* 010100000110 */
+ { -5+INDEX_SHIFT, 1287, 12 }, /* 010100000111 */
+ { -4+INDEX_SHIFT, 161, 9 }, /* 010100001 */
+ { -3+INDEX_SHIFT, 41, 7 }, /* 0101001 */
+ { -2+INDEX_SHIFT, 11, 5 }, /* 01011 */
+ { -1+INDEX_SHIFT, 0, 2 }, /* 00 */
+ { 0+INDEX_SHIFT, 2, 2 }, /* 10 */
+ { 1+INDEX_SHIFT, 3, 2 }, /* 11 */
+ { 2+INDEX_SHIFT, 3, 3 }, /* 011 */
+ { 3+INDEX_SHIFT, 4, 4 }, /* 0100 */
+ { 4+INDEX_SHIFT, 21, 6 }, /* 010101 */
+ { 5+INDEX_SHIFT, 81, 8 }, /* 01010001 */
+ { 6+INDEX_SHIFT, 640, 11 }, /* 01010000000 */
+ { 7+INDEX_SHIFT, 641, 11 } /* 01010000001 */
+};
+
+const Coding codesTnsCoeff4TCX20[] =
+{
+ { -8+INDEX_SHIFT, 13318, 14 }, /* 11010000000110 */
+ { -7+INDEX_SHIFT, 13319, 14 }, /* 11010000000111 */
+ { -6+INDEX_SHIFT, 6656, 13 }, /* 1101000000000 */
+ { -5+INDEX_SHIFT, 833, 10 }, /* 1101000001 */
+ { -4+INDEX_SHIFT, 209, 8 }, /* 11010001 */
+ { -3+INDEX_SHIFT, 53, 6 }, /* 110101 */
+ { -2+INDEX_SHIFT, 12, 4 }, /* 1100 */
+ { -1+INDEX_SHIFT, 2, 2 }, /* 10 */
+ { 0+INDEX_SHIFT, 0, 1 }, /* 0 */
+ { 1+INDEX_SHIFT, 7, 3 }, /* 111 */
+ { 2+INDEX_SHIFT, 27, 5 }, /* 11011 */
+ { 3+INDEX_SHIFT, 105, 7 }, /* 1101001 */
+ { 4+INDEX_SHIFT, 417, 9 }, /* 110100001 */
+ { 5+INDEX_SHIFT, 1665, 11 }, /* 11010000001 */
+ { 6+INDEX_SHIFT, 6657, 13 }, /* 1101000000001 */
+ { 7+INDEX_SHIFT, 6658, 13 } /* 1101000000010 */
+};
+
+const Coding codesTnsCoeff4TCX10[] =
+{
+ { -8+INDEX_SHIFT, 20, 12 }, /* 000000010100 */
+ { -7+INDEX_SHIFT, 21, 12 }, /* 000000010101 */
+ { -6+INDEX_SHIFT, 22, 12 }, /* 000000010110 */
+ { -5+INDEX_SHIFT, 3, 9 }, /* 000000011 */
+ { -4+INDEX_SHIFT, 1, 7 }, /* 0000001 */
+ { -3+INDEX_SHIFT, 1, 5 }, /* 00001 */
+ { -2+INDEX_SHIFT, 1, 3 }, /* 001 */
+ { -1+INDEX_SHIFT, 2, 2 }, /* 10 */
+ { 0+INDEX_SHIFT, 3, 2 }, /* 11 */
+ { 1+INDEX_SHIFT, 1, 2 }, /* 01 */
+ { 2+INDEX_SHIFT, 1, 4 }, /* 0001 */
+ { 3+INDEX_SHIFT, 1, 6 }, /* 000001 */
+ { 4+INDEX_SHIFT, 0, 8 }, /* 00000000 */
+ { 5+INDEX_SHIFT, 23, 12 }, /* 000000010111 */
+ { 6+INDEX_SHIFT, 8, 11 }, /* 00000001000 */
+ { 7+INDEX_SHIFT, 9, 11 } /* 00000001001 */
+};
+
+const Coding codesTnsCoeff5[] =
+{
+ { -8+INDEX_SHIFT, 6788, 13 }, /* 1101010000100 */
+ { -7+INDEX_SHIFT, 6789, 13 }, /* 1101010000101 */
+ { -6+INDEX_SHIFT, 6790, 13 }, /* 1101010000110 */
+ { -5+INDEX_SHIFT, 849, 10 }, /* 1101010001 */
+ { -4+INDEX_SHIFT, 213, 8 }, /* 11010101 */
+ { -3+INDEX_SHIFT, 107, 7 }, /* 1101011 */
+ { -2+INDEX_SHIFT, 27, 5 }, /* 11011 */
+ { -1+INDEX_SHIFT, 7, 3 }, /* 111 */
+ { 0+INDEX_SHIFT, 0, 1 }, /* 0 */
+ { 1+INDEX_SHIFT, 2, 2 }, /* 10 */
+ { 2+INDEX_SHIFT, 12, 4 }, /* 1100 */
+ { 3+INDEX_SHIFT, 52, 6 }, /* 110100 */
+ { 4+INDEX_SHIFT, 425, 9 }, /* 110101001 */
+ { 5+INDEX_SHIFT, 6791, 13 }, /* 1101010000111 */
+ { 6+INDEX_SHIFT, 3392, 12 }, /* 110101000000 */
+ { 7+INDEX_SHIFT, 3393, 12 } /* 110101000001 */
+};
+
+const Coding codesTnsCoeff6[] =
+{
+ { -8+INDEX_SHIFT, 4, 12 }, /* 000000000100 */
+ { -7+INDEX_SHIFT, 5, 12 }, /* 000000000101 */
+ { -6+INDEX_SHIFT, 6, 12 }, /* 000000000110 */
+ { -5+INDEX_SHIFT, 1, 9 }, /* 000000001 */
+ { -4+INDEX_SHIFT, 1, 7 }, /* 0000001 */
+ { -3+INDEX_SHIFT, 1, 5 }, /* 00001 */
+ { -2+INDEX_SHIFT, 1, 3 }, /* 001 */
+ { -1+INDEX_SHIFT, 2, 2 }, /* 10 */
+ { 0+INDEX_SHIFT, 3, 2 }, /* 11 */
+ { 1+INDEX_SHIFT, 1, 2 }, /* 01 */
+ { 2+INDEX_SHIFT, 1, 4 }, /* 0001 */
+ { 3+INDEX_SHIFT, 1, 6 }, /* 000001 */
+ { 4+INDEX_SHIFT, 1, 8 }, /* 00000001 */
+ { 5+INDEX_SHIFT, 7, 12 }, /* 000000000111 */
+ { 6+INDEX_SHIFT, 0, 11 }, /* 00000000000 */
+ { 7+INDEX_SHIFT, 1, 11 } /* 00000000001 */
+};
+
+const Coding codesTnsCoeff7[] =
+{
+ { -8+INDEX_SHIFT, 14, 11 }, /* 00000001110 */
+ { -7+INDEX_SHIFT, 15, 11 }, /* 00000001111 */
+ { -6+INDEX_SHIFT, 0, 10 }, /* 0000000000 */
+ { -5+INDEX_SHIFT, 1, 10 }, /* 0000000001 */
+ { -4+INDEX_SHIFT, 1, 7 }, /* 0000001 */
+ { -3+INDEX_SHIFT, 1, 5 }, /* 00001 */
+ { -2+INDEX_SHIFT, 1, 4 }, /* 0001 */
+ { -1+INDEX_SHIFT, 1, 2 }, /* 01 */
+ { 0+INDEX_SHIFT, 2, 10 }, /* 0000000010 */
+ { 1+INDEX_SHIFT, 1, 1 }, /* 1 */
+ { 2+INDEX_SHIFT, 1, 3 }, /* 001 */
+ { 3+INDEX_SHIFT, 1, 6 }, /* 000001 */
+ { 4+INDEX_SHIFT, 3, 10 }, /* 0000000011 */
+ { 5+INDEX_SHIFT, 4, 10 }, /* 0000000100 */
+ { 6+INDEX_SHIFT, 5, 10 }, /* 0000000101 */
+ { 7+INDEX_SHIFT, 6, 10 } /* 0000000110 */
+};
+
+const Coding codesTnsCoeff456[] =
+{
+ { -8+INDEX_SHIFT, 516, 12 }, /* 001000000100 */
+ { -7+INDEX_SHIFT, 517, 12 }, /* 001000000101 */
+ { -6+INDEX_SHIFT, 518, 12 }, /* 001000000110 */
+ { -5+INDEX_SHIFT, 65, 9 }, /* 001000001 */
+ { -4+INDEX_SHIFT, 17, 7 }, /* 0010001 */
+ { -3+INDEX_SHIFT, 5, 5 }, /* 00101 */
+ { -2+INDEX_SHIFT, 3, 4 }, /* 0011 */
+ { -1+INDEX_SHIFT, 1, 2 }, /* 01 */
+ { 0+INDEX_SHIFT, 3, 2 }, /* 11 */
+ { 1+INDEX_SHIFT, 2, 2 }, /* 10 */
+ { 2+INDEX_SHIFT, 0, 3 }, /* 000 */
+ { 3+INDEX_SHIFT, 9, 6 }, /* 001001 */
+ { 4+INDEX_SHIFT, 33, 8 }, /* 00100001 */
+ { 5+INDEX_SHIFT, 519, 12 }, /* 001000000111 */
+ { 6+INDEX_SHIFT, 256, 11 }, /* 00100000000 */
+ { 7+INDEX_SHIFT, 257, 11 } /* 00100000001 */
+};
+
+const Coding codesTnsCoeff0WBTCX20[] =
+{
+ { -8+INDEX_SHIFT, 225, 10 }, /* 0011100001 */
+ { -7+INDEX_SHIFT, 113, 9 }, /* 001110001 */
+ { -6+INDEX_SHIFT, 29, 7 }, /* 0011101 */
+ { -5+INDEX_SHIFT, 15, 6 }, /* 001111 */
+ { -4+INDEX_SHIFT, 2, 4 }, /* 0010 */
+ { -3+INDEX_SHIFT, 0, 3 }, /* 000 */
+ { -2+INDEX_SHIFT, 13, 4 }, /* 1101 */
+ { -1+INDEX_SHIFT, 2, 3 }, /* 010 */
+ { 0+INDEX_SHIFT, 5, 3 }, /* 101 */
+ { 1+INDEX_SHIFT, 3, 3 }, /* 011 */
+ { 2+INDEX_SHIFT, 4, 3 }, /* 100 */
+ { 3+INDEX_SHIFT, 7, 3 }, /* 111 */
+ { 4+INDEX_SHIFT, 12, 4 }, /* 1100 */
+ { 5+INDEX_SHIFT, 6, 5 }, /* 00110 */
+ { 6+INDEX_SHIFT, 57, 8 }, /* 00111001 */
+ { 7+INDEX_SHIFT, 224, 10 } /* 0011100000 */
+};
+
+
+const Coding codesTnsCoeff1WBTCX20[] =
+{
+ { -8+INDEX_SHIFT, 512, 12 }, /* 001000000000 */
+ { -7+INDEX_SHIFT, 513, 12 }, /* 001000000001 */
+ { -6+INDEX_SHIFT, 514, 12 }, /* 001000000010 */
+ { -5+INDEX_SHIFT, 65, 9 }, /* 001000001 */
+ { -4+INDEX_SHIFT, 17, 7 }, /* 0010001 */
+ { -3+INDEX_SHIFT, 5, 5 }, /* 00101 */
+ { -2+INDEX_SHIFT, 0, 3 }, /* 000 */
+ { -1+INDEX_SHIFT, 2, 3 }, /* 010 */
+ { 0+INDEX_SHIFT, 3, 2 }, /* 11 */
+ { 1+INDEX_SHIFT, 2, 2 }, /* 10 */
+ { 2+INDEX_SHIFT, 3, 3 }, /* 011 */
+ { 3+INDEX_SHIFT, 3, 4 }, /* 0011 */
+ { 4+INDEX_SHIFT, 9, 6 }, /* 001001 */
+ { 5+INDEX_SHIFT, 33, 8 }, /* 00100001 */
+ { 6+INDEX_SHIFT, 129, 10 }, /* 0010000001 */
+ { 7+INDEX_SHIFT, 515, 12 } /* 001000000011 */
+};
+
+
+const Coding codesTnsCoeff2WB[] =
+{
+ { -8+INDEX_SHIFT, 5632, 13 }, /* 1011000000000 */
+ { -7+INDEX_SHIFT, 5633, 13 }, /* 1011000000001 */
+ { -6+INDEX_SHIFT, 1409, 11 }, /* 10110000001 */
+ { -5+INDEX_SHIFT, 353, 9 }, /* 101100001 */
+ { -4+INDEX_SHIFT, 89, 7 }, /* 1011001 */
+ { -3+INDEX_SHIFT, 23, 5 }, /* 10111 */
+ { -2+INDEX_SHIFT, 4, 3 }, /* 100 */
+ { -1+INDEX_SHIFT, 0, 2 }, /* 00 */
+ { 0+INDEX_SHIFT, 3, 2 }, /* 11 */
+ { 1+INDEX_SHIFT, 1, 2 }, /* 01 */
+ { 2+INDEX_SHIFT, 10, 4 }, /* 1010 */
+ { 3+INDEX_SHIFT, 45, 6 }, /* 101101 */
+ { 4+INDEX_SHIFT, 177, 8 }, /* 10110001 */
+ { 5+INDEX_SHIFT, 705, 10 }, /* 1011000001 */
+ { 6+INDEX_SHIFT, 5634, 13 }, /* 1011000000010 */
+ { 7+INDEX_SHIFT, 5635, 13 } /* 1011000000011 */
+};
+
+const Coding codesTnsCoeff3WB[] =
+{
+ { -8+INDEX_SHIFT, 5638, 13 }, /* 1011000000110 */
+ { -7+INDEX_SHIFT, 5639, 13 }, /* 1011000000111 */
+ { -6+INDEX_SHIFT, 2816, 12 }, /* 101100000000 */
+ { -5+INDEX_SHIFT, 353, 9 }, /* 101100001 */
+ { -4+INDEX_SHIFT, 177, 8 }, /* 10110001 */
+ { -3+INDEX_SHIFT, 45, 6 }, /* 101101 */
+ { -2+INDEX_SHIFT, 10, 4 }, /* 1010 */
+ { -1+INDEX_SHIFT, 0, 2 }, /* 00 */
+ { 0+INDEX_SHIFT, 3, 2 }, /* 11 */
+ { 1+INDEX_SHIFT, 1, 2 }, /* 01 */
+ { 2+INDEX_SHIFT, 4, 3 }, /* 100 */
+ { 3+INDEX_SHIFT, 23, 5 }, /* 10111 */
+ { 4+INDEX_SHIFT, 89, 7 }, /* 1011001 */
+ { 5+INDEX_SHIFT, 705, 10 }, /* 1011000001 */
+ { 6+INDEX_SHIFT, 2817, 12 }, /* 101100000001 */
+ { 7+INDEX_SHIFT, 2818, 12 } /* 101100000010 */
+};
+
+const Word16 nTnsCoeffCodes = sizeof(codesTnsCoeff0TCX20)/sizeof(codesTnsCoeff0TCX20[0]);
+
+const Coding * const codesTnsCoeffSWBTCX20[] = { codesTnsCoeff0TCX20, codesTnsCoeff1TCX20, codesTnsCoeff2TCX20, codesTnsCoeff3TCX20, codesTnsCoeff4TCX20, codesTnsCoeff5, codesTnsCoeff6, codesTnsCoeff7 };
+const Coding * const codesTnsCoeffSWBTCX10[] = { codesTnsCoeff0TCX10, codesTnsCoeff1TCX10, codesTnsCoeff2TCX10, codesTnsCoeff3TCX10, codesTnsCoeff4TCX10, codesTnsCoeff5, codesTnsCoeff6, codesTnsCoeff7 };
+const Coding * const codesTnsCoeffWBTCX20[] = { codesTnsCoeff0WBTCX20, codesTnsCoeff1WBTCX20, codesTnsCoeff2WB, codesTnsCoeff3WB, codesTnsCoeff456, codesTnsCoeff456, codesTnsCoeff456, codesTnsCoeff7 };
+
+const Word16 nTnsCoeffTables = sizeof(codesTnsCoeffSWBTCX20)/sizeof(codesTnsCoeffSWBTCX20[0]); // Q0
+
+const Coding codesTnsOrderTCX20[] =
+{
+ { 1, 0, 2 }, /* 00 */
+ { 2, 40, 6 }, /* 101000 */
+ { 3, 41, 6 }, /* 101001 */
+ { 4, 21, 5 }, /* 10101 */
+ { 5, 11, 4 }, /* 1011 */
+ { 6, 4, 3 }, /* 100 */
+ { 7, 1, 2 }, /* 01 */
+ { 8, 3, 2 } /* 11 */
+};
+const Coding codesTnsOrderTCX10[] =
+{
+ { 1, 0, 3 }, /* 000 */
+ { 2, 16, 5 }, /* 10000 */
+ { 3, 17, 5 }, /* 10001 */
+ { 4, 9, 4 }, /* 1001 */
+ { 5, 1, 3 }, /* 001 */
+ { 6, 5, 3 }, /* 101 */
+ { 7, 1, 2 }, /* 01 */
+ { 8, 3, 2 } /* 11 */
+};
+const Coding codesTnsOrder[] =
+{
+ { 1, 96, 7 }, /* 1100000 */
+ { 2, 97, 7 }, /* 1100001 */
+ { 3, 49, 6 }, /* 110001 */
+ { 4, 25, 5 }, /* 11001 */
+ { 5, 13, 4 }, /* 1101 */
+ { 6, 7, 3 }, /* 111 */
+ { 7, 2, 2 }, /* 10 */
+ { 8, 0, 1 } /* 0 */
+};
+
+const Word16 nTnsOrderCodes = sizeof(codesTnsOrder)/sizeof(codesTnsOrder[0]); // Q0
+
+const ParamsBitMap tnsSWBTCX20FilterCoeffBitMap =
+{
+ 1,
+ {
+ { 0, GetSWBTCX20TnsFilterCoeffBits, TRUE, GetTnsFilterCoeff, SetTnsFilterCoeff, EncodeSWBTCX20TnsFilterCoeff, DecodeSWBTCX20TnsFilterCoeff_flt, NULL } /* TNS filter coefficients */
+ }
+};
+
+const ParamsBitMap tnsSWBTCX10FilterCoeffBitMap =
+{
+ 1,
+ {
+ { 0, GetSWBTCX10TnsFilterCoeffBits, TRUE, GetTnsFilterCoeff, SetTnsFilterCoeff, EncodeSWBTCX10TnsFilterCoeff, DecodeSWBTCX10TnsFilterCoeff_flt, NULL } /* TNS filter coefficients */
+ }
+};
+
+const ParamsBitMap tnsSWBTCX20FilterBitMap =
+{
+ 1,
+ {
+ { 0, GetTnsFilterOrderBitsSWBTCX20, FALSE, GetTnsFilterOrder, SetTnsFilterOrder, EncodeTnsFilterOrderSWBTCX20, DecodeTnsFilterOrderSWBTCX20_flt, &tnsSWBTCX20FilterCoeffBitMap } /* TNS filter order */
+ }
+};
+
+const ParamsBitMap tnsSWBTCX10FilterBitMap =
+{
+ 1,
+ {
+ { 0, GetTnsFilterOrderBitsSWBTCX10, FALSE, GetTnsFilterOrder, SetTnsFilterOrder, EncodeTnsFilterOrderSWBTCX10, DecodeTnsFilterOrderSWBTCX10_flt, &tnsSWBTCX10FilterCoeffBitMap } /* TNS filter order */
+ }
+};
+
+const ParamsBitMap tnsSWBTCX20BitMap =
+{
+ 1,
+ {
+ { 1, NULL, FALSE, GetNumOfTnsFilters_flt, SetNumOfTnsFilters_flt, NULL, NULL, &tnsSWBTCX20FilterBitMap } /* Number of TNS filters */
+ }
+};
+
+/* For storing/reading bits in SWB/FB mode */
+const ParamsBitMap tnsEnabledSWBTCX20BitMap =
+{
+ 1,
+ {
+ { 1, NULL, TRUE, GetTnsEnabled, SetTnsEnabled, NULL, NULL, &tnsSWBTCX20BitMap } /* TNS Enabled/Disable */
+ }
+};
+
+const ParamsBitMap tnsSWBTCX10BitMap =
+{
+ 1,
+ {
+ { 1, NULL, FALSE, GetNumOfTnsFilters_flt, SetNumOfTnsFilters_flt, NULL, NULL, &tnsSWBTCX10FilterBitMap } /* Number of TNS filters */
+ }
+};
+
+/* For storing/reading bits in SWB/FB mode */
+const ParamsBitMap tnsEnabledSWBTCX10BitMap =
+{
+ 1,
+ {
+ { 1, NULL, TRUE, GetTnsEnabled, SetTnsEnabled, NULL, NULL, &tnsSWBTCX10BitMap } /* TNS Enabled/Disable */
+ }
+};
+
+const ParamsBitMap tnsWBTCX20FilterCoeffBitMap =
+{
+ 1,
+ {
+ { 0, GetWBTCX20TnsFilterCoeffBits, TRUE, GetTnsFilterCoeff, SetTnsFilterCoeff, EncodeWBTCX20TnsFilterCoeff, DecodeWBTCX20TnsFilterCoeff_flt, NULL } /* TNS filter coefficients */
+ }
+};
+
+
+const ParamsBitMap tnsWBTCX20FilterBitMap =
+{
+ 1,
+ {
+ { 0, GetTnsFilterOrderBits, FALSE, GetTnsFilterOrder, SetTnsFilterOrder, EncodeTnsFilterOrder, DecodeTnsFilterOrder_flt, &tnsWBTCX20FilterCoeffBitMap } /* TNS filter order */
+ }
+};
+
+
+/* For storing/reading bits in WB mode */
+const ParamsBitMap tnsEnabledWBTCX20BitMap =
+{
+ 1,
+ {
+ { 1, NULL, TRUE, GetTnsEnabledSingleFilter, SetTnsEnabledSingleFilter, NULL, NULL, &tnsWBTCX20FilterBitMap } /* TNS Enabled/Disable */
+ }
+};
+
+/* For storing/reading bits in SWB/FB mode */
+const ParamsBitMap tnsOnWhiteSWBTCX20BitMap =
+{
+ 2,
+ {
+ { 1, NULL, TRUE, GetTnsOnWhite, SetTnsOnWhite, NULL, NULL, NULL }, /* TNS Enabled/Disable */
+ { 1, NULL, FALSE, GetNumOfTnsFilters_flt, SetNumOfTnsFilters_flt, NULL, NULL, &tnsSWBTCX20FilterBitMap }
+ }
+};
+
+const ParamsBitMap tnsEnabledOnWhiteSWBTCX20BitMap =
+{
+ 1,
+ {
+ { 1, NULL, TRUE, GetTnsEnabled, SetTnsEnabled, NULL, NULL, &tnsOnWhiteSWBTCX20BitMap } /* TNS Enabled/Disable */
+ }
+};
+/* For storing/reading bits in SWB/FB mode */
+const ParamsBitMap tnsOnWhiteSWBTCX10BitMap =
+{
+ 2,
+ {
+ { 1, NULL, TRUE, GetTnsOnWhite, SetTnsOnWhite, NULL, NULL, NULL }, /* TNS on whitened spectra */
+ { 1, NULL, FALSE, GetNumOfTnsFilters_flt, SetNumOfTnsFilters_flt, NULL, NULL, &tnsSWBTCX10FilterBitMap }
+ }
+};
+
+/* For storing/reading bits in SWB/FB mode */
+const ParamsBitMap tnsEnabledOnWhiteSWBTCX10BitMap =
+{
+ 1,
+ {
+ { 1, NULL, TRUE, GetTnsEnabled, SetTnsEnabled, NULL, NULL, &tnsOnWhiteSWBTCX10BitMap } /* TNS Enabled/Disable */
+ }
+};
+
+
+/**
+ * 4 bit resolution TNS coefficients.
+ */
+const Word16 tnsCoeff4[16] =
+{
+ -32628/*-0.99573418F Q15*/, /* = sin(-8*(PI/2.0)/(8 + 0.5)) */
+ -31517/*-0.96182564F Q15*/, /* = sin(-7*(PI/2.0)/(8 + 0.5)) */
+ -29333/*-0.89516329F Q15*/,
+ -26149/*-0.79801723F Q15*/,
+ -22076/*-0.67369564F Q15*/,
+ -17250/*-0.52643216F Q15*/,
+ -11837/*-0.36124167F Q15*/,
+ -6021/*-0.18374952F Q15*/, /* = sin(-1*(PI/2.0)/(8 + 0.5)) */
+ 0/* 0.00000000F Q15*/, /* = sin(0*(PI/2.0)/(8 + 0.5)) */
+ 6813/* 0.20791169F Q15*/, /* = sin(1*(PI/2.0)/(8 - 0.5)) */
+ 13328/* 0.40673664F Q15*/,
+ 19261/* 0.58778525F Q15*/,
+ 24351/* 0.74314483F Q15*/,
+ 28378/* 0.86602540F Q15*/,
+ 31164/* 0.95105652F Q15*/, /* = sin(6*(PI/2.0)/(8 - 0.5)) */
+ 32588/* 0.99452190F Q15*/ /* = sin(7*(PI/2.0)/(8 - 0.5)) */
+};
+
+
+/*----------------------------------------------------------------------------------*
+ * IGF settings for each bitrate
+ *----------------------------------------------------------------------------------*/
+
+const Word16 swb_offset_LB_new[IGF_BITRATE_UNKNOWN][IGF_MAX_SFB] = // Q0
+{
+ /* 0: for 9600 kbs WB */
+ {
+ 4, 164, 186, 242, 320
+ },
+ /* 1: for 13200 kbs WB RF */
+ {
+ 4, 164, 186, 242, 320
+ },
+ /* 2: for 9600 kbs SWB */
+ {
+ 4, 200, 322, 444, 566
+ },
+ /* 3: for 13200 kbs SWB */
+ {
+ 7, 256, 288, 328, 376, 432, 496, 566
+ },
+ /* 4: for 13200 kbs SWB RF */
+ {
+ 4, 200, 322, 444, 566
+ },
+ /* 5: for 16400 kbs SWB */
+ {
+ 8, 256, 288, 328, 376, 432, 496, 576, 640
+ },
+ /* 6: for 24400 kbs SWB */
+ {
+ 9, 256, 284, 318, 358, 402, 450, 508, 576, 640
+ },
+ /* 7: for 32000 kbs SWB */
+ {
+ 9, 256, 284, 318, 358, 402, 450, 508, 576, 640
+ },
+ /* 8: for 48000 kbs SWB */
+ {
+ 4, 512, 534, 576, 640
+ },
+ /* 9: for 64000 kbs SWB */
+ {
+ 4, 512, 534, 576, 640
+ },
+ /* 10: for 16400 kbs FB */
+ {
+ 10, 256, 288, 328, 376, 432, 496, 576, 640, 720, 800
+ },
+ /* 11: for 24400 kbs FB */
+ {
+ 11, 256, 284, 318, 358, 402, 450, 508, 576, 640, 720, 800
+ },
+ /* 12: for 32000 kbs FB */
+ {
+ 11, 256, 284, 318, 358, 402, 450, 508, 576, 640, 720, 800
+ },
+ /* 13: for 48000 kbs FB */
+ {
+ 5, 512, 584, 656, 728, 800
+ },
+ /* 14: for 64000 kbs FB */
+ {
+ 5, 512, 584, 656, 728, 800
+ },
+ /* 15: for 96000 kbs FB */
+ {
+ 3, 640, 720, 800 /* old: 640, 760, 880 */
+ },
+ /* 16: for 128000 kbs FB */
+ {
+ 3, 640, 720, 800 /* old: 640, 760, 880 */
+ },
+ /* 17: for 13200 kbs WB (stereo) */
+ {
+ 3, 196, 248, 320
+ },
+ /* 18: for 16400 kbs WB (stereo) */
+ {
+ 3, 228, 268, 320
+ },
+ /* 19: for 13200 kbs SWB (stereo) */
+ {
+ 5, 200, 264, 344, 440, 566
+ },
+ /* 20: for 16400 kbs SWB (stereo) */
+ {
+ 7, 228, 264, 308, 360, 420, 488, 566
+ },
+ /* 21: for 24400 kbs SWB (stereo) */
+ {
+ 8, 256, 288, 328, 376, 432, 496, 576, 640
+ },
+ /* 22: for 32000 kbs SWB (stereo) */
+ {
+ 9, 256, 284, 320, 360, 404, 452, 508, 576, 640
+ },
+ /* 23: for 48000 kbs SWB (stereo) */
+ {
+ 7, 360, 392, 424, 464, 508, 560, 640
+ },
+ /* 24: for 48000 kbs SWB (stereo TCX10) */
+ {
+ 4, 360, 424, 508, 640
+ },
+ /* 25: for 64000 kbs SWB (stereo) */
+ {
+ 8, 400, 424, 448, 476, 508, 540, 576, 640
+ },
+ /* 26: for 80000 kbs SWB (stereo) */
+ {
+ 5, 464, 496, 532, 576, 640
+ },
+ /* 27: for 96000 kbs SWB (stereo) */
+ {
+ 4, 512, 536, 576, 640
+ },
+ /* 28: for 24400 kbs FB (stereo) */
+ {
+ 10, 256, 288, 328, 376, 432, 496, 576, 640, 720, 800
+ },
+ /* 29: for 32000 kbs FB (stereo) */
+ {
+ 11, 256, 284, 320, 360, 404, 452, 508, 576, 640, 720, 800
+ },
+ /* 30: for 48000 kbs FB (stereo) */
+ {
+ 9, 360, 392, 424, 464, 508, 560, 640, 720, 800
+ },
+ /* 31: for 48000 kbs FB (stereo TCX10) */
+ {
+ 5, 360, 424, 508, 640, 800
+ },
+ /* 32: for 64000 kbs FB (stereo) */
+ {
+ 10, 400, 424, 448, 476, 508, 540, 576, 640, 720, 800
+ },
+ /* 33: for 80000 kbs FB (stereo) */
+ {
+ 7, 464, 496, 532, 576, 640, 720, 800
+ },
+ /* 34: for 96000 kbs FB (stereo) */
+ {
+ 6, 512, 536, 576, 640, 720, 800
+ },
+ /* 35: for 128000 kbs FB (stereo) */
+ {
+ 3, 640, 720, 800
+ }
+};/*Q0*/
+
+const Word16 igf_tile_offset_table[IGF_BITRATE_UNKNOWN][2*IGF_MAX_TILES+1] = { // Q0
+ { 2, 2, 0, 3, 0}, /* 9600 WB*/
+ { 2, 2, 0, 3, 0}, /* 13200 WB RF */
+ { 3, 1, 0, 2, 32, 3, 46}, /* 9600 SWB */
+ { 2, 4, 0, 6, 32}, /* 13200 SWB RF */
+ { 3, 1, 0, 2, 32, 3, 46}, /* 13200 SWB */
+ { 3, 4, 0, 6, 48, 7, 64}, /* 16400 SWB */
+ { 3, 4, 0, 7, 32, 8, 64}, /* 24400 SWB */
+ { 3, 4, 0, 7, 32, 8, 64}, /* 32000 SWB */
+ { 1, 3, 320}, /* 48000 SWB */
+ { 1, 3, 320}, /* 64000 SWB */
+ { 3, 4, 0, 7, 0, 9, 0}, /* 16400 FB */
+ { 4, 4, 0, 6, 32, 9, 0, 10, 80}, /* 24400 FB */
+ { 4, 4, 0, 6, 32, 9, 0, 10, 80}, /* 32000 FB */
+ { 1, 4, 160}, /* 48000 FB */
+ { 1, 4, 160}, /* 64000 FB */
+ { 1, 2, 416}, /* 96000 FB */
+ { 1, 2, 416}, /*128000 FB */
+ { 2, 1, 40, 2, 92}, /* 13200 WB (stereo) */
+ { 2, 1, 80, 2, 120}, /* 16400 WB (stereo) */
+ { 4, 1, 0, 2, 32, 3, 46, 4, 40}, /* 13200 SWB (stereo) */
+ { 6, 1, 0, 2, 36, 3, 80, 4, 132, 5, 32, 6, 100 }, /* 16400 SWB (stereo) */
+ { 7, 1, 0, 2, 32, 3, 72, 4, 120, 5, 48, 6, 112, 7, 64 }, /* 24400 SWB (stereo) */
+ { 8, 1, 0, 2, 28, 3, 64, 4, 104, 5, 32, 6, 80, 7, 136, 8, 64 }, /* 32000 SWB (stereo) */
+ { 6, 1, 120, 2, 152, 3, 184, 4, 224, 5, 140, 6, 192}, /* 48000 SWB (stereo) */
+ { 3, 1, 0, 2, 40, 3, 80 }, /* 48000 SWB (stereo TCX10) */
+ { 4, 2, 80, 4, 128, 6, 144, 7, 212 }, /* 64000 SWB (stereo) */
+ { 2, 2, 212, 4, 280 }, /* 80000 SWB (stereo) */
+ { 1, 3, 200}, /* 96000 SWB (stereo) */
+ { 9, 1, 0, 2, 32, 3, 72, 4, 120, 5, 48, 6, 112, 7, 64, 8, 0, 9, 80 }, /* 24400 FB (stereo) */
+ {10, 1, 0, 2, 28, 3, 64, 4, 104, 5, 32, 6, 80, 7, 136, 8, 64, 9, 0, 10, 80 }, /* 32000 FB (stereo) */
+ { 7, 1, 120, 2, 152, 3, 184, 4, 224, 5, 140, 6, 192, 8, 140}, /* 48000 FB (stereo) */
+ { 4, 1, 0, 2, 40, 3, 80, 4, 140 }, /* 48000 FB (stereo TCX10) */
+ { 5, 2, 80, 4, 128, 6, 144, 7, 212, 9, 160 }, /* 64000 FB (stereo) */
+ { 3, 2, 212, 4, 280, 6, 200 }, /* 80000 FB (stereo) */
+ { 2, 3, 200, 5, 240}, /* 96000 FB (stereo) */
+ { 1, 2, 416} /*128000 FB (stereo) */
+};
+
+const Word16 igf_whitening_TH_ivas_fx[][2][IGF_MAX_TILES] =
+{
+ /* 0: for 9600 kbs WB */
+ {
+ /* medium */ { 2949/*0.36f Q13*/, 2949/*0.36f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 11551/*1.41f Q13*/, 11551/*1.41f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+ },
+ /* 1: for 13200 kbs WB RF */
+ {
+ /* medium */ { 2949/*0.36f Q13*/, 2949/*0.36f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 11551/*1.41f Q13*/, 11551/*1.41f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+ },
+ /* 2: for 9600 kbs SWB */
+ {
+ /* medium */ { 6881/*0.84f Q13*/, 7291/*0.89f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 10650/*1.30f Q13*/, 10240/*1.25f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+ },
+ /* 3: for 13200 kbs SWB */
+ {
+ /* medium */ { 6881/*0.84f Q13*/, 7291/*0.89f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 10650/*1.30f Q13*/, 10240/*1.25f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+ },
+ /* 4: for 13200 kbs SWB RF */
+ {
+ /* medium */ { 6881/*0.84f Q13*/, 7291/*0.89f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 10650/*1.30f Q13*/, 10240/*1.25f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+ },
+ /* 5: for 16400 kbs SWB */
+ {
+ /* medium */ { 6799/*0.83f Q13*/, 7291/*0.89f Q13*/, 7291/*0.89f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 10732/*1.31f Q13*/, 9748/*1.19f Q13*/, 9748/*1.19f Q13*/, 0/*0.f Q13*/}
+ },
+ /* 6: for 24400 kbs SWB*/
+ {
+ /* medium */ { 6636/*0.81f Q13*/, 6963/*0.85f Q13*/, 6963/*0.85f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 11059/*1.35f Q13*/, 10076/*1.23f Q13*/, 10076/*1.23f Q13*/, 0/*0.f Q13*/}
+ },
+ /* 7: for 32000 kbs SWB */
+ {
+ /* medium */ { 7455/*0.91f Q13*/, 6963/*0.85f Q13*/, 6963/*0.85f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 10977/*1.34f Q13*/, 11059/*1.35f Q13*/, 11059/*1.35f Q13*/, 0/*0.f Q13*/}
+ },
+ /* 8: for 48000 kbs SWB */
+ {
+ /* medium */ { 9421/*1.15f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 9748/*1.19f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+ },
+ /* 9: for 64000 kbs SWB */
+ {
+ /* medium */ { 9421/*1.15f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 9748/*1.19f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+ },
+ /* 10: for 16400 kbs FB */
+ {
+ /* medium */ { 5161/*0.63f Q13*/, 2212/*0.27f Q13*/, 2949/*0.36f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 12534/*1.53f Q13*/, 10813/*1.32f Q13*/, 5489/*0.67f Q13*/, 0/*0.f Q13*/}
+ },
+ /* 11: for 24400 kbs FB */
+ {
+ /* medium */ { 6390/*0.78f Q13*/, 2540/*0.31f Q13*/, 2785/*0.34f Q13*/, 2785/*0.34f Q13*/},
+ /* strong */ { 12206/*1.49f Q13*/, 11305/*1.38f Q13*/, 5325/*0.65f Q13*/, 5325/*0.65f Q13*/}
+ },
+ /* 12: for 32000 kbs FB */
+ {
+ /* medium */ { 6390/*0.78f Q13*/, 2540/*0.31f Q13*/, 2785/*0.34f Q13*/, 2785/*0.34f Q13*/},
+ /* strong */ { 12206/*1.49f Q13*/, 11305/*1.38f Q13*/, 5325/*0.65f Q13*/, 5325/*0.65f Q13*/}
+ },
+ /* 13: for 48000 kbs FB */
+ {
+ /* medium */ { 6554/*0.80f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 8192/*1.00f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+ },
+ /* 14: for 64000 kbs FB */
+ {
+ /* medium */ { 6554/*0.80f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 8192/*1.00f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+ },
+ /* 15: for 96000 kbs FB */
+ {
+ /* medium */ { 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 23101/*2.82f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+ },
+ /* 16: for 128000 kbs FB */
+ {
+ /* medium */ { 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 23101/*2.82f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+ },
+ /* 17: for 13200 kbs WB (stereo) */
+ {
+ /* medium */ {6554/*0.800000 Q13*/, 6144/*0.750000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/ },
+ /* strong */ {12288/*1.500000 Q13*/, 11878/*1.450000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/ }
+ },
+ /* 18: for 16400 kbs WB (stereo) */
+ {
+
+ /* medium */ {7373/*0.900000 Q13*/, 6963/*0.850000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/ },
+ /* strong */ {13107/*1.600000 Q13*/, 12288/*1.500000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/ }
+ },
+ /* 19: for 13200 kbs SWB (stereo) */
+ {
+ /* medium */ {7291/*0.890000 Q13*/, 7291/*0.890000 Q13*/, 6554/*0.800000 Q13*/, 6554/*0.800000 Q13*/, },
+ /* strong */ {10240/*1.250000 Q13*/, 10240/*1.250000 Q13*/, 9748/*1.190000 Q13*/, 9748/*1.190000 Q13*/, }
+ },
+ /* 20: for 16400 kbs SWB (stereo) */
+ {
+ /* medium */ {8602/*1.050000 Q13*/, 8602/*1.050000 Q13*/, 9011/*1.100000 Q13*/, 9011/*1.100000 Q13*/, 8602/*1.050000 Q13*/, 8602/*1.050000 Q13*/, },
+ /* strong */ {13926/*1.700000 Q13*/, 13926/*1.700000 Q13*/, 13517/*1.650000 Q13*/, 13517/*1.650000 Q13*/, 13107/*1.600000 Q13*/, 12288/*1.500000 Q13*/, }
+ },
+ /* 21: for 24400 kbs SWB (stereo) */
+ {
+ /* medium */ {9830/*1.200000 Q13*/, 9830/*1.200000 Q13*/, 9421/*1.150000 Q13*/, 9011/*1.100000 Q13*/, 8602/*1.050000 Q13*/, 8192/*1.000000 Q13*/, 7373/*0.900000 Q13*/, },
+ /* strong */ {13926/*1.700000 Q13*/, 13926/*1.700000 Q13*/, 13926/*1.700000 Q13*/, 13926/*1.700000 Q13*/, 12698/*1.550000 Q13*/, 11878/*1.450000 Q13*/, 9830/*1.200000 Q13*/, }
+ },
+ /* 22: for 32000 kbs SWB (stereo) */
+ {
+ /* medium */ {9830/*1.200000 Q13*/, 9830/*1.200000 Q13*/, 9421/*1.150000 Q13*/, 9421/*1.150000 Q13*/, 9011/*1.100000 Q13*/, 8602/*1.050000 Q13*/, 8192/*1.000000 Q13*/, 7373/*0.900000 Q13*/, },
+ /* strong */ {14746/*1.800000 Q13*/, 14746/*1.800000 Q13*/, 14746/*1.800000 Q13*/, 14746/*1.800000 Q13*/, 13517/*1.650000 Q13*/, 12698/*1.550000 Q13*/, 11878/*1.450000 Q13*/, 9830/*1.200000 Q13*/, }
+ },
+ /* 23: for 48000 kbs SWB (stereo) */ /* currently not used due to adaptive calculation of thresholds at 48 kbps */
+ {
+ /* medium */ {6144/*0.750000 Q13*/, 5734/*0.700000 Q13*/, 4096/*0.500000 Q13*/, 0/*0.000000 Q13*/ },
+ /* strong */ {10240/*1.250000 Q13*/, 9011/*1.100000 Q13*/, 8192/*1.000000 Q13*/, 0/*0.000000 Q13*/ }
+ },
+ /* 24: for 48000 kbs SWB (stereo TCX10) */ /* currently not used due to adaptive calculation of thresholds at 48 kbps */
+ {
+ /* medium */ {6144/*0.750000 Q13*/, 5734/*0.700000 Q13*/, 4096/*0.500000 Q13*/, 0/*0.000000 Q13*/ },
+ /* strong */ {10240/*1.250000 Q13*/, 9011/*1.100000 Q13*/, 8192/*1.000000 Q13*/, 0/*0.000000 Q13*/ }
+ },
+ /* 25: for 64000 kbs SWB (stereo) */
+ {
+ /* medium */ {8192/*1.000000 Q13*/, 8192/*1.000000 Q13*/, 9830/*1.200000 Q13*/, 10240/*1.250000 Q13*/ },
+ /* strong */ {12288/*1.500000 Q13*/, 12288/*1.500000 Q13*/, 13107/*1.600000 Q13*/, 13107/*1.600000 Q13*/ }
+ },
+ /* 26: for 80000 kbs SWB (stereo) */
+ {
+ /* medium */ {9830/*1.200000 Q13*/, 10240/*1.250000 Q13*/, 0/*0.000000 Q13*/ },
+ /* strong */ {13107/*1.600000 Q13*/, 13107/*1.600000 Q13*/, 0/*0.000000 Q13*/ }
+ },
+ /* 27: for 96000 kbs SWB (stereo) */
+ {
+ /* medium */ {9421/*1.150000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/ },
+ /* strong */ {9748/*1.190000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/ }
+ },
+ /* 28: for 24400 kbs FB (stereo) */
+ {
+ /* medium */ {9830/*1.200000 Q13*/, 9830/*1.200000 Q13*/, 9421/*1.150000 Q13*/, 9011/*1.100000 Q13*/, 8602/*1.050000 Q13*/, 8192/*1.000000 Q13*/, 7373/*0.900000 Q13*/, 2785/*0.340000 Q13*/, 2785/*0.340000 Q13*/ },
+ /* strong */ {13926/*1.700000 Q13*/, 13926/*1.700000 Q13*/, 13926/*1.700000 Q13*/, 13926/*1.700000 Q13*/, 12698/*1.550000 Q13*/, 11878/*1.450000 Q13*/, 9830/*1.200000 Q13*/, 5325/*0.650000 Q13*/, 5325/*0.650000 Q13*/ }
+ },
+ /* 29: for 32000 kbs FB (stereo) */
+ {
+ /* medium */ {9830/*1.200000 Q13*/, 9830/*1.200000 Q13*/, 9421/*1.150000 Q13*/, 9421/*1.150000 Q13*/, 9011/*1.100000 Q13*/, 8602/*1.050000 Q13*/, 8192/*1.000000 Q13*/, 7373/*0.900000 Q13*/, 2785/*0.340000 Q13*/, 2785/*0.340000 Q13*/ },
+ /* strong */ {14746/*1.800000 Q13*/, 14746/*1.800000 Q13*/, 14746/*1.800000 Q13*/, 14746/*1.800000 Q13*/, 13517/*1.650000 Q13*/, 12698/*1.550000 Q13*/, 11878/*1.450000 Q13*/, 9830/*1.200000 Q13*/, 5325/*0.650000 Q13*/, 5325/*0.650000 Q13*/ }
+ },
+ /* 30: for 48000 kbs FB (stereo) */ /* currently not used due to adaptive calculation of thresholds at 48 kbps */
+ {
+ /* medium */ {6390/*0.780000 Q13*/, 2540/*0.310000 Q13*/, 2785/*0.340000 Q13*/, 2785/*0.340000 Q13*/ },
+ /* strong */ {12206/*1.490000 Q13*/, 11305/*1.380000 Q13*/, 5325/*0.650000 Q13*/, 5325/*0.650000 Q13*/ }
+ },
+ /* 31: for 48000 kbs FB (stereo TCX10) */ /* currently not used due to adaptive calculation of thresholds at 48 kbps */
+ {
+ /* medium */ {6144/*0.750000 Q13*/, 5734/*0.700000 Q13*/, 4096/*0.500000 Q13*/, 4096/*0.500000 Q13*/ },
+ /* strong */ {10240/*1.250000 Q13*/, 9011/*1.100000 Q13*/, 8192/*1.000000 Q13*/, 8192/*1.000000 Q13*/ }
+ },
+ /* 32: for 64000 kbs FB (stereo) */
+ {
+ /* medium */ {8192/*1.000000 Q13*/, 8192/*1.000000 Q13*/, 9830/*1.200000 Q13*/, 10240/*1.250000 Q13*/, 6144/*0.750000 Q13*/ },
+ /* strong */ {12288/*1.500000 Q13*/, 12288/*1.500000 Q13*/, 13107/*1.600000 Q13*/, 13107/*1.600000 Q13*/, 8192/*1.000000 Q13*/ }
+ },
+ /* 33: for 80000 kbs FB (stereo) */
+ {
+ /* medium */ {9830/*1.200000 Q13*/, 10240/*1.250000 Q13*/, 6144/*0.750000 Q13*/, 0/*0.000000 Q13*/ },
+ /* strong */ {13107/*1.600000 Q13*/, 13107/*1.600000 Q13*/, 8192/*1.000000 Q13*/, 0/*0.000000 Q13*/ }
+ },
+ /* 34: for 96000 kbs FB (stereo) */
+ {
+ /* medium */ {7455/*0.910000 Q13*/, 6963/*0.850000 Q13*/ , 0/*0.000000 Q13*/ },
+ /* strong */ {10977/*1.340000 Q13*/, 11059/*1.350000 Q13*/, 0/*0.000000 Q13*/ }
+ },
+ /* 35: for 128000 kbs FB (stereo) */
+ {
+ /* medium */ { 0/*0.000000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/},
+ /* strong */ {23101/*2.820000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/, 0/*0.000000 Q13*/}
+ }
+};
+const Word16 igf_whitening_TH[][2][IGF_MAX_TILES] =
+{
+ /* 0: for 9600 kbs WB */
+ {
+ /* medium */ { 2949/*0.36f Q13*/, 2949/*0.36f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 11551/*1.41f Q13*/, 11551/*1.41f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+},
+/* 1: for 13200 kbs WB RF */
+{
+ /* medium */ { 2949/*0.36f Q13*/, 2949/*0.36f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 11551/*1.41f Q13*/, 11551/*1.41f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+},
+/* 2: for 9600 kbs SWB */
+{
+ /* medium */ { 6881/*0.84f Q13*/, 7291/*0.89f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 10650/*1.30f Q13*/, 10240/*1.25f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+},
+/* 3: for 13200 kbs SWB */
+{
+ /* medium */ { 6881/*0.84f Q13*/, 7291/*0.89f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 10650/*1.30f Q13*/, 10240/*1.25f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+},
+/* 4: for 13200 kbs SWB RF */
+{
+ /* medium */ { 6881/*0.84f Q13*/, 7291/*0.89f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 10650/*1.30f Q13*/, 10240/*1.25f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+},
+/* 5: for 16400 kbs SWB */
+{
+ /* medium */ { 6799/*0.83f Q13*/, 7291/*0.89f Q13*/, 7291/*0.89f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 10732/*1.31f Q13*/, 9748/*1.19f Q13*/, 9748/*1.19f Q13*/, 0/*0.f Q13*/}
+},
+/* 6: for 24400 kbs SWB*/
+{
+ /* medium */ { 6636/*0.81f Q13*/, 6963/*0.85f Q13*/, 6963/*0.85f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 11059/*1.35f Q13*/, 10076/*1.23f Q13*/, 10076/*1.23f Q13*/, 0/*0.f Q13*/}
+},
+/* 7: for 32000 kbs SWB */
+{
+ /* medium */ { 7455/*0.91f Q13*/, 6963/*0.85f Q13*/, 6963/*0.85f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 10977/*1.34f Q13*/, 11059/*1.35f Q13*/, 11059/*1.35f Q13*/, 0/*0.f Q13*/}
+},
+/* 8: for 48000 kbs SWB */
+{
+ /* medium */ { 9421/*1.15f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 9748/*1.19f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+},
+/* 9: for 64000 kbs SWB */
+{
+ /* medium */ { 9421/*1.15f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 9748/*1.19f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+},
+/* 10: for 16400 kbs FB */
+{
+ /* medium */ { 5161/*0.63f Q13*/, 2212/*0.27f Q13*/, 2949/*0.36f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 12534/*1.53f Q13*/, 10813/*1.32f Q13*/, 5489/*0.67f Q13*/, 0/*0.f Q13*/}
+},
+/* 11: for 24400 kbs FB */
+{
+ /* medium */ { 6390/*0.78f Q13*/, 2540/*0.31f Q13*/, 2785/*0.34f Q13*/, 2785/*0.34f Q13*/},
+ /* strong */ { 12206/*1.49f Q13*/, 11305/*1.38f Q13*/, 5325/*0.65f Q13*/, 5325/*0.65f Q13*/}
+},
+/* 12: for 32000 kbs FB */
+{
+ /* medium */ { 6390/*0.78f Q13*/, 2540/*0.31f Q13*/, 2785/*0.34f Q13*/, 2785/*0.34f Q13*/},
+ /* strong */ { 12206/*1.49f Q13*/, 11305/*1.38f Q13*/, 5325/*0.65f Q13*/, 5325/*0.65f Q13*/}
+},
+/* 13: for 48000 kbs FB */
+{
+ /* medium */ { 6554/*0.80f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 8192/*1.00f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+},
+/* 14: for 64000 kbs FB */
+{
+ /* medium */ { 6554/*0.80f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 8192/*1.00f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+},
+/* 15: for 96000 kbs FB */
+{
+ /* medium */ { 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 23101/*2.82f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+},
+/* 16: for 128000 kbs FB */
+{
+ /* medium */ { 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/},
+ /* strong */ { 23101/*2.82f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/, 0/*0.f Q13*/}
+}
+};
+
+/* IGF SCF arithmetic coder cumulative frequency tables and offsets */
+
+const Word16 cf_off_se01_tab[10] = { // Q0
+ +1, /* 9.6 kbs B*/
+ +1, /* 13.2 kbs WB RF B*/
+ +1, /* 9.6 kbs SWB B*/
+ +1, /* 13.2 kbs A*/
+ +1, /* 13.2 kbs SWB RF B*/
+ +1, /* 16.4 kbs B*/
+ +1, /* 24.4 kbs B*/
+ +1, /* 32.0 kbs A*/
+ -1, /* 48.0 kbs B*/
+ -1 /* 64.0 kbs B*/
+};
+
+const Word16 cf_off_se02_tab[10][IGF_CTX_COUNT] = { // Q0
+ { +1, +2, +2, +2, +3, +3, +4}, /* 9.6 kbs B*/
+ { +1, +2, +2, +2, +3, +3, +4}, /* 13.2 kbs WB RF B*/
+ { +0, +2, +3, +3, +2, +2, +4}, /* 9.6 kbs SWB B*/
+ { +0, +2, +3, +3, +2, +2, +4}, /* 13.2 kbs A*/
+ { +0, +2, +3, +3, +2, +2, +4}, /* 13.2 kbs SWB RF B*/
+ { +0, +2, +3, +3, +2, +2, +4}, /* 16.4 kbs B*/
+ { -1, +2, +2, +2, +2, +3, +5}, /* 24.4 kbs B*/
+ { -1, +2, +2, +2, +2, +3, +5}, /* 32.0 kbs A*/
+ { +3, +2, +3, +2, +3, +3, +6}, /* 48.0 kbs B*/
+ { +3, +2, +3, +2, +3, +3, +6} /* 64.0 kbs B*/
+};
+
+const Word16 cf_off_se10_tab = -7; // Q0
+
+const Word16 cf_off_se11_tab[IGF_CTX_COUNT][IGF_CTX_COUNT] = // Q0
+{
+ { -5, +0, +0, +0, +0, +0, +0},
+ { +0, +0, +0, +0, +0, +0, +0},
+ { +0, +0, +0, +0, +0, +0, +0},
+ { +0, +0, +0, +0, +0, +0, +0},
+ { +0, +0, +0, +0, +0, +0, +0},
+ { +0, +0, +0, +0, +0, +0, +1},
+ { +0, +1, +0, +0, +3, +0, +3}
+};
+
+const UWord16 cf_se00_tab[IGF_SYMBOLS_IN_TABLE + 1] = // Q0
+{
+ 16384, 16356, 16299, 16185, 15904, 15282, 14669, 13598, 11886, 9541, 6613, 3845, 1799, 606, 153, 32, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
+};
+
+const UWord16 cf_se01_tab[10][IGF_SYMBOLS_IN_TABLE + 1] = // Q0
+{
+ {16384, 16320, 16285, 16237, 16163, 16049, 15864, 15604, 15187, 14557, 13612, 12308, 10590, 8535, 6346, 4396, 2900, 1917, 1289, 870, 593, 408, 279, 181, 122, 78, 52, 0}, /* 9.6 kbs B*/
+ {16384, 16320, 16285, 16237, 16163, 16049, 15864, 15604, 15187, 14557, 13612, 12308, 10590, 8535, 6346, 4396, 2900, 1917, 1289, 870, 593, 408, 279, 181, 122, 78, 52, 0}, /* 13.2 kbs WB RF B*/
+ {16384, 16375, 16362, 16339, 16307, 16258, 16180, 16061, 15845, 15463, 14795, 13680, 11828, 9252, 6358, 3769, 2079, 1186, 687, 415, 242, 150, 100, 67, 44, 30, 19, 0}, /* 9.6 kbs SWB B*/
+ {16384, 16375, 16362, 16339, 16307, 16258, 16180, 16061, 15845, 15463, 14795, 13680, 11828, 9252, 6358, 3769, 2079, 1186, 687, 415, 242, 150, 100, 67, 44, 30, 19, 0}, /* 13.2 kbs A*/
+ {16384, 16375, 16362, 16339, 16307, 16258, 16180, 16061, 15845, 15463, 14795, 13680, 11828, 9252, 6358, 3769, 2079, 1186, 687, 415, 242, 150, 100, 67, 44, 30, 19, 0}, /* 13.2 kbs SWB RF B*/
+ {16384, 16375, 16362, 16339, 16307, 16258, 16180, 16061, 15845, 15463, 14795, 13680, 11828, 9252, 6358, 3769, 2079, 1186, 687, 415, 242, 150, 100, 67, 44, 30, 19, 0}, /* 16.4 kbs B*/
+ {16384, 16369, 16356, 16337, 16311, 16268, 16197, 16073, 15876, 15544, 14977, 13987, 12327, 9908, 7017, 4393, 2545, 1446, 840, 493, 292, 183, 111, 70, 45, 31, 20, 0 }, /* 24.4 kbs B*/
+ {16384, 16369, 16356, 16337, 16311, 16268, 16197, 16073, 15876, 15544, 14977, 13987, 12327, 9908, 7017, 4393, 2545, 1446, 840, 493, 292, 183, 111, 70, 45, 31, 20, 0}, /* 32.0 kbs A*/
+ {16384, 16368, 16355, 16334, 16291, 16212, 16071, 15816, 15359, 14523, 13014, 10534, 7345, 4272, 2228, 1149, 626, 357, 215, 139, 93, 67, 53, 43, 36, 28, 22, 0}, /* 48.0 kbs B*/
+ {16384, 16368, 16355, 16334, 16291, 16212, 16071, 15816, 15359, 14523, 13014, 10534, 7345, 4272, 2228, 1149, 626, 357, 215, 139, 93, 67, 53, 43, 36, 28, 22, 0} /* 64.0 kbs B*/
+};
+
+const UWord16 cf_se02_tab[10][IGF_CTX_COUNT][IGF_SYMBOLS_IN_TABLE + 1] = // Q0
+{
+ { /* 9.6 kbs B */
+ { 16384, 16369, 16348, 16316, 16256, 16172, 16017, 15735, 15246, 14363, 13036, 11139, 8916, 6724, 4757, 3282, 2221, 1549, 1105, 771, 548, 364, 238, 151, 89, 50, 30, 0},
+ { 16384, 16371, 16358, 16339, 16290, 16241, 16153, 16040, 15813, 15397, 14601, 13301, 11360, 8916, 6254, 3911, 2220, 1280, 755, 461, 278, 177, 111, 70, 35, 20, 12, 0},
+ { 16384, 16375, 16359, 16333, 16286, 16243, 16154, 16024, 15771, 15380, 14712, 13537, 11742, 9425, 6872, 4378, 2327, 1197, 671, 412, 259, 145, 93, 52, 26, 13, 5, 0},
+ { 16384, 16372, 16358, 16326, 16289, 16241, 16147, 16014, 15765, 15321, 14670, 13546, 11912, 9787, 7323, 4824, 2536, 1330, 731, 438, 258, 148, 86, 37, 22, 11, 2, 0},
+ { 16384, 16376, 16364, 16344, 16315, 16272, 16219, 16119, 15910, 15620, 15100, 14254, 13063, 11489, 9413, 7100, 4738, 2751, 1584, 973, 597, 349, 201, 96, 47, 22, 9, 0},
+ { 16384, 16364, 16340, 16312, 16288, 16237, 16166, 16026, 15756, 15390, 14833, 13870, 12627, 10998, 8985, 6893, 4720, 3048, 1860, 1131, 725, 449, 215, 111, 56, 34, 14, 0},
+ { 16384, 16326, 16297, 16246, 16183, 16064, 15884, 15632, 15240, 14763, 14107, 13230, 12185, 10886, 9390, 7781, 6194, 4696, 3350, 2259, 1506, 975, 604, 356, 201, 106, 48, 0}
+ },
+ { /* 13.2 kbs WB RF B*/
+ { 16384, 16369, 16348, 16316, 16256, 16172, 16017, 15735, 15246, 14363, 13036, 11139, 8916, 6724, 4757, 3282, 2221, 1549, 1105, 771, 548, 364, 238, 151, 89, 50, 30, 0},
+ { 16384, 16371, 16358, 16339, 16290, 16241, 16153, 16040, 15813, 15397, 14601, 13301, 11360, 8916, 6254, 3911, 2220, 1280, 755, 461, 278, 177, 111, 70, 35, 20, 12, 0},
+ { 16384, 16375, 16359, 16333, 16286, 16243, 16154, 16024, 15771, 15380, 14712, 13537, 11742, 9425, 6872, 4378, 2327, 1197, 671, 412, 259, 145, 93, 52, 26, 13, 5, 0},
+ { 16384, 16372, 16358, 16326, 16289, 16241, 16147, 16014, 15765, 15321, 14670, 13546, 11912, 9787, 7323, 4824, 2536, 1330, 731, 438, 258, 148, 86, 37, 22, 11, 2, 0},
+ { 16384, 16376, 16364, 16344, 16315, 16272, 16219, 16119, 15910, 15620, 15100, 14254, 13063, 11489, 9413, 7100, 4738, 2751, 1584, 973, 597, 349, 201, 96, 47, 22, 9, 0},
+ { 16384, 16364, 16340, 16312, 16288, 16237, 16166, 16026, 15756, 15390, 14833, 13870, 12627, 10998, 8985, 6893, 4720, 3048, 1860, 1131, 725, 449, 215, 111, 56, 34, 14, 0},
+ { 16384, 16326, 16297, 16246, 16183, 16064, 15884, 15632, 15240, 14763, 14107, 13230, 12185, 10886, 9390, 7781, 6194, 4696, 3350, 2259, 1506, 975, 604, 356, 201, 106, 48, 0}
+ },
+ { /* 9.6 kbs SWB B*/
+ { 16384, 16359, 16349, 16331, 16300, 16236, 16112, 15894, 15480, 14691, 13257, 10996, 8168, 5357, 3193, 1864, 1098, 676, 426, 265, 173, 117, 81, 59, 45, 35, 26, 0},
+ { 16384, 16374, 16370, 16367, 16362, 16348, 16325, 16283, 16204, 16058, 15715, 14980, 13521, 11144, 7972, 4702, 2366, 1063, 480, 241, 128, 71, 42, 22, 14, 9, 5, 0},
+ { 16384, 16380, 16377, 16375, 16372, 16365, 16354, 16334, 16295, 16216, 16056, 15716, 15034, 13690, 11467, 8404, 5150, 2385, 908, 417, 199, 106, 62, 35, 21, 13, 7, 0},
+ { 16384, 16378, 16376, 16373, 16368, 16360, 16346, 16318, 16267, 16173, 15991, 15644, 14932, 13623, 11575, 8688, 5224, 2309, 891, 393, 202, 103, 57, 34, 20, 11, 8, 0},
+ { 16384, 16375, 16372, 16365, 16348, 16322, 16279, 16201, 16046, 15728, 15214, 14297, 12811, 10673, 7918, 4530, 2109, 978, 466, 234, 121, 72, 46, 31, 25, 17, 13, 0},
+ { 16384, 16366, 16357, 16341, 16325, 16289, 16220, 16084, 15768, 15300, 14466, 13206, 11402, 9176, 6633, 4092, 2192, 1171, 592, 315, 179, 111, 74, 46, 31, 26, 18, 0},
+ { 16384, 16301, 16266, 16211, 16140, 16045, 15889, 15652, 15358, 14883, 14192, 13119, 11753, 10181, 8445, 6708, 5023, 3449, 2226, 1375, 849, 516, 353, 231, 153, 107, 78, 0}
+ },
+ { /* 13.2 kbs A */
+ { 16384, 16359, 16349, 16331, 16300, 16236, 16112, 15894, 15480, 14691, 13257, 10996, 8168, 5357, 3193, 1864, 1098, 676, 426, 265, 173, 117, 81, 59, 45, 35, 26, 0},
+ { 16384, 16374, 16370, 16367, 16362, 16348, 16325, 16283, 16204, 16058, 15715, 14980, 13521, 11144, 7972, 4702, 2366, 1063, 480, 241, 128, 71, 42, 22, 14, 9, 5, 0},
+ { 16384, 16380, 16377, 16375, 16372, 16365, 16354, 16334, 16295, 16216, 16056, 15716, 15034, 13690, 11467, 8404, 5150, 2385, 908, 417, 199, 106, 62, 35, 21, 13, 7, 0},
+ { 16384, 16378, 16376, 16373, 16368, 16360, 16346, 16318, 16267, 16173, 15991, 15644, 14932, 13623, 11575, 8688, 5224, 2309, 891, 393, 202, 103, 57, 34, 20, 11, 8, 0},
+ { 16384, 16375, 16372, 16365, 16348, 16322, 16279, 16201, 16046, 15728, 15214, 14297, 12811, 10673, 7918, 4530, 2109, 978, 466, 234, 121, 72, 46, 31, 25, 17, 13, 0},
+ { 16384, 16366, 16357, 16341, 16325, 16289, 16220, 16084, 15768, 15300, 14466, 13206, 11402, 9176, 6633, 4092, 2192, 1171, 592, 315, 179, 111, 74, 46, 31, 26, 18, 0},
+ { 16384, 16301, 16266, 16211, 16140, 16045, 15889, 15652, 15358, 14883, 14192, 13119, 11753, 10181, 8445, 6708, 5023, 3449, 2226, 1375, 849, 516, 353, 231, 153, 107, 78, 0}
+ },
+ { /* 13.2 kbs SWB RF B*/
+ { 16384, 16359, 16349, 16331, 16300, 16236, 16112, 15894, 15480, 14691, 13257, 10996, 8168, 5357, 3193, 1864, 1098, 676, 426, 265, 173, 117, 81, 59, 45, 35, 26, 0},
+ { 16384, 16374, 16370, 16367, 16362, 16348, 16325, 16283, 16204, 16058, 15715, 14980, 13521, 11144, 7972, 4702, 2366, 1063, 480, 241, 128, 71, 42, 22, 14, 9, 5, 0},
+ { 16384, 16380, 16377, 16375, 16372, 16365, 16354, 16334, 16295, 16216, 16056, 15716, 15034, 13690, 11467, 8404, 5150, 2385, 908, 417, 199, 106, 62, 35, 21, 13, 7, 0},
+ { 16384, 16378, 16376, 16373, 16368, 16360, 16346, 16318, 16267, 16173, 15991, 15644, 14932, 13623, 11575, 8688, 5224, 2309, 891, 393, 202, 103, 57, 34, 20, 11, 8, 0},
+ { 16384, 16375, 16372, 16365, 16348, 16322, 16279, 16201, 16046, 15728, 15214, 14297, 12811, 10673, 7918, 4530, 2109, 978, 466, 234, 121, 72, 46, 31, 25, 17, 13, 0},
+ { 16384, 16366, 16357, 16341, 16325, 16289, 16220, 16084, 15768, 15300, 14466, 13206, 11402, 9176, 6633, 4092, 2192, 1171, 592, 315, 179, 111, 74, 46, 31, 26, 18, 0},
+ { 16384, 16301, 16266, 16211, 16140, 16045, 15889, 15652, 15358, 14883, 14192, 13119, 11753, 10181, 8445, 6708, 5023, 3449, 2226, 1375, 849, 516, 353, 231, 153, 107, 78, 0}
+ },
+ { /* 16.4 kbs B */
+ { 16384, 16359, 16349, 16331, 16300, 16236, 16112, 15894, 15480, 14691, 13257, 10996, 8168, 5357, 3193, 1864, 1098, 676, 426, 265, 173, 117, 81, 59, 45, 35, 26, 0},
+ { 16384, 16374, 16370, 16367, 16362, 16348, 16325, 16283, 16204, 16058, 15715, 14980, 13521, 11144, 7972, 4702, 2366, 1063, 480, 241, 128, 71, 42, 22, 14, 9, 5, 0},
+ { 16384, 16380, 16377, 16375, 16372, 16365, 16354, 16334, 16295, 16216, 16056, 15716, 15034, 13690, 11467, 8404, 5150, 2385, 908, 417, 199, 106, 62, 35, 21, 13, 7, 0},
+ { 16384, 16378, 16376, 16373, 16368, 16360, 16346, 16318, 16267, 16173, 15991, 15644, 14932, 13623, 11575, 8688, 5224, 2309, 891, 393, 202, 103, 57, 34, 20, 11, 8, 0},
+ { 16384, 16375, 16372, 16365, 16348, 16322, 16279, 16201, 16046, 15728, 15214, 14297, 12811, 10673, 7918, 4530, 2109, 978, 466, 234, 121, 72, 46, 31, 25, 17, 13, 0},
+ { 16384, 16366, 16357, 16341, 16325, 16289, 16220, 16084, 15768, 15300, 14466, 13206, 11402, 9176, 6633, 4092, 2192, 1171, 592, 315, 179, 111, 74, 46, 31, 26, 18, 0},
+ { 16384, 16301, 16266, 16211, 16140, 16045, 15889, 15652, 15358, 14883, 14192, 13119, 11753, 10181, 8445, 6708, 5023, 3449, 2226, 1375, 849, 516, 353, 231, 153, 107, 78, 0}
+ },
+ { /* 24.4 kbs B */
+ { 16384, 16351, 16333, 16303, 16254, 16163, 15993, 15681, 15080, 13987, 12109, 9465, 6588, 4160, 2488, 1480, 912, 589, 389, 266, 190, 131, 93, 68, 47, 34, 24, 0},
+ { 16384, 16379, 16375, 16369, 16360, 16345, 16328, 16286, 16211, 16078, 15810, 15233, 14058, 11933, 8881, 5609, 2940, 1290, 558, 274, 150, 80, 47, 29, 17, 11, 6, 0},
+ { 16384, 16382, 16380, 16377, 16370, 16358, 16337, 16300, 16224, 16088, 15811, 15233, 14112, 12019, 9061, 5723, 2780, 1121, 480, 239, 123, 69, 41, 22, 13, 8, 5, 0},
+ { 16384, 16377, 16375, 16369, 16363, 16351, 16325, 16268, 16172, 16009, 15686, 15039, 13830, 11799, 8924, 5422, 2444, 960, 441, 220, 111, 63, 37, 22, 11, 6, 3, 0},
+ { 16384, 16374, 16369, 16363, 16356, 16335, 16290, 16214, 16068, 15826, 15382, 14550, 13126, 10956, 8000, 4622, 2090, 973, 478, 249, 128, 75, 42, 19, 13, 7, 4, 0},
+ { 16384, 16375, 16370, 16367, 16362, 16340, 16298, 16232, 16097, 15860, 15440, 14718, 13570, 11874, 9557, 6790, 4053, 2166, 1150, 622, 323, 179, 96, 53, 33, 17, 12, 0},
+ { 16384, 16335, 16304, 16276, 16228, 16166, 16094, 15983, 15775, 15501, 15040, 14417, 13552, 12326, 10847, 9117, 7308, 5373, 3666, 2297, 1336, 807, 495, 313, 216, 152, 114, 0}
+ },
+ { /* 32.0 kbs A */
+ { 16384, 16351, 16333, 16303, 16254, 16163, 15993, 15681, 15080, 13987, 12109, 9465, 6588, 4160, 2488, 1480, 912, 589, 389, 266, 190, 131, 93, 68, 47, 34, 24, 0},
+ { 16384, 16379, 16375, 16369, 16360, 16345, 16328, 16286, 16211, 16078, 15810, 15233, 14058, 11933, 8881, 5609, 2940, 1290, 558, 274, 150, 80, 47, 29, 17, 11, 6, 0},
+ { 16384, 16382, 16380, 16377, 16370, 16358, 16337, 16300, 16224, 16088, 15811, 15233, 14112, 12019, 9061, 5723, 2780, 1121, 480, 239, 123, 69, 41, 22, 13, 8, 5, 0},
+ { 16384, 16377, 16375, 16369, 16363, 16351, 16325, 16268, 16172, 16009, 15686, 15039, 13830, 11799, 8924, 5422, 2444, 960, 441, 220, 111, 63, 37, 22, 11, 6, 3, 0},
+ { 16384, 16374, 16369, 16363, 16356, 16335, 16290, 16214, 16068, 15826, 15382, 14550, 13126, 10956, 8000, 4622, 2090, 973, 478, 249, 128, 75, 42, 19, 13, 7, 4, 0},
+ { 16384, 16375, 16370, 16367, 16362, 16340, 16298, 16232, 16097, 15860, 15440, 14718, 13570, 11874, 9557, 6790, 4053, 2166, 1150, 622, 323, 179, 96, 53, 33, 17, 12, 0},
+ { 16384, 16335, 16304, 16276, 16228, 16166, 16094, 15983, 15775, 15501, 15040, 14417, 13552, 12326, 10847, 9117, 7308, 5373, 3666, 2297, 1336, 807, 495, 313, 216, 152, 114, 0}
+ },
+ { /* 48.0 kbs B */
+ { 16384, 16334, 16310, 16285, 16254, 16204, 16128, 16031, 15903, 15697, 15380, 14820, 13857, 12267, 9878, 7099, 4509, 2576, 1478, 871, 531, 349, 230, 163, 111, 80, 62, 0},
+ { 16384, 16337, 16327, 16307, 16278, 16239, 16178, 16092, 15947, 15719, 15286, 14428, 12833, 10246, 7123, 4088, 1896, 849, 481, 287, 190, 139, 94, 66, 52, 34, 24, 0},
+ { 16384, 16352, 16341, 16329, 16312, 16295, 16265, 16223, 16151, 16026, 15825, 15437, 14645, 13089, 10612, 7364, 4077, 1783, 779, 444, 281, 192, 138, 93, 65, 43, 30, 0},
+ { 16384, 16354, 16347, 16337, 16314, 16284, 16233, 16165, 16051, 15847, 15450, 14621, 13069, 10623, 7298, 3789, 1569, 727, 445, 302, 207, 143, 96, 59, 36, 18, 9, 0},
+ { 16384, 16352, 16342, 16330, 16314, 16295, 16266, 16215, 16127, 15984, 15709, 15190, 14242, 12540, 9979, 6448, 3160, 1392, 752, 481, 344, 251, 169, 115, 73, 28, 8, 0},
+ { 16384, 16340, 16320, 16302, 16272, 16257, 16220, 16135, 16011, 15784, 15370, 14688, 13423, 11457, 8721, 5529, 2736, 1375, 784, 525, 353, 263, 172, 113, 78, 26, 11, 0},
+ { 16384, 16238, 16170, 16113, 16077, 16030, 16000, 15948, 15873, 15752, 15535, 15157, 14595, 13788, 12569, 10767, 8611, 6186, 4101, 2459, 1478, 881, 607, 385, 243, 168, 116, 0}
+ },
+ { /* 64.0 kbs B */
+ { 16384, 16334, 16310, 16285, 16254, 16204, 16128, 16031, 15903, 15697, 15380, 14820, 13857, 12267, 9878, 7099, 4509, 2576, 1478, 871, 531, 349, 230, 163, 111, 80, 62, 0},
+ { 16384, 16337, 16327, 16307, 16278, 16239, 16178, 16092, 15947, 15719, 15286, 14428, 12833, 10246, 7123, 4088, 1896, 849, 481, 287, 190, 139, 94, 66, 52, 34, 24, 0},
+ { 16384, 16352, 16341, 16329, 16312, 16295, 16265, 16223, 16151, 16026, 15825, 15437, 14645, 13089, 10612, 7364, 4077, 1783, 779, 444, 281, 192, 138, 93, 65, 43, 30, 0},
+ { 16384, 16354, 16347, 16337, 16314, 16284, 16233, 16165, 16051, 15847, 15450, 14621, 13069, 10623, 7298, 3789, 1569, 727, 445, 302, 207, 143, 96, 59, 36, 18, 9, 0},
+ { 16384, 16352, 16342, 16330, 16314, 16295, 16266, 16215, 16127, 15984, 15709, 15190, 14242, 12540, 9979, 6448, 3160, 1392, 752, 481, 344, 251, 169, 115, 73, 28, 8, 0},
+ { 16384, 16340, 16320, 16302, 16272, 16257, 16220, 16135, 16011, 15784, 15370, 14688, 13423, 11457, 8721, 5529, 2736, 1375, 784, 525, 353, 263, 172, 113, 78, 26, 11, 0},
+ { 16384, 16238, 16170, 16113, 16077, 16030, 16000, 15948, 15873, 15752, 15535, 15157, 14595, 13788, 12569, 10767, 8611, 6186, 4101, 2459, 1478, 881, 607, 385, 243, 168, 116, 0}
+ }
+};
+
+/* only needed for >= 48 kbps */
+
+const UWord16 cf_se10_tab[IGF_SYMBOLS_IN_TABLE + 1] = // Q0
+{
+ 16384, 15493, 15154, 14810, 14331, 13701, 13086, 12403, 11585, 10923, 10293, 9631, 8943, 8385, 7760, 7182, 6593, 6009, 5540, 5082, 4571, 4133, 3711, 3299, 2887, 2460, 2043, 0
+};
+
+const UWord16 cf_se11_tab[IGF_CTX_COUNT][IGF_CTX_COUNT][IGF_SYMBOLS_IN_TABLE + 1] = // Q0
+{
+ {
+ { 16384, 16313, 16312, 16241, 16206, 16099, 15957, 15386, 14601, 12852, 10282, 7534, 4964, 2966, 1824, 896, 504, 255, 113, 112, 41, 40, 39, 38, 37, 36, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16207, 16206, 16205, 16120, 15949, 14663, 12777, 9947, 6860, 3773, 1972, 772, 430, 259, 174, 89, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16115, 15941, 14891, 12965, 11477, 8587, 5347, 3421, 1407, 620, 8, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16254, 16253, 16004, 15005, 13756, 12006, 9256, 5755, 3755, 1755, 756, 132, 131, 130, 129, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 15964, 15550, 14929, 12856, 9954, 6430, 2906, 1456, 1042, 628, 214, 8, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16087, 15503, 14334, 14333, 11994, 10240, 8193, 5268, 2929, 1760, 1176, 299, 298, 297, 296, 295, 294, 293, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 14922, 13467, 10919, 9464, 7280, 6189, 3641, 2914, 2187, 1824, 1823, 1096, 369, 368, 367, 4, 3, 2, 1, 0}
+ },
+ {
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16238, 16237, 15678, 15399, 14840, 13441, 11341, 8681, 6161, 3781, 2522, 702, 283, 144, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 16374, 15693, 14671, 12625, 7507, 4778, 2390, 1368, 1028, 347, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 16374, 15595, 13776, 9877, 6498, 3639, 3120, 1561, 1042, 523, 265, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 15709, 13704, 12702, 11032, 7355, 3010, 1340, 1007, 674, 341, 8, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 16374, 12816, 10683, 7125, 2854, 720, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 12738, 12737, 10920, 9103, 5466, 1828, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 15359, 15358, 14337, 14336, 14335, 14334, 14333, 10240, 7170, 5124, 2054, 1032, 1031, 1030, 1029, 7, 6, 5, 4, 3, 2, 1, 0}
+ },
+ {
+ { 16384, 16383, 16382, 16107, 16106, 16105, 16104, 16103, 15966, 15965, 15690, 15140, 14315, 12939, 10324, 8122, 4956, 2479, 1654, 966, 691, 416, 141, 140, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 15320, 14265, 12945, 10568, 8984, 6343, 4230, 1853, 797, 270, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16112, 16111, 16110, 15037, 14501, 12622, 11012, 7790, 5374, 3226, 1347, 542, 275, 274, 273, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 15597, 14819, 12090, 7021, 4292, 1953, 1175, 787, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 15935, 14165, 12838, 9297, 6641, 3985, 1772, 1331, 890, 449, 8, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 14740, 13923, 9010, 6555, 4100, 2464, 828, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 13104, 13103, 8192, 4920, 1647, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}
+ },
+ {
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16077, 16076, 16075, 15926, 15176, 14425, 10819, 7664, 5711, 2856, 1354, 754, 454, 154, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16044, 16043, 14373, 12369, 10030, 7023, 5019, 1677, 676, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16077, 16076, 16075, 15470, 14258, 12743, 11531, 6375, 3040, 3039, 917, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 15309, 13531, 11396, 7480, 3564, 1786, 364, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 15833, 15289, 13652, 10377, 6556, 3827, 3283, 1646, 555, 554, 553, 552, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 14146, 13404, 13403, 13402, 10425, 7448, 3727, 2240, 2239, 752, 751, 750, 749, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 15562, 14745, 13928, 10653, 7378, 5742, 2467, 830, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}
+ },
+ {
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 16219, 15590, 14803, 13544, 11339, 9292, 6930, 4568, 2521, 1419, 790, 318, 161, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16014, 15652, 14925, 14198, 12743, 10196, 5464, 3645, 1826, 371, 8, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16050, 15396, 15395, 12447, 10810, 8518, 4915, 2950, 1313, 659, 333, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 14792, 14001, 11096, 8455, 6079, 3174, 2119, 535, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 15796, 15795, 15794, 15793, 11700, 8777, 6439, 4101, 1178, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 15473, 15472, 15471, 14563, 13655, 12746, 10017, 7288, 6379, 6378, 4559, 1830, 1829, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 15723, 15069, 13105, 9174, 7865, 3934, 3280, 1971, 1317, 663, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}
+ },
+ {
+ { 16384, 16383, 16382, 16381, 16232, 16231, 16230, 16229, 16228, 16227, 16078, 15628, 15329, 13977, 12325, 10222, 5413, 4212, 1959, 908, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16109, 15842, 15841, 13694, 11815, 10205, 5640, 3493, 2151, 1347, 543, 542, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16168, 14699, 13650, 11761, 9452, 6093, 3784, 1685, 636, 427, 426, 425, 424, 423, 422, 421, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16122, 15611, 14332, 13053, 10238, 7423, 4608, 2561, 2050, 1027, 516, 515, 260, 259, 258, 257, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 16376, 16375, 15207, 13649, 10531, 6632, 3514, 1176, 398, 397, 396, 395, 394, 393, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16379, 16378, 16377, 15749, 15120, 12601, 10082, 8823, 6304, 3785, 3156, 1267, 638, 637, 636, 7, 6, 5, 4, 3, 2, 1, 0},
+ { 16384, 16383, 15729, 15728, 15727, 15726, 15725, 15071, 14417, 12453, 10489, 8525, 5905, 1975, 1321, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}
+ },
+ {
+ { 16384, 16383, 16372, 16340, 16339, 16328, 16285, 16253, 16136, 15923, 15614, 14931, 13833, 12201, 10175, 7615, 5269, 3243, 2123, 1142, 673, 342, 182, 150, 86, 54, 11, 0},
+ { 16384, 16383, 16366, 16349, 16332, 16331, 16314, 16245, 16244, 16141, 15813, 15451, 14105, 12672, 9910, 7113, 4472, 2590, 1071, 484, 294, 156, 53, 36, 19, 18, 1, 0},
+ { 16384, 16383, 16382, 16369, 16355, 16341, 16271, 16117, 15921, 15627, 14772, 13089, 10929, 8334, 5487, 3299, 1644, 999, 424, 228, 88, 46, 18, 17, 16, 15, 14, 0},
+ { 16384, 16367, 16366, 16365, 16364, 16363, 16259, 16173, 15809, 15028, 13951, 12214, 9278, 6203, 3719, 2052, 1079, 402, 194, 125, 56, 22, 21, 20, 3, 2, 1, 0},
+ { 16384, 16383, 16360, 16359, 16358, 16357, 16356, 16333, 16332, 16143, 15954, 15434, 14227, 12262, 9540, 6652, 3882, 1988, 1207, 829, 427, 191, 73, 50, 49, 2, 1, 0},
+ { 16384, 16383, 16382, 16381, 16380, 16296, 16254, 15748, 14862, 13427, 11189, 8487, 5278, 3252, 2028, 1099, 551, 340, 298, 214, 172, 88, 46, 45, 3, 2, 1, 0},
+ { 16384, 16383, 16307, 16269, 16231, 16230, 16077, 15886, 15464, 14620, 13546, 11896, 9671, 7024, 4338, 2382, 1423, 809, 541, 311, 158, 43, 5, 4, 3, 2, 1, 0}
+ }
+};
+
+const IGF_MODE igfMode[IGF_BITRATE_UNKNOWN] =
+{
+ /* sampleRate, frameLength, igfMinFq, maxHopsize */
+ { 16000, 320, 774, 4 }, /* 9.6kbs WB 0 */
+ { 16000, 320, 774, 4 }, /* 13.2kbs WB RF 1 */
+ { 32000, 640, 800, 2 }, /* 9.6kbs SWB 2 */
+ { 32000, 640, 800, 4 }, /* 13.2kbs SWB 3 */
+ { 32000, 640, 800, 2 }, /* 13.2kbs SWB RF 4 */
+ { 32000, 640, 800, 4 }, /* 16.4kbs SWB 5 */
+ { 32000, 640, 800, 4 }, /* 24.4kbs SWB 6 */
+ { 32000, 640, 800, 4 }, /* 32.0kbs SWB 7 */
+ { 32000, 640, 1600, 4 }, /* 48.0kbs SWB 8 */
+ { 32000, 640, 1600, 4 }, /* 64.0kbs SWB 9 */
+ { 48000, 960, 800, 4 }, /* 16.4kbs FB 10 */
+ { 48000, 960, 800, 2 }, /* 24.4kbs FB 11 */
+ { 48000, 960, 800, 2 }, /* 32.0kbs FB 12 */
+ { 48000, 960, 1600, 2 }, /* 48.0kbs FB 13 */
+ { 48000, 960, 1600, 2 }, /* 64.0kbs FB 14 */
+ { 48000, 960, 1600, 1 }, /* 96.0kbs FB 15 */
+ { 48000, 960, 1600, 1 }, /*128.0kbs FB 16 */
+ { 16000, 320, 800, 2 }, /* 13.2kbs WB CPE 17 */ /* stereo mode */
+ { 16000, 320, 800, 2 }, /* 16.4kbs WB CPE 18 */ /* stereo mode */
+ { 32000, 640, 800, 2 }, /* 13.2kbs SWB CPE 19 */ /* stereo mode */
+ { 32000, 640, 800, 2 }, /* 16.4kbs SWB CPE 20 */ /* stereo mode */
+ { 32000, 640, 800, 2 }, /* 24.4kbs SWB CPE 21 */ /* stereo mode */
+ { 32000, 640, 800, 2 }, /* 32.0kbs SWB CPE 22 */ /* stereo mode */
+ { 32000, 640, 1200, 2 }, /* 48.0kbs SWB CPE 23 */ /* stereo mode */
+ { 32000, 640, 1200, 2 }, /* 48.0kbs SWB CPE 24 */ /* stereo TCX10 mode */
+ { 32000, 640, 1200, 2 }, /* 64.0kbs SWB CPE 25 */ /* stereo mode */
+ { 32000, 640, 1600, 2 }, /* 80.0kbs SWB CPE 26 */ /* stereo mode */
+ { 32000, 640, 1600, 4 }, /* 96.0kbs SWB CPE 27 */ /* stereo mode */
+ { 48000, 960, 800, 2 }, /* 24.4kbs FB CPE 28 */ /* stereo mode */
+ { 48000, 960, 800, 2 }, /* 32.0kbs FB CPE 29 */ /* stereo mode */
+ { 48000, 960, 1200, 2 }, /* 48.0kbs FB CPE 30 */ /* stereo mode */
+ { 48000, 960, 1200, 2 }, /* 48.0kbs FB CPE 31 */ /* stereo TCX10 mode */
+ { 48000, 960, 1200, 2 }, /* 64.0kbs FB CPE 32 */ /* stereo mode */
+ { 48000, 960, 1600, 2 }, /* 80.0kbs FB CPE 33 */ /* stereo mode */
+ { 48000, 960, 1600, 1 }, /* 96.0kbs FB CPE 34 */ /* stereo mode */
+ { 48000, 960, 1600, 1 } /*128.0kbs FB CPE 35 */ /* stereo mode */
+};
+
+#define STCP( a, b ) {{ WORD322WORD16( a ), WORD322WORD16( b ) }}
+
+const PWord16 SineTable512_fx[] =//Q15
+{
+ STCP(0x7fffffff, 0x00000000), STCP(0x7fffd886, 0x006487e3), STCP(0x7fff6216, 0x00c90f88), STCP(0x7ffe9cb2, 0x012d96b1),
+ STCP(0x7ffd885a, 0x01921d20), STCP(0x7ffc250f, 0x01f6a297), STCP(0x7ffa72d1, 0x025b26d7), STCP(0x7ff871a2, 0x02bfa9a4),
+ STCP(0x7ff62182, 0x03242abf), STCP(0x7ff38274, 0x0388a9ea), STCP(0x7ff09478, 0x03ed26e6), STCP(0x7fed5791, 0x0451a177),
+ STCP(0x7fe9cbc0, 0x04b6195d), STCP(0x7fe5f108, 0x051a8e5c), STCP(0x7fe1c76b, 0x057f0035), STCP(0x7fdd4eec, 0x05e36ea9),
+ STCP(0x7fd8878e, 0x0647d97c), STCP(0x7fd37153, 0x06ac406f), STCP(0x7fce0c3e, 0x0710a345), STCP(0x7fc85854, 0x077501be),
+ STCP(0x7fc25596, 0x07d95b9e), STCP(0x7fbc040a, 0x083db0a7), STCP(0x7fb563b3, 0x08a2009a), STCP(0x7fae7495, 0x09064b3a),
+ STCP(0x7fa736b4, 0x096a9049), STCP(0x7f9faa15, 0x09cecf89), STCP(0x7f97cebd, 0x0a3308bd), STCP(0x7f8fa4b0, 0x0a973ba5),
+ STCP(0x7f872bf3, 0x0afb6805), STCP(0x7f7e648c, 0x0b5f8d9f), STCP(0x7f754e80, 0x0bc3ac35), STCP(0x7f6be9d4, 0x0c27c389),
+ STCP(0x7f62368f, 0x0c8bd35e), STCP(0x7f5834b7, 0x0cefdb76), STCP(0x7f4de451, 0x0d53db92), STCP(0x7f434563, 0x0db7d376),
+ STCP(0x7f3857f6, 0x0e1bc2e4), STCP(0x7f2d1c0e, 0x0e7fa99e), STCP(0x7f2191b4, 0x0ee38766), STCP(0x7f15b8ee, 0x0f475bff),
+ STCP(0x7f0991c4, 0x0fab272b), STCP(0x7efd1c3c, 0x100ee8ad), STCP(0x7ef05860, 0x1072a048), STCP(0x7ee34636, 0x10d64dbd),
+ STCP(0x7ed5e5c6, 0x1139f0cf), STCP(0x7ec8371a, 0x119d8941), STCP(0x7eba3a39, 0x120116d5), STCP(0x7eabef2c, 0x1264994e),
+ STCP(0x7e9d55fc, 0x12c8106f), STCP(0x7e8e6eb2, 0x132b7bf9), STCP(0x7e7f3957, 0x138edbb1), STCP(0x7e6fb5f4, 0x13f22f58),
+ STCP(0x7e5fe493, 0x145576b1), STCP(0x7e4fc53e, 0x14b8b17f), STCP(0x7e3f57ff, 0x151bdf86), STCP(0x7e2e9cdf, 0x157f0086),
+ STCP(0x7e1d93ea, 0x15e21445), STCP(0x7e0c3d29, 0x16451a83), STCP(0x7dfa98a8, 0x16a81305), STCP(0x7de8a670, 0x170afd8d),
+ STCP(0x7dd6668f, 0x176dd9de), STCP(0x7dc3d90d, 0x17d0a7bc), STCP(0x7db0fdf8, 0x183366e9), STCP(0x7d9dd55a, 0x18961728),
+ STCP(0x7d8a5f40, 0x18f8b83c), STCP(0x7d769bb5, 0x195b49ea), STCP(0x7d628ac6, 0x19bdcbf3), STCP(0x7d4e2c7f, 0x1a203e1b),
+ STCP(0x7d3980ec, 0x1a82a026), STCP(0x7d24881b, 0x1ae4f1d6), STCP(0x7d0f4218, 0x1b4732ef), STCP(0x7cf9aef0, 0x1ba96335),
+ STCP(0x7ce3ceb2, 0x1c0b826a), STCP(0x7ccda169, 0x1c6d9053), STCP(0x7cb72724, 0x1ccf8cb3), STCP(0x7ca05ff1, 0x1d31774d),
+ STCP(0x7c894bde, 0x1d934fe5), STCP(0x7c71eaf9, 0x1df5163f), STCP(0x7c5a3d50, 0x1e56ca1e), STCP(0x7c4242f2, 0x1eb86b46),
+ STCP(0x7c29fbee, 0x1f19f97b), STCP(0x7c116853, 0x1f7b7481), STCP(0x7bf88830, 0x1fdcdc1b), STCP(0x7bdf5b94, 0x203e300d),
+ STCP(0x7bc5e290, 0x209f701c), STCP(0x7bac1d31, 0x21009c0c), STCP(0x7b920b89, 0x2161b3a0), STCP(0x7b77ada8, 0x21c2b69c),
+ STCP(0x7b5d039e, 0x2223a4c5), STCP(0x7b420d7a, 0x22847de0), STCP(0x7b26cb4f, 0x22e541af), STCP(0x7b0b3d2c, 0x2345eff8),
+ STCP(0x7aef6323, 0x23a6887f), STCP(0x7ad33d45, 0x24070b08), STCP(0x7ab6cba4, 0x24677758), STCP(0x7a9a0e50, 0x24c7cd33),
+ STCP(0x7a7d055b, 0x25280c5e), STCP(0x7a5fb0d8, 0x2588349d), STCP(0x7a4210d8, 0x25e845b6), STCP(0x7a24256f, 0x26483f6c),
+ STCP(0x7a05eead, 0x26a82186), STCP(0x79e76ca7, 0x2707ebc7), STCP(0x79c89f6e, 0x27679df4), STCP(0x79a98715, 0x27c737d3),
+ STCP(0x798a23b1, 0x2826b928), STCP(0x796a7554, 0x288621b9), STCP(0x794a7c12, 0x28e5714b), STCP(0x792a37fe, 0x2944a7a2),
+ STCP(0x7909a92d, 0x29a3c485), STCP(0x78e8cfb2, 0x2a02c7b8), STCP(0x78c7aba2, 0x2a61b101), STCP(0x78a63d11, 0x2ac08026),
+ STCP(0x78848414, 0x2b1f34eb), STCP(0x786280bf, 0x2b7dcf17), STCP(0x78403329, 0x2bdc4e6f), STCP(0x781d9b65, 0x2c3ab2b9),
+ STCP(0x77fab989, 0x2c98fbba), STCP(0x77d78daa, 0x2cf72939), STCP(0x77b417df, 0x2d553afc), STCP(0x7790583e, 0x2db330c7),
+ STCP(0x776c4edb, 0x2e110a62), STCP(0x7747fbce, 0x2e6ec792), STCP(0x77235f2d, 0x2ecc681e), STCP(0x76fe790e, 0x2f29ebcc),
+ STCP(0x76d94989, 0x2f875262), STCP(0x76b3d0b4, 0x2fe49ba7), STCP(0x768e0ea6, 0x3041c761), STCP(0x76680376, 0x309ed556),
+ STCP(0x7641af3d, 0x30fbc54d), STCP(0x761b1211, 0x3158970e), STCP(0x75f42c0b, 0x31b54a5e), STCP(0x75ccfd42, 0x3211df04),
+ STCP(0x75a585cf, 0x326e54c7), STCP(0x757dc5ca, 0x32caab6f), STCP(0x7555bd4c, 0x3326e2c3), STCP(0x752d6c6c, 0x3382fa88),
+ STCP(0x7504d345, 0x33def287), STCP(0x74dbf1ef, 0x343aca87), STCP(0x74b2c884, 0x34968250), STCP(0x7489571c, 0x34f219a8),
+ STCP(0x745f9dd1, 0x354d9057), STCP(0x74359cbd, 0x35a8e625), STCP(0x740b53fb, 0x36041ad9), STCP(0x73e0c3a3, 0x365f2e3b),
+ STCP(0x73b5ebd1, 0x36ba2014), STCP(0x738acc9e, 0x3714f02a), STCP(0x735f6626, 0x376f9e46), STCP(0x7333b883, 0x37ca2a30),
+ STCP(0x7307c3d0, 0x382493b0), STCP(0x72db8828, 0x387eda8e), STCP(0x72af05a7, 0x38d8fe93), STCP(0x72823c67, 0x3932ff87),
+ STCP(0x72552c85, 0x398cdd32), STCP(0x7227d61c, 0x39e6975e), STCP(0x71fa3949, 0x3a402dd2), STCP(0x71cc5626, 0x3a99a057),
+ STCP(0x719e2cd2, 0x3af2eeb7), STCP(0x716fbd68, 0x3b4c18ba), STCP(0x71410805, 0x3ba51e29), STCP(0x71120cc5, 0x3bfdfecd),
+ STCP(0x70e2cbc6, 0x3c56ba70), STCP(0x70b34525, 0x3caf50da), STCP(0x708378ff, 0x3d07c1d6), STCP(0x70536771, 0x3d600d2c),
+ STCP(0x7023109a, 0x3db832a6), STCP(0x6ff27497, 0x3e10320d), STCP(0x6fc19385, 0x3e680b2c), STCP(0x6f906d84, 0x3ebfbdcd),
+ STCP(0x6f5f02b2, 0x3f1749b8), STCP(0x6f2d532c, 0x3f6eaeb8), STCP(0x6efb5f12, 0x3fc5ec98), STCP(0x6ec92683, 0x401d0321),
+ STCP(0x6e96a99d, 0x4073f21d), STCP(0x6e63e87f, 0x40cab958), STCP(0x6e30e34a, 0x4121589b), STCP(0x6dfd9a1c, 0x4177cfb1),
+ STCP(0x6dca0d14, 0x41ce1e65), STCP(0x6d963c54, 0x42244481), STCP(0x6d6227fa, 0x427a41d0), STCP(0x6d2dd027, 0x42d0161e),
+ STCP(0x6cf934fc, 0x4325c135), STCP(0x6cc45698, 0x437b42e1), STCP(0x6c8f351c, 0x43d09aed), STCP(0x6c59d0a9, 0x4425c923),
+ STCP(0x6c242960, 0x447acd50), STCP(0x6bee3f62, 0x44cfa740), STCP(0x6bb812d1, 0x452456bd), STCP(0x6b81a3cd, 0x4578db93),
+ STCP(0x6b4af279, 0x45cd358f), STCP(0x6b13fef5, 0x4621647d), STCP(0x6adcc964, 0x46756828), STCP(0x6aa551e9, 0x46c9405c),
+ STCP(0x6a6d98a4, 0x471cece7), STCP(0x6a359db9, 0x47706d93), STCP(0x69fd614a, 0x47c3c22f), STCP(0x69c4e37a, 0x4816ea86),
+ STCP(0x698c246c, 0x4869e665), STCP(0x69532442, 0x48bcb599), STCP(0x6919e320, 0x490f57ee), STCP(0x68e06129, 0x4961cd33),
+ STCP(0x68a69e81, 0x49b41533), STCP(0x686c9b4b, 0x4a062fbd), STCP(0x683257ab, 0x4a581c9e), STCP(0x67f7d3c5, 0x4aa9dba2),
+ STCP(0x67bd0fbd, 0x4afb6c98), STCP(0x67820bb7, 0x4b4ccf4d), STCP(0x6746c7d8, 0x4b9e0390), STCP(0x670b4444, 0x4bef092d),
+ STCP(0x66cf8120, 0x4c3fdff4), STCP(0x66937e91, 0x4c9087b1), STCP(0x66573cbb, 0x4ce10034), STCP(0x661abbc5, 0x4d31494b),
+ STCP(0x65ddfbd3, 0x4d8162c4), STCP(0x65a0fd0b, 0x4dd14c6e), STCP(0x6563bf92, 0x4e210617), STCP(0x6526438f, 0x4e708f8f),
+ STCP(0x64e88926, 0x4ebfe8a5), STCP(0x64aa907f, 0x4f0f1126), STCP(0x646c59bf, 0x4f5e08e3), STCP(0x642de50d, 0x4faccfab),
+ STCP(0x63ef3290, 0x4ffb654d), STCP(0x63b0426d, 0x5049c999), STCP(0x637114cc, 0x5097fc5e), STCP(0x6331a9d4, 0x50e5fd6d),
+ STCP(0x62f201ac, 0x5133cc94), STCP(0x62b21c7b, 0x518169a5), STCP(0x6271fa69, 0x51ced46e), STCP(0x62319b9d, 0x521c0cc2),
+ STCP(0x61f1003f, 0x5269126e), STCP(0x61b02876, 0x52b5e546), STCP(0x616f146c, 0x53028518), STCP(0x612dc447, 0x534ef1b5),
+ STCP(0x60ec3830, 0x539b2af0), STCP(0x60aa7050, 0x53e73097), STCP(0x60686ccf, 0x5433027d), STCP(0x60262dd6, 0x547ea073),
+ STCP(0x5fe3b38d, 0x54ca0a4b), STCP(0x5fa0fe1f, 0x55153fd4), STCP(0x5f5e0db3, 0x556040e2), STCP(0x5f1ae274, 0x55ab0d46),
+ STCP(0x5ed77c8a, 0x55f5a4d2), STCP(0x5e93dc1f, 0x56400758), STCP(0x5e50015d, 0x568a34a9), STCP(0x5e0bec6e, 0x56d42c99),
+ STCP(0x5dc79d7c, 0x571deefa), STCP(0x5d8314b1, 0x57677b9d), STCP(0x5d3e5237, 0x57b0d256), STCP(0x5cf95638, 0x57f9f2f8),
+ STCP(0x5cb420e0, 0x5842dd54), STCP(0x5c6eb258, 0x588b9140), STCP(0x5c290acc, 0x58d40e8c), STCP(0x5be32a67, 0x591c550e),
+ STCP(0x5b9d1154, 0x59646498), STCP(0x5b56bfbd, 0x59ac3cfd), STCP(0x5b1035cf, 0x59f3de12), STCP(0x5ac973b5, 0x5a3b47ab),
+ STCP(0x5a82799a, 0x5a82799a)
+};
+
+/* Lookup-Table for binary logarithm */
+const Word16 ldCoeff[7] =//Q15
+{
+ -32768, -16384, -10923, -8192, -6554, -5461, -4681
+ /* -4096, -3641, -3277 */
+};
+
+/* Lookup-Table for binary power algorithm */
+/* This table is used for lookup 2^x with x in range [0...1.0[ in steps of 1/32 */
+const UWord32 exp2_tab_long[32] =//Q31
+{
+ 0x40000000,0x4166C34C,0x42D561B4,0x444C0740,
+ 0x45CAE0F2,0x47521CC6,0x48E1E9BA,0x4A7A77D4,
+ 0x4C1BF829,0x4DC69CDD,0x4F7A9930,0x51382182,
+ 0x52FF6B55,0x54D0AD5A,0x56AC1F75,0x5891FAC1,
+ 0x5A82799A,0x5C7DD7A4,0x5E8451D0,0x60962665,
+ 0x62B39509,0x64DCDEC3,0x6712460B,0x69540EC9,
+ 0x6BA27E65,0x6DFDDBCC,0x70666F76,0x72DC8374,
+ 0x75606374,0x77F25CCE,0x7A92BE8B,0x7D41D96E
+};
+
+/* Lookup-Table for binary power algorithm */
+/* This table is used for lookup 2^x with x in range [0...1/32[ in steps of 1/1024 */
+const UWord32 exp2w_tab_long[32] =//Q31
+{
+ 0x40000000,0x400B1818,0x4016321B,0x40214E0C,
+ 0x402C6BE9,0x40378BB4,0x4042AD6D,0x404DD113,
+ 0x4058F6A8,0x40641E2B,0x406F479E,0x407A7300,
+ 0x4085A051,0x4090CF92,0x409C00C4,0x40A733E6,
+ 0x40B268FA,0x40BD9FFF,0x40C8D8F5,0x40D413DD,
+ 0x40DF50B8,0x40EA8F86,0x40F5D046,0x410112FA,
+ 0x410C57A2,0x41179E3D,0x4122E6CD,0x412E3152,
+ 0x41397DCC,0x4144CC3B,0x41501CA0,0x415B6EFB
+};
+
+/* Lookup-Table for binary power algorithm */
+/* This table is used for lookup 2^x with x in range [0...1/1024[ in steps of 1/32768 */
+const UWord32 exp2x_tab_long[32] =//Q31
+{
+ 0x40000000,0x400058B9,0x4000B173,0x40010A2D,
+ 0x400162E8,0x4001BBA3,0x4002145F,0x40026D1B,
+ 0x4002C5D8,0x40031E95,0x40037752,0x4003D011,
+ 0x400428CF,0x4004818E,0x4004DA4E,0x4005330E,
+ 0x40058BCE,0x4005E48F,0x40063D51,0x40069613,
+ 0x4006EED5,0x40074798,0x4007A05B,0x4007F91F,
+ 0x400851E4,0x4008AAA8,0x4009036E,0x40095C33,
+ 0x4009B4FA,0x400A0DC0,0x400A6688,0x400ABF4F
+};
+
+/* square root tables */
+const Word32 SqrtTable[32] = /* Q31 */
+{
+ 0x5A82D429, 0x5BEA10FE, 0x5D4BE6E5, 0x5EA89270, 0x60004BE2, 0x615347A1, 0x62A1B68C, 0x63EBC651,
+ 0x6531A1B5, 0x667370D4, 0x67B1595F, 0x68EB7EC8, 0x6A220277, 0x6B5503F0, 0x6C84A0F9, 0x6DB0F5BD,
+ 0x6EDA1CE9, 0x70002FC7, 0x7123465A, 0x72437773, 0x7360D8C5, 0x747B7EFA, 0x75937DC4, 0x76A8E7EB,
+ 0x77BBCF60, 0x78CC4545, 0x79DA5A00, 0x7AE61D3E, 0x7BEF9E07, 0x7CF6EAC2, 0x7DFC113F, 0x7EFF1EC0
+};
+
+const Word16 SqrtDiffTable[32] = /* Q15 */
+{
+ 0x59CF, 0x5875, 0x572B, 0x55EE, 0x54BF, 0x539C, 0x5284, 0x5177,
+ 0x5074, 0x4F7A, 0x4E89, 0x4DA1, 0x4CC0, 0x4BE7, 0x4B15, 0x4A4A,
+ 0x4985, 0x48C6, 0x480C, 0x4758, 0x46AA, 0x4600, 0x455B, 0x44BA,
+ 0x441D, 0x4385, 0x42F1, 0x4260, 0x41D3, 0x414A, 0x40C3, 0x4040
+};
+
+const Word32 ISqrtTable[32] = /* Q31 */
+{
+ 0x7FFE7F85, 0x7E0A4E25, 0x7C2C56C7, 0x7A63002C, 0x78ACD922, 0x7708939D, 0x75750088, 0x73F10C2D,
+ 0x727BBB1A, 0x71142774, 0x6FB97EA5, 0x6E6AFF54, 0x6D27F79D, 0x6BEFC388, 0x6AC1CBA4, 0x699D83DA,
+ 0x68826A53, 0x6770068E, 0x6665E882, 0x6563A7DF, 0x6468E364, 0x63754043, 0x62886999, 0x61A20FEE,
+ 0x60C1E8C8, 0x5FE7AE45, 0x5F131EBE, 0x5E43FC76, 0x5D7A0D4F, 0x5CB51A81, 0x5BF4F061, 0x5B395E26
+};
+
+const Word16 ISqrtDiffTable[32] = /* Q15 */
+{
+ 0x7D0C, 0x777E, 0x7256, 0x6D8A, 0x6911, 0x64E5, 0x60FD, 0x5D54,
+ 0x59E5, 0x56AA, 0x53A0, 0x50C2, 0x4E0D, 0x4B7E, 0x4912, 0x46C6,
+ 0x4499, 0x4288, 0x4090, 0x3EB1, 0x3CE9, 0x3B36, 0x3996, 0x380A,
+ 0x368F, 0x3524, 0x33C9, 0x327C, 0x313D, 0x300B, 0x2EE5, 0x2DCA
+};
+
+/* 1/x tables */
+const Word32 InvTable[32] = /* Q31 */
+{
+ 0x7FFBFE40, 0x7C1B608E, 0x78752176, 0x750440BA, 0x71C44C49, 0x6EB14D0A, 0x6BC7B6B4, 0x69045A19,
+ 0x6664598A, 0x63E51EE2, 0x61845308, 0x5F3FD698, 0x5D15BB8E, 0x5B043FD0, 0x5909C861, 0x5724DD3C,
+ 0x555425B2, 0x53966532, 0x51EA787F, 0x504F5331, 0x4EC3FD84, 0x4D479267, 0x4BD93DBE, 0x4A783ADC,
+ 0x4923D31D, 0x47DB5CAE, 0x469E3974, 0x456BD608, 0x4443A8D9, 0x43253159, 0x420FF746, 0x41038A01
+};
+
+const Word16 InvDiffTable[32] = /* Q15 */
+{
+ 0x7C14, 0x74C8, 0x6E1C, 0x67FF, 0x6260, 0x5D33, 0x586C, 0x5400,
+ 0x4FE7, 0x4C19, 0x4890, 0x4543, 0x422F, 0x3F4F, 0x3C9D, 0x3A17,
+ 0x37B8, 0x357E, 0x3365, 0x316B, 0x2F8D, 0x2DCB, 0x2C20, 0x2A8D,
+ 0x290F, 0x27A4, 0x264C, 0x2506, 0x23CF, 0x22A7, 0x218E, 0x2081
+};
+
+const Word16 tcx_mdct_window_48_fx[420] =//Q15
+{ 61, 183, 306, 428, 551, 673, 796, 919, 1041, 1163, 1286,
+1408, 1531, 1653, 1776, 1898, 2020, 2143, 2265, 2387, 2509,
+2632, 2754, 2876, 2998, 3120, 3242, 3364, 3486, 3607, 3729,
+3851, 3973, 4094, 4216, 4337, 4459, 4580, 4701, 4823, 4944,
+5065, 5186, 5307, 5428, 5549, 5669, 5790, 5911, 6031, 6152,
+6272, 6392, 6512, 6632, 6752, 6872, 6992, 7112, 7231, 7351,
+7470, 7589, 7709, 7828, 7947, 8065, 8184, 8303, 8421, 8540,
+8658, 8776, 8894, 9012, 9130, 9247, 9365, 9482, 9599, 9717,
+9834, 9950, 10067, 10184, 10300, 10416, 10532, 10648, 10764, 10880,
+10995, 11111, 11226, 11341, 11456, 11571, 11685, 11800, 11914, 12028,
+12142, 12256, 12369, 12483, 12596, 12709, 12822, 12934, 13047, 13159,
+13271, 13383, 13495, 13607, 13718, 13829, 13940, 14051, 14162, 14272,
+14382, 14492, 14602, 14712, 14821, 14930, 15039, 15148, 15257, 15365,
+15473, 15581, 15689, 15796, 15904, 16011, 16117, 16224, 16330, 16437,
+16542, 16648, 16754, 16859, 16964, 17068, 17173, 17277, 17381, 17485,
+17589, 17692, 17795, 17898, 18000, 18102, 18204, 18306, 18408, 18509,
+18610, 18711, 18811, 18911, 19011, 19111, 19210, 19310, 19408, 19507,
+19605, 19703, 19801, 19899, 19996, 20093, 20190, 20286, 20382, 20478,
+20573, 20669, 20764, 20858, 20953, 21047, 21140, 21234, 21327, 21420,
+21513, 21605, 21697, 21789, 21880, 21971, 22062, 22152, 22242, 22332,
+22422, 22511, 22600, 22688, 22777, 22865, 22952, 23040, 23127, 23213,
+23300, 23386, 23471, 23557, 23642, 23726, 23811, 23895, 23978, 24062,
+24145, 24227, 24310, 24392, 24473, 24555, 24636, 24716, 24797, 24877,
+24956, 25035, 25114, 25193, 25271, 25349, 25426, 25504, 25580, 25657,
+25733, 25808, 25884, 25959, 26033, 26108, 26181, 26255, 26328, 26401,
+26473, 26545, 26617, 26688, 26759, 26830, 26900, 26970, 27039, 27108,
+27177, 27245, 27313, 27381, 27448, 27514, 27581, 27647, 27712, 27778,
+27842, 27907, 27971, 28034, 28098, 28161, 28223, 28285, 28347, 28408,
+28469, 28529, 28589, 28649, 28708, 28767, 28826, 28884, 28942, 28999,
+29056, 29112, 29168, 29224, 29279, 29334, 29388, 29442, 29496, 29549,
+29602, 29654, 29706, 29758, 29809, 29859, 29910, 29959, 30009, 30058,
+30106, 30155, 30202, 30250, 30297, 30343, 30389, 30435, 30480, 30525,
+30569, 30613, 30656, 30700, 30742, 30784, 30826, 30867, 30908, 30949,
+30989, 31029, 31068, 31106, 31145, 31183, 31220, 31257, 31294, 31330,
+31365, 31401, 31435, 31470, 31504, 31537, 31570, 31603, 31635, 31667,
+31698, 31729, 31759, 31789, 31819, 31848, 31876, 31905, 31932, 31960,
+31986, 32013, 32039, 32064, 32089, 32114, 32138, 32162, 32185, 32208,
+32230, 32252, 32273, 32294, 32315, 32335, 32354, 32374, 32392, 32411,
+32428, 32446, 32463, 32479, 32495, 32511, 32526, 32540, 32555, 32568,
+32582, 32594, 32607, 32619, 32630, 32641, 32652, 32662, 32671, 32680,
+32689, 32697, 32705, 32712, 32719, 32726, 32732, 32737, 32742, 32747,
+32751, 32755, 32758, 32761, 32763, 32765, 32766, 32767, 32767 };
+
+const Word16 tcx_mdct_window_half_48_fx[180] =//Q15
+{
+ 142, 428, 714, 1000, 1286, 1572, 1857, 2143, 2428, 2713, 2998,
+3282, 3567, 3851, 4135, 4418, 4701, 4984, 5267, 5549, 5830,
+6112, 6392, 6672, 6952, 7231, 7510, 7788, 8065, 8342, 8619,
+8894, 9169, 9443, 9717, 9989, 10261, 10532, 10803, 11072, 11341,
+11609, 11876, 12142, 12407, 12671, 12934, 13197, 13458, 13718, 13977,
+14235, 14492, 14748, 15003, 15257, 15509, 15761, 16011, 16260, 16507,
+16754, 16999, 17242, 17485, 17726, 17966, 18204, 18441, 18677, 18911,
+19144, 19376, 19605, 19834, 20061, 20286, 20510, 20732, 20953, 21172,
+21389, 21605, 21819, 22032, 22242, 22452, 22659, 22865, 23069, 23271,
+23471, 23670, 23867, 24062, 24255, 24446, 24636, 24823, 25009, 25193,
+25375, 25555, 25733, 25909, 26083, 26255, 26425, 26593, 26759, 26923,
+27085, 27245, 27403, 27559, 27712, 27864, 28013, 28161, 28306, 28449,
+28589, 28728, 28865, 28999, 29131, 29261, 29388, 29514, 29637, 29758,
+29876, 29992, 30106, 30218, 30328, 30435, 30540, 30642, 30742, 30840,
+30935, 31029, 31119, 31208, 31294, 31377, 31458, 31537, 31614, 31688,
+31759, 31828, 31895, 31960, 32021, 32081, 32138, 32192, 32245, 32294,
+32341, 32386, 32428, 32468, 32506, 32540, 32573, 32603, 32630, 32655,
+32677, 32697, 32715, 32730, 32742, 32752, 32760, 32765, 32767 };
+
+
+const Word16 tcx_mdct_window_trans_48_fx[60] =//Q15
+{ 428, 1286, 2143, 2998, 3851, 4701, 5549, 6392, 7231, 8065, 8894,
+9717, 10532, 11341, 12142, 12934, 13718, 14492, 15257, 16011, 16754,
+17485, 18204, 18911, 19605, 20286, 20953, 21605, 22242, 22865, 23471,
+24062, 24636, 25193, 25733, 26255, 26759, 27245, 27712, 28161, 28589,
+28999, 29388, 29758, 30106, 30435, 30742, 31029, 31294, 31537, 31759,
+31960, 32138, 32294, 32428, 32540, 32630, 32697, 32742, 32765
+};
+
+/*----------------------------------------------------------------------------------*
+ * SWB TBE LSF tables (1.75 kbps)
+ *----------------------------------------------------------------------------------*/
+
+const Word32 sigma_BWE_fx[] = {//Q31
+17011214, 16701976, 17561200,
+17474996, 19251270, 20645372, 39204284,
+40792208, 18917444, 18895726, 19477682,
+19499580, 20916386, 22705246, 39204284,
+40792208 }; /* for 3 bits first stage */
-#include "prot_fx.h"
-#include "basop_util.h"
-#include "wmc_auto.h"
-#include "rom_com_fx.h"
-#define SHC( x ) ( (Word16) x )
+const Word16 inv_modified_sigma_BWE_fx[] = {//x2.56
+323,
+329,
+313,
+314,
+285,
+266,
+140,
+134,
+290,
+290,
+282,
+281,
+262,
+242,
+140,
+134
+};
+
+const Word16 modified_sigma_BWE_fx[] =//Q15
+{ 259,
+254,
+267,
+266,
+293,
+315,
+598,
+622,
+288,
+288,
+297,
+297,
+319,
+346,
+598,
+622 };
+
+
+const Word16 SHB_LSF_mean_fx[10] = {//Q15
+1353, 2646, 4046,
+5428, 6896, 8339, 9863,
+11368, 12977, 14558
+};
+
+/* 4 bit VQ first stage */
+/* An 6-by-16 matrix */
+
+const Word16 SHB_LSF_VQ4_fx[96] =//Q15
+{ 150, 51, -507, -986, -1115, -944,
+-184, -77, 95, 232, 440, 497, -115,
+-107, -109, -242, -446, -592, 387, 799,
+1132, 1263, 1259, 1122, -128, -599, -1214,
+-1389, -1319, -1016, 533, 424, 148, -125,
+-378, -501, -337, -590, -587, -630, -715,
+-750, 504, 849, 750, 508, 234, 68,
+176, -177, -407, 327, 206, 21, -107,
+341, 423, 264, -17, -180, -110, -381,
+-716, -725, -232, -42, 170, 265, 273,
+336, 397, 450, 69, 285, 519, 686,
+656, 564, 120, 115, -123, -382, -19,
+234, -377, -629, -296, -95, 21, 63,
+-206, -456, 518, 472, 179, 22 };
+/* 3 bit VQ first stage */
+const Word16 SHB_LSF_VQ3_fx[48] =//Q15
+{ 278, 403, 285, 65, -206, -337,
+386, 770, 838, 753, 599, 445, -196,
+-455, -609, -524, -206, -78, 39, 199,
+393, 514, 491, 462, -91, -435, -979,
+-1241, -1225, -976, -52, -98, -216, -422,
+-599, -688, 127, 137, 0, 52, 301,
+412, -278, -422, 9, 199, 137, 72 };
+const Word16 *const cb_LSF_BWE_fx[] = { SHB_LSF_VQ4_fx, SHB_LSF_VQ3_fx }; // Q15
+
+const Word16 mslvq_SHB_min_bits[] = {14, 12}; /* for 4 bits and 3 bits respectively Q0*/
+
+const Word16 scales_BWE_fx[] = {//Q13
+7634, 13737,
+23027, 7299, 14499,
+24592, 6955, 14491,
+26427 };
+
+const Word16 scales_BWE_fx_new[] = {//Q11
+
+1908,
+3434,
+5756,
+1824,
+3624,
+6148,
+1738,
+3622,
+6606
+};
+const Word8 no_lead_BWE[] = { // Q0
+ 8, 6, 5, /* 14 bits */
+ 10,9,5, /* 15 bits*/
+ 16, 11, 5}; /* 16 bits */
+
+const Word16 scales_BWE_3b_fx[] = {//Q13
+7847, 14262,
+28934, 7610, 12771,
+21544, 7249, 12689,
+23060 };
+
+const Word16 scales_BWE_3b_fx_new[] = {//Q11
+ 1961,
+3565,
+7233,
+1902,
+3192,
+5386,
+1812,
+3172,
+5765
+};
+
+const Word8 no_lead_BWE_3b[] = { // Q0
+ 4, 5, 2, /* 12 bits */
+ 5, 5, 5, /* 13 bits */
+ 8, 6, 5 /* 14 bits */
+ };
+
+const Word32 LastCoefPred_0bit_fx[18] =//Q31
+{
+10930692, -29356102, -14495515,
+-11918534, 3435973, 89292368, 269423296,
+1105954048, 0, 17544942, -13851270,
+-20121922, -15590731, 7795365, 46127948,
+176888224, 438086656, 0 };
+
+
+const Word32 LastCoefPred_1bit_fx[36] = {//Q31
+37795712, -47094316, 24910810,
+18060338, 38268160, 87424056, 217346816,
+810181184, 9685151, 53107272, -26843546,
+11703786, -7301444, 20444044, 22655952,
+138448272, 307648512, 9234180 };
+
+const Word16 config_LSF_BWE[] = { // Q0
+ 4, 16, 1, /* 21 bits */
+ 4, 16, 1, /* 20 */
+ 4, 16, 1, /* 19 */
+ 3, 8, 1, /* 18 */
+ 3, 8, 1, /* 17 */
+ 3, 8, 0 /* 16 */
+};
+
+//basops
+const Word32 BASOP_util_normReciprocal[CHEAP_NORM_SIZE] =
+{
+ 0l/*0.0 Q31*/, 2147483647l/*1.0000000000 Q31*/, 1073741824l/*0.5000000000 Q31*/, 715827883l/*0.3333333333 Q31*/, 536870912l/*0.2500000000 Q31*/, 429496730l/*0.2000000000 Q31*/,
+ 357913941l/*0.1666666667 Q31*/, 306783378l/*0.1428571429 Q31*/, 268435456l/*0.1250000000 Q31*/, 238609294l/*0.1111111111 Q31*/, 214748365l/*0.1000000000 Q31*/, 195225786l/*0.0909090909 Q31*/,
+ 178956971l/*0.0833333333 Q31*/, 165191050l/*0.0769230769 Q31*/, 153391689l/*0.0714285714 Q31*/, 143165577l/*0.0666666667 Q31*/, 134217728l/*0.0625000000 Q31*/, 126322568l/*0.0588235294 Q31*/,
+ 119304647l/*0.0555555556 Q31*/, 113025455l/*0.0526315789 Q31*/, 107374182l/*0.0500000000 Q31*/, 102261126l/*0.0476190476 Q31*/, 97612893l/*0.0454545455 Q31*/, 93368854l/*0.0434782609 Q31*/,
+ 89478485l/*0.0416666667 Q31*/, 85899346l/*0.0400000000 Q31*/, 82595525l/*0.0384615385 Q31*/, 79536431l/*0.0370370370 Q31*/, 76695845l/*0.0357142857 Q31*/, 74051160l/*0.0344827586 Q31*/,
+ 71582788l/*0.0333333333 Q31*/, 69273666l/*0.0322580645 Q31*/, 67108864l/*0.0312500000 Q31*/, 65075262l/*0.0303030303 Q31*/, 63161284l/*0.0294117647 Q31*/, 61356676l/*0.0285714286 Q31*/,
+ 59652324l/*0.0277777778 Q31*/, 58040099l/*0.0270270270 Q31*/, 56512728l/*0.0263157895 Q31*/, 55063683l/*0.0256410256 Q31*/, 53687091l/*0.0250000000 Q31*/, 52377650l/*0.0243902439 Q31*/,
+ 51130563l/*0.0238095238 Q31*/, 49941480l/*0.0232558140 Q31*/, 48806446l/*0.0227272727 Q31*/, 47721859l/*0.0222222222 Q31*/, 46684427l/*0.0217391304 Q31*/, 45691141l/*0.0212765957 Q31*/,
+ 44739243l/*0.0208333333 Q31*/, 43826197l/*0.0204081633 Q31*/, 42949673l/*0.0200000000 Q31*/, 42107522l/*0.0196078431 Q31*/, 41297762l/*0.0192307692 Q31*/, 40518559l/*0.0188679245 Q31*/,
+ 39768216l/*0.0185185185 Q31*/, 39045157l/*0.0181818182 Q31*/, 38347922l/*0.0178571429 Q31*/, 37675152l/*0.0175438596 Q31*/, 37025580l/*0.0172413793 Q31*/, 36398028l/*0.0169491525 Q31*/,
+ 35791394l/*0.0166666667 Q31*/, 35204650l/*0.0163934426 Q31*/, 34636833l/*0.0161290323 Q31*/, 34087042l/*0.0158730159 Q31*/, 33554432l/*0.0156250000 Q31*/, 33038210l/*0.0153846154 Q31*/,
+ 32537631l/*0.0151515152 Q31*/, 32051995l/*0.0149253731 Q31*/, 31580642l/*0.0147058824 Q31*/, 31122951l/*0.0144927536 Q31*/, 30678338l/*0.0142857143 Q31*/, 30246248l/*0.0140845070 Q31*/,
+ 29826162l/*0.0138888889 Q31*/, 29417584l/*0.0136986301 Q31*/, 29020049l/*0.0135135135 Q31*/, 28633115l/*0.0133333333 Q31*/, 28256364l/*0.0131578947 Q31*/, 27889398l/*0.0129870130 Q31*/,
+ 27531842l/*0.0128205128 Q31*/, 27183337l/*0.0126582278 Q31*/, 26843546l/*0.0125000000 Q31*/, 26512144l/*0.0123456790 Q31*/, 26188825l/*0.0121951220 Q31*/, 25873297l/*0.0120481928 Q31*/,
+ 25565282l/*0.0119047619 Q31*/, 25264514l/*0.0117647059 Q31*/, 24970740l/*0.0116279070 Q31*/, 24683720l/*0.0114942529 Q31*/, 24403223l/*0.0113636364 Q31*/, 24129030l/*0.0112359551 Q31*/,
+ 23860929l/*0.0111111111 Q31*/, 23598721l/*0.0109890110 Q31*/, 23342214l/*0.0108695652 Q31*/, 23091222l/*0.0107526882 Q31*/, 22845571l/*0.0106382979 Q31*/, 22605091l/*0.0105263158 Q31*/,
+ 22369621l/*0.0104166667 Q31*/, 22139007l/*0.0103092784 Q31*/, 21913098l/*0.0102040816 Q31*/, 21691754l/*0.0101010101 Q31*/, 21474836l/*0.0100000000 Q31*/, 21262214l/*0.0099009901 Q31*/,
+ 21053761l/*0.0098039216 Q31*/, 20849356l/*0.0097087379 Q31*/, 20648881l/*0.0096153846 Q31*/, 20452225l/*0.0095238095 Q31*/, 20259280l/*0.0094339623 Q31*/, 20069941l/*0.0093457944 Q31*/,
+ 19884108l/*0.0092592593 Q31*/, 19701685l/*0.0091743119 Q31*/, 19522579l/*0.0090909091 Q31*/, 19346700l/*0.0090090090 Q31*/, 19173961l/*0.0089285714 Q31*/, 19004280l/*0.0088495575 Q31*/,
+ 18837576l/*0.0087719298 Q31*/, 18673771l/*0.0086956522 Q31*/, 18512790l/*0.0086206897 Q31*/, 18354561l/*0.0085470085 Q31*/, 18199014l/*0.0084745763 Q31*/, 18046081l/*0.0084033613 Q31*/,
+ 17895697l/*0.0083333333 Q31*/, 17747799l/*0.0082644628 Q31*/, 17602325l/*0.0081967213 Q31*/, 17459217l/*0.0081300813 Q31*/, 17318416l/*0.0080645161 Q31*/, 17179869l/*0.0080000000 Q31*/,
+ 17043521l/*0.0079365079 Q31*/, 16909320l/*0.0078740157 Q31*/, 16777216l/*0.0078125000 Q31*/, 16647160l/*0.0077519380 Q31*/, 16519105l/*0.0076923077 Q31*/, 16393005l/*0.0076335878 Q31*/,
+ 16268816l/*0.0075757576 Q31*/, 16146494l/*0.0075187970 Q31*/, 16025997l/*0.0074626866 Q31*/, 15907286l/*0.0074074074 Q31*/, 15790321l/*0.0073529412 Q31*/, 15675063l/*0.0072992701 Q31*/,
+ 15561476l/*0.0072463768 Q31*/, 15449523l/*0.0071942446 Q31*/, 15339169l/*0.0071428571 Q31*/, 15230381l/*0.0070921986 Q31*/, 15123124l/*0.0070422535 Q31*/, 15017368l/*0.0069930070 Q31*/,
+ 14913081l/*0.0069444444 Q31*/, 14810232l/*0.0068965517 Q31*/, 14708792l/*0.0068493151 Q31*/, 14608732l/*0.0068027211 Q31*/, 14510025l/*0.0067567568 Q31*/, 14412642l/*0.0067114094 Q31*/,
+ 14316558l/*0.0066666667 Q31*/, 14221746l/*0.0066225166 Q31*/, 14128182l/*0.0065789474 Q31*/, 14035841l/*0.0065359477 Q31*/, 13944699l/*0.0064935065 Q31*/, 13854733l/*0.0064516129 Q31*/,
+ 13765921l/*0.0064102564 Q31*/, 13678240l/*0.0063694268 Q31*/, 13591669l/*0.0063291139 Q31*/, 13506187l/*0.0062893082 Q31*/, 13421773l/*0.0062500000 Q31*/
+};
+
+const Word16 f_atan_expand_range[MAXSFTAB - (MINSFTAB - 1)] =
+{
+ /*****************************************************************************
+ *
+ * Table holds fixp_atan() output values which are outside of input range
+ * of fixp_atan() to improve SNR of fixp_atan2().
+ *
+ * This Table might also be used in fixp_atan() [todo] so there a wider input
+ * range can be covered, too.
+ *
+ * Matlab (generate table):
+ * for scl = 7:25 % MINSFTAB .. MAXSFTAB
+ * at=atan(0.5 *(2^scl)); % 0.5 because get in 'middle' area of current scale level 'scl'
+ * at/2 % div at by ATO_SCALE
+ * end
+ *
+ * Table divided by 2=ATO_SCALE <-- SF=ATO_SF
+ *****************************************************************************/
+ 25480/*7.775862990872099e-001 Q15*/, 25608/*7.814919928673978e-001 Q15*/, 25672/*7.834450483314648e-001 Q15*/,
+ 25704/*7.844216021392089e-001 Q15*/, 25720/*7.849098823026687e-001 Q15*/, 25728/*7.851540227918509e-001 Q15*/,
+ 25732/*7.852760930873737e-001 Q15*/, 25734/*7.853371282415015e-001 Q15*/, 25735/*7.853676458193612e-001 Q15*/,
+ 25735/*7.853829046083906e-001 Q15*/, 25736/*7.853905340029177e-001 Q15*/, 25736/*7.853943487001828e-001 Q15*/,
+ 25736/*7.853962560488155e-001 Q15*/, 25736/*7.853972097231319e-001 Q15*/, 25736/*7.853976865602901e-001 Q15*/,
+ 25736/*7.853979249788692e-001 Q15*/, 25736/*7.853980441881587e-001 Q15*/, 25736/*7.853981037928035e-001 Q15*/,
+ 25736/*7.853981335951259e-001 Q15*/
+ /* pi/4 = 0.785398163397448 = pi/2/ATO_SCALE */
+};
+
+
+const Word16 Grid[GRID100_POINTS + 1] =//Q15
+{
+ 32767, 32751, 32703, 32622, 32509, 32364,
+ 32187, 31978, 31738, 31466, 31164, 30830,
+ 30466, 30072, 29649, 29196, 28714, 28204,
+ 27666, 27101, 26509, 25891, 25248, 24579,
+ 23886, 23170, 22431, 21669, 20887, 20083,
+ 19260, 18418, 17557, 16680, 15786, 14876,
+ 13951, 13013, 12062, 11099, 10125, 9141,
+ 8149, 7148, 6140, 5126, 4106, 3083,
+ 2057, 1029, 0, -1029, -2057, -3083,
+ -4106, -5126, -6140, -7148, -8149, -9141,
+ -10125, -11099, -12062, -13013, -13951, -14876,
+ -15786, -16680, -17557, -18418, -19260, -20083,
+ -20887, -21669, -22431, -23170, -23886, -24579,
+ -25248, -25891, -26509, -27101, -27666, -28204,
+ -28714, -29196, -29649, -30072, -30466, -30830,
+ -31164, -31466, -31738, -31978, -32187, -32364,
+ -32509, -32622, -32703, -32751, -32760
+};
+
+const Word16 pwAlpha[10] = { 0x6666, 0x51ec, 0x4189, 0x346e, 0x29f1,//Q15
+ 0x218e, 0x1ad8, 0x157a, 0x112e, 0x0dbe
+};
+
+/* Used in 'lsp2lsf_fx.c' */
+const Word8 Ind_Guess[256] =
+{
+ 126, 122, 120, 119, 117, 116, 115, 114,
+ 113, 112, 111, 110, 110, 109, 108, 108,
+ 107, 106, 106, 105, 104, 104, 103, 103,
+ 102, 102, 101, 101, 100, 100, 99, 99,
+ 98, 98, 97, 97, 96, 96, 95, 95,
+ 94, 94, 94, 93, 93, 92, 92, 91,
+ 91, 91, 90, 90, 89, 89, 89, 88,
+ 88, 87, 87, 87, 86, 86, 86, 85,
+ 85, 84, 84, 84, 83, 83, 83, 82,
+ 82, 82, 81, 81, 81, 80, 80, 80,
+ 79, 79, 78, 78, 78, 77, 77, 77,
+ 76, 76, 76, 75, 75, 75, 74, 74,
+ 74, 73, 73, 73, 72, 72, 72, 72,
+ 71, 71, 71, 70, 70, 70, 69, 69,
+ 69, 68, 68, 68, 67, 67, 67, 66,
+ 66, 66, 65, 65, 65, 64, 64, 64,
+ 64, 63, 63, 63, 62, 62, 62, 61,
+ 61, 61, 60, 60, 60, 59, 59, 59,
+ 58, 58, 58, 57, 57, 57, 56, 56,
+ 56, 55, 55, 55, 55, 54, 54, 54,
+ 53, 53, 53, 52, 52, 52, 51, 51,
+ 51, 50, 50, 50, 49, 49, 49, 48,
+ 48, 47, 47, 47, 46, 46, 46, 45,
+ 45, 45, 44, 44, 44, 43, 43, 43,
+ 42, 42, 41, 41, 41, 40, 40, 40,
+ 39, 39, 38, 38, 38, 37, 37, 36,
+ 36, 36, 35, 35, 34, 34, 33, 33,
+ 33, 32, 32, 31, 31, 30, 30, 29,
+ 29, 28, 28, 27, 27, 26, 26, 25,
+ 25, 24, 24, 23, 23, 22, 21, 21,
+ 20, 19, 19, 18, 17, 17, 16, 15,
+ 14, 13, 12, 11, 10, 8, 7, 5
+};
+
+const Word16 cos_table_129[129] =//Q15
+{
+ 32767,
+ 32758, 32729, 32679, 32610, 32522, 32413, 32286, 32138,
+ 31972, 31786, 31581, 31357, 31114, 30853, 30572, 30274,
+ 29957, 29622, 29269, 28899, 28511, 28106, 27684, 27246,
+ 26791, 26320, 25833, 25330, 24812, 24279, 23732, 23170,
+ 22595, 22006, 21403, 20788, 20160, 19520, 18868, 18205,
+ 17531, 16846, 16151, 15447, 14733, 14010, 13279, 12540,
+ 11793, 11039, 10279, 9512, 8740, 7962, 7180, 6393,
+ 5602, 4808, 4011, 3212, 2411, 1608, 804, 0,
+ -804, -1608, -2411, -3212, -4011, -4808, -5602, -6393,
+ -7180, -7962, -8740, -9512, -10279, -11039, -11793, -12540,
+ -13279, -14010, -14733, -15447, -16151, -16846, -17531, -18205,
+ -18868, -19520, -20160, -20788, -21403, -22006, -22595, -23170,
+ -23732, -24279, -24812, -25330, -25833, -26320, -26791, -27246,
+ -27684, -28106, -28511, -28899, -29269, -29622, -29957, -30274,
+ -30572, -30853, -31114, -31357, -31581, -31786, -31972, -32138,
+ -32286, -32413, -32522, -32610, -32679, -32729, -32758, -32768
+};
+
+const Word16 acos_slope[128] =//Q15
+{
+ -26214, -9039, -5243, -3799, -2979, -2405, -2064, -1771,
+ -1579, -1409, -1279, -1170, -1079, -1004, -933, -880,
+ -827, -783, -743, -708, -676, -647, -621, -599,
+ -576, -557, -538, -521, -506, -492, -479, -466,
+ -456, -445, -435, -426, -417, -410, -402, -395,
+ -389, -383, -377, -372, -367, -363, -359, -355,
+ -351, -348, -345, -342, -340, -337, -335, -333,
+ -331, -330, -329, -328, -327, -326, -326, -326,
+ -326, -326, -326, -327, -328, -329, -330, -331,
+ -333, -335, -337, -340, -342, -345, -348, -351,
+ -355, -359, -363, -367, -372, -377, -383, -389,
+ -395, -402, -410, -417, -426, -435, -445, -456,
+ -466, -479, -492, -506, -521, -538, -557, -576,
+ -599, -621, -647, -676, -708, -743, -783, -827,
+ -880, -933, -1004, -1079, -1170, -1279, -1409, -1579,
+ -1771, -2064, -2405, -2979, -3799, -5243, -9039,-26214
+};
+
+
+const Word16 cos_coef_new[4] = { SHC(0x02BA), SHC(0xE60A), SHC(0xEEEF), SHC(0xAAAB) };//Q15
+
+const Word16 cos_table[512] =//Q15
+{
+ SHC(0x7fff),
+ SHC(0x7ffe),
+ SHC(0x7ff6),
+ SHC(0x7fea),
+ SHC(0x7fd9),
+ SHC(0x7fc2),
+ SHC(0x7fa7),
+ SHC(0x7f87),
+ SHC(0x7f62),
+ SHC(0x7f38),
+ SHC(0x7f0a),
+ SHC(0x7ed6),
+ SHC(0x7e9d),
+ SHC(0x7e60),
+ SHC(0x7e1e),
+ SHC(0x7dd6),
+ SHC(0x7d8a),
+ SHC(0x7d3a),
+ SHC(0x7ce4),
+ SHC(0x7c89),
+ SHC(0x7c2a),
+ SHC(0x7bc6),
+ SHC(0x7b5d),
+ SHC(0x7aef),
+ SHC(0x7a7d),
+ SHC(0x7a06),
+ SHC(0x798a),
+ SHC(0x790a),
+ SHC(0x7885),
+ SHC(0x77fb),
+ SHC(0x776c),
+ SHC(0x76d9),
+ SHC(0x7642),
+ SHC(0x75a6),
+ SHC(0x7505),
+ SHC(0x7460),
+ SHC(0x73b6),
+ SHC(0x7308),
+ SHC(0x7255),
+ SHC(0x719e),
+ SHC(0x70e3),
+ SHC(0x7023),
+ SHC(0x6f5f),
+ SHC(0x6e97),
+ SHC(0x6dca),
+ SHC(0x6cf9),
+ SHC(0x6c24),
+ SHC(0x6b4b),
+ SHC(0x6a6e),
+ SHC(0x698c),
+ SHC(0x68a7),
+ SHC(0x67bd),
+ SHC(0x66d0),
+ SHC(0x65de),
+ SHC(0x64e9),
+ SHC(0x63ef),
+ SHC(0x62f2),
+ SHC(0x61f1),
+ SHC(0x60ec),
+ SHC(0x5fe4),
+ SHC(0x5ed7),
+ SHC(0x5dc8),
+ SHC(0x5cb4),
+ SHC(0x5b9d),
+ SHC(0x5a82),
+ SHC(0x5964),
+ SHC(0x5843),
+ SHC(0x571e),
+ SHC(0x55f6),
+ SHC(0x54ca),
+ SHC(0x539b),
+ SHC(0x5269),
+ SHC(0x5134),
+ SHC(0x4ffb),
+ SHC(0x4ec0),
+ SHC(0x4d81),
+ SHC(0x4c40),
+ SHC(0x4afb),
+ SHC(0x49b4),
+ SHC(0x486a),
+ SHC(0x471d),
+ SHC(0x45cd),
+ SHC(0x447b),
+ SHC(0x4326),
+ SHC(0x41ce),
+ SHC(0x4074),
+ SHC(0x3f17),
+ SHC(0x3db8),
+ SHC(0x3c57),
+ SHC(0x3af3),
+ SHC(0x398d),
+ SHC(0x3825),
+ SHC(0x36ba),
+ SHC(0x354e),
+ SHC(0x33df),
+ SHC(0x326e),
+ SHC(0x30fc),
+ SHC(0x2f87),
+ SHC(0x2e11),
+ SHC(0x2c99),
+ SHC(0x2b1f),
+ SHC(0x29a4),
+ SHC(0x2827),
+ SHC(0x26a8),
+ SHC(0x2528),
+ SHC(0x23a7),
+ SHC(0x2224),
+ SHC(0x209f),
+ SHC(0x1f1a),
+ SHC(0x1d93),
+ SHC(0x1c0c),
+ SHC(0x1a83),
+ SHC(0x18f9),
+ SHC(0x176e),
+ SHC(0x15e2),
+ SHC(0x1455),
+ SHC(0x12c8),
+ SHC(0x113a),
+ SHC(0xfab),
+ SHC(0xe1c),
+ SHC(0xc8c),
+ SHC(0xafb),
+ SHC(0x96b),
+ SHC(0x7d9),
+ SHC(0x648),
+ SHC(0x4b6),
+ SHC(0x324),
+ SHC(0x192),
+ SHC(0x0),
+ SHC(0xfe6e),
+ SHC(0xfcdc),
+ SHC(0xfb4a),
+ SHC(0xf9b8),
+ SHC(0xf827),
+ SHC(0xf695),
+ SHC(0xf505),
+ SHC(0xf374),
+ SHC(0xf1e4),
+ SHC(0xf055),
+ SHC(0xeec6),
+ SHC(0xed38),
+ SHC(0xebab),
+ SHC(0xea1e),
+ SHC(0xe892),
+ SHC(0xe707),
+ SHC(0xe57d),
+ SHC(0xe3f4),
+ SHC(0xe26d),
+ SHC(0xe0e6),
+ SHC(0xdf61),
+ SHC(0xdddc),
+ SHC(0xdc59),
+ SHC(0xdad8),
+ SHC(0xd958),
+ SHC(0xd7d9),
+ SHC(0xd65c),
+ SHC(0xd4e1),
+ SHC(0xd367),
+ SHC(0xd1ef),
+ SHC(0xd079),
+ SHC(0xcf04),
+ SHC(0xcd92),
+ SHC(0xcc21),
+ SHC(0xcab2),
+ SHC(0xc946),
+ SHC(0xc7db),
+ SHC(0xc673),
+ SHC(0xc50d),
+ SHC(0xc3a9),
+ SHC(0xc248),
+ SHC(0xc0e9),
+ SHC(0xbf8c),
+ SHC(0xbe32),
+ SHC(0xbcda),
+ SHC(0xbb85),
+ SHC(0xba33),
+ SHC(0xb8e3),
+ SHC(0xb796),
+ SHC(0xb64c),
+ SHC(0xb505),
+ SHC(0xb3c0),
+ SHC(0xb27f),
+ SHC(0xb140),
+ SHC(0xb005),
+ SHC(0xaecc),
+ SHC(0xad97),
+ SHC(0xac65),
+ SHC(0xab36),
+ SHC(0xaa0a),
+ SHC(0xa8e2),
+ SHC(0xa7bd),
+ SHC(0xa69c),
+ SHC(0xa57e),
+ SHC(0xa463),
+ SHC(0xa34c),
+ SHC(0xa238),
+ SHC(0xa129),
+ SHC(0xa01c),
+ SHC(0x9f14),
+ SHC(0x9e0f),
+ SHC(0x9d0e),
+ SHC(0x9c11),
+ SHC(0x9b17),
+ SHC(0x9a22),
+ SHC(0x9930),
+ SHC(0x9843),
+ SHC(0x9759),
+ SHC(0x9674),
+ SHC(0x9592),
+ SHC(0x94b5),
+ SHC(0x93dc),
+ SHC(0x9307),
+ SHC(0x9236),
+ SHC(0x9169),
+ SHC(0x90a1),
+ SHC(0x8fdd),
+ SHC(0x8f1d),
+ SHC(0x8e62),
+ SHC(0x8dab),
+ SHC(0x8cf8),
+ SHC(0x8c4a),
+ SHC(0x8ba0),
+ SHC(0x8afb),
+ SHC(0x8a5a),
+ SHC(0x89be),
+ SHC(0x8927),
+ SHC(0x8894),
+ SHC(0x8805),
+ SHC(0x877b),
+ SHC(0x86f6),
+ SHC(0x8676),
+ SHC(0x85fa),
+ SHC(0x8583),
+ SHC(0x8511),
+ SHC(0x84a3),
+ SHC(0x843a),
+ SHC(0x83d6),
+ SHC(0x8377),
+ SHC(0x831c),
+ SHC(0x82c6),
+ SHC(0x8276),
+ SHC(0x822a),
+ SHC(0x81e2),
+ SHC(0x81a0),
+ SHC(0x8163),
+ SHC(0x812a),
+ SHC(0x80f6),
+ SHC(0x80c8),
+ SHC(0x809e),
+ SHC(0x8079),
+ SHC(0x8059),
+ SHC(0x803e),
+ SHC(0x8027),
+ SHC(0x8016),
+ SHC(0x800a),
+ SHC(0x8002),
+ SHC(0x8001),
+ SHC(0x8002),
+ SHC(0x800a),
+ SHC(0x8016),
+ SHC(0x8027),
+ SHC(0x803e),
+ SHC(0x8059),
+ SHC(0x8079),
+ SHC(0x809e),
+ SHC(0x80c8),
+ SHC(0x80f6),
+ SHC(0x812a),
+ SHC(0x8163),
+ SHC(0x81a0),
+ SHC(0x81e2),
+ SHC(0x822a),
+ SHC(0x8276),
+ SHC(0x82c6),
+ SHC(0x831c),
+ SHC(0x8377),
+ SHC(0x83d6),
+ SHC(0x843a),
+ SHC(0x84a3),
+ SHC(0x8511),
+ SHC(0x8583),
+ SHC(0x85fa),
+ SHC(0x8676),
+ SHC(0x86f6),
+ SHC(0x877b),
+ SHC(0x8805),
+ SHC(0x8894),
+ SHC(0x8927),
+ SHC(0x89be),
+ SHC(0x8a5a),
+ SHC(0x8afb),
+ SHC(0x8ba0),
+ SHC(0x8c4a),
+ SHC(0x8cf8),
+ SHC(0x8dab),
+ SHC(0x8e62),
+ SHC(0x8f1d),
+ SHC(0x8fdd),
+ SHC(0x90a1),
+ SHC(0x9169),
+ SHC(0x9236),
+ SHC(0x9307),
+ SHC(0x93dc),
+ SHC(0x94b5),
+ SHC(0x9592),
+ SHC(0x9674),
+ SHC(0x9759),
+ SHC(0x9843),
+ SHC(0x9930),
+ SHC(0x9a22),
+ SHC(0x9b17),
+ SHC(0x9c11),
+ SHC(0x9d0e),
+ SHC(0x9e0f),
+ SHC(0x9f14),
+ SHC(0xa01c),
+ SHC(0xa129),
+ SHC(0xa238),
+ SHC(0xa34c),
+ SHC(0xa463),
+ SHC(0xa57e),
+ SHC(0xa69c),
+ SHC(0xa7bd),
+ SHC(0xa8e2),
+ SHC(0xaa0a),
+ SHC(0xab36),
+ SHC(0xac65),
+ SHC(0xad97),
+ SHC(0xaecc),
+ SHC(0xb005),
+ SHC(0xb140),
+ SHC(0xb27f),
+ SHC(0xb3c0),
+ SHC(0xb505),
+ SHC(0xb64c),
+ SHC(0xb796),
+ SHC(0xb8e3),
+ SHC(0xba33),
+ SHC(0xbb85),
+ SHC(0xbcda),
+ SHC(0xbe32),
+ SHC(0xbf8c),
+ SHC(0xc0e9),
+ SHC(0xc248),
+ SHC(0xc3a9),
+ SHC(0xc50d),
+ SHC(0xc673),
+ SHC(0xc7db),
+ SHC(0xc946),
+ SHC(0xcab2),
+ SHC(0xcc21),
+ SHC(0xcd92),
+ SHC(0xcf04),
+ SHC(0xd079),
+ SHC(0xd1ef),
+ SHC(0xd367),
+ SHC(0xd4e1),
+ SHC(0xd65c),
+ SHC(0xd7d9),
+ SHC(0xd958),
+ SHC(0xdad8),
+ SHC(0xdc59),
+ SHC(0xdddc),
+ SHC(0xdf61),
+ SHC(0xe0e6),
+ SHC(0xe26d),
+ SHC(0xe3f4),
+ SHC(0xe57d),
+ SHC(0xe707),
+ SHC(0xe892),
+ SHC(0xea1e),
+ SHC(0xebab),
+ SHC(0xed38),
+ SHC(0xeec6),
+ SHC(0xf055),
+ SHC(0xf1e4),
+ SHC(0xf374),
+ SHC(0xf505),
+ SHC(0xf695),
+ SHC(0xf827),
+ SHC(0xf9b8),
+ SHC(0xfb4a),
+ SHC(0xfcdc),
+ SHC(0xfe6e),
+ SHC(0x0),
+ SHC(0x192),
+ SHC(0x324),
+ SHC(0x4b6),
+ SHC(0x648),
+ SHC(0x7d9),
+ SHC(0x96b),
+ SHC(0xafb),
+ SHC(0xc8c),
+ SHC(0xe1c),
+ SHC(0xfab),
+ SHC(0x113a),
+ SHC(0x12c8),
+ SHC(0x1455),
+ SHC(0x15e2),
+ SHC(0x176e),
+ SHC(0x18f9),
+ SHC(0x1a83),
+ SHC(0x1c0c),
+ SHC(0x1d93),
+ SHC(0x1f1a),
+ SHC(0x209f),
+ SHC(0x2224),
+ SHC(0x23a7),
+ SHC(0x2528),
+ SHC(0x26a8),
+ SHC(0x2827),
+ SHC(0x29a4),
+ SHC(0x2b1f),
+ SHC(0x2c99),
+ SHC(0x2e11),
+ SHC(0x2f87),
+ SHC(0x30fc),
+ SHC(0x326e),
+ SHC(0x33df),
+ SHC(0x354e),
+ SHC(0x36ba),
+ SHC(0x3825),
+ SHC(0x398d),
+ SHC(0x3af3),
+ SHC(0x3c57),
+ SHC(0x3db8),
+ SHC(0x3f17),
+ SHC(0x4074),
+ SHC(0x41ce),
+ SHC(0x4326),
+ SHC(0x447b),
+ SHC(0x45cd),
+ SHC(0x471d),
+ SHC(0x486a),
+ SHC(0x49b4),
+ SHC(0x4afb),
+ SHC(0x4c40),
+ SHC(0x4d81),
+ SHC(0x4ec0),
+ SHC(0x4ffb),
+ SHC(0x5134),
+ SHC(0x5269),
+ SHC(0x539b),
+ SHC(0x54ca),
+ SHC(0x55f6),
+ SHC(0x571e),
+ SHC(0x5843),
+ SHC(0x5964),
+ SHC(0x5a82),
+ SHC(0x5b9d),
+ SHC(0x5cb4),
+ SHC(0x5dc8),
+ SHC(0x5ed7),
+ SHC(0x5fe4),
+ SHC(0x60ec),
+ SHC(0x61f1),
+ SHC(0x62f2),
+ SHC(0x63ef),
+ SHC(0x64e9),
+ SHC(0x65de),
+ SHC(0x66d0),
+ SHC(0x67bd),
+ SHC(0x68a7),
+ SHC(0x698c),
+ SHC(0x6a6e),
+ SHC(0x6b4b),
+ SHC(0x6c24),
+ SHC(0x6cf9),
+ SHC(0x6dca),
+ SHC(0x6e97),
+ SHC(0x6f5f),
+ SHC(0x7023),
+ SHC(0x70e3),
+ SHC(0x719e),
+ SHC(0x7255),
+ SHC(0x7308),
+ SHC(0x73b6),
+ SHC(0x7460),
+ SHC(0x7505),
+ SHC(0x75a6),
+ SHC(0x7642),
+ SHC(0x76d9),
+ SHC(0x776c),
+ SHC(0x77fb),
+ SHC(0x7885),
+ SHC(0x790a),
+ SHC(0x798a),
+ SHC(0x7a06),
+ SHC(0x7a7d),
+ SHC(0x7aef),
+ SHC(0x7b5d),
+ SHC(0x7bc6),
+ SHC(0x7c2a),
+ SHC(0x7c89),
+ SHC(0x7ce4),
+ SHC(0x7d3a),
+ SHC(0x7d8a),
+ SHC(0x7dd6),
+ SHC(0x7e1e),
+ SHC(0x7e60),
+ SHC(0x7e9d),
+ SHC(0x7ed6),
+ SHC(0x7f0a),
+ SHC(0x7f38),
+ SHC(0x7f62),
+ SHC(0x7f87),
+ SHC(0x7fa7),
+ SHC(0x7fc2),
+ SHC(0x7fd9),
+ SHC(0x7fea),
+ SHC(0x7ff6),
+ SHC(0x7ffe)
+};
+
+const PWord16 w1N8[15] =
+{
+ {{ 32729/*0.998795 Q15*/, -1608/*-0.049068 Q15*/}},
+ {{ 32610/*0.995185 Q15*/, -3212/*-0.098017 Q15*/}},
+ {{ 32413/*0.989177 Q15*/, -4808/*-0.146730 Q15*/}},
+ {{ 32138/*0.980785 Q15*/, -6393/*-0.195090 Q15*/}},
+ {{ 31786/*0.970031 Q15*/, -7962/*-0.242980 Q15*/}},
+ {{ 31357/*0.956940 Q15*/, -9512/*-0.290285 Q15*/}},
+ {{ 30853/*0.941544 Q15*/, -11039/*-0.336890 Q15*/}},
+ {{ 30274/*0.923880 Q15*/, -12540/*-0.382683 Q15*/}},
+ {{ 29622/*0.903989 Q15*/, -14010/*-0.427555 Q15*/}},
+ {{ 28899/*0.881921 Q15*/, -15447/*-0.471397 Q15*/}},
+ {{ 28106/*0.857729 Q15*/, -16846/*-0.514103 Q15*/}},
+ {{ 27246/*0.831470 Q15*/, -18205/*-0.555570 Q15*/}},
+ {{ 26320/*0.803208 Q15*/, -19520/*-0.595699 Q15*/}},
+ {{ 25330/*0.773010 Q15*/, -20788/*-0.634393 Q15*/}},
+ {{ 24279/*0.740951 Q15*/, -22006/*-0.671559 Q15*/}}
+};
+
+const PWord16 w2N8[15] =
+{
+ {{ 32610/*0.995185 Q15*/, -3212/*-0.098017 Q15*/}},
+ {{ 32138/*0.980785 Q15*/, -6393/*-0.195090 Q15*/}},
+ {{ 31357/*0.956940 Q15*/, -9512/*-0.290285 Q15*/}},
+ {{ 30274/*0.923880 Q15*/, -12540/*-0.382683 Q15*/}},
+ {{ 28899/*0.881921 Q15*/, -15447/*-0.471397 Q15*/}},
+ {{ 27246/*0.831470 Q15*/, -18205/*-0.555570 Q15*/}},
+ {{ 25330/*0.773010 Q15*/, -20788/*-0.634393 Q15*/}},
+ {{ 23170/*0.707107 Q15*/, -23170/*-0.707107 Q15*/}},
+ {{ 20788/*0.634393 Q15*/, -25330/*-0.773010 Q15*/}},
+ {{ 18205/*0.555570 Q15*/, -27246/*-0.831470 Q15*/}},
+ {{ 15447/*0.471397 Q15*/, -28899/*-0.881921 Q15*/}},
+ {{ 12540/*0.382683 Q15*/, -30274/*-0.923880 Q15*/}},
+ {{ 9512/*0.290285 Q15*/, -31357/*-0.956940 Q15*/}},
+ {{ 6393/*0.195090 Q15*/, -32138/*-0.980785 Q15*/}},
+ {{ 3212/*0.098017 Q15*/, -32610/*-0.995185 Q15*/}}
+};
+
+const PWord16 w3N8[15] =
+{
+ {{ 32413/*0.989177 Q15*/, -4808/*-0.146730 Q15*/}},
+ {{ 31357/*0.956940 Q15*/, -9512/*-0.290285 Q15*/}},
+ {{ 29622/*0.903989 Q15*/, -14010/*-0.427555 Q15*/}},
+ {{ 27246/*0.831470 Q15*/, -18205/*-0.555570 Q15*/}},
+ {{ 24279/*0.740951 Q15*/, -22006/*-0.671559 Q15*/}},
+ {{ 20788/*0.634393 Q15*/, -25330/*-0.773010 Q15*/}},
+ {{ 16846/*0.514103 Q15*/, -28106/*-0.857729 Q15*/}},
+ {{ 12540/*0.382683 Q15*/, -30274/*-0.923880 Q15*/}},
+ {{ 7962/*0.242980 Q15*/, -31786/*-0.970031 Q15*/}},
+ {{ 3212/*0.098017 Q15*/, -32610/*-0.995185 Q15*/}},
+ {{ -1608/*-0.049068 Q15*/, -32729/*-0.998795 Q15*/}},
+ {{ -6393/*-0.195090 Q15*/, -32138/*-0.980785 Q15*/}},
+ {{-11039/*-0.336890 Q15*/, -30853/*-0.941544 Q15*/}},
+ {{-15447/*-0.471397 Q15*/, -28899/*-0.881921 Q15*/}},
+ {{-19520/*-0.595699 Q15*/, -26320/*-0.803208 Q15*/}}
+};
+
+const PWord16 w4N8[15] =
+{
+ {{ 32138/*0.980785 Q15*/, -6393/*-0.195090 Q15*/}},
+ {{ 30274/*0.923880 Q15*/, -12540/*-0.382683 Q15*/}},
+ {{ 27246/*0.831470 Q15*/, -18205/*-0.555570 Q15*/}},
+ {{ 23170/*0.707107 Q15*/, -23170/*-0.707107 Q15*/}},
+ {{ 18205/*0.555570 Q15*/, -27246/*-0.831470 Q15*/}},
+ {{ 12540/*0.382683 Q15*/, -30274/*-0.923880 Q15*/}},
+ {{ 6393/*0.195090 Q15*/, -32138/*-0.980785 Q15*/}},
+ {{ 0/*0.000000 Q15*/, -32768/*-1.000000 Q15*/}},
+ {{ -6393/*-0.195090 Q15*/, -32138/*-0.980785 Q15*/}},
+ {{-12540/*-0.382683 Q15*/, -30274/*-0.923880 Q15*/}},
+ {{-18205/*-0.555570 Q15*/, -27246/*-0.831470 Q15*/}},
+ {{-23170/*-0.707107 Q15*/, -23170/*-0.707107 Q15*/}},
+ {{-27246/*-0.831470 Q15*/, -18205/*-0.555570 Q15*/}},
+ {{-30274/*-0.923880 Q15*/, -12540/*-0.382683 Q15*/}},
+ {{-32138/*-0.980785 Q15*/, -6393/*-0.195090 Q15*/}}
+};
+
+const PWord16 w5N8[15] =
+{
+ {{ 31786/*0.970031 Q15*/, -7962/*-0.242980 Q15*/}},
+ {{ 28899/*0.881921 Q15*/, -15447/*-0.471397 Q15*/}},
+ {{ 24279/*0.740951 Q15*/, -22006/*-0.671559 Q15*/}},
+ {{ 18205/*0.555570 Q15*/, -27246/*-0.831470 Q15*/}},
+ {{ 11039/*0.336890 Q15*/, -30853/*-0.941544 Q15*/}},
+ {{ 3212/*0.098017 Q15*/, -32610/*-0.995185 Q15*/}},
+ {{ -4808/*-0.146730 Q15*/, -32413/*-0.989177 Q15*/}},
+ {{-12540/*-0.382683 Q15*/, -30274/*-0.923880 Q15*/}},
+ {{-19520/*-0.595699 Q15*/, -26320/*-0.803208 Q15*/}},
+ {{-25330/*-0.773010 Q15*/, -20788/*-0.634393 Q15*/}},
+ {{-29622/*-0.903989 Q15*/, -14010/*-0.427555 Q15*/}},
+ {{-32138/*-0.980785 Q15*/, -6393/*-0.195090 Q15*/}},
+ {{-32729/*-0.998795 Q15*/, 1608/*0.049068 Q15*/}},
+ {{-31357/*-0.956940 Q15*/, 9512/*0.290285 Q15*/}},
+ {{-28106/*-0.857729 Q15*/, 16846/*0.514103 Q15*/}}
+};
+
+const PWord16 w6N8[15] =
+{
+ {{ 31357/*0.956940 Q15*/, -9512/*-0.290285 Q15*/}},
+ {{ 27246/*0.831470 Q15*/, -18205/*-0.555570 Q15*/}},
+ {{ 20788/*0.634393 Q15*/, -25330/*-0.773010 Q15*/}},
+ {{ 12540/*0.382683 Q15*/, -30274/*-0.923880 Q15*/}},
+ {{ 3212/*0.098017 Q15*/, -32610/*-0.995185 Q15*/}},
+ {{ -6393/*-0.195090 Q15*/, -32138/*-0.980785 Q15*/}},
+ {{-15447/*-0.471397 Q15*/, -28899/*-0.881921 Q15*/}},
+ {{-23170/*-0.707107 Q15*/, -23170/*-0.707107 Q15*/}},
+ {{-28899/*-0.881921 Q15*/, -15447/*-0.471397 Q15*/}},
+ {{-32138/*-0.980785 Q15*/, -6393/*-0.195090 Q15*/}},
+ {{-32610/*-0.995185 Q15*/, 3212/*0.098017 Q15*/}},
+ {{-30274/*-0.923880 Q15*/, 12540/*0.382683 Q15*/}},
+ {{-25330/*-0.773010 Q15*/, 20788/*0.634393 Q15*/}},
+ {{-18205/*-0.555570 Q15*/, 27246/*0.831470 Q15*/}},
+ {{ -9512/*-0.290285 Q15*/, 31357/*0.956940 Q15*/}}
+};
+
+const PWord16 w7N8[15] =
+{
+ {{ 30853/*0.941544 Q15*/, -11039/*-0.336890 Q15*/}},
+ {{ 25330/*0.773010 Q15*/, -20788/*-0.634393 Q15*/}},
+ {{ 16846/*0.514103 Q15*/, -28106/*-0.857729 Q15*/}},
+ {{ 6393/*0.195090 Q15*/, -32138/*-0.980785 Q15*/}},
+ {{ -4808/*-0.146730 Q15*/, -32413/*-0.989177 Q15*/}},
+ {{-15447/*-0.471397 Q15*/, -28899/*-0.881921 Q15*/}},
+ {{-24279/*-0.740951 Q15*/, -22006/*-0.671559 Q15*/}},
+ {{-30274/*-0.923880 Q15*/, -12540/*-0.382683 Q15*/}},
+ {{-32729/*-0.998795 Q15*/, -1608/*-0.049068 Q15*/}},
+ {{-31357/*-0.956940 Q15*/, 9512/*0.290285 Q15*/}},
+ {{-26320/*-0.803208 Q15*/, 19520/*0.595699 Q15*/}},
+ {{-18205/*-0.555570 Q15*/, 27246/*0.831470 Q15*/}},
+ {{ -7962/*-0.242980 Q15*/, 31786/*0.970031 Q15*/}},
+ {{ 3212/*0.098017 Q15*/, 32610/*0.995185 Q15*/}},
+ {{ 14010/*0.427555 Q15*/, 29622/*0.903989 Q15*/}}
+};
+
+const PWord16 *w_a[7] = { w1N8, w2N8, w3N8, w4N8, w5N8, w6N8, w7N8 };//Q15
+
+const PWord16 w19N[127] =
+{
+ {{ 31881/*0.972940 Q15*/, 7571/*0.231058 Q15*/}},
+ {{ 29269/*0.893224 Q15*/, 14733/*0.449611 Q15*/}},
+ {{ 25073/*0.765167 Q15*/, 21097/*0.643832 Q15*/}},
+ {{ 19520/*0.595699 Q15*/, 26320/*0.803208 Q15*/}},
+ {{ 12910/*0.393992 Q15*/, 30118/*0.919114 Q15*/}},
+ {{ 5602/*0.170962 Q15*/, 32286/*0.985278 Q15*/}},
+ {{ -2009/*-0.061321 Q15*/, 32706/*0.998118 Q15*/}},
+ {{ -9512/*-0.290285 Q15*/, 31357/*0.956940 Q15*/}},
+ {{-16500/*-0.503538 Q15*/, 28311/*0.863973 Q15*/}},
+ {{-22595/*-0.689541 Q15*/, 23732/*0.724247 Q15*/}},
+ {{-27467/*-0.838225 Q15*/, 17869/*0.545325 Q15*/}},
+ {{-30853/*-0.941544 Q15*/, 11039/*0.336890 Q15*/}},
+ {{-32568/*-0.993907 Q15*/, 3612/*0.110222 Q15*/}},
+ {{-32522/*-0.992480 Q15*/, -4011/*-0.122411 Q15*/}},
+ {{-30715/*-0.937339 Q15*/, -11417/*-0.348419 Q15*/}},
+ {{-27246/*-0.831470 Q15*/, -18205/*-0.555570 Q15*/}},
+ {{-22302/*-0.680601 Q15*/, -24008/*-0.732654 Q15*/}},
+ {{-16151/*-0.492898 Q15*/, -28511/*-0.870087 Q15*/}},
+ {{ -9127/*-0.278520 Q15*/, -31471/*-0.960431 Q15*/}},
+ {{ -1608/*-0.049068 Q15*/, -32729/*-0.998795 Q15*/}},
+ {{ 5998/*0.183040 Q15*/, -32214/*-0.983105 Q15*/}},
+ {{ 13279/*0.405241 Q15*/, -29957/*-0.914210 Q15*/}},
+ {{ 19841/*0.605511 Q15*/, -26078/*-0.795837 Q15*/}},
+ {{ 25330/*0.773010 Q15*/, -20788/*-0.634393 Q15*/}},
+ {{ 29448/*0.898674 Q15*/, -14373/*-0.438616 Q15*/}},
+ {{ 31972/*0.975702 Q15*/, -7180/*-0.219101 Q15*/}},
+ {{ 32766/*0.999925 Q15*/, 402/*0.012272 Q15*/}},
+ {{ 31786/*0.970031 Q15*/, 7962/*0.242980 Q15*/}},
+ {{ 29086/*0.887640 Q15*/, 15091/*0.460539 Q15*/}},
+ {{ 24812/*0.757209 Q15*/, 21403/*0.653173 Q15*/}},
+ {{ 19195/*0.585798 Q15*/, 26557/*0.810457 Q15*/}},
+ {{ 12540/*0.382683 Q15*/, 30274/*0.923880 Q15*/}},
+ {{ 5205/*0.158858 Q15*/, 32352/*0.987301 Q15*/}},
+ {{ -2411/*-0.073565 Q15*/, 32679/*0.997290 Q15*/}},
+ {{ -9896/*-0.302006 Q15*/, 31238/*0.953306 Q15*/}},
+ {{-16846/*-0.514103 Q15*/, 28106/*0.857729 Q15*/}},
+ {{-22884/*-0.698376 Q15*/, 23453/*0.715731 Q15*/}},
+ {{-27684/*-0.844854 Q15*/, 17531/*0.534998 Q15*/}},
+ {{-30986/*-0.945607 Q15*/, 10660/*0.325310 Q15*/}},
+ {{-32610/*-0.995185 Q15*/, 3212/*0.098017 Q15*/}},
+ {{-32470/*-0.990903 Q15*/, -4410/*-0.134581 Q15*/}},
+ {{-30572/*-0.932993 Q15*/, -11793/*-0.359895 Q15*/}},
+ {{-27020/*-0.824589 Q15*/, -18538/*-0.565732 Q15*/}},
+ {{-22006/*-0.671559 Q15*/, -24279/*-0.740951 Q15*/}},
+ {{-15800/*-0.482184 Q15*/, -28707/*-0.876070 Q15*/}},
+ {{ -8740/*-0.266713 Q15*/, -31581/*-0.963776 Q15*/}},
+ {{ -1206/*-0.036807 Q15*/, -32746/*-0.999322 Q15*/}},
+ {{ 6393/*0.195090 Q15*/, -32138/*-0.980785 Q15*/}},
+ {{ 13646/*0.416430 Q15*/, -29792/*-0.909168 Q15*/}},
+ {{ 20160/*0.615232 Q15*/, -25833/*-0.788346 Q15*/}},
+ {{ 25583/*0.780737 Q15*/, -20475/*-0.624859 Q15*/}},
+ {{ 29622/*0.903989 Q15*/, -14010/*-0.427555 Q15*/}},
+ {{ 32057/*0.978317 Q15*/, -6787/*-0.207111 Q15*/}},
+ {{ 32758/*0.999699 Q15*/, 804/*0.024541 Q15*/}},
+ {{ 31686/*0.966976 Q15*/, 8351/*0.254866 Q15*/}},
+ {{ 28899/*0.881921 Q15*/, 15447/*0.471397 Q15*/}},
+ {{ 24548/*0.749136 Q15*/, 21706/*0.662416 Q15*/}},
+ {{ 18868/*0.575808 Q15*/, 26791/*0.817585 Q15*/}},
+ {{ 12167/*0.371317 Q15*/, 30425/*0.928506 Q15*/}},
+ {{ 4808/*0.146730 Q15*/, 32413/*0.989177 Q15*/}},
+ {{ -2811/*-0.085797 Q15*/, 32647/*0.996313 Q15*/}},
+ {{-10279/*-0.313682 Q15*/, 31114/*0.949528 Q15*/}},
+ {{-17190/*-0.524590 Q15*/, 27897/*0.851355 Q15*/}},
+ {{-23170/*-0.707107 Q15*/, 23170/*0.707107 Q15*/}},
+ {{-27897/*-0.851355 Q15*/, 17190/*0.524590 Q15*/}},
+ {{-31114/*-0.949528 Q15*/, 10279/*0.313682 Q15*/}},
+ {{-32647/*-0.996313 Q15*/, 2811/*0.085797 Q15*/}},
+ {{-32413/*-0.989177 Q15*/, -4808/*-0.146730 Q15*/}},
+ {{-30425/*-0.928506 Q15*/, -12167/*-0.371317 Q15*/}},
+ {{-26791/*-0.817585 Q15*/, -18868/*-0.575808 Q15*/}},
+ {{-21706/*-0.662416 Q15*/, -24548/*-0.749136 Q15*/}},
+ {{-15447/*-0.471397 Q15*/, -28899/*-0.881921 Q15*/}},
+ {{ -8351/*-0.254866 Q15*/, -31686/*-0.966976 Q15*/}},
+ {{ -804/*-0.024541 Q15*/, -32758/*-0.999699 Q15*/}},
+ {{ 6787/*0.207111 Q15*/, -32057/*-0.978317 Q15*/}},
+ {{ 14010/*0.427555 Q15*/, -29622/*-0.903989 Q15*/}},
+ {{ 20475/*0.624859 Q15*/, -25583/*-0.780737 Q15*/}},
+ {{ 25833/*0.788346 Q15*/, -20160/*-0.615232 Q15*/}},
+ {{ 29792/*0.909168 Q15*/, -13646/*-0.416430 Q15*/}},
+ {{ 32138/*0.980785 Q15*/, -6393/*-0.195090 Q15*/}},
+ {{ 32746/*0.999322 Q15*/, 1206/*0.036807 Q15*/}},
+ {{ 31581/*0.963776 Q15*/, 8740/*0.266713 Q15*/}},
+ {{ 28707/*0.876070 Q15*/, 15800/*0.482184 Q15*/}},
+ {{ 24279/*0.740951 Q15*/, 22006/*0.671559 Q15*/}},
+ {{ 18538/*0.565732 Q15*/, 27020/*0.824589 Q15*/}},
+ {{ 11793/*0.359895 Q15*/, 30572/*0.932993 Q15*/}},
+ {{ 4410/*0.134581 Q15*/, 32470/*0.990903 Q15*/}},
+ {{ -3212/*-0.098017 Q15*/, 32610/*0.995185 Q15*/}},
+ {{-10660/*-0.325310 Q15*/, 30986/*0.945607 Q15*/}},
+ {{-17531/*-0.534998 Q15*/, 27684/*0.844854 Q15*/}},
+ {{-23453/*-0.715731 Q15*/, 22884/*0.698376 Q15*/}},
+ {{-28106/*-0.857729 Q15*/, 16846/*0.514103 Q15*/}},
+ {{-31238/*-0.953306 Q15*/, 9896/*0.302006 Q15*/}},
+ {{-32679/*-0.997290 Q15*/, 2411/*0.073565 Q15*/}},
+ {{-32352/*-0.987301 Q15*/, -5205/*-0.158858 Q15*/}},
+ {{-30274/*-0.923880 Q15*/, -12540/*-0.382683 Q15*/}},
+ {{-26557/*-0.810457 Q15*/, -19195/*-0.585798 Q15*/}},
+ {{-21403/*-0.653173 Q15*/, -24812/*-0.757209 Q15*/}},
+ {{-15091/*-0.460539 Q15*/, -29086/*-0.887640 Q15*/}},
+ {{ -7962/*-0.242980 Q15*/, -31786/*-0.970031 Q15*/}},
+ {{ -402/*-0.012272 Q15*/, -32766/*-0.999925 Q15*/}},
+ {{ 7180/*0.219101 Q15*/, -31972/*-0.975702 Q15*/}},
+ {{ 14373/*0.438616 Q15*/, -29448/*-0.898674 Q15*/}},
+ {{ 20788/*0.634393 Q15*/, -25330/*-0.773010 Q15*/}},
+ {{ 26078/*0.795837 Q15*/, -19841/*-0.605511 Q15*/}},
+ {{ 29957/*0.914210 Q15*/, -13279/*-0.405241 Q15*/}},
+ {{ 32214/*0.983105 Q15*/, -5998/*-0.183040 Q15*/}},
+ {{ 32729/*0.998795 Q15*/, 1608/*0.049068 Q15*/}},
+ {{ 31471/*0.960431 Q15*/, 9127/*0.278520 Q15*/}},
+ {{ 28511/*0.870087 Q15*/, 16151/*0.492898 Q15*/}},
+ {{ 24008/*0.732654 Q15*/, 22302/*0.680601 Q15*/}},
+ {{ 18205/*0.555570 Q15*/, 27246/*0.831470 Q15*/}},
+ {{ 11417/*0.348419 Q15*/, 30715/*0.937339 Q15*/}},
+ {{ 4011/*0.122411 Q15*/, 32522/*0.992480 Q15*/}},
+ {{ -3612/*-0.110222 Q15*/, 32568/*0.993907 Q15*/}},
+ {{-11039/*-0.336890 Q15*/, 30853/*0.941544 Q15*/}},
+ {{-17869/*-0.545325 Q15*/, 27467/*0.838225 Q15*/}},
+ {{-23732/*-0.724247 Q15*/, 22595/*0.689541 Q15*/}},
+ {{-28311/*-0.863973 Q15*/, 16500/*0.503538 Q15*/}},
+ {{-31357/*-0.956940 Q15*/, 9512/*0.290285 Q15*/}},
+ {{-32706/*-0.998118 Q15*/, 2009/*0.061321 Q15*/}},
+ {{-32286/*-0.985278 Q15*/, -5602/*-0.170962 Q15*/}},
+ {{-30118/*-0.919114 Q15*/, -12910/*-0.393992 Q15*/}},
+ {{-26320/*-0.803208 Q15*/, -19520/*-0.595699 Q15*/}},
+ {{-21097/*-0.643832 Q15*/, -25073/*-0.765167 Q15*/}},
+ {{-14733/*-0.449611 Q15*/, -29269/*-0.893224 Q15*/}},
+ {{ -7571/*-0.231058 Q15*/, -31881/*-0.972940 Q15*/}}
+};
+
+const PWord16 w18N[127] =
+{
+ {{ 31972/*0.975702 Q15*/, 7180/*0.219101 Q15*/}},
+ {{ 29622/*0.903989 Q15*/, 14010/*0.427555 Q15*/}},
+ {{ 25833/*0.788346 Q15*/, 20160/*0.615232 Q15*/}},
+ {{ 20788/*0.634393 Q15*/, 25330/*0.773010 Q15*/}},
+ {{ 14733/*0.449611 Q15*/, 29269/*0.893224 Q15*/}},
+ {{ 7962/*0.242980 Q15*/, 31786/*0.970031 Q15*/}},
+ {{ 804/*0.024541 Q15*/, 32758/*0.999699 Q15*/}},
+ {{ -6393/*-0.195090 Q15*/, 32138/*0.980785 Q15*/}},
+ {{-13279/*-0.405241 Q15*/, 29957/*0.914210 Q15*/}},
+ {{-19520/*-0.595699 Q15*/, 26320/*0.803208 Q15*/}},
+ {{-24812/*-0.757209 Q15*/, 21403/*0.653173 Q15*/}},
+ {{-28899/*-0.881921 Q15*/, 15447/*0.471397 Q15*/}},
+ {{-31581/*-0.963776 Q15*/, 8740/*0.266713 Q15*/}},
+ {{-32729/*-0.998795 Q15*/, 1608/*0.049068 Q15*/}},
+ {{-32286/*-0.985278 Q15*/, -5602/*-0.170962 Q15*/}},
+ {{-30274/*-0.923880 Q15*/, -12540/*-0.382683 Q15*/}},
+ {{-26791/*-0.817585 Q15*/, -18868/*-0.575808 Q15*/}},
+ {{-22006/*-0.671559 Q15*/, -24279/*-0.740951 Q15*/}},
+ {{-16151/*-0.492898 Q15*/, -28511/*-0.870087 Q15*/}},
+ {{ -9512/*-0.290285 Q15*/, -31357/*-0.956940 Q15*/}},
+ {{ -2411/*-0.073565 Q15*/, -32679/*-0.997290 Q15*/}},
+ {{ 4808/*0.146730 Q15*/, -32413/*-0.989177 Q15*/}},
+ {{ 11793/*0.359895 Q15*/, -30572/*-0.932993 Q15*/}},
+ {{ 18205/*0.555570 Q15*/, -27246/*-0.831470 Q15*/}},
+ {{ 23732/*0.724247 Q15*/, -22595/*-0.689541 Q15*/}},
+ {{ 28106/*0.857729 Q15*/, -16846/*-0.514103 Q15*/}},
+ {{ 31114/*0.949528 Q15*/, -10279/*-0.313682 Q15*/}},
+ {{ 32610/*0.995185 Q15*/, -3212/*-0.098017 Q15*/}},
+ {{ 32522/*0.992480 Q15*/, 4011/*0.122411 Q15*/}},
+ {{ 30853/*0.941544 Q15*/, 11039/*0.336890 Q15*/}},
+ {{ 27684/*0.844854 Q15*/, 17531/*0.534998 Q15*/}},
+ {{ 23170/*0.707107 Q15*/, 23170/*0.707107 Q15*/}},
+ {{ 17531/*0.534998 Q15*/, 27684/*0.844854 Q15*/}},
+ {{ 11039/*0.336890 Q15*/, 30853/*0.941544 Q15*/}},
+ {{ 4011/*0.122411 Q15*/, 32522/*0.992480 Q15*/}},
+ {{ -3212/*-0.098017 Q15*/, 32610/*0.995185 Q15*/}},
+ {{-10279/*-0.313682 Q15*/, 31114/*0.949528 Q15*/}},
+ {{-16846/*-0.514103 Q15*/, 28106/*0.857729 Q15*/}},
+ {{-22595/*-0.689541 Q15*/, 23732/*0.724247 Q15*/}},
+ {{-27246/*-0.831470 Q15*/, 18205/*0.555570 Q15*/}},
+ {{-30572/*-0.932993 Q15*/, 11793/*0.359895 Q15*/}},
+ {{-32413/*-0.989177 Q15*/, 4808/*0.146730 Q15*/}},
+ {{-32679/*-0.997290 Q15*/, -2411/*-0.073565 Q15*/}},
+ {{-31357/*-0.956940 Q15*/, -9512/*-0.290285 Q15*/}},
+ {{-28511/*-0.870087 Q15*/, -16151/*-0.492898 Q15*/}},
+ {{-24279/*-0.740951 Q15*/, -22006/*-0.671559 Q15*/}},
+ {{-18868/*-0.575808 Q15*/, -26791/*-0.817585 Q15*/}},
+ {{-12540/*-0.382683 Q15*/, -30274/*-0.923880 Q15*/}},
+ {{ -5602/*-0.170962 Q15*/, -32286/*-0.985278 Q15*/}},
+ {{ 1608/*0.049068 Q15*/, -32729/*-0.998795 Q15*/}},
+ {{ 8740/*0.266713 Q15*/, -31581/*-0.963776 Q15*/}},
+ {{ 15447/*0.471397 Q15*/, -28899/*-0.881921 Q15*/}},
+ {{ 21403/*0.653173 Q15*/, -24812/*-0.757209 Q15*/}},
+ {{ 26320/*0.803208 Q15*/, -19520/*-0.595699 Q15*/}},
+ {{ 29957/*0.914210 Q15*/, -13279/*-0.405241 Q15*/}},
+ {{ 32138/*0.980785 Q15*/, -6393/*-0.195090 Q15*/}},
+ {{ 32758/*0.999699 Q15*/, 804/*0.024541 Q15*/}},
+ {{ 31786/*0.970031 Q15*/, 7962/*0.242980 Q15*/}},
+ {{ 29269/*0.893224 Q15*/, 14733/*0.449611 Q15*/}},
+ {{ 25330/*0.773010 Q15*/, 20788/*0.634393 Q15*/}},
+ {{ 20160/*0.615232 Q15*/, 25833/*0.788346 Q15*/}},
+ {{ 14010/*0.427555 Q15*/, 29622/*0.903989 Q15*/}},
+ {{ 7180/*0.219101 Q15*/, 31972/*0.975702 Q15*/}},
+ {{ 0/*0.000000 Q15*/, 32767/*1.000000 Q15*/}},
+ {{ -7180/*-0.219101 Q15*/, 31972/*0.975702 Q15*/}},
+ {{-14010/*-0.427555 Q15*/, 29622/*0.903989 Q15*/}},
+ {{-20160/*-0.615232 Q15*/, 25833/*0.788346 Q15*/}},
+ {{-25330/*-0.773010 Q15*/, 20788/*0.634393 Q15*/}},
+ {{-29269/*-0.893224 Q15*/, 14733/*0.449611 Q15*/}},
+ {{-31786/*-0.970031 Q15*/, 7962/*0.242980 Q15*/}},
+ {{-32758/*-0.999699 Q15*/, 804/*0.024541 Q15*/}},
+ {{-32138/*-0.980785 Q15*/, -6393/*-0.195090 Q15*/}},
+ {{-29957/*-0.914210 Q15*/, -13279/*-0.405241 Q15*/}},
+ {{-26320/*-0.803208 Q15*/, -19520/*-0.595699 Q15*/}},
+ {{-21403/*-0.653173 Q15*/, -24812/*-0.757209 Q15*/}},
+ {{-15447/*-0.471397 Q15*/, -28899/*-0.881921 Q15*/}},
+ {{ -8740/*-0.266713 Q15*/, -31581/*-0.963776 Q15*/}},
+ {{ -1608/*-0.049068 Q15*/, -32729/*-0.998795 Q15*/}},
+ {{ 5602/*0.170962 Q15*/, -32286/*-0.985278 Q15*/}},
+ {{ 12540/*0.382683 Q15*/, -30274/*-0.923880 Q15*/}},
+ {{ 18868/*0.575808 Q15*/, -26791/*-0.817585 Q15*/}},
+ {{ 24279/*0.740951 Q15*/, -22006/*-0.671559 Q15*/}},
+ {{ 28511/*0.870087 Q15*/, -16151/*-0.492898 Q15*/}},
+ {{ 31357/*0.956940 Q15*/, -9512/*-0.290285 Q15*/}},
+ {{ 32679/*0.997290 Q15*/, -2411/*-0.073565 Q15*/}},
+ {{ 32413/*0.989177 Q15*/, 4808/*0.146730 Q15*/}},
+ {{ 30572/*0.932993 Q15*/, 11793/*0.359895 Q15*/}},
+ {{ 27246/*0.831470 Q15*/, 18205/*0.555570 Q15*/}},
+ {{ 22595/*0.689541 Q15*/, 23732/*0.724247 Q15*/}},
+ {{ 16846/*0.514103 Q15*/, 28106/*0.857729 Q15*/}},
+ {{ 10279/*0.313682 Q15*/, 31114/*0.949528 Q15*/}},
+ {{ 3212/*0.098017 Q15*/, 32610/*0.995185 Q15*/}},
+ {{ -4011/*-0.122411 Q15*/, 32522/*0.992480 Q15*/}},
+ {{-11039/*-0.336890 Q15*/, 30853/*0.941544 Q15*/}},
+ {{-17531/*-0.534998 Q15*/, 27684/*0.844854 Q15*/}},
+ {{-23170/*-0.707107 Q15*/, 23170/*0.707107 Q15*/}},
+ {{-27684/*-0.844854 Q15*/, 17531/*0.534998 Q15*/}},
+ {{-30853/*-0.941544 Q15*/, 11039/*0.336890 Q15*/}},
+ {{-32522/*-0.992480 Q15*/, 4011/*0.122411 Q15*/}},
+ {{-32610/*-0.995185 Q15*/, -3212/*-0.098017 Q15*/}},
+ {{-31114/*-0.949528 Q15*/, -10279/*-0.313682 Q15*/}},
+ {{-28106/*-0.857729 Q15*/, -16846/*-0.514103 Q15*/}},
+ {{-23732/*-0.724247 Q15*/, -22595/*-0.689541 Q15*/}},
+ {{-18205/*-0.555570 Q15*/, -27246/*-0.831470 Q15*/}},
+ {{-11793/*-0.359895 Q15*/, -30572/*-0.932993 Q15*/}},
+ {{ -4808/*-0.146730 Q15*/, -32413/*-0.989177 Q15*/}},
+ {{ 2411/*0.073565 Q15*/, -32679/*-0.997290 Q15*/}},
+ {{ 9512/*0.290285 Q15*/, -31357/*-0.956940 Q15*/}},
+ {{ 16151/*0.492898 Q15*/, -28511/*-0.870087 Q15*/}},
+ {{ 22006/*0.671559 Q15*/, -24279/*-0.740951 Q15*/}},
+ {{ 26791/*0.817585 Q15*/, -18868/*-0.575808 Q15*/}},
+ {{ 30274/*0.923880 Q15*/, -12540/*-0.382683 Q15*/}},
+ {{ 32286/*0.985278 Q15*/, -5602/*-0.170962 Q15*/}},
+ {{ 32729/*0.998795 Q15*/, 1608/*0.049068 Q15*/}},
+ {{ 31581/*0.963776 Q15*/, 8740/*0.266713 Q15*/}},
+ {{ 28899/*0.881921 Q15*/, 15447/*0.471397 Q15*/}},
+ {{ 24812/*0.757209 Q15*/, 21403/*0.653173 Q15*/}},
+ {{ 19520/*0.595699 Q15*/, 26320/*0.803208 Q15*/}},
+ {{ 13279/*0.405241 Q15*/, 29957/*0.914210 Q15*/}},
+ {{ 6393/*0.195090 Q15*/, 32138/*0.980785 Q15*/}},
+ {{ -804/*-0.024541 Q15*/, 32758/*0.999699 Q15*/}},
+ {{ -7962/*-0.242980 Q15*/, 31786/*0.970031 Q15*/}},
+ {{-14733/*-0.449611 Q15*/, 29269/*0.893224 Q15*/}},
+ {{-20788/*-0.634393 Q15*/, 25330/*0.773010 Q15*/}},
+ {{-25833/*-0.788346 Q15*/, 20160/*0.615232 Q15*/}},
+ {{-29622/*-0.903989 Q15*/, 14010/*0.427555 Q15*/}},
+ {{-31972/*-0.975702 Q15*/, 7180/*0.219101 Q15*/}}
+};
+
+/*-------------------------------------------------------------------*
+ * 1/4 resolution interpolation filter (-3 dB at 0.791*fs/2)
+ * for fractional pitch search
+ * Used in lib_enc\pit_enc.c Q14
+ *-------------------------------------------------------------------*/
+const Word16 inter4_1_fx[32] =//Q14
+{
+ -12, -26, 32, 206,
+ 420, 455, 73, -766,
+ -1732, -2142,-1242, 1376,
+ 5429, 9910,13418,14746,
+ 13418, 9910, 5429, 1376,
+ -1242, -2142,-1732, -766,
+ 73, 455, 420, 206,
+ 32, -26, -12, 0
+};
+
+const Word16 sin_switch_8[15] = { 3212, 6393, 9512, 12540, 15447, 18205, 20788, 23170,
+ 25330, 27246, 28899, 30274, 31357, 32138, 32610
+};//Q15
+
+const Word16 sin_switch_16[30] = { 1660, 3315, 4962, 6596, 8213, 9810, 11380, 12922,
+ 14431, 15902, 17333, 18719, 20057, 21344, 22576, 23750,
+ 24863, 25912, 26895, 27808, 28651, 29419, 30112, 30728,
+ 31265, 31722, 32097, 32390, 32600, 32726
+};//Q15
+
+
+const Word16 sin_switch_32[60] = { 844, 1687, 2529, 3369, 4207, 5043, 5875, 6703,
+ 7526, 8345, 9158, 9965, 10766, 11559, 12345, 13122,
+ 13891, 14650, 15400, 16140, 16869, 17586, 18293, 18986,
+ 19668, 20336, 20991, 21632, 22258, 22870, 23467, 24048,
+ 24613, 25162, 25694, 26209, 26707, 27187, 27649, 28092,
+ 28518, 28924, 29311, 29678, 30026, 30354, 30662, 30949,
+ 31216, 31462, 31688, 31892, 32075, 32237, 32378, 32497,
+ 32594, 32670, 32725, 32757
+};//Q15
+
+
+const Word16 sin_switch_48[90] = { 566, 1131, 1696, 2261, 2825, 3388, 3950, 4511,
+ 5070, 5628, 6185, 6739, 7292, 7842, 8390, 8935,
+ 9478, 10018, 10555, 11089, 11620, 12147, 12670, 13190,
+ 13706, 14218, 14725, 15228, 15727, 16220, 16709, 17194,
+ 17672, 18146, 18614, 19077, 19534, 19985, 20431, 20870,
+ 21303, 21729, 22149, 22563, 22970, 23370, 23763, 24148,
+ 24527, 24899, 25263, 25619, 25968, 26309, 26642, 26968,
+ 27285, 27594, 27895, 28188, 28472, 28747, 29015, 29273,
+ 29523, 29764, 29996, 30219, 30433, 30639, 30835, 31021,
+ 31199, 31367, 31526, 31676, 31816, 31946, 32068, 32179,
+ 32281, 32373, 32456, 32529, 32592, 32646, 32690, 32724,
+ 32748, 32763
+};//Q15
+
+const Word16 one_on_win_48k_fx[210] =
+{
+ 16399, 16412, 16425, 16439, 16452, 16465, 16479, 16492,
+ 16506, 16519, 16533, 16547, 16561, 16575, 16589, 16603,
+ 16618, 16632, 16647, 16662, 16677, 16692, 16707, 16722,
+ 16738, 16754, 16770, 16786, 16802, 16818, 16835, 16851,
+ 16868, 16885, 16902, 16919, 16937, 16955, 16972, 16990,
+ 17008, 17027, 17045, 17064, 17083, 17102, 17121, 17140,
+ 17160, 17180, 17200, 17220, 17240, 17261, 17281, 17302,
+ 17323, 17345, 17366, 17388, 17410, 17432, 17454, 17477,
+ 17499, 17522, 17545, 17569, 17592, 17616, 17640, 17664,
+ 17689, 17713, 17738, 17763, 17789, 17814, 17840, 17866,
+ 17892, 17918, 17945, 17972, 17999, 18027, 18054, 18082,
+ 18110, 18139, 18167, 18196, 18225, 18255, 18284, 18314,
+ 18345, 18375, 18406, 18437, 18468, 18499, 18531, 18563,
+ 18596, 18628, 18661, 18695, 18728, 18762, 18796, 18830,
+ 18865, 18900, 18935, 18971, 19007, 19043, 19080, 19117,
+ 19154, 19191, 19229, 19267, 19306, 19345, 19384, 19423,
+ 19463, 19504, 19544, 19585, 19626, 19668, 19710, 19752,
+ 19795, 19838, 19882, 19926, 19970, 20015, 20060, 20105,
+ 20151, 20198, 20244, 20291, 20339, 20387, 20435, 20484,
+ 20533, 20583, 20633, 20684, 20735, 20787, 20839, 20891,
+ 20944, 20997, 21051, 21106, 21161, 21216, 21272, 21328,
+ 21385, 21443, 21501, 21559, 21618, 21678, 21738, 21799,
+ 21860, 21922, 21984, 22048, 22111, 22175, 22240, 22306,
+ 22372, 22439, 22506, 22574, 22643, 22712, 22782, 22853,
+ 22924, 22996, 23069, 23142, 23216, 23291, 23367, 23443,
+ 23521, 23599, 23677, 23757, 23837, 23918, 24000, 24083,
+ 24167, 24251
+};//Q14
+
+const Word16 one_on_win_8k_16k_48k_fx[70] =
+{
+ 16432, 16472, 16512, 16554, 16596, 16639, 16684, 16730,
+ 16778, 16826, 16876, 16928, 16981, 17036, 17092, 17150,
+ 17210, 17271, 17334, 17399, 17465, 17534, 17604, 17676,
+ 17751, 17827, 17905, 17986, 18068, 18153, 18240, 18329,
+ 18421, 18515, 18612, 18711, 18813, 18918, 19025, 19135,
+ 19248, 19364, 19483, 19606, 19731, 19860, 19992, 20128,
+ 20268, 20411, 20558, 20709, 20865, 21024, 21188, 21357,
+ 21530, 21708, 21891, 22079, 22273, 22472, 22677, 22888,
+ 23105, 23329, 23560, 23797, 24041, 24251
+};//Q14
+
+const Word16 window_8_16_32kHz_fx[370] =
+{
+ 3, 9, 19, 33, 49, 69, 93, 119,
+ 149, 182, 219, 258, 301, 347, 396, 448,
+ 503, 561, 623, 687, 755, 825, 898, 974,
+ 1054, 1136, 1221, 1309, 1399, 1493, 1589, 1688,
+ 1790, 1895, 2002, 2112, 2225, 2340, 2458, 2579,
+ 2702, 2827, 2955, 3086, 3219, 3355, 3493, 3633,
+ 3775, 3920, 4068, 4217, 4369, 4523, 4679, 4837,
+ 4998, 5160, 5325, 5491, 5660, 5830, 6003, 6177,
+ 6353, 6531, 6711, 6892, 7076, 7260, 7447, 7635,
+ 7825, 8016, 8209, 8403, 8599, 8796, 8995, 9195,
+ 9396, 9598, 9802, 10007, 10212, 10419, 10628, 10837,
+ 11047, 11248, 11437, 11623, 11809, 11997, 12185, 12374,
+ 12564, 12754, 12944, 13135, 13326, 13517, 13709, 13901,
+ 14093, 14286, 14478, 14671, 14864, 15057, 15250, 15443,
+ 15636, 15829, 16023, 16216, 16409, 16602, 16794, 16987,
+ 17179, 17372, 17564, 17755, 17947, 18138, 18329, 18519,
+ 18710, 18899, 19089, 19278, 19466, 19654, 19841, 20028,
+ 20214, 20400, 20585, 20770, 20954, 21137, 21319, 21501,
+ 21682, 21862, 22042, 22220, 22398, 22575, 22751, 22926,
+ 23101, 23274, 23446, 23618, 23788, 23958, 24126, 24266,
+ 24321, 24460, 24625, 24789, 24953, 25114, 25275, 25435,
+ 25593, 25751, 25907, 26061, 26215, 26367, 26518, 26668,
+ 26817, 26964, 27110, 27254, 27398, 27540, 27680, 27819,
+ 27957, 28093, 28228, 28362, 28494, 28625, 28754, 28882,
+ 29008, 29133, 29256, 29378, 29499, 29618, 29736, 29852,
+ 29966, 30079, 30191, 30301, 30410, 30517, 30623, 30727,
+ 30830, 30931, 31031, 31129, 31226, 31322, 31416, 31508,
+ 31599, 31689, 31777, 31864, 31950, 32035, 32118, 32200,
+ 32280, 32360, 32439, 32517, 32595, 32673, 32673, 32593,
+ 32513, 32432, 32349, 32265, 32178, 32090, 31999, 31907,
+ 31812, 31715, 31615, 31514, 31410, 31304, 31196, 31085,
+ 30972, 30857, 30739, 30619, 30497, 30372, 30245, 30116,
+ 29984, 29850, 29714, 29575, 29434, 29290, 29144, 28996,
+ 28845, 28692, 28537, 28379, 28219, 28057, 27892, 27725,
+ 27555, 27383, 27209, 27033, 26854, 26672, 26489, 26303,
+ 26115, 25924, 25731, 25536, 25338, 25138, 24936, 24731,
+ 24525, 24316, 24104, 23890, 23674, 23456, 23236, 23013,
+ 22788, 22561, 22331, 22138, 22060, 21865, 21629, 21390,
+ 21150, 20907, 20662, 20414, 20165, 19913, 19659, 19403,
+ 19145, 18885, 18622, 18357, 18090, 17821, 17550, 17277,
+ 17001, 16723, 16443, 16161, 15877, 15591, 15303, 15012,
+ 14719, 14425, 14127, 13828, 13527, 13223, 12918, 12610,
+ 12300, 11988, 11673, 11356, 11038, 10716, 10393, 10067,
+ 9739, 9408, 9076, 8740, 8403, 8062, 7720, 7374,
+ 7026, 6675, 6322, 5965, 5606, 5243, 4878, 4508,
+ 4136, 3759, 3378, 2993, 2603, 2208, 1807, 1397,
+ 978, 545
+};//Q15
+
+const Word16 window_48kHz_fx[1110] =
+{
+ 0, 1, 2, 3, 5, 8, 10, 13,
+ 17, 21, 25, 30, 35, 40, 46, 52,
+ 58, 65, 72, 80, 88, 96, 105, 114,
+ 124, 133, 144, 154, 165, 176, 188, 200,
+ 212, 225, 238, 251, 265, 279, 293, 308,
+ 323, 339, 354, 371, 387, 404, 421, 439,
+ 457, 475, 493, 512, 532, 551, 571, 591,
+ 612, 633, 654, 676, 698, 720, 743, 766,
+ 789, 813, 837, 861, 885, 910, 936, 961,
+ 987, 1013, 1040, 1067, 1094, 1122, 1149, 1178,
+ 1206, 1235, 1264, 1293, 1323, 1353, 1384, 1414,
+ 1445, 1477, 1508, 1540, 1573, 1605, 1638, 1671,
+ 1705, 1739, 1773, 1807, 1842, 1877, 1912, 1948,
+ 1984, 2020, 2057, 2093, 2130, 2168, 2206, 2244,
+ 2282, 2320, 2359, 2399, 2438, 2478, 2518, 2558,
+ 2599, 2640, 2681, 2722, 2764, 2806, 2848, 2891,
+ 2934, 2977, 3020, 3064, 3108, 3152, 3196, 3241,
+ 3286, 3332, 3377, 3423, 3469, 3515, 3562, 3609,
+ 3656, 3704, 3751, 3799, 3847, 3896, 3945, 3994,
+ 4043, 4092, 4142, 4192, 4242, 4293, 4343, 4394,
+ 4445, 4497, 4549, 4600, 4653, 4705, 4758, 4811,
+ 4864, 4917, 4971, 5024, 5078, 5133, 5187, 5242,
+ 5297, 5352, 5407, 5463, 5519, 5575, 5631, 5688,
+ 5744, 5801, 5859, 5916, 5974, 6031, 6089, 6147,
+ 6206, 6265, 6323, 6382, 6442, 6501, 6561, 6620,
+ 6680, 6741, 6801, 6862, 6922, 6983, 7045, 7106,
+ 7168, 7229, 7291, 7353, 7416, 7478, 7541, 7604,
+ 7667, 7730, 7793, 7857, 7920, 7984, 8048, 8112,
+ 8177, 8241, 8306, 8371, 8436, 8501, 8566, 8632,
+ 8697, 8763, 8829, 8895, 8961, 9028, 9094, 9161,
+ 9228, 9295, 9362, 9429, 9497, 9564, 9632, 9700,
+ 9768, 9836, 9904, 9972, 10041, 10109, 10178, 10247,
+ 10316, 10385, 10454, 10523, 10593, 10662, 10732, 10802,
+ 10871, 10941, 11012, 11082, 11152, 11222, 11283, 11344,
+ 11406, 11467, 11529, 11591, 11653, 11716, 11778, 11840,
+ 11903, 11966, 12028, 12091, 12154, 12217, 12280, 12343,
+ 12406, 12469, 12532, 12595, 12658, 12722, 12785, 12849,
+ 12912, 12976, 13039, 13103, 13166, 13230, 13294, 13358,
+ 13421, 13485, 13549, 13613, 13677, 13741, 13805, 13869,
+ 13933, 13997, 14061, 14125, 14189, 14253, 14318, 14382,
+ 14446, 14510, 14574, 14639, 14703, 14767, 14832, 14896,
+ 14960, 15025, 15089, 15153, 15218, 15282, 15346, 15411,
+ 15475, 15540, 15604, 15668, 15733, 15797, 15862, 15926,
+ 15990, 16055, 16119, 16183, 16248, 16312, 16376, 16441,
+ 16505, 16569, 16634, 16698, 16762, 16826, 16891, 16955,
+ 17019, 17083, 17147, 17211, 17275, 17339, 17404, 17468,
+ 17532, 17596, 17659, 17723, 17787, 17851, 17915, 17979,
+ 18042, 18106, 18170, 18233, 18297, 18361, 18424, 18488,
+ 18551, 18614, 18678, 18741, 18804, 18868, 18931, 18994,
+ 19057, 19120, 19183, 19246, 19309, 19372, 19434, 19497,
+ 19560, 19622, 19685, 19748, 19810, 19872, 19935, 19997,
+ 20059, 20121, 20183, 20245, 20307, 20369, 20431, 20493,
+ 20554, 20616, 20677, 20739, 20800, 20862, 20923, 20984,
+ 21045, 21106, 21167, 21228, 21289, 21349, 21410, 21471,
+ 21531, 21591, 21652, 21712, 21772, 21832, 21892, 21952,
+ 22012, 22071, 22131, 22190, 22250, 22309, 22368, 22427,
+ 22486, 22545, 22604, 22663, 22722, 22780, 22839, 22897,
+ 22955, 23013, 23071, 23129, 23187, 23245, 23303, 23360,
+ 23418, 23475, 23532, 23589, 23646, 23703, 23760, 23817,
+ 23873, 23930, 23986, 24042, 24098, 24154, 24210, 24266,
+ 24321, 24377, 24432, 24488, 24543, 24598, 24653, 24707,
+ 24762, 24817, 24871, 24925, 24979, 25034, 25087, 25141,
+ 25195, 25248, 25302, 25355, 25408, 25461, 25514, 25567,
+ 25620, 25672, 25724, 25777, 25829, 25881, 25932, 25984,
+ 26036, 26087, 26138, 26189, 26240, 26291, 26342, 26393,
+ 26443, 26493, 26543, 26593, 26643, 26693, 26743, 26792,
+ 26841, 26890, 26939, 26988, 27037, 27086, 27134, 27182,
+ 27230, 27278, 27326, 27374, 27421, 27469, 27516, 27563,
+ 27610, 27657, 27703, 27750, 27796, 27842, 27888, 27934,
+ 27980, 28025, 28071, 28116, 28161, 28206, 28250, 28295,
+ 28340, 28384, 28428, 28472, 28516, 28559, 28603, 28646,
+ 28689, 28732, 28775, 28818, 28860, 28903, 28945, 28987,
+ 29029, 29071, 29112, 29154, 29195, 29236, 29277, 29318,
+ 29358, 29399, 29439, 29479, 29519, 29559, 29598, 29638,
+ 29677, 29716, 29755, 29794, 29832, 29871, 29909, 29947,
+ 29985, 30023, 30061, 30098, 30135, 30172, 30209, 30246,
+ 30283, 30319, 30356, 30392, 30428, 30464, 30499, 30535,
+ 30570, 30605, 30640, 30675, 30710, 30744, 30779, 30813,
+ 30847, 30881, 30914, 30948, 30981, 31014, 31047, 31080,
+ 31113, 31145, 31178, 31210, 31242, 31274, 31306, 31337,
+ 31369, 31400, 31431, 31462, 31493, 31523, 31554, 31584,
+ 31614, 31644, 31674, 31704, 31733, 31763, 31792, 31821,
+ 31850, 31879, 31907, 31936, 31964, 31992, 32020, 32048,
+ 32076, 32104, 32131, 32159, 32186, 32213, 32240, 32267,
+ 32294, 32320, 32347, 32373, 32399, 32426, 32452, 32478,
+ 32504, 32530, 32556, 32582, 32607, 32633, 32659, 32685,
+ 32712, 32739, 32739, 32712, 32685, 32659, 32633, 32606,
+ 32580, 32553, 32527, 32500, 32473, 32446, 32418, 32391,
+ 32363, 32335, 32307, 32279, 32251, 32222, 32193, 32164,
+ 32134, 32105, 32075, 32045, 32015, 31984, 31953, 31922,
+ 31891, 31859, 31828, 31796, 31764, 31731, 31698, 31665,
+ 31632, 31599, 31565, 31531, 31497, 31462, 31428, 31393,
+ 31357, 31322, 31286, 31250, 31214, 31177, 31141, 31104,
+ 31066, 31029, 30991, 30953, 30915, 30876, 30837, 30798,
+ 30759, 30719, 30679, 30639, 30599, 30558, 30517, 30476,
+ 30435, 30393, 30351, 30309, 30266, 30224, 30181, 30138,
+ 30094, 30050, 30006, 29962, 29917, 29873, 29827, 29782,
+ 29737, 29691, 29645, 29598, 29551, 29505, 29457, 29410,
+ 29362, 29314, 29266, 29218, 29169, 29120, 29070, 29021,
+ 28971, 28921, 28871, 28820, 28769, 28718, 28667, 28615,
+ 28563, 28511, 28459, 28406, 28353, 28300, 28246, 28192,
+ 28138, 28084, 28030, 27975, 27920, 27864, 27809, 27753,
+ 27697, 27640, 27584, 27527, 27470, 27412, 27355, 27297,
+ 27238, 27180, 27121, 27062, 27003, 26944, 26884, 26824,
+ 26763, 26703, 26642, 26581, 26520, 26458, 26396, 26334,
+ 26272, 26209, 26146, 26083, 26020, 25956, 25892, 25828,
+ 25763, 25699, 25634, 25568, 25503, 25437, 25371, 25305,
+ 25239, 25172, 25105, 25037, 24970, 24902, 24834, 24766,
+ 24697, 24628, 24559, 24490, 24420, 24351, 24281, 24210,
+ 24140, 24069, 23998, 23926, 23855, 23783, 23711, 23638,
+ 23566, 23493, 23420, 23346, 23273, 23199, 23125, 23050,
+ 22976, 22901, 22826, 22750, 22675, 22599, 22523, 22446,
+ 22370, 22293, 22215, 22138, 22060, 21983, 21904, 21826,
+ 21747, 21669, 21589, 21510, 21430, 21351, 21271, 21190,
+ 21110, 21029, 20948, 20866, 20785, 20703, 20621, 20538,
+ 20456, 20373, 20290, 20207, 20123, 20039, 19955, 19871,
+ 19787, 19702, 19617, 19532, 19446, 19360, 19274, 19188,
+ 19102, 19015, 18928, 18841, 18754, 18666, 18578, 18490,
+ 18402, 18313, 18224, 18135, 18046, 17956, 17866, 17776,
+ 17686, 17595, 17505, 17414, 17322, 17231, 17139, 17047,
+ 16955, 16863, 16770, 16677, 16584, 16490, 16397, 16303,
+ 16209, 16114, 16020, 15925, 15830, 15735, 15639, 15543,
+ 15447, 15351, 15254, 15158, 15061, 14964, 14866, 14768,
+ 14671, 14572, 14474, 14375, 14276, 14177, 14078, 13978,
+ 13878, 13778, 13678, 13578, 13477, 13376, 13274, 13173,
+ 13071, 12969, 12867, 12764, 12662, 12559, 12455, 12352,
+ 12248, 12144, 12040, 11936, 11831, 11726, 11621, 11515,
+ 11410, 11304, 11197, 11091, 10984, 10877, 10770, 10663,
+ 10555, 10447, 10339, 10230, 10122, 10013, 9904, 9794,
+ 9684, 9574, 9464, 9353, 9243, 9131, 9020, 8908,
+ 8797, 8684, 8572, 8459, 8346, 8233, 8119, 8006,
+ 7892, 7777, 7662, 7547, 7432, 7317, 7201, 7085,
+ 6968, 6851, 6734, 6617, 6499, 6381, 6263, 6144,
+ 6025, 5906, 5786, 5666, 5546, 5425, 5304, 5183,
+ 5061, 4939, 4817, 4694, 4570, 4447, 4323, 4198,
+ 4074, 3948, 3823, 3696, 3570, 3443, 3315, 3187,
+ 3058, 2929, 2800, 2669, 2539, 2407, 2275, 2142,
+ 2009, 1875, 1740, 1604, 1467, 1330, 1191, 1051,
+ 909, 766, 621, 474, 324, 169
+};//Q15
+
+const Word16 window_256kHz[592] = /*ALDO at 25.6 maybe not needed ?Q15*/
+{
+ 1, 3, 7, 12, 19, 27, 36, 47,
+ 58, 72, 86, 102, 119, 138, 157, 178,
+ 201, 224, 249, 275, 302, 331, 361, 391,
+ 424, 457, 492, 527, 564, 603, 642, 683,
+ 724, 767, 811, 857, 903, 951, 999, 1049,
+ 1100, 1152, 1205, 1260, 1315, 1372, 1430, 1488,
+ 1548, 1609, 1671, 1735, 1799, 1864, 1931, 1998,
+ 2066, 2136, 2207, 2278, 2351, 2424, 2499, 2575,
+ 2651, 2729, 2808, 2887, 2968, 3049, 3132, 3215,
+ 3300, 3385, 3472, 3559, 3647, 3736, 3826, 3917,
+ 4009, 4101, 4195, 4289, 4385, 4481, 4578, 4676,
+ 4774, 4874, 4974, 5075, 5177, 5280, 5384, 5488,
+ 5593, 5699, 5806, 5913, 6021, 6130, 6240, 6350,
+ 6461, 6573, 6685, 6798, 6912, 7026, 7141, 7257,
+ 7373, 7491, 7608, 7726, 7845, 7965, 8085, 8206,
+ 8327, 8449, 8571, 8694, 8817, 8941, 9066, 9191,
+ 9316, 9442, 9569, 9696, 9823, 9951, 10079, 10208,
+ 10337, 10467, 10597, 10727, 10858, 10990, 11121, 11253,
+ 11367, 11482, 11598, 11714, 11831, 11948, 12065, 12182,
+ 12300, 12418, 12536, 12654, 12772, 12891, 13010, 13129,
+ 13248, 13367, 13486, 13605, 13725, 13844, 13964, 14084,
+ 14203, 14323, 14443, 14563, 14683, 14804, 14924, 15044,
+ 15164, 15284, 15405, 15525, 15645, 15765, 15885, 16006,
+ 16126, 16246, 16366, 16486, 16606, 16726, 16846, 16966,
+ 17086, 17206, 17325, 17445, 17564, 17684, 17803, 17922,
+ 18041, 18160, 18279, 18397, 18516, 18634, 18753, 18871,
+ 18988, 19106, 19224, 19341, 19458, 19575, 19692, 19809,
+ 19925, 20041, 20157, 20273, 20388, 20503, 20618, 20733,
+ 20848, 20962, 21076, 21190, 21303, 21416, 21529, 21642,
+ 21754, 21866, 21978, 22089, 22200, 22311, 22421, 22531,
+ 22641, 22751, 22860, 22968, 23077, 23185, 23293, 23400,
+ 23507, 23613, 23719, 23825, 23931, 24036, 24140, 24244,
+ 24348, 24452, 24555, 24657, 24759, 24861, 24962, 25063,
+ 25163, 25263, 25363, 25462, 25561, 25659, 25756, 25854,
+ 25950, 26047, 26142, 26238, 26333, 26427, 26521, 26614,
+ 26707, 26799, 26891, 26982, 27073, 27164, 27253, 27343,
+ 27432, 27520, 27608, 27695, 27781, 27868, 27953, 28038,
+ 28123, 28207, 28290, 28373, 28456, 28537, 28619, 28699,
+ 28780, 28859, 28938, 29017, 29095, 29172, 29249, 29325,
+ 29401, 29476, 29550, 29624, 29698, 29771, 29843, 29915,
+ 29986, 30056, 30126, 30196, 30264, 30333, 30400, 30467,
+ 30534, 30600, 30665, 30730, 30794, 30858, 30921, 30984,
+ 31046, 31107, 31168, 31228, 31288, 31347, 31406, 31464,
+ 31522, 31579, 31635, 31691, 31746, 31801, 31856, 31909,
+ 31963, 32016, 32068, 32120, 32171, 32222, 32273, 32323,
+ 32372, 32422, 32471, 32520, 32568, 32617, 32666, 32715,
+ 32715, 32666, 32616, 32567, 32517, 32466, 32415, 32364,
+ 32311, 32258, 32204, 32150, 32094, 32038, 31981, 31923,
+ 31864, 31805, 31744, 31683, 31621, 31557, 31494, 31429,
+ 31363, 31296, 31229, 31161, 31091, 31021, 30950, 30878,
+ 30805, 30731, 30657, 30581, 30505, 30427, 30349, 30270,
+ 30189, 30108, 30026, 29943, 29860, 29775, 29689, 29603,
+ 29515, 29427, 29337, 29247, 29156, 29064, 28971, 28877,
+ 28782, 28687, 28590, 28492, 28394, 28294, 28194, 28093,
+ 27991, 27888, 27784, 27679, 27573, 27466, 27358, 27250,
+ 27140, 27030, 26919, 26806, 26693, 26579, 26464, 26349,
+ 26232, 26114, 25996, 25876, 25756, 25635, 25512, 25389,
+ 25265, 25140, 25015, 24888, 24761, 24632, 24503, 24373,
+ 24242, 24110, 23977, 23843, 23708, 23573, 23436, 23299,
+ 23161, 23022, 22882, 22741, 22599, 22457, 22313, 22169,
+ 22024, 21878, 21731, 21583, 21435, 21285, 21135, 20984,
+ 20832, 20679, 20525, 20370, 20215, 20059, 19901, 19743,
+ 19584, 19425, 19264, 19103, 18940, 18777, 18613, 18448,
+ 18283, 18116, 17949, 17781, 17612, 17442, 17271, 17100,
+ 16927, 16754, 16580, 16405, 16230, 16053, 15876, 15698,
+ 15518, 15339, 15158, 14976, 14794, 14611, 14427, 14242,
+ 14056, 13869, 13682, 13494, 13305, 13115, 12924, 12732,
+ 12540, 12346, 12152, 11957, 11761, 11564, 11366, 11168,
+ 10968, 10768, 10566, 10364, 10161, 9957, 9752, 9547,
+ 9340, 9132, 8924, 8714, 8503, 8292, 8079, 7866,
+ 7651, 7436, 7219, 7002, 6783, 6563, 6343, 6121,
+ 5897, 5673, 5448, 5221, 4993, 4764, 4533, 4301,
+ 4067, 3832, 3596, 3358, 3118, 2876, 2632, 2387,
+ 2139, 1888, 1635, 1379, 1119, 854, 583, 304
+};
+
+const Word16 small_overlap_48[R2_48 / 7] =//Q15
+{
+ 429, 1286, 2143, 2998, 3851, 4702, 5549, 6393,
+ 7232, 8066, 8895, 9717, 10533, 11342, 12142, 12935,
+ 13719, 14493, 15257, 16011, 16754, 17485, 18205, 18912,
+ 19606, 20286, 20953, 21605, 22243, 22865, 23472, 24062,
+ 24636, 25193, 25733, 26255, 26760, 27246, 27713, 28161,
+ 28590, 28999, 29389, 29758, 30107, 30435, 30743, 31029,
+ 31294, 31538, 31760, 31960, 32138, 32295, 32429, 32541,
+ 32631, 32698, 32743, 32765
+};
+
+const Word16 small_overlap_25[R2_25 / 7] =//Q15
+{
+ 804, 2411, 4011, 5602, 7180, 8740, 10279, 11793,
+ 13279, 14733, 16151, 17531, 18868, 20160, 21403, 22595,
+ 23732, 24812, 25833, 26791, 27684, 28511, 29269, 29957,
+ 30572, 31114, 31581, 31972, 32286, 32522, 32679, 32758
+};
+
+const Word16 small_overlap_int[R2_16 / 7] =//Q15
+{
+ 2571, 5126,
+ 7650, 10126, 12540, 14876, 17121, 19261, 21281, 22865,
+ 23472, 24917, 26510, 27939, 29197, 30274, 31164, 31863,
+ 32365, 32667
+};
+
+
+const Word16 half_overlap_48[3 * R2_48 / 7] =//Q15
+{
+ 143, 429,
+ 715, 1001, 1286, 1572, 1858, 2143, 2428, 2713,
+ 2998, 3283, 3567, 3851, 4135, 4419, 4702, 4985,
+ 5267, 5549, 5831, 6112, 6393, 6673, 6953, 7232,
+ 7510, 7788, 8066, 8343, 8619, 8895, 9169, 9444,
+ 9717, 9990, 10262, 10533, 10803, 11073, 11342, 11609,
+ 11876, 12142, 12408, 12672, 12935, 13197, 13458, 13719,
+ 13978, 14236, 14493, 14749, 15004, 15257, 15510, 15761,
+ 16011, 16260, 16508, 16754, 16999, 17243, 17485, 17727,
+ 17966, 18205, 18442, 18678, 18912, 19145, 19376, 19606,
+ 19834, 20061, 20286, 20510, 20732, 20953, 21172, 21390,
+ 21605, 21820, 22032, 22243, 22452, 22659, 22865, 23069,
+ 23271, 23472, 23670, 23867, 24062, 24255, 24447, 24636,
+ 24824, 25010, 25193, 25375, 25555, 25733, 25909, 26083,
+ 26255, 26426, 26594, 26760, 26924, 27086, 27246, 27403,
+ 27559, 27713, 27864, 28014, 28161, 28306, 28449, 28590,
+ 28729, 28865, 28999, 29131, 29261, 29389, 29514, 29637,
+ 29758, 29877, 29993, 30107, 30219, 30328, 30435, 30540,
+ 30643, 30743, 30840, 30936, 31029, 31120, 31208, 31294,
+ 31378, 31459, 31538, 31614, 31688, 31760, 31829, 31896,
+ 31960, 32022, 32081, 32138, 32193, 32245, 32295, 32342,
+ 32387, 32429, 32469, 32506, 32541, 32573, 32603, 32631,
+ 32655, 32678, 32698, 32715, 32730, 32743, 32753, 32760,
+ 32765, 32767
+};
+
+const Word16 half_overlap_25[3 * R2_25 / 7] =//Q15
+{
+ 268, 804, 1340, 1876, 2411, 2945, 3479, 4011,
+ 4543, 5073, 5602, 6130, 6655, 7180, 7702, 8222,
+ 8740, 9255, 9768, 10279, 10786, 11291, 11793, 12292,
+ 12787, 13279, 13767, 14252, 14733, 15210, 15683, 16151,
+ 16616, 17075, 17531, 17981, 18427, 18868, 19304, 19735,
+ 20160, 20580, 20994, 21403, 21806, 22204, 22595, 22980,
+ 23359, 23732, 24099, 24459, 24812, 25159, 25499, 25833,
+ 26159, 26478, 26791, 27096, 27394, 27684, 27967, 28243,
+ 28511, 28771, 29024, 29269, 29506, 29736, 29957, 30170,
+ 30375, 30572, 30761, 30942, 31114, 31278, 31434, 31581,
+ 31720, 31850, 31972, 32085, 32190, 32286, 32373, 32452,
+ 32522, 32583, 32635, 32679, 32714, 32741, 32758, 32767
+};
+
+const Word16 half_overlap_int[3 * R2_16 / 7] =//Q15
+{
+ 858, 1715, 2571, 3425, 4277, 5126,
+ 5971, 6813, 7650, 8481, 9307, 10126, 10938, 11743,
+ 12540, 13328, 14107, 14876, 15636, 16384, 17121, 17847,
+ 18560, 19261, 19948, 20622, 21281, 21926, 22556, 23069,
+ 23271, 23769, 24351, 24917, 25466, 25997, 26510, 27005,
+ 27482, 27939, 28378, 28797, 29197, 29576, 29935, 30274,
+ 30592, 30888, 31164, 31419, 31651, 31863, 32052, 32219,
+ 32365, 32488, 32588, 32667, 32723, 32757
+};
+const Word16 wac_h[LPC_SHB_ORDER] =//Q15
+{
+ 32763,
+ 32751,
+ 32731,
+ 32703,
+ 32667,
+ 32622,
+ 32570,
+ 32510,
+ 32442,
+ 32366
+};
+
+const Word16 wac_l[LPC_SHB_ORDER] =//Q15
+{
+ 31381,
+ 27317,
+ 20869,
+ 12529,
+ 2980,
+ 25869,
+ 16731,
+ 9600,
+ 5926,
+ 7354
+};
+
+const Word16 dsDiracsTab[65] =
+{
+ 0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 23, 25,
+ 27, 29, 31, 33, 35, 37, 39, 43,
+ 47, 51, 55, 59, 63, 67, 71, 75,
+ 83, 91, 99, 107, 115, 123, 131, 139,
+ 147, 163, 179, 195, 211, 227, 243, 259,
+ 275, 291, 323, 355, 387, 419, 451, 483,
+ 512
+};
+
+const Word16 pwf_fx[17] =//Q12
+{
+ 22938, 16056, 11239, 7868, 5507, 3855, 2699, 1889,
+ 1322, 926, 648, 454, 317, 222, 156, 109,
+ 76
+};
+
+const Word32 inverse_table[] =//Q29
+{
+ 0,
+ 134217728, 67108864, 44739242, 33554432, 26843545, 22369621, 19173961, 16777216, 14913080, 13421772, 12201611, 11184810, 10324440, 9586980, 8947848, 8388608, 7895160, 7456540, 7064090, 6710886, 6391320, 6100805, 5835553, 5592405, 5368709, 5162220, 4971026, 4793490, 4628197, 4473924, 4329604, 4194304, 4067203, 3947580, 3834792, 3728270, 3627506, 3532045, 3441480, 3355443, 3273603, 3195660, 3121342, 3050402, 2982616, 2917776, 2855696, 2796202, 2739137, 2684354, 2631720, 2581110, 2532409, 2485513, 2440322, 2396745, 2354696, 2314098, 2274876, 2236962, 2200290, 2164802, 2130440, 2097152, 2064888, 2033601, 2003249, 1973790, 1945184, 1917396, 1890390, 1864135, 1838599, 1813753, 1789569, 1766022, 1743087, 1720740, 1698958, 1677721, 1657008, 1636801, 1617081, 1597830, 1579032, 1560671, 1542732, 1525201, 1508064, 1491308, 1474920, 1458888, 1443201, 1427848, 1412818, 1398101, 1383687, 1369568, 1355734, 1342177, 1328888, 1315860, 1303084, 1290555, 1278264, 1266204, 1254371, 1242756, 1231355, 1220161, 1209168, 1198372, 1187767, 1177348, 1167110, 1157049, 1147160, 1137438, 1127880, 1118481, 1109237, 1100145, 1091201, 1082401, 1073741, 1065220, 1056832, 1048576, 1040447, 1032444, 1024562, 1016800, 1009155, 1001624, 994205, 986895, 979691, 972592, 965595, 958698, 951898, 945195, 938585, 932067, 925639, 919299, 913045, 906876, 900790, 894784, 888859, 883011, 877240, 871543, 865920, 860370, 854889, 849479, 844136, 838860, 833650, 828504, 823421, 818400, 813440, 808540, 803698, 798915, 794187, 789516, 784898, 780335, 775825, 771366, 766958, 762600, 758292, 754032, 749819, 745654, 741534, 737460, 733430, 729444, 725501, 721600, 717741, 713924, 710146, 706409, 702710, 699050, 695428, 691843, 688296, 684784, 681308, 677867, 674460, 671088, 667749, 664444, 661171, 657930, 654720, 651542, 648394, 645277, 642190, 639132, 636102, 633102, 630130, 627185, 624268, 621378, 618514, 615677, 612866, 610080, 607320, 604584, 601873, 599186, 596523, 593883, 591267, 588674, 586103, 583555, 581029, 578524, 576041, 573580, 571139, 568719, 566319, 563940, 561580, 559240, 556920, 554618, 552336, 550072, 547827, 545600, 543391, 541200, 539027, 536870, 534731, 532610, 530504, 528416, 526344,
+};
+
+const Word16 cos_diff_table[512] =//Q15
+{
+ SHC(0xFFFF), SHC(0xFFF8), SHC(0xFFF4), SHC(0xFFEF), SHC(0xFFE9), SHC(0xFFE5), SHC(0xFFE0), SHC(0xFFDB),
+ SHC(0xFFD6), SHC(0xFFD2), SHC(0xFFCC), SHC(0xFFC7), SHC(0xFFC3), SHC(0xFFBE), SHC(0xFFB8), SHC(0xFFB4),
+ SHC(0xFFB0), SHC(0xFFAA), SHC(0xFFA5), SHC(0xFFA1), SHC(0xFF9C), SHC(0xFF97), SHC(0xFF92), SHC(0xFF8E),
+ SHC(0xFF89), SHC(0xFF84), SHC(0xFF80), SHC(0xFF7B), SHC(0xFF76), SHC(0xFF71), SHC(0xFF6D), SHC(0xFF69),
+ SHC(0xFF64), SHC(0xFF5F), SHC(0xFF5B), SHC(0xFF56), SHC(0xFF52), SHC(0xFF4D), SHC(0xFF49), SHC(0xFF45),
+ SHC(0xFF40), SHC(0xFF3C), SHC(0xFF38), SHC(0xFF33), SHC(0xFF2F), SHC(0xFF2B), SHC(0xFF27), SHC(0xFF23),
+ SHC(0xFF1E), SHC(0xFF1B), SHC(0xFF16), SHC(0xFF13), SHC(0xFF0E), SHC(0xFF0B), SHC(0xFF06), SHC(0xFF03),
+ SHC(0xFEFF), SHC(0xFEFB), SHC(0xFEF8), SHC(0xFEF3), SHC(0xFEF1), SHC(0xFEEC), SHC(0xFEE9), SHC(0xFEE5),
+ SHC(0xFEE2), SHC(0xFEDF), SHC(0xFEDB), SHC(0xFED8), SHC(0xFED4), SHC(0xFED1), SHC(0xFECE), SHC(0xFECB),
+ SHC(0xFEC7), SHC(0xFEC5), SHC(0xFEC1), SHC(0xFEBF), SHC(0xFEBB), SHC(0xFEB9), SHC(0xFEB6), SHC(0xFEB3),
+ SHC(0xFEB0), SHC(0xFEAE), SHC(0xFEAB), SHC(0xFEA8), SHC(0xFEA6), SHC(0xFEA3), SHC(0xFEA1), SHC(0xFE9F),
+ SHC(0xFE9C), SHC(0xFE9A), SHC(0xFE98), SHC(0xFE95), SHC(0xFE94), SHC(0xFE91), SHC(0xFE8F), SHC(0xFE8E),
+ SHC(0xFE8B), SHC(0xFE8A), SHC(0xFE88), SHC(0xFE86), SHC(0xFE85), SHC(0xFE83), SHC(0xFE81), SHC(0xFE80),
+ SHC(0xFE7F), SHC(0xFE7D), SHC(0xFE7B), SHC(0xFE7B), SHC(0xFE79), SHC(0xFE79), SHC(0xFE77), SHC(0xFE76),
+ SHC(0xFE75), SHC(0xFE74), SHC(0xFE73), SHC(0xFE73), SHC(0xFE72), SHC(0xFE71), SHC(0xFE71), SHC(0xFE70),
+ SHC(0xFE6F), SHC(0xFE70), SHC(0xFE6E), SHC(0xFE6F), SHC(0xFE6E), SHC(0xFE6E), SHC(0xFE6E), SHC(0xFE6E),
+ SHC(0xFE6E), SHC(0xFE6E), SHC(0xFE6E), SHC(0xFE6E), SHC(0xFE6F), SHC(0xFE6E), SHC(0xFE70), SHC(0xFE6F),
+ SHC(0xFE70), SHC(0xFE71), SHC(0xFE71), SHC(0xFE72), SHC(0xFE73), SHC(0xFE73), SHC(0xFE74), SHC(0xFE75),
+ SHC(0xFE76), SHC(0xFE77), SHC(0xFE79), SHC(0xFE79), SHC(0xFE7B), SHC(0xFE7B), SHC(0xFE7D), SHC(0xFE7F),
+ SHC(0xFE80), SHC(0xFE81), SHC(0xFE83), SHC(0xFE85), SHC(0xFE86), SHC(0xFE88), SHC(0xFE8A), SHC(0xFE8B),
+ SHC(0xFE8E), SHC(0xFE8F), SHC(0xFE91), SHC(0xFE94), SHC(0xFE95), SHC(0xFE98), SHC(0xFE9A), SHC(0xFE9C),
+ SHC(0xFE9F), SHC(0xFEA1), SHC(0xFEA3), SHC(0xFEA6), SHC(0xFEA8), SHC(0xFEAB), SHC(0xFEAE), SHC(0xFEB0),
+ SHC(0xFEB3), SHC(0xFEB6), SHC(0xFEB9), SHC(0xFEBB), SHC(0xFEBF), SHC(0xFEC1), SHC(0xFEC5), SHC(0xFEC7),
+ SHC(0xFECB), SHC(0xFECE), SHC(0xFED1), SHC(0xFED4), SHC(0xFED8), SHC(0xFEDB), SHC(0xFEDF), SHC(0xFEE2),
+ SHC(0xFEE5), SHC(0xFEE9), SHC(0xFEEC), SHC(0xFEF1), SHC(0xFEF3), SHC(0xFEF8), SHC(0xFEFB), SHC(0xFEFF),
+ SHC(0xFF03), SHC(0xFF06), SHC(0xFF0B), SHC(0xFF0E), SHC(0xFF13), SHC(0xFF16), SHC(0xFF1B), SHC(0xFF1E),
+ SHC(0xFF23), SHC(0xFF27), SHC(0xFF2B), SHC(0xFF2F), SHC(0xFF33), SHC(0xFF38), SHC(0xFF3C), SHC(0xFF40),
+ SHC(0xFF45), SHC(0xFF49), SHC(0xFF4D), SHC(0xFF52), SHC(0xFF56), SHC(0xFF5B), SHC(0xFF5F), SHC(0xFF64),
+ SHC(0xFF69), SHC(0xFF6D), SHC(0xFF71), SHC(0xFF76), SHC(0xFF7B), SHC(0xFF80), SHC(0xFF84), SHC(0xFF89),
+ SHC(0xFF8E), SHC(0xFF92), SHC(0xFF97), SHC(0xFF9C), SHC(0xFFA1), SHC(0xFFA5), SHC(0xFFAA), SHC(0xFFB0),
+ SHC(0xFFB4), SHC(0xFFB8), SHC(0xFFBE), SHC(0xFFC3), SHC(0xFFC7), SHC(0xFFCC), SHC(0xFFD2), SHC(0xFFD6),
+ SHC(0xFFDB), SHC(0xFFE0), SHC(0xFFE5), SHC(0xFFE9), SHC(0xFFEF), SHC(0xFFF4), SHC(0xFFF8), SHC(0xFFFF),
+ SHC(0x0001), SHC(0x0008), SHC(0x000C), SHC(0x0011), SHC(0x0017), SHC(0x001B), SHC(0x0020), SHC(0x0025),
+ SHC(0x002A), SHC(0x002E), SHC(0x0034), SHC(0x0039), SHC(0x003D), SHC(0x0042), SHC(0x0048), SHC(0x004C),
+ SHC(0x0050), SHC(0x0056), SHC(0x005B), SHC(0x005F), SHC(0x0064), SHC(0x0069), SHC(0x006E), SHC(0x0072),
+ SHC(0x0077), SHC(0x007C), SHC(0x0080), SHC(0x0085), SHC(0x008A), SHC(0x008F), SHC(0x0093), SHC(0x0097),
+ SHC(0x009C), SHC(0x00A1), SHC(0x00A5), SHC(0x00AA), SHC(0x00AE), SHC(0x00B3), SHC(0x00B7), SHC(0x00BB),
+ SHC(0x00C0), SHC(0x00C4), SHC(0x00C8), SHC(0x00CD), SHC(0x00D1), SHC(0x00D5), SHC(0x00D9), SHC(0x00DD),
+ SHC(0x00E2), SHC(0x00E5), SHC(0x00EA), SHC(0x00ED), SHC(0x00F2), SHC(0x00F5), SHC(0x00FA), SHC(0x00FD),
+ SHC(0x0101), SHC(0x0105), SHC(0x0108), SHC(0x010D), SHC(0x010F), SHC(0x0114), SHC(0x0117), SHC(0x011B),
+ SHC(0x011E), SHC(0x0121), SHC(0x0125), SHC(0x0128), SHC(0x012C), SHC(0x012F), SHC(0x0132), SHC(0x0135),
+ SHC(0x0139), SHC(0x013B), SHC(0x013F), SHC(0x0141), SHC(0x0145), SHC(0x0147), SHC(0x014A), SHC(0x014D),
+ SHC(0x0150), SHC(0x0152), SHC(0x0155), SHC(0x0158), SHC(0x015A), SHC(0x015D), SHC(0x015F), SHC(0x0161),
+ SHC(0x0164), SHC(0x0166), SHC(0x0168), SHC(0x016B), SHC(0x016C), SHC(0x016F), SHC(0x0171), SHC(0x0172),
+ SHC(0x0175), SHC(0x0176), SHC(0x0178), SHC(0x017A), SHC(0x017B), SHC(0x017D), SHC(0x017F), SHC(0x0180),
+ SHC(0x0181), SHC(0x0183), SHC(0x0185), SHC(0x0185), SHC(0x0187), SHC(0x0187), SHC(0x0189), SHC(0x018A),
+ SHC(0x018B), SHC(0x018C), SHC(0x018D), SHC(0x018D), SHC(0x018E), SHC(0x018F), SHC(0x018F), SHC(0x0190),
+ SHC(0x0191), SHC(0x0190), SHC(0x0192), SHC(0x0191), SHC(0x0192), SHC(0x0192), SHC(0x0192), SHC(0x0192),
+ SHC(0x0192), SHC(0x0192), SHC(0x0192), SHC(0x0192), SHC(0x0191), SHC(0x0192), SHC(0x0190), SHC(0x0191),
+ SHC(0x0190), SHC(0x018F), SHC(0x018F), SHC(0x018E), SHC(0x018D), SHC(0x018D), SHC(0x018C), SHC(0x018B),
+ SHC(0x018A), SHC(0x0189), SHC(0x0187), SHC(0x0187), SHC(0x0185), SHC(0x0185), SHC(0x0183), SHC(0x0181),
+ SHC(0x0180), SHC(0x017F), SHC(0x017D), SHC(0x017B), SHC(0x017A), SHC(0x0178), SHC(0x0176), SHC(0x0175),
+ SHC(0x0172), SHC(0x0171), SHC(0x016F), SHC(0x016C), SHC(0x016B), SHC(0x0168), SHC(0x0166), SHC(0x0164),
+ SHC(0x0161), SHC(0x015F), SHC(0x015D), SHC(0x015A), SHC(0x0158), SHC(0x0155), SHC(0x0152), SHC(0x0150),
+ SHC(0x014D), SHC(0x014A), SHC(0x0147), SHC(0x0145), SHC(0x0141), SHC(0x013F), SHC(0x013B), SHC(0x0139),
+ SHC(0x0135), SHC(0x0132), SHC(0x012F), SHC(0x012C), SHC(0x0128), SHC(0x0125), SHC(0x0121), SHC(0x011E),
+ SHC(0x011B), SHC(0x0117), SHC(0x0114), SHC(0x010F), SHC(0x010D), SHC(0x0108), SHC(0x0105), SHC(0x0101),
+ SHC(0x00FD), SHC(0x00FA), SHC(0x00F5), SHC(0x00F2), SHC(0x00ED), SHC(0x00EA), SHC(0x00E5), SHC(0x00E2),
+ SHC(0x00DD), SHC(0x00D9), SHC(0x00D5), SHC(0x00D1), SHC(0x00CD), SHC(0x00C8), SHC(0x00C4), SHC(0x00C0),
+ SHC(0x00BB), SHC(0x00B7), SHC(0x00B3), SHC(0x00AE), SHC(0x00AA), SHC(0x00A5), SHC(0x00A1), SHC(0x009C),
+ SHC(0x0097), SHC(0x0093), SHC(0x008F), SHC(0x008A), SHC(0x0085), SHC(0x0080), SHC(0x007C), SHC(0x0077),
+ SHC(0x0072), SHC(0x006E), SHC(0x0069), SHC(0x0064), SHC(0x005F), SHC(0x005B), SHC(0x0056), SHC(0x0050),
+ SHC(0x004C), SHC(0x0048), SHC(0x0042), SHC(0x003D), SHC(0x0039), SHC(0x0034), SHC(0x002E), SHC(0x002A),
+ SHC(0x0025), SHC(0x0020), SHC(0x001B), SHC(0x0017), SHC(0x0011), SHC(0x000C), SHC(0x0008), SHC(0x0001)
+
+};
+
+const Word16 fftSineTab640_fx[ 321 ] =
+{//Q15
+ SHC( 0x0000 ), SHC( 0x0141 ), SHC( 0x0283 ), SHC( 0x03c4 ), SHC( 0x0506 ), SHC( 0x0647 ), SHC( 0x0789 ), SHC( 0x08ca ),
+ SHC( 0x0a0a ), SHC( 0x0b4b ), SHC( 0x0c8b ), SHC( 0x0dcb ), SHC( 0x0f0b ), SHC( 0x104a ), SHC( 0x1189 ), SHC( 0x12c8 ),
+ SHC( 0x1406 ), SHC( 0x1543 ), SHC( 0x1680 ), SHC( 0x17bc ), SHC( 0x18f8 ), SHC( 0x1a33 ), SHC( 0x1b6e ), SHC( 0x1ca8 ),
+ SHC( 0x1de1 ), SHC( 0x1f19 ), SHC( 0x2051 ), SHC( 0x2188 ), SHC( 0x22be ), SHC( 0x23f3 ), SHC( 0x2528 ), SHC( 0x265b ),
+ SHC( 0x278d ), SHC( 0x28bf ), SHC( 0x29ef ), SHC( 0x2b1f ), SHC( 0x2c4d ), SHC( 0x2d7a ), SHC( 0x2ea6 ), SHC( 0x2fd1 ),
+ SHC( 0x30fb ), SHC( 0x3224 ), SHC( 0x334b ), SHC( 0x3471 ), SHC( 0x3596 ), SHC( 0x36ba ), SHC( 0x37dc ), SHC( 0x38fd ),
+ SHC( 0x3a1c ), SHC( 0x3b3a ), SHC( 0x3c56 ), SHC( 0x3d71 ), SHC( 0x3e8b ), SHC( 0x3fa3 ), SHC( 0x40b9 ), SHC( 0x41ce ),
+ SHC( 0x42e1 ), SHC( 0x43f2 ), SHC( 0x4502 ), SHC( 0x4610 ), SHC( 0x471c ), SHC( 0x4827 ), SHC( 0x4930 ), SHC( 0x4a37 ),
+ SHC( 0x4b3c ), SHC( 0x4c3f ), SHC( 0x4d41 ), SHC( 0x4e40 ), SHC( 0x4f3e ), SHC( 0x503a ), SHC( 0x5133 ), SHC( 0x522b ),
+ SHC( 0x5321 ), SHC( 0x5414 ), SHC( 0x5506 ), SHC( 0x55f5 ), SHC( 0x56e2 ), SHC( 0x57ce ), SHC( 0x58b7 ), SHC( 0x599d ),
+ SHC( 0x5a82 ), SHC( 0x5b64 ), SHC( 0x5c44 ), SHC( 0x5d22 ), SHC( 0x5dfe ), SHC( 0x5ed7 ), SHC( 0x5fae ), SHC( 0x6082 ),
+ SHC( 0x6154 ), SHC( 0x6224 ), SHC( 0x62f2 ), SHC( 0x63bc ), SHC( 0x6485 ), SHC( 0x654b ), SHC( 0x660e ), SHC( 0x66cf ),
+ SHC( 0x678d ), SHC( 0x6849 ), SHC( 0x6902 ), SHC( 0x69b9 ), SHC( 0x6a6d ), SHC( 0x6b1f ), SHC( 0x6bcd ), SHC( 0x6c79 ),
+ SHC( 0x6d23 ), SHC( 0x6dca ), SHC( 0x6e6e ), SHC( 0x6f0f ), SHC( 0x6fad ), SHC( 0x7049 ), SHC( 0x70e2 ), SHC( 0x7179 ),
+ SHC( 0x720c ), SHC( 0x729d ), SHC( 0x732a ), SHC( 0x73b5 ), SHC( 0x743e ), SHC( 0x74c3 ), SHC( 0x7545 ), SHC( 0x75c5 ),
+ SHC( 0x7641 ), SHC( 0x76bb ), SHC( 0x7732 ), SHC( 0x77a5 ), SHC( 0x7816 ), SHC( 0x7884 ), SHC( 0x78ef ), SHC( 0x7957 ),
+ SHC( 0x79bc ), SHC( 0x7a1e ), SHC( 0x7a7d ), SHC( 0x7ad8 ), SHC( 0x7b31 ), SHC( 0x7b87 ), SHC( 0x7bda ), SHC( 0x7c29 ),
+ SHC( 0x7c76 ), SHC( 0x7cc0 ), SHC( 0x7d06 ), SHC( 0x7d4a ), SHC( 0x7d8a ), SHC( 0x7dc7 ), SHC( 0x7e01 ), SHC( 0x7e38 ),
+ SHC( 0x7e6c ), SHC( 0x7e9d ), SHC( 0x7eca ), SHC( 0x7ef5 ), SHC( 0x7f1c ), SHC( 0x7f41 ), SHC( 0x7f62 ), SHC( 0x7f80 ),
+ SHC( 0x7f9a ), SHC( 0x7fb2 ), SHC( 0x7fc7 ), SHC( 0x7fd8 ), SHC( 0x7fe6 ), SHC( 0x7ff1 ), SHC( 0x7ff9 ), SHC( 0x7ffe ),
+ SHC( 0x7fff ), SHC( 0x7ffe ), SHC( 0x7ff9 ), SHC( 0x7ff1 ), SHC( 0x7fe6 ), SHC( 0x7fd8 ), SHC( 0x7fc7 ), SHC( 0x7fb2 ),
+ SHC( 0x7f9a ), SHC( 0x7f80 ), SHC( 0x7f62 ), SHC( 0x7f41 ), SHC( 0x7f1c ), SHC( 0x7ef5 ), SHC( 0x7eca ), SHC( 0x7e9d ),
+ SHC( 0x7e6c ), SHC( 0x7e38 ), SHC( 0x7e01 ), SHC( 0x7dc7 ), SHC( 0x7d8a ), SHC( 0x7d4a ), SHC( 0x7d06 ), SHC( 0x7cc0 ),
+ SHC( 0x7c76 ), SHC( 0x7c29 ), SHC( 0x7bda ), SHC( 0x7b87 ), SHC( 0x7b31 ), SHC( 0x7ad8 ), SHC( 0x7a7d ), SHC( 0x7a1e ),
+ SHC( 0x79bc ), SHC( 0x7957 ), SHC( 0x78ef ), SHC( 0x7884 ), SHC( 0x7816 ), SHC( 0x77a5 ), SHC( 0x7732 ), SHC( 0x76bb ),
+ SHC( 0x7641 ), SHC( 0x75c5 ), SHC( 0x7545 ), SHC( 0x74c3 ), SHC( 0x743e ), SHC( 0x73b5 ), SHC( 0x732a ), SHC( 0x729d ),
+ SHC( 0x720c ), SHC( 0x7179 ), SHC( 0x70e2 ), SHC( 0x7049 ), SHC( 0x6fad ), SHC( 0x6f0f ), SHC( 0x6e6e ), SHC( 0x6dca ),
+ SHC( 0x6d23 ), SHC( 0x6c79 ), SHC( 0x6bcd ), SHC( 0x6b1f ), SHC( 0x6a6d ), SHC( 0x69b9 ), SHC( 0x6902 ), SHC( 0x6849 ),
+ SHC( 0x678d ), SHC( 0x66cf ), SHC( 0x660e ), SHC( 0x654b ), SHC( 0x6485 ), SHC( 0x63bc ), SHC( 0x62f2 ), SHC( 0x6224 ),
+ SHC( 0x6154 ), SHC( 0x6082 ), SHC( 0x5fae ), SHC( 0x5ed7 ), SHC( 0x5dfe ), SHC( 0x5d22 ), SHC( 0x5c44 ), SHC( 0x5b64 ),
+ SHC( 0x5a82 ), SHC( 0x599d ), SHC( 0x58b7 ), SHC( 0x57ce ), SHC( 0x56e2 ), SHC( 0x55f5 ), SHC( 0x5506 ), SHC( 0x5414 ),
+ SHC( 0x5321 ), SHC( 0x522b ), SHC( 0x5133 ), SHC( 0x503a ), SHC( 0x4f3e ), SHC( 0x4e40 ), SHC( 0x4d41 ), SHC( 0x4c3f ),
+ SHC( 0x4b3c ), SHC( 0x4a37 ), SHC( 0x4930 ), SHC( 0x4827 ), SHC( 0x471c ), SHC( 0x4610 ), SHC( 0x4502 ), SHC( 0x43f2 ),
+ SHC( 0x42e1 ), SHC( 0x41ce ), SHC( 0x40b9 ), SHC( 0x3fa3 ), SHC( 0x3e8b ), SHC( 0x3d71 ), SHC( 0x3c56 ), SHC( 0x3b3a ),
+ SHC( 0x3a1c ), SHC( 0x38fd ), SHC( 0x37dc ), SHC( 0x36ba ), SHC( 0x3596 ), SHC( 0x3471 ), SHC( 0x334b ), SHC( 0x3224 ),
+ SHC( 0x30fb ), SHC( 0x2fd1 ), SHC( 0x2ea6 ), SHC( 0x2d7a ), SHC( 0x2c4d ), SHC( 0x2b1f ), SHC( 0x29ef ), SHC( 0x28bf ),
+ SHC( 0x278d ), SHC( 0x265b ), SHC( 0x2528 ), SHC( 0x23f3 ), SHC( 0x22be ), SHC( 0x2188 ), SHC( 0x2051 ), SHC( 0x1f19 ),
+ SHC( 0x1de1 ), SHC( 0x1ca8 ), SHC( 0x1b6e ), SHC( 0x1a33 ), SHC( 0x18f8 ), SHC( 0x17bc ), SHC( 0x1680 ), SHC( 0x1543 ),
+ SHC( 0x1406 ), SHC( 0x12c8 ), SHC( 0x1189 ), SHC( 0x104a ), SHC( 0x0f0b ), SHC( 0x0dcb ), SHC( 0x0c8b ), SHC( 0x0b4b ),
+ SHC( 0x0a0a ), SHC( 0x08ca ), SHC( 0x0789 ), SHC( 0x0647 ), SHC( 0x0506 ), SHC( 0x03c4 ), SHC( 0x0283 ), SHC( 0x0141 ),
+ SHC( 0x0000 ),
+};
+
+
+const Word32 bwMode2fs[4] = { 8000, 16000, 32000, 48000 };//Q0
+
+const Word16 cos_pi_by_127[128] = /* Q15 */
+{
+ 32767 ,32756 ,32726 ,32676 ,32606 ,32516 ,
+ 32406 ,32276 ,32127 ,31958 ,31769 ,
+ 31561 ,31333 ,31087 ,30821 ,30537 ,
+ 30233 ,29912 ,29572 ,29213 ,28837 ,
+ 28444 ,28033 ,27605 ,27160 ,26698 ,
+ 26220 ,25726 ,25216 ,24691 ,24150 ,
+ 23595 ,23026 ,22442 ,21844 ,21234 ,
+ 20610 ,19974 ,19325 ,18665 ,17993 ,
+ 17310 ,16616 ,15913 ,15199 ,14477 ,
+ 13745 ,13005 ,12258 ,11502 ,10740 ,
+ 9971 ,9196 ,8415 ,7629 ,6839 ,
+ 6044 ,5245 ,4444 ,3639 ,2833 ,
+ 2025 ,1215 ,405 ,-405 ,-1215 ,
+ -2025 ,-2833 ,-3639 ,-4444 ,-5245 ,
+ -6044 ,-6839 ,-7629 ,-8415 ,-9196 ,
+ -9971 ,-10740 ,-11502 ,-12258 ,-13005 ,
+ -13745 ,-14477 ,-15199 ,-15913 ,-16616 ,
+ -17310 ,-17993 ,-18665 ,-19325 ,-19974 ,
+ -20610 ,-21234 ,-21844 ,-22442 ,-23026 ,
+ -23595 ,-24150 ,-24691 ,-25216 ,-25726 ,
+ -26220 ,-26698 ,-27160 ,-27605 ,-28033 ,
+ -28444 ,-28837 ,-29213 ,-29572 ,-29912 ,
+ -30233 ,-30537 ,-30821 ,-31087 ,-31333 ,
+ -31561 ,-31769 ,-31958 ,-32127 ,-32276 ,
+ -32406 ,-32516 ,-32606 ,-32676 ,-32726 ,
+ -32756 ,-32767
+};
+
+const Word16 cos_pi_by_255[256] = /* Q15 */
+{
+ 32767 ,32764 ,32757 ,32744 ,32727 ,32704 ,
+ 32677 ,32645 ,32607 ,32565 ,32518 ,
+ 32466 ,32409 ,32347 ,32280 ,32209 ,
+ 32132 ,32050 ,31964 ,31873 ,31777 ,
+ 31676 ,31570 ,31460 ,31345 ,31225 ,
+ 31100 ,30970 ,30836 ,30697 ,30554 ,
+ 30406 ,30253 ,30096 ,29934 ,29767 ,
+ 29596 ,29421 ,29241 ,29056 ,28868 ,
+ 28674 ,28477 ,28275 ,28069 ,27859 ,
+ 27644 ,27425 ,27202 ,26975 ,26744 ,
+ 26509 ,26269 ,26026 ,25779 ,25528 ,
+ 25273 ,25014 ,24751 ,24485 ,24215 ,
+ 23941 ,23663 ,23382 ,23098 ,22810 ,
+ 22518 ,22223 ,21925 ,21623 ,21318 ,
+ 21010 ,20699 ,20384 ,20067 ,19746 ,
+ 19422 ,19096 ,18766 ,18434 ,18099 ,
+ 17761 ,17420 ,17077 ,16731 ,16383 ,
+ 16032 ,15679 ,15323 ,14965 ,14605 ,
+ 14243 ,13878 ,13511 ,13142 ,12772 ,
+ 12399 ,12024 ,11648 ,11270 ,10890 ,
+ 10508 ,10125 ,9740 ,9354 ,8967 ,
+ 8578 ,8187 ,7796 ,7403 ,7009 ,
+ 6615 ,6219 ,5822 ,5424 ,5026 ,
+ 4626 ,4226 ,3826 ,3425 ,3023 ,
+ 2621 ,2218 ,1815 ,1412 ,1009 ,
+ 605 ,201 ,-201 ,-605 ,-1009 ,
+ -1412 ,-1815 ,-2218 ,-2621 ,-3023 ,
+ -3425 ,-3826 ,-4226 ,-4626 ,-5026 ,
+ -5424 ,-5822 ,-6219 ,-6615 ,-7009 ,
+ -7403 ,-7796 ,-8187 ,-8578 ,-8967 ,
+ -9354 ,-9740 ,-10125 ,-10508 ,-10890 ,
+ -11270 ,-11648 ,-12024 ,-12399 ,-12772 ,
+ -13142 ,-13511 ,-13878 ,-14243 ,-14605 ,
+ -14965 ,-15323 ,-15679 ,-16032 ,-16383 ,
+ -16731 ,-17077 ,-17420 ,-17761 ,-18099 ,
+ -18434 ,-18766 ,-19096 ,-19422 ,-19746 ,
+ -20067 ,-20384 ,-20699 ,-21010 ,-21318 ,
+ -21623 ,-21925 ,-22223 ,-22518 ,-22810 ,
+ -23098 ,-23382 ,-23663 ,-23941 ,-24215 ,
+ -24485 ,-24751 ,-25014 ,-25273 ,-25528 ,
+ -25779 ,-26026 ,-26269 ,-26509 ,-26744 ,
+ -26975 ,-27202 ,-27425 ,-27644 ,-27859 ,
+ -28069 ,-28275 ,-28477 ,-28674 ,-28868 ,
+ -29056 ,-29241 ,-29421 ,-29596 ,-29767 ,
+ -29934 ,-30096 ,-30253 ,-30406 ,-30554 ,
+ -30697 ,-30836 ,-30970 ,-31100 ,-31225 ,
+ -31345 ,-31460 ,-31570 ,-31676 ,-31777 ,
+ -31873 ,-31964 ,-32050 ,-32132 ,-32209 ,
+ -32280 ,-32347 ,-32409 ,-32466 ,-32518 ,
+ -32565 ,-32607 ,-32645 ,-32677 ,-32704 ,
+ -32727 ,-32744 ,-32757 ,-32764 ,-32767
+};
+
+const Word16 cos_pi_by_383[384] = /* Q15 */
+{
+ 32767 ,32765 ,32762 ,32757 ,32749 ,32739 ,
+ 32727 ,32713 ,32696 ,32677 ,32656 ,
+ 32633 ,32608 ,32580 ,32551 ,32519 ,
+ 32485 ,32448 ,32410 ,32369 ,32327 ,
+ 32282 ,32234 ,32185 ,32134 ,32080 ,
+ 32024 ,31966 ,31906 ,31844 ,31779 ,
+ 31713 ,31644 ,31573 ,31500 ,31425 ,
+ 31348 ,31269 ,31188 ,31104 ,31019 ,
+ 30931 ,30841 ,30749 ,30655 ,30560 ,
+ 30462 ,30361 ,30259 ,30155 ,30049 ,
+ 29941 ,29831 ,29719 ,29604 ,29488 ,
+ 29370 ,29250 ,29128 ,29004 ,28878 ,
+ 28750 ,28620 ,28488 ,28354 ,28218 ,
+ 28081 ,27941 ,27800 ,27657 ,27512 ,
+ 27365 ,27216 ,27066 ,26913 ,26759 ,
+ 26603 ,26445 ,26286 ,26124 ,25961 ,
+ 25796 ,25630 ,25461 ,25291 ,25120 ,
+ 24946 ,24771 ,24594 ,24416 ,24236 ,
+ 24054 ,23871 ,23686 ,23499 ,23311 ,
+ 23122 ,22930 ,22738 ,22543 ,22348 ,
+ 22150 ,21952 ,21751 ,21550 ,21346 ,
+ 21142 ,20936 ,20728 ,20519 ,20309 ,
+ 20097 ,19885 ,19670 ,19455 ,19238 ,
+ 19019 ,18800 ,18579 ,18357 ,18134 ,
+ 17910 ,17684 ,17457 ,17229 ,17000 ,
+ 16769 ,16538 ,16305 ,16072 ,15837 ,
+ 15601 ,15364 ,15126 ,14887 ,14647 ,
+ 14407 ,14165 ,13922 ,13678 ,13433 ,
+ 13188 ,12941 ,12694 ,12446 ,12197 ,
+ 11947 ,11696 ,11445 ,11192 ,10939 ,
+ 10686 ,10431 ,10176 ,9920 ,9664 ,
+ 9407 ,9149 ,8891 ,8632 ,8372 ,
+ 8112 ,7851 ,7590 ,7328 ,7066 ,
+ 6803 ,6540 ,6277 ,6013 ,5748 ,
+ 5483 ,5218 ,4953 ,4687 ,4421 ,
+ 4154 ,3888 ,3621 ,3353 ,3086 ,
+ 2818 ,2550 ,2282 ,2014 ,1746 ,
+ 1477 ,1209 ,940 ,671 ,403 ,
+ 134 ,-134 ,-403 ,-671 ,-940 ,
+ -1209 ,-1477 ,-1746 ,-2014 ,-2282 ,
+ -2550 ,-2818 ,-3086 ,-3353 ,-3621 ,
+ -3888 ,-4154 ,-4421 ,-4687 ,-4953 ,
+ -5218 ,-5483 ,-5748 ,-6013 ,-6277 ,
+ -6540 ,-6803 ,-7066 ,-7328 ,-7590 ,
+ -7851 ,-8112 ,-8372 ,-8632 ,-8891 ,
+ -9149 ,-9407 ,-9664 ,-9920 ,-10176 ,
+ -10431 ,-10686 ,-10939 ,-11192 ,-11445 ,
+ -11696 ,-11947 ,-12197 ,-12446 ,-12694 ,
+ -12941 ,-13188 ,-13433 ,-13678 ,-13922 ,
+ -14165 ,-14407 ,-14647 ,-14887 ,-15126 ,
+ -15364 ,-15601 ,-15837 ,-16072 ,-16305 ,
+ -16538 ,-16769 ,-17000 ,-17229 ,-17457 ,
+ -17684 ,-17910 ,-18134 ,-18357 ,-18579 ,
+ -18800 ,-19019 ,-19238 ,-19455 ,-19670 ,
+ -19885 ,-20097 ,-20309 ,-20519 ,-20728 ,
+ -20936 ,-21142 ,-21346 ,-21550 ,-21751 ,
+ -21952 ,-22150 ,-22348 ,-22543 ,-22738 ,
+ -22930 ,-23122 ,-23311 ,-23499 ,-23686 ,
+ -23871 ,-24054 ,-24236 ,-24416 ,-24594 ,
+ -24771 ,-24946 ,-25120 ,-25291 ,-25461 ,
+ -25630 ,-25796 ,-25961 ,-26124 ,-26286 ,
+ -26445 ,-26603 ,-26759 ,-26913 ,-27066 ,
+ -27216 ,-27365 ,-27512 ,-27657 ,-27800 ,
+ -27941 ,-28081 ,-28218 ,-28354 ,-28488 ,
+ -28620 ,-28750 ,-28878 ,-29004 ,-29128 ,
+ -29250 ,-29370 ,-29488 ,-29604 ,-29719 ,
+ -29831 ,-29941 ,-30049 ,-30155 ,-30259 ,
+ -30361 ,-30462 ,-30560 ,-30655 ,-30749 ,
+ -30841 ,-30931 ,-31019 ,-31104 ,-31188 ,
+ -31269 ,-31348 ,-31425 ,-31500 ,-31573 ,
+ -31644 ,-31713 ,-31779 ,-31844 ,-31906 ,
+ -31966 ,-32024 ,-32080 ,-32134 ,-32185 ,
+ -32234 ,-32282 ,-32327 ,-32369 ,-32410 ,
+ -32448 ,-32485 ,-32519 ,-32551 ,-32580 ,
+ -32608 ,-32633 ,-32656 ,-32677 ,-32696 ,
+ -32713 ,-32727 ,-32739 ,-32749 ,-32757 ,
+ -32762 ,-32765 ,-32767
+};
+
+const Word16 swb_lsp_prev_interp_init[10] = { 32767, 31164, 26510, 19261, 10126, 0, -10126, -19261, -26510, -31164 };//Q15
+/* st->swb_lsp_prev_interp[i] = (float)cos( (float)i * PI / (float)10.0f )*/
+
+//ivas_sns_com_fx.c
+/*
+ powf( 10.0f, (float) i * (float) tilt / ( (float) FDNS_NPTS - 1.0f ) / 10.0f ) where 0 =< i < FDNS_NPTS;
+ tilt = 19.f for L_FRAME16k,
+ 22.f for L_FRAME25_6k,
+ 23.5f for L_FRAME32k;
+*/
+
+/* Q23 */
+const Word32 pow_tilt_16k[64] = {
+ 8388608, 8991841, 9638454, 10331564, 11074518, 11870897, 12724546, 13639580,
+ 14620416, 15671785, 16798759, 18006775, 19301660, 20689662, 22177476, 23772281,
+ 25481769, 27314189, 29278380, 31383818, 33640660, 36059793, 38652889, 41432458,
+ 44411907, 47605612, 51028980, 54698525, 58631951, 62848233, 67367713, 72212193,
+ 77405045, 82971319, 88937870, 95333482, 102189009, 109537523, 117414477, 125857870,
+ 134908436, 144609837, 155008876, 166155720, 178104145, 190911793, 204640453, 219356353,
+ 235130489, 252038960, 270163335, 289591052, 310415836, 332738151, 356665686, 382313874,
+ 409806450, 439276044, 470864826, 504725189, 541020486, 579925813, 621628862, 666330818
+};
+
+/* Q23 */
+const Word32 pow_tilt_25_6k[64] = {
+ 8388608, 9090977, 9852154, 10677063, 11571041, 12539871, 13589820, 14727680,
+ 15960812, 17297192, 18745466, 20315003, 22015955, 23859325, 25857039, 28022019,
+ 30368270, 32910971, 35666569, 38652889, 41889251, 45396590, 49197594, 53316853,
+ 57781011, 62618949, 67861961, 73543965, 79701717, 86375050, 93607134, 101444752,
+ 109938604, 119143637, 129119397, 139930415, 151646628, 164343826, 178104145, 193016600,
+ 209177658, 226691863, 245672512, 266242389, 288534558, 312693225, 338874669, 367248256,
+ 397997530, 431321405, 467435450, 506573283, 548988082, 594954222, 644769055, 698754827,
+ 757260765, 820665338, 889378703, 963845359, 1044547023, 1132005744, 1226787283, 1329504771
+};
+
+/* Q23 */
+const Word32 pow_tilt_32k[64] = {
+ 8388608, 9140953, 9960774, 10854121, 11827590, 12888365, 14044278, 15303861,
+ 16676411, 18172061, 19801850, 21577810, 23513049, 25621853, 27919788, 30423818,
+ 33152425, 36125751, 39365745, 42896322, 46743545, 50935812, 55504069, 60482037,
+ 65906462, 71817384, 78258437, 85277166, 92925380, 101259536, 110341153, 120237270,
+ 131020935, 142771749, 155576454, 169529568, 184734089, 201302251, 219356353, 239029666,
+ 260467410, 283827832, 309283369, 337021925, 367248256, 400185482, 436076734, 475186948,
+ 517804822, 564244946, 614850125, 669993906, 730083343, 795561993, 866913198, 944663645,
+ 1029387260, 1121709444, 1222311686, 1331936594, 1451393382, 1581563835, 1723408827, 1877975405
+};
+
+const Word16 L_frame_inv[8] = { 0x4000, 0x369D, 0x3333, 0x2D83, 0x2AAB, 0x28F6, 0, 0x2222 }; // Q14
+
+const Word16 InvIntTable[65] = // Q15
+{
+ 0x7FFF,
+ 0x7FFF, 0x4000, 0x2AAB, 0x2000, 0x199A, 0x1555, 0x1249, 0x1000,
+ 0x0E39, 0x0CCD, 0x0BA3, 0x0AAB, 0x09D9, 0x0925, 0x0889, 0x0800,
+ 0x0788, 0x071C, 0x06BD, 0x0666, 0x0618, 0x05D1, 0x0591, 0x0555,
+ 0x051F, 0x04EC, 0x04BE, 0x0492, 0x046A, 0x0444, 0x0421, 0x0400,
+ 0x03E1, 0x03C4, 0x03A8, 0x038E, 0x0376, 0x035E, 0x0348, 0x0333,
+ 0x031F, 0x030C, 0x02FA, 0x02E9, 0x02D8, 0x02C8, 0x02B9, 0x02AB,
+ 0x029D, 0x028F, 0x0283, 0x0276, 0x026A, 0x025F, 0x0254, 0x0249,
+ 0x023F, 0x0235, 0x022B, 0x0222, 0x0219, 0x0211, 0x0208, 0x0200
+};
+
+const Word16 TecLowBandTable[] = { 0, 2, 4, 6 }; //Q0
+const Word16 TecSC_Fx[] =
+{
+ 23999/*0.3662f*2.0f Q15*/, 7065/*0.1078f*2.0f Q15*/, 7825/*0.1194f*2.0f Q15*/,
+ 8448/*0.1289f*2.0f Q15*/, 8946/*0.1365f*2.0f Q15*/, 9254/*0.1412f*2.0f Q15*/
+};
+
+/* clang-format on */
+const Word16 sqrt_table_pitch_search[256 + 1] = /* Q11 */
+ {
+ 0, 2048, 2896, 3547, 4096, 4579, 5017, 5418,
+ 5793, 6144, 6476, 6792, 7094, 7384, 7663, 7932,
+ 8192, 8444, 8689, 8927, 9159, 9385, 9606, 9822,
+ 10033, 10240, 10443, 10642, 10837, 11029, 11217, 11403,
+ 11585, 11765, 11942, 12116, 12288, 12457, 12625, 12790,
+ 12953, 13114, 13273, 13430, 13585, 13738, 13890, 14040,
+ 14189, 14336, 14482, 14626, 14768, 14910, 15050, 15188,
+ 15326, 15462, 15597, 15731, 15864, 15995, 16126, 16255,
+ 16384, 16512, 16638, 16764, 16888, 17012, 17135, 17257,
+ 17378, 17498, 17618, 17736, 17854, 17971, 18087, 18203,
+ 18318, 18432, 18545, 18658, 18770, 18882, 18992, 19102,
+ 19212, 19321, 19429, 19537, 19644, 19750, 19856, 19961,
+ 20066, 20170, 20274, 20377, 20480, 20582, 20684, 20785,
+ 20886, 20986, 21085, 21185, 21283, 21382, 21480, 21577,
+ 21674, 21771, 21867, 21962, 22058, 22153, 22247, 22341,
+ 22435, 22528, 22621, 22713, 22806, 22897, 22989, 23080,
+ 23170, 23261, 23351, 23440, 23530, 23619, 23707, 23796,
+ 23884, 23971, 24059, 24146, 24232, 24319, 24405, 24491,
+ 24576, 24661, 24746, 24831, 24915, 24999, 25083, 25166,
+ 25249, 25332, 25415, 25497, 25580, 25661, 25743, 25824,
+ 25905, 25986, 26067, 26147, 26227, 26307, 26387, 26466,
+ 26545, 26624, 26703, 26781, 26859, 26937, 27015, 27092,
+ 27170, 27247, 27324, 27400, 27477, 27553, 27629, 27705,
+ 27780, 27856, 27931, 28006, 28081, 28155, 28230, 28304,
+ 28378, 28452, 28525, 28599, 28672, 28745, 28818, 28891,
+ 28963, 29035, 29108, 29180, 29251, 29323, 29394, 29466,
+ 29537, 29608, 29678, 29749, 29819, 29890, 29960, 30030,
+ 30099, 30169, 30238, 30308, 30377, 30446, 30515, 30583,
+ 30652, 30720, 30788, 30856, 30924, 30992, 31059, 31127,
+ 31194, 31261, 31328, 31395, 31462, 31529, 31595, 31661,
+ 31727, 31794, 31859, 31925, 31991, 32056, 32122, 32187,
+ 32252, 32317, 32382, 32446, 32511, 32575, 32640, 32704,
+ 32766
+ };
+
+// fft_evs.c
+const Word16 RotVector_32[2 * 20] = { // Q15
+ /**
+ * \brief Twiddle factors are unscaled
+ */
+ SHC( 0x7d8a ), SHC( 0xe707 ), SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x5a82 ), SHC( 0xa57e ),
+ SHC( 0x471d ), SHC( 0x9592 ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0x7642 ), SHC( 0xcf04 ),
+ SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0xcf04 ), SHC( 0x89be ), SHC( 0xa57e ), SHC( 0xa57e ),
+ SHC( 0x89be ), SHC( 0xcf04 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0xe707 ), SHC( 0x8276 ),
+ SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x8276 ), SHC( 0xe707 ), SHC( 0x89be ), SHC( 0x30fc ), SHC( 0xb8e3 ), SHC( 0x6a6e )
+};
+
+/**
+ * \brief Twiddle factors are unscaled
+ */
+const Word16 RotVector_480[2 * ( 480 - 30 )] = { // Q15
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ff5 ), SHC( 0xfca6 ),
+ SHC( 0x7fd3 ), SHC( 0xf94d ), SHC( 0x7f9b ), SHC( 0xf5f5 ), SHC( 0x7f4c ), SHC( 0xf29f ), SHC( 0x7ee8 ), SHC( 0xef4b ),
+ SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7ddb ), SHC( 0xe8ad ), SHC( 0x7d34 ), SHC( 0xe563 ), SHC( 0x7c77 ), SHC( 0xe21e ),
+ SHC( 0x7ba3 ), SHC( 0xdedf ), SHC( 0x7abb ), SHC( 0xdba5 ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x78a8 ), SHC( 0xd546 ),
+ SHC( 0x7780 ), SHC( 0xd221 ), SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x74ef ), SHC( 0xcbf0 ), SHC( 0x7388 ), SHC( 0xc8e5 ),
+ SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x707d ), SHC( 0xc2ec ), SHC( 0x6eda ), SHC( 0xc000 ), SHC( 0x6d23 ), SHC( 0xbd1f ),
+ SHC( 0x6b5a ), SHC( 0xba49 ), SHC( 0x697d ), SHC( 0xb780 ), SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x658d ), SHC( 0xb214 ),
+ SHC( 0x637a ), SHC( 0xaf72 ), SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x5f1f ), SHC( 0xaa5a ), SHC( 0x5cd9 ), SHC( 0xa7e4 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fd3 ), SHC( 0xf94d ), SHC( 0x7f4c ), SHC( 0xf29f ), SHC( 0x7e6d ), SHC( 0xebfa ),
+ SHC( 0x7d34 ), SHC( 0xe563 ), SHC( 0x7ba3 ), SHC( 0xdedf ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x7780 ), SHC( 0xd221 ),
+ SHC( 0x74ef ), SHC( 0xcbf0 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6eda ), SHC( 0xc000 ), SHC( 0x6b5a ), SHC( 0xba49 ),
+ SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x637a ), SHC( 0xaf72 ), SHC( 0x5f1f ), SHC( 0xaa5a ), SHC( 0x5a82 ), SHC( 0xa57e ),
+ SHC( 0x55a6 ), SHC( 0xa0e1 ), SHC( 0x508e ), SHC( 0x9c86 ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x45b7 ), SHC( 0x94a6 ),
+ SHC( 0x4000 ), SHC( 0x9126 ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x3410 ), SHC( 0x8b11 ), SHC( 0x2ddf ), SHC( 0x8880 ),
+ SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x2121 ), SHC( 0x845d ), SHC( 0x1a9d ), SHC( 0x82cc ), SHC( 0x1406 ), SHC( 0x8193 ),
+ SHC( 0x0d61 ), SHC( 0x80b4 ), SHC( 0x06b3 ), SHC( 0x802d ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f9b ), SHC( 0xf5f5 ),
+ SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x7642 ), SHC( 0xcf04 ),
+ SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6d23 ), SHC( 0xbd1f ), SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x6155 ), SHC( 0xacdf ),
+ SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x5321 ), SHC( 0x9eab ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x42e1 ), SHC( 0x92dd ),
+ SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1de2 ), SHC( 0x8389 ),
+ SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0x0a0b ), SHC( 0x8065 ), SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xf5f5 ), SHC( 0x8065 ),
+ SHC( 0xebfa ), SHC( 0x8193 ), SHC( 0xe21e ), SHC( 0x8389 ), SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xcf04 ), SHC( 0x89be ),
+ SHC( 0xc5e4 ), SHC( 0x8df3 ), SHC( 0xbd1f ), SHC( 0x92dd ), SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xacdf ), SHC( 0x9eab ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f4c ), SHC( 0xf29f ), SHC( 0x7d34 ), SHC( 0xe563 ), SHC( 0x79bc ), SHC( 0xd872 ),
+ SHC( 0x74ef ), SHC( 0xcbf0 ), SHC( 0x6eda ), SHC( 0xc000 ), SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x5f1f ), SHC( 0xaa5a ),
+ SHC( 0x55a6 ), SHC( 0xa0e1 ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x4000 ), SHC( 0x9126 ), SHC( 0x3410 ), SHC( 0x8b11 ),
+ SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1a9d ), SHC( 0x82cc ), SHC( 0x0d61 ), SHC( 0x80b4 ), SHC( 0x0000 ), SHC( 0x8000 ),
+ SHC( 0xf29f ), SHC( 0x80b4 ), SHC( 0xe563 ), SHC( 0x82cc ), SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xcbf0 ), SHC( 0x8b11 ),
+ SHC( 0xc000 ), SHC( 0x9126 ), SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xaa5a ), SHC( 0xa0e1 ), SHC( 0xa0e1 ), SHC( 0xaa5a ),
+ SHC( 0x9872 ), SHC( 0xb4c3 ), SHC( 0x9126 ), SHC( 0xc000 ), SHC( 0x8b11 ), SHC( 0xcbf0 ), SHC( 0x8644 ), SHC( 0xd872 ),
+ SHC( 0x82cc ), SHC( 0xe563 ), SHC( 0x80b4 ), SHC( 0xf29f ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ee8 ), SHC( 0xef4b ),
+ SHC( 0x7ba3 ), SHC( 0xdedf ), SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x6eda ), SHC( 0xc000 ), SHC( 0x658d ), SHC( 0xb214 ),
+ SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x4dec ), SHC( 0x9a73 ), SHC( 0x4000 ), SHC( 0x9126 ), SHC( 0x30fc ), SHC( 0x89be ),
+ SHC( 0x2121 ), SHC( 0x845d ), SHC( 0x10b5 ), SHC( 0x8118 ), SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xef4b ), SHC( 0x8118 ),
+ SHC( 0xdedf ), SHC( 0x845d ), SHC( 0xcf04 ), SHC( 0x89be ), SHC( 0xc000 ), SHC( 0x9126 ), SHC( 0xb214 ), SHC( 0x9a73 ),
+ SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x9a73 ), SHC( 0xb214 ), SHC( 0x9126 ), SHC( 0xc000 ), SHC( 0x89be ), SHC( 0xcf04 ),
+ SHC( 0x845d ), SHC( 0xdedf ), SHC( 0x8118 ), SHC( 0xef4b ), SHC( 0x8000 ), SHC( 0x0000 ), SHC( 0x8118 ), SHC( 0x10b5 ),
+ SHC( 0x845d ), SHC( 0x2121 ), SHC( 0x89be ), SHC( 0x30fc ), SHC( 0x9126 ), SHC( 0x4000 ), SHC( 0x9a73 ), SHC( 0x4dec ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x720d ), SHC( 0xc5e4 ),
+ SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x3a1c ), SHC( 0x8df3 ),
+ SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xebfa ), SHC( 0x8193 ),
+ SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xc5e4 ), SHC( 0x8df3 ), SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xa57e ), SHC( 0xa57e ),
+ SHC( 0x9872 ), SHC( 0xb4c3 ), SHC( 0x8df3 ), SHC( 0xc5e4 ), SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8193 ), SHC( 0xebfa ),
+ SHC( 0x8000 ), SHC( 0x0000 ), SHC( 0x8193 ), SHC( 0x1406 ), SHC( 0x8644 ), SHC( 0x278e ), SHC( 0x8df3 ), SHC( 0x3a1c ),
+ SHC( 0x9872 ), SHC( 0x4b3d ), SHC( 0xa57e ), SHC( 0x5a82 ), SHC( 0xb4c3 ), SHC( 0x678e ), SHC( 0xc5e4 ), SHC( 0x720d ),
+ SHC( 0xd872 ), SHC( 0x79bc ), SHC( 0xebfa ), SHC( 0x7e6d ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ddb ), SHC( 0xe8ad ),
+ SHC( 0x7780 ), SHC( 0xd221 ), SHC( 0x6d23 ), SHC( 0xbd1f ), SHC( 0x5f1f ), SHC( 0xaa5a ), SHC( 0x4dec ), SHC( 0x9a73 ),
+ SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x245b ), SHC( 0x8545 ), SHC( 0x0d61 ), SHC( 0x80b4 ), SHC( 0xf5f5 ), SHC( 0x8065 ),
+ SHC( 0xdedf ), SHC( 0x845d ), SHC( 0xc8e5 ), SHC( 0x8c78 ), SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xa327 ), SHC( 0xa7e4 ),
+ SHC( 0x94a6 ), SHC( 0xba49 ), SHC( 0x89be ), SHC( 0xcf04 ), SHC( 0x82cc ), SHC( 0xe563 ), SHC( 0x800b ), SHC( 0xfca6 ),
+ SHC( 0x8193 ), SHC( 0x1406 ), SHC( 0x8758 ), SHC( 0x2aba ), SHC( 0x9126 ), SHC( 0x4000 ), SHC( 0x9eab ), SHC( 0x5321 ),
+ SHC( 0xaf72 ), SHC( 0x637a ), SHC( 0xc2ec ), SHC( 0x707d ), SHC( 0xd872 ), SHC( 0x79bc ), SHC( 0xef4b ), SHC( 0x7ee8 ),
+ SHC( 0x06b3 ), SHC( 0x7fd3 ), SHC( 0x1de2 ), SHC( 0x7c77 ), SHC( 0x3410 ), SHC( 0x74ef ), SHC( 0x4880 ), SHC( 0x697d ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ffd ), SHC( 0xfe53 ), SHC( 0x7ff5 ), SHC( 0xfca6 ), SHC( 0x7fe7 ), SHC( 0xfafa ),
+ SHC( 0x7fd3 ), SHC( 0xf94d ), SHC( 0x7fba ), SHC( 0xf7a1 ), SHC( 0x7f9b ), SHC( 0xf5f5 ), SHC( 0x7f77 ), SHC( 0xf44a ),
+ SHC( 0x7f4c ), SHC( 0xf29f ), SHC( 0x7f1d ), SHC( 0xf0f5 ), SHC( 0x7ee8 ), SHC( 0xef4b ), SHC( 0x7ead ), SHC( 0xeda2 ),
+ SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7e27 ), SHC( 0xea53 ), SHC( 0x7ddb ), SHC( 0xe8ad ), SHC( 0x7d8a ), SHC( 0xe707 ),
+ SHC( 0x7d34 ), SHC( 0xe563 ), SHC( 0x7cd8 ), SHC( 0xe3c0 ), SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x7c10 ), SHC( 0xe07e ),
+ SHC( 0x7ba3 ), SHC( 0xdedf ), SHC( 0x7b32 ), SHC( 0xdd41 ), SHC( 0x7abb ), SHC( 0xdba5 ), SHC( 0x7a3e ), SHC( 0xda0b ),
+ SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x7935 ), SHC( 0xd6db ), SHC( 0x78a8 ), SHC( 0xd546 ), SHC( 0x7817 ), SHC( 0xd3b2 ),
+ SHC( 0x7780 ), SHC( 0xd221 ), SHC( 0x76e3 ), SHC( 0xd092 ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fe7 ), SHC( 0xfafa ),
+ SHC( 0x7f9b ), SHC( 0xf5f5 ), SHC( 0x7f1d ), SHC( 0xf0f5 ), SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7d8a ), SHC( 0xe707 ),
+ SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x7b32 ), SHC( 0xdd41 ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x7817 ), SHC( 0xd3b2 ),
+ SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x743e ), SHC( 0xca69 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6fae ), SHC( 0xc175 ),
+ SHC( 0x6d23 ), SHC( 0xbd1f ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x6485 ), SHC( 0xb0c2 ),
+ SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x5dfe ), SHC( 0xa91d ), SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x56e3 ), SHC( 0xa202 ),
+ SHC( 0x5321 ), SHC( 0x9eab ), SHC( 0x4f3e ), SHC( 0x9b7b ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x471d ), SHC( 0x9592 ),
+ SHC( 0x42e1 ), SHC( 0x92dd ), SHC( 0x3e8b ), SHC( 0x9052 ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x3597 ), SHC( 0x8bc2 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fba ), SHC( 0xf7a1 ), SHC( 0x7ee8 ), SHC( 0xef4b ), SHC( 0x7d8a ), SHC( 0xe707 ),
+ SHC( 0x7ba3 ), SHC( 0xdedf ), SHC( 0x7935 ), SHC( 0xd6db ), SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x72cd ), SHC( 0xc763 ),
+ SHC( 0x6eda ), SHC( 0xc000 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x658d ), SHC( 0xb214 ), SHC( 0x603c ), SHC( 0xab9b ),
+ SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x5465 ), SHC( 0x9fc4 ), SHC( 0x4dec ), SHC( 0x9a73 ), SHC( 0x471d ), SHC( 0x9592 ),
+ SHC( 0x4000 ), SHC( 0x9126 ), SHC( 0x389d ), SHC( 0x8d33 ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x2925 ), SHC( 0x86cb ),
+ SHC( 0x2121 ), SHC( 0x845d ), SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0x10b5 ), SHC( 0x8118 ), SHC( 0x085f ), SHC( 0x8046 ),
+ SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xf7a1 ), SHC( 0x8046 ), SHC( 0xef4b ), SHC( 0x8118 ), SHC( 0xe707 ), SHC( 0x8276 ),
+ SHC( 0xdedf ), SHC( 0x845d ), SHC( 0xd6db ), SHC( 0x86cb ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f77 ), SHC( 0xf44a ),
+ SHC( 0x7ddb ), SHC( 0xe8ad ), SHC( 0x7b32 ), SHC( 0xdd41 ), SHC( 0x7780 ), SHC( 0xd221 ), SHC( 0x72cd ), SHC( 0xc763 ),
+ SHC( 0x6d23 ), SHC( 0xbd1f ), SHC( 0x668f ), SHC( 0xb36a ), SHC( 0x5f1f ), SHC( 0xaa5a ), SHC( 0x56e3 ), SHC( 0xa202 ),
+ SHC( 0x4dec ), SHC( 0x9a73 ), SHC( 0x444d ), SHC( 0x93bf ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x2f6e ), SHC( 0x891d ),
+ SHC( 0x245b ), SHC( 0x8545 ), SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0x0d61 ), SHC( 0x80b4 ), SHC( 0x01ad ), SHC( 0x8003 ),
+ SHC( 0xf5f5 ), SHC( 0x8065 ), SHC( 0xea53 ), SHC( 0x81d9 ), SHC( 0xdedf ), SHC( 0x845d ), SHC( 0xd3b2 ), SHC( 0x87e9 ),
+ SHC( 0xc8e5 ), SHC( 0x8c78 ), SHC( 0xbe8e ), SHC( 0x91ff ), SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xab9b ), SHC( 0x9fc4 ),
+ SHC( 0xa327 ), SHC( 0xa7e4 ), SHC( 0x9b7b ), SHC( 0xb0c2 ), SHC( 0x94a6 ), SHC( 0xba49 ), SHC( 0x8eb9 ), SHC( 0xc467 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f1d ), SHC( 0xf0f5 ), SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x7817 ), SHC( 0xd3b2 ),
+ SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x56e3 ), SHC( 0xa202 ),
+ SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x3e8b ), SHC( 0x9052 ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x22bf ), SHC( 0x84ce ),
+ SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0x0506 ), SHC( 0x8019 ), SHC( 0xf5f5 ), SHC( 0x8065 ), SHC( 0xe707 ), SHC( 0x8276 ),
+ SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xca69 ), SHC( 0x8bc2 ), SHC( 0xbd1f ), SHC( 0x92dd ), SHC( 0xb0c2 ), SHC( 0x9b7b ),
+ SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x9b7b ), SHC( 0xb0c2 ), SHC( 0x92dd ), SHC( 0xbd1f ), SHC( 0x8bc2 ), SHC( 0xca69 ),
+ SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8276 ), SHC( 0xe707 ), SHC( 0x8065 ), SHC( 0xf5f5 ), SHC( 0x8019 ), SHC( 0x0506 ),
+ SHC( 0x8193 ), SHC( 0x1406 ), SHC( 0x84ce ), SHC( 0x22bf ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ead ), SHC( 0xeda2 ),
+ SHC( 0x7abb ), SHC( 0xdba5 ), SHC( 0x743e ), SHC( 0xca69 ), SHC( 0x6b5a ), SHC( 0xba49 ), SHC( 0x603c ), SHC( 0xab9b ),
+ SHC( 0x5321 ), SHC( 0x9eab ), SHC( 0x444d ), SHC( 0x93bf ), SHC( 0x3410 ), SHC( 0x8b11 ), SHC( 0x22bf ), SHC( 0x84ce ),
+ SHC( 0x10b5 ), SHC( 0x8118 ), SHC( 0xfe53 ), SHC( 0x8003 ), SHC( 0xebfa ), SHC( 0x8193 ), SHC( 0xda0b ), SHC( 0x85c2 ),
+ SHC( 0xc8e5 ), SHC( 0x8c78 ), SHC( 0xb8e3 ), SHC( 0x9592 ), SHC( 0xaa5a ), SHC( 0xa0e1 ), SHC( 0x9d97 ), SHC( 0xae27 ),
+ SHC( 0x92dd ), SHC( 0xbd1f ), SHC( 0x8a65 ), SHC( 0xcd79 ), SHC( 0x845d ), SHC( 0xdedf ), SHC( 0x80e3 ), SHC( 0xf0f5 ),
+ SHC( 0x800b ), SHC( 0x035a ), SHC( 0x81d9 ), SHC( 0x15ad ), SHC( 0x8644 ), SHC( 0x278e ), SHC( 0x8d33 ), SHC( 0x389d ),
+ SHC( 0x9683 ), SHC( 0x4880 ), SHC( 0xa202 ), SHC( 0x56e3 ), SHC( 0xaf72 ), SHC( 0x637a ), SHC( 0xbe8e ), SHC( 0x6e01 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e27 ), SHC( 0xea53 ), SHC( 0x78a8 ), SHC( 0xd546 ), SHC( 0x6fae ), SHC( 0xc175 ),
+ SHC( 0x637a ), SHC( 0xaf72 ), SHC( 0x5465 ), SHC( 0x9fc4 ), SHC( 0x42e1 ), SHC( 0x92dd ), SHC( 0x2f6e ), SHC( 0x891d ),
+ SHC( 0x1a9d ), SHC( 0x82cc ), SHC( 0x0506 ), SHC( 0x8019 ), SHC( 0xef4b ), SHC( 0x8118 ), SHC( 0xda0b ), SHC( 0x85c2 ),
+ SHC( 0xc5e4 ), SHC( 0x8df3 ), SHC( 0xb36a ), SHC( 0x9971 ), SHC( 0xa327 ), SHC( 0xa7e4 ), SHC( 0x9592 ), SHC( 0xb8e3 ),
+ SHC( 0x8b11 ), SHC( 0xcbf0 ), SHC( 0x83f0 ), SHC( 0xe07e ), SHC( 0x8065 ), SHC( 0xf5f5 ), SHC( 0x8089 ), SHC( 0x0bb6 ),
+ SHC( 0x845d ), SHC( 0x2121 ), SHC( 0x8bc2 ), SHC( 0x3597 ), SHC( 0x9683 ), SHC( 0x4880 ), SHC( 0xa450 ), SHC( 0x5951 ),
+ SHC( 0xb4c3 ), SHC( 0x678e ), SHC( 0xc763 ), SHC( 0x72cd ), SHC( 0xdba5 ), SHC( 0x7abb ), SHC( 0xf0f5 ), SHC( 0x7f1d ),
+ SHC( 0x06b3 ), SHC( 0x7fd3 ), SHC( 0x1c40 ), SHC( 0x7cd8 ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7d8a ), SHC( 0xe707 ),
+ SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x471d ), SHC( 0x9592 ),
+ SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xe707 ), SHC( 0x8276 ),
+ SHC( 0xcf04 ), SHC( 0x89be ), SHC( 0xb8e3 ), SHC( 0x9592 ), SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x9592 ), SHC( 0xb8e3 ),
+ SHC( 0x89be ), SHC( 0xcf04 ), SHC( 0x8276 ), SHC( 0xe707 ), SHC( 0x8000 ), SHC( 0x0000 ), SHC( 0x8276 ), SHC( 0x18f9 ),
+ SHC( 0x89be ), SHC( 0x30fc ), SHC( 0x9592 ), SHC( 0x471d ), SHC( 0xa57e ), SHC( 0x5a82 ), SHC( 0xb8e3 ), SHC( 0x6a6e ),
+ SHC( 0xcf04 ), SHC( 0x7642 ), SHC( 0xe707 ), SHC( 0x7d8a ), SHC( 0x0000 ), SHC( 0x7fff ), SHC( 0x18f9 ), SHC( 0x7d8a ),
+ SHC( 0x30fc ), SHC( 0x7642 ), SHC( 0x471d ), SHC( 0x6a6e ), SHC( 0x5a82 ), SHC( 0x5a82 ), SHC( 0x6a6e ), SHC( 0x471d )
+};
+
+const Word16 RotVector_600[2 * ( 600 - 30 )] = { // Q15
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ff9 ), SHC( 0xfd52 ),
+ SHC( 0x7fe3 ), SHC( 0xfaa4 ), SHC( 0x7fbf ), SHC( 0xf7f6 ), SHC( 0x7f8d ), SHC( 0xf54a ), SHC( 0x7f4c ), SHC( 0xf29f ),
+ SHC( 0x7efe ), SHC( 0xeff5 ), SHC( 0x7ea0 ), SHC( 0xed4d ), SHC( 0x7e35 ), SHC( 0xeaa7 ), SHC( 0x7dbc ), SHC( 0xe804 ),
+ SHC( 0x7d34 ), SHC( 0xe563 ), SHC( 0x7c9e ), SHC( 0xe2c5 ), SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x7b49 ), SHC( 0xdd94 ),
+ SHC( 0x7a89 ), SHC( 0xdb01 ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x78e1 ), SHC( 0xd5e8 ), SHC( 0x77f9 ), SHC( 0xd362 ),
+ SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x7600 ), SHC( 0xce66 ), SHC( 0x74ef ), SHC( 0xcbf0 ), SHC( 0x73d1 ), SHC( 0xc980 ),
+ SHC( 0x72a7 ), SHC( 0xc716 ), SHC( 0x716f ), SHC( 0xc4b3 ), SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x6eda ), SHC( 0xc000 ),
+ SHC( 0x6d7d ), SHC( 0xbdb1 ), SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x6a9d ), SHC( 0xb92a ), SHC( 0x691b ), SHC( 0xb6f3 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fe3 ), SHC( 0xfaa4 ), SHC( 0x7f8d ), SHC( 0xf54a ), SHC( 0x7efe ), SHC( 0xeff5 ),
+ SHC( 0x7e35 ), SHC( 0xeaa7 ), SHC( 0x7d34 ), SHC( 0xe563 ), SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x7a89 ), SHC( 0xdb01 ),
+ SHC( 0x78e1 ), SHC( 0xd5e8 ), SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x74ef ), SHC( 0xcbf0 ), SHC( 0x72a7 ), SHC( 0xc716 ),
+ SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x6d7d ), SHC( 0xbdb1 ), SHC( 0x6a9d ), SHC( 0xb92a ), SHC( 0x678e ), SHC( 0xb4c3 ),
+ SHC( 0x6450 ), SHC( 0xb07e ), SHC( 0x60e5 ), SHC( 0xac5d ), SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x598f ), SHC( 0xa48c ),
+ SHC( 0x55a6 ), SHC( 0xa0e1 ), SHC( 0x5197 ), SHC( 0x9d60 ), SHC( 0x4d64 ), SHC( 0x9a0b ), SHC( 0x490d ), SHC( 0x96e5 ),
+ SHC( 0x4496 ), SHC( 0x93ed ), SHC( 0x4000 ), SHC( 0x9126 ), SHC( 0x3b4d ), SHC( 0x8e91 ), SHC( 0x3680 ), SHC( 0x8c2f ),
+ SHC( 0x319a ), SHC( 0x8a00 ), SHC( 0x2c9e ), SHC( 0x8807 ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fbf ), SHC( 0xf7f6 ),
+ SHC( 0x7efe ), SHC( 0xeff5 ), SHC( 0x7dbc ), SHC( 0xe804 ), SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x79bc ), SHC( 0xd872 ),
+ SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x73d1 ), SHC( 0xc980 ), SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x6c13 ), SHC( 0xbb6a ),
+ SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x62a0 ), SHC( 0xae69 ), SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x579f ), SHC( 0xa2b1 ),
+ SHC( 0x5197 ), SHC( 0x9d60 ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x4496 ), SHC( 0x93ed ), SHC( 0x3daa ), SHC( 0x8fd5 ),
+ SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x2f1f ), SHC( 0x88fd ), SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1fd5 ), SHC( 0x8405 ),
+ SHC( 0x17fc ), SHC( 0x8244 ), SHC( 0x100b ), SHC( 0x8102 ), SHC( 0x080a ), SHC( 0x8041 ), SHC( 0x0000 ), SHC( 0x8000 ),
+ SHC( 0xf7f6 ), SHC( 0x8041 ), SHC( 0xeff5 ), SHC( 0x8102 ), SHC( 0xe804 ), SHC( 0x8244 ), SHC( 0xe02b ), SHC( 0x8405 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f8d ), SHC( 0xf54a ), SHC( 0x7e35 ), SHC( 0xeaa7 ), SHC( 0x7bfb ), SHC( 0xe02b ),
+ SHC( 0x78e1 ), SHC( 0xd5e8 ), SHC( 0x74ef ), SHC( 0xcbf0 ), SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x6a9d ), SHC( 0xb92a ),
+ SHC( 0x6450 ), SHC( 0xb07e ), SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x55a6 ), SHC( 0xa0e1 ), SHC( 0x4d64 ), SHC( 0x9a0b ),
+ SHC( 0x4496 ), SHC( 0x93ed ), SHC( 0x3b4d ), SHC( 0x8e91 ), SHC( 0x319a ), SHC( 0x8a00 ), SHC( 0x278e ), SHC( 0x8644 ),
+ SHC( 0x1d3b ), SHC( 0x8362 ), SHC( 0x12b3 ), SHC( 0x8160 ), SHC( 0x080a ), SHC( 0x8041 ), SHC( 0xfd52 ), SHC( 0x8007 ),
+ SHC( 0xf29f ), SHC( 0x80b4 ), SHC( 0xe804 ), SHC( 0x8244 ), SHC( 0xdd94 ), SHC( 0x84b7 ), SHC( 0xd362 ), SHC( 0x8807 ),
+ SHC( 0xc980 ), SHC( 0x8c2f ), SHC( 0xc000 ), SHC( 0x9126 ), SHC( 0xb6f3 ), SHC( 0x96e5 ), SHC( 0xae69 ), SHC( 0x9d60 ),
+ SHC( 0xa671 ), SHC( 0xa48c ), SHC( 0x9f1b ), SHC( 0xac5d ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f4c ), SHC( 0xf29f ),
+ SHC( 0x7d34 ), SHC( 0xe563 ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x74ef ), SHC( 0xcbf0 ), SHC( 0x6eda ), SHC( 0xc000 ),
+ SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x5f1f ), SHC( 0xaa5a ), SHC( 0x55a6 ), SHC( 0xa0e1 ), SHC( 0x4b3d ), SHC( 0x9872 ),
+ SHC( 0x4000 ), SHC( 0x9126 ), SHC( 0x3410 ), SHC( 0x8b11 ), SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1a9d ), SHC( 0x82cc ),
+ SHC( 0x0d61 ), SHC( 0x80b4 ), SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xf29f ), SHC( 0x80b4 ), SHC( 0xe563 ), SHC( 0x82cc ),
+ SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xcbf0 ), SHC( 0x8b11 ), SHC( 0xc000 ), SHC( 0x9126 ), SHC( 0xb4c3 ), SHC( 0x9872 ),
+ SHC( 0xaa5a ), SHC( 0xa0e1 ), SHC( 0xa0e1 ), SHC( 0xaa5a ), SHC( 0x9872 ), SHC( 0xb4c3 ), SHC( 0x9126 ), SHC( 0xc000 ),
+ SHC( 0x8b11 ), SHC( 0xcbf0 ), SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x82cc ), SHC( 0xe563 ), SHC( 0x80b4 ), SHC( 0xf29f ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7efe ), SHC( 0xeff5 ), SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x7703 ), SHC( 0xd0e1 ),
+ SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x5197 ), SHC( 0x9d60 ),
+ SHC( 0x4496 ), SHC( 0x93ed ), SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x17fc ), SHC( 0x8244 ),
+ SHC( 0x080a ), SHC( 0x8041 ), SHC( 0xf7f6 ), SHC( 0x8041 ), SHC( 0xe804 ), SHC( 0x8244 ), SHC( 0xd872 ), SHC( 0x8644 ),
+ SHC( 0xc980 ), SHC( 0x8c2f ), SHC( 0xbb6a ), SHC( 0x93ed ), SHC( 0xae69 ), SHC( 0x9d60 ), SHC( 0xa2b1 ), SHC( 0xa861 ),
+ SHC( 0x9872 ), SHC( 0xb4c3 ), SHC( 0x8fd5 ), SHC( 0xc256 ), SHC( 0x88fd ), SHC( 0xd0e1 ), SHC( 0x8405 ), SHC( 0xe02b ),
+ SHC( 0x8102 ), SHC( 0xeff5 ), SHC( 0x8000 ), SHC( 0x0000 ), SHC( 0x8102 ), SHC( 0x100b ), SHC( 0x8405 ), SHC( 0x1fd5 ),
+ SHC( 0x88fd ), SHC( 0x2f1f ), SHC( 0x8fd5 ), SHC( 0x3daa ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ea0 ), SHC( 0xed4d ),
+ SHC( 0x7a89 ), SHC( 0xdb01 ), SHC( 0x73d1 ), SHC( 0xc980 ), SHC( 0x6a9d ), SHC( 0xb92a ), SHC( 0x5f1f ), SHC( 0xaa5a ),
+ SHC( 0x5197 ), SHC( 0x9d60 ), SHC( 0x424f ), SHC( 0x9283 ), SHC( 0x319a ), SHC( 0x8a00 ), SHC( 0x1fd5 ), SHC( 0x8405 ),
+ SHC( 0x0d61 ), SHC( 0x80b4 ), SHC( 0xfaa4 ), SHC( 0x801d ), SHC( 0xe804 ), SHC( 0x8244 ), SHC( 0xd5e8 ), SHC( 0x871f ),
+ SHC( 0xc4b3 ), SHC( 0x8e91 ), SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xa671 ), SHC( 0xa48c ), SHC( 0x9a0b ), SHC( 0xb29c ),
+ SHC( 0x8fd5 ), SHC( 0xc256 ), SHC( 0x8807 ), SHC( 0xd362 ), SHC( 0x82cc ), SHC( 0xe563 ), SHC( 0x8041 ), SHC( 0xf7f6 ),
+ SHC( 0x8073 ), SHC( 0x0ab6 ), SHC( 0x8362 ), SHC( 0x1d3b ), SHC( 0x88fd ), SHC( 0x2f1f ), SHC( 0x9126 ), SHC( 0x4000 ),
+ SHC( 0x9bb0 ), SHC( 0x4f82 ), SHC( 0xa861 ), SHC( 0x5d4f ), SHC( 0xb6f3 ), SHC( 0x691b ), SHC( 0xc716 ), SHC( 0x72a7 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e35 ), SHC( 0xeaa7 ), SHC( 0x78e1 ), SHC( 0xd5e8 ), SHC( 0x702b ), SHC( 0xc256 ),
+ SHC( 0x6450 ), SHC( 0xb07e ), SHC( 0x55a6 ), SHC( 0xa0e1 ), SHC( 0x4496 ), SHC( 0x93ed ), SHC( 0x319a ), SHC( 0x8a00 ),
+ SHC( 0x1d3b ), SHC( 0x8362 ), SHC( 0x080a ), SHC( 0x8041 ), SHC( 0xf29f ), SHC( 0x80b4 ), SHC( 0xdd94 ), SHC( 0x84b7 ),
+ SHC( 0xc980 ), SHC( 0x8c2f ), SHC( 0xb6f3 ), SHC( 0x96e5 ), SHC( 0xa671 ), SHC( 0xa48c ), SHC( 0x9872 ), SHC( 0xb4c3 ),
+ SHC( 0x8d59 ), SHC( 0xc716 ), SHC( 0x8577 ), SHC( 0xdb01 ), SHC( 0x8102 ), SHC( 0xeff5 ), SHC( 0x801d ), SHC( 0x055c ),
+ SHC( 0x82cc ), SHC( 0x1a9d ), SHC( 0x88fd ), SHC( 0x2f1f ), SHC( 0x9283 ), SHC( 0x424f ), SHC( 0x9f1b ), SHC( 0x53a3 ),
+ SHC( 0xae69 ), SHC( 0x62a0 ), SHC( 0xc000 ), SHC( 0x6eda ), SHC( 0xd362 ), SHC( 0x77f9 ), SHC( 0xe804 ), SHC( 0x7dbc ),
+ SHC( 0xfd52 ), SHC( 0x7ff9 ), SHC( 0x12b3 ), SHC( 0x7ea0 ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7dbc ), SHC( 0xe804 ),
+ SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x4b3d ), SHC( 0x9872 ),
+ SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x1fd5 ), SHC( 0x8405 ), SHC( 0x080a ), SHC( 0x8041 ), SHC( 0xeff5 ), SHC( 0x8102 ),
+ SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xc256 ), SHC( 0x8fd5 ), SHC( 0xae69 ), SHC( 0x9d60 ), SHC( 0x9d60 ), SHC( 0xae69 ),
+ SHC( 0x8fd5 ), SHC( 0xc256 ), SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8102 ), SHC( 0xeff5 ), SHC( 0x8041 ), SHC( 0x080a ),
+ SHC( 0x8405 ), SHC( 0x1fd5 ), SHC( 0x8c2f ), SHC( 0x3680 ), SHC( 0x9872 ), SHC( 0x4b3d ), SHC( 0xa861 ), SHC( 0x5d4f ),
+ SHC( 0xbb6a ), SHC( 0x6c13 ), SHC( 0xd0e1 ), SHC( 0x7703 ), SHC( 0xe804 ), SHC( 0x7dbc ), SHC( 0x0000 ), SHC( 0x7fff ),
+ SHC( 0x17fc ), SHC( 0x7dbc ), SHC( 0x2f1f ), SHC( 0x7703 ), SHC( 0x4496 ), SHC( 0x6c13 ), SHC( 0x579f ), SHC( 0x5d4f ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ffe ), SHC( 0xfea9 ), SHC( 0x7ff9 ), SHC( 0xfd52 ), SHC( 0x7ff0 ), SHC( 0xfbfb ),
+ SHC( 0x7fe3 ), SHC( 0xfaa4 ), SHC( 0x7fd3 ), SHC( 0xf94d ), SHC( 0x7fbf ), SHC( 0xf7f6 ), SHC( 0x7fa8 ), SHC( 0xf6a0 ),
+ SHC( 0x7f8d ), SHC( 0xf54a ), SHC( 0x7f6f ), SHC( 0xf3f4 ), SHC( 0x7f4c ), SHC( 0xf29f ), SHC( 0x7f27 ), SHC( 0xf14a ),
+ SHC( 0x7efe ), SHC( 0xeff5 ), SHC( 0x7ed1 ), SHC( 0xeea1 ), SHC( 0x7ea0 ), SHC( 0xed4d ), SHC( 0x7e6d ), SHC( 0xebfa ),
+ SHC( 0x7e35 ), SHC( 0xeaa7 ), SHC( 0x7dfa ), SHC( 0xe955 ), SHC( 0x7dbc ), SHC( 0xe804 ), SHC( 0x7d7a ), SHC( 0xe6b3 ),
+ SHC( 0x7d34 ), SHC( 0xe563 ), SHC( 0x7ceb ), SHC( 0xe414 ), SHC( 0x7c9e ), SHC( 0xe2c5 ), SHC( 0x7c4e ), SHC( 0xe178 ),
+ SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x7ba3 ), SHC( 0xdedf ), SHC( 0x7b49 ), SHC( 0xdd94 ), SHC( 0x7aeb ), SHC( 0xdc4a ),
+ SHC( 0x7a89 ), SHC( 0xdb01 ), SHC( 0x7a25 ), SHC( 0xd9b9 ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ff0 ), SHC( 0xfbfb ),
+ SHC( 0x7fbf ), SHC( 0xf7f6 ), SHC( 0x7f6f ), SHC( 0xf3f4 ), SHC( 0x7efe ), SHC( 0xeff5 ), SHC( 0x7e6d ), SHC( 0xebfa ),
+ SHC( 0x7dbc ), SHC( 0xe804 ), SHC( 0x7ceb ), SHC( 0xe414 ), SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x7aeb ), SHC( 0xdc4a ),
+ SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x786f ), SHC( 0xd4a4 ), SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x7579 ), SHC( 0xcd2a ),
+ SHC( 0x73d1 ), SHC( 0xc980 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x6e2d ), SHC( 0xbed8 ),
+ SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x69de ), SHC( 0xb80e ), SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x6524 ), SHC( 0xb18c ),
+ SHC( 0x62a0 ), SHC( 0xae69 ), SHC( 0x6004 ), SHC( 0xab5a ), SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x5a82 ), SHC( 0xa57e ),
+ SHC( 0x579f ), SHC( 0xa2b1 ), SHC( 0x54a6 ), SHC( 0x9ffc ), SHC( 0x5197 ), SHC( 0x9d60 ), SHC( 0x4e74 ), SHC( 0x9adc ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fd3 ), SHC( 0xf94d ), SHC( 0x7f4c ), SHC( 0xf29f ), SHC( 0x7e6d ), SHC( 0xebfa ),
+ SHC( 0x7d34 ), SHC( 0xe563 ), SHC( 0x7ba3 ), SHC( 0xdedf ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x7780 ), SHC( 0xd221 ),
+ SHC( 0x74ef ), SHC( 0xcbf0 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6eda ), SHC( 0xc000 ), SHC( 0x6b5a ), SHC( 0xba49 ),
+ SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x637a ), SHC( 0xaf72 ), SHC( 0x5f1f ), SHC( 0xaa5a ), SHC( 0x5a82 ), SHC( 0xa57e ),
+ SHC( 0x55a6 ), SHC( 0xa0e1 ), SHC( 0x508e ), SHC( 0x9c86 ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x45b7 ), SHC( 0x94a6 ),
+ SHC( 0x4000 ), SHC( 0x9126 ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x3410 ), SHC( 0x8b11 ), SHC( 0x2ddf ), SHC( 0x8880 ),
+ SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x2121 ), SHC( 0x845d ), SHC( 0x1a9d ), SHC( 0x82cc ), SHC( 0x1406 ), SHC( 0x8193 ),
+ SHC( 0x0d61 ), SHC( 0x80b4 ), SHC( 0x06b3 ), SHC( 0x802d ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fa8 ), SHC( 0xf6a0 ),
+ SHC( 0x7ea0 ), SHC( 0xed4d ), SHC( 0x7ceb ), SHC( 0xe414 ), SHC( 0x7a89 ), SHC( 0xdb01 ), SHC( 0x7780 ), SHC( 0xd221 ),
+ SHC( 0x73d1 ), SHC( 0xc980 ), SHC( 0x6f84 ), SHC( 0xc12a ), SHC( 0x6a9d ), SHC( 0xb92a ), SHC( 0x6524 ), SHC( 0xb18c ),
+ SHC( 0x5f1f ), SHC( 0xaa5a ), SHC( 0x5898 ), SHC( 0xa39d ), SHC( 0x5197 ), SHC( 0x9d60 ), SHC( 0x4a26 ), SHC( 0x97aa ),
+ SHC( 0x424f ), SHC( 0x9283 ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x319a ), SHC( 0x8a00 ), SHC( 0x28d4 ), SHC( 0x86b0 ),
+ SHC( 0x1fd5 ), SHC( 0x8405 ), SHC( 0x16ab ), SHC( 0x8206 ), SHC( 0x0d61 ), SHC( 0x80b4 ), SHC( 0x0405 ), SHC( 0x8010 ),
+ SHC( 0xfaa4 ), SHC( 0x801d ), SHC( 0xf14a ), SHC( 0x80d9 ), SHC( 0xe804 ), SHC( 0x8244 ), SHC( 0xdedf ), SHC( 0x845d ),
+ SHC( 0xd5e8 ), SHC( 0x871f ), SHC( 0xcd2a ), SHC( 0x8a87 ), SHC( 0xc4b3 ), SHC( 0x8e91 ), SHC( 0xbc8d ), SHC( 0x9337 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f6f ), SHC( 0xf3f4 ), SHC( 0x7dbc ), SHC( 0xe804 ), SHC( 0x7aeb ), SHC( 0xdc4a ),
+ SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x6524 ), SHC( 0xb18c ),
+ SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x54a6 ), SHC( 0x9ffc ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x4128 ), SHC( 0x91d3 ),
+ SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x2b5c ), SHC( 0x8791 ), SHC( 0x1fd5 ), SHC( 0x8405 ), SHC( 0x1406 ), SHC( 0x8193 ),
+ SHC( 0x080a ), SHC( 0x8041 ), SHC( 0xfbfb ), SHC( 0x8010 ), SHC( 0xeff5 ), SHC( 0x8102 ), SHC( 0xe414 ), SHC( 0x8315 ),
+ SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xcd2a ), SHC( 0x8a87 ), SHC( 0xc256 ), SHC( 0x8fd5 ), SHC( 0xb80e ), SHC( 0x9622 ),
+ SHC( 0xae69 ), SHC( 0x9d60 ), SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x9d60 ), SHC( 0xae69 ), SHC( 0x9622 ), SHC( 0xb80e ),
+ SHC( 0x8fd5 ), SHC( 0xc256 ), SHC( 0x8a87 ), SHC( 0xcd2a ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f27 ), SHC( 0xf14a ),
+ SHC( 0x7c9e ), SHC( 0xe2c5 ), SHC( 0x786f ), SHC( 0xd4a4 ), SHC( 0x72a7 ), SHC( 0xc716 ), SHC( 0x6b5a ), SHC( 0xba49 ),
+ SHC( 0x62a0 ), SHC( 0xae69 ), SHC( 0x5898 ), SHC( 0xa39d ), SHC( 0x4d64 ), SHC( 0x9a0b ), SHC( 0x4128 ), SHC( 0x91d3 ),
+ SHC( 0x3410 ), SHC( 0x8b11 ), SHC( 0x2647 ), SHC( 0x85db ), SHC( 0x17fc ), SHC( 0x8244 ), SHC( 0x0960 ), SHC( 0x8058 ),
+ SHC( 0xfaa4 ), SHC( 0x801d ), SHC( 0xebfa ), SHC( 0x8193 ), SHC( 0xdd94 ), SHC( 0x84b7 ), SHC( 0xcfa3 ), SHC( 0x897d ),
+ SHC( 0xc256 ), SHC( 0x8fd5 ), SHC( 0xb5da ), SHC( 0x97aa ), SHC( 0xaa5a ), SHC( 0xa0e1 ), SHC( 0x9ffc ), SHC( 0xab5a ),
+ SHC( 0x96e5 ), SHC( 0xb6f3 ), SHC( 0x8f31 ), SHC( 0xc383 ), SHC( 0x88fd ), SHC( 0xd0e1 ), SHC( 0x845d ), SHC( 0xdedf ),
+ SHC( 0x8160 ), SHC( 0xed4d ), SHC( 0x8010 ), SHC( 0xfbfb ), SHC( 0x8073 ), SHC( 0x0ab6 ), SHC( 0x8286 ), SHC( 0x194d ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ed1 ), SHC( 0xeea1 ), SHC( 0x7b49 ), SHC( 0xdd94 ), SHC( 0x7579 ), SHC( 0xcd2a ),
+ SHC( 0x6d7d ), SHC( 0xbdb1 ), SHC( 0x637a ), SHC( 0xaf72 ), SHC( 0x579f ), SHC( 0xa2b1 ), SHC( 0x4a26 ), SHC( 0x97aa ),
+ SHC( 0x3b4d ), SHC( 0x8e91 ), SHC( 0x2b5c ), SHC( 0x8791 ), SHC( 0x1a9d ), SHC( 0x82cc ), SHC( 0x0960 ), SHC( 0x8058 ),
+ SHC( 0xf7f6 ), SHC( 0x8041 ), SHC( 0xe6b3 ), SHC( 0x8286 ), SHC( 0xd5e8 ), SHC( 0x871f ), SHC( 0xc5e4 ), SHC( 0x8df3 ),
+ SHC( 0xb6f3 ), SHC( 0x96e5 ), SHC( 0xa95c ), SHC( 0xa1c8 ), SHC( 0x9d60 ), SHC( 0xae69 ), SHC( 0x9337 ), SHC( 0xbc8d ),
+ SHC( 0x8b11 ), SHC( 0xcbf0 ), SHC( 0x8515 ), SHC( 0xdc4a ), SHC( 0x8160 ), SHC( 0xed4d ), SHC( 0x8002 ), SHC( 0xfea9 ),
+ SHC( 0x8102 ), SHC( 0x100b ), SHC( 0x845d ), SHC( 0x2121 ), SHC( 0x8a00 ), SHC( 0x319a ), SHC( 0x91d3 ), SHC( 0x4128 ),
+ SHC( 0x9bb0 ), SHC( 0x4f82 ), SHC( 0xa768 ), SHC( 0x5c63 ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e6d ), SHC( 0xebfa ),
+ SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x5a82 ), SHC( 0xa57e ),
+ SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1406 ), SHC( 0x8193 ),
+ SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xebfa ), SHC( 0x8193 ), SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xc5e4 ), SHC( 0x8df3 ),
+ SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x9872 ), SHC( 0xb4c3 ), SHC( 0x8df3 ), SHC( 0xc5e4 ),
+ SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8193 ), SHC( 0xebfa ), SHC( 0x8000 ), SHC( 0x0000 ), SHC( 0x8193 ), SHC( 0x1406 ),
+ SHC( 0x8644 ), SHC( 0x278e ), SHC( 0x8df3 ), SHC( 0x3a1c ), SHC( 0x9872 ), SHC( 0x4b3d ), SHC( 0xa57e ), SHC( 0x5a82 ),
+ SHC( 0xb4c3 ), SHC( 0x678e ), SHC( 0xc5e4 ), SHC( 0x720d ), SHC( 0xd872 ), SHC( 0x79bc ), SHC( 0xebfa ), SHC( 0x7e6d ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7dfa ), SHC( 0xe955 ), SHC( 0x77f9 ), SHC( 0xd362 ), SHC( 0x6e2d ), SHC( 0xbed8 ),
+ SHC( 0x60e5 ), SHC( 0xac5d ), SHC( 0x508e ), SHC( 0x9c86 ), SHC( 0x3daa ), SHC( 0x8fd5 ), SHC( 0x28d4 ), SHC( 0x86b0 ),
+ SHC( 0x12b3 ), SHC( 0x8160 ), SHC( 0xfbfb ), SHC( 0x8010 ), SHC( 0xe563 ), SHC( 0x82cc ), SHC( 0xcfa3 ), SHC( 0x897d ),
+ SHC( 0xbb6a ), SHC( 0x93ed ), SHC( 0xa95c ), SHC( 0xa1c8 ), SHC( 0x9a0b ), SHC( 0xb29c ), SHC( 0x8df3 ), SHC( 0xc5e4 ),
+ SHC( 0x8577 ), SHC( 0xdb01 ), SHC( 0x80d9 ), SHC( 0xf14a ), SHC( 0x8041 ), SHC( 0x080a ), SHC( 0x83b2 ), SHC( 0x1e88 ),
+ SHC( 0x8b11 ), SHC( 0x3410 ), SHC( 0x9622 ), SHC( 0x47f2 ), SHC( 0xa48c ), SHC( 0x598f ), SHC( 0xb5da ), SHC( 0x6856 ),
+ SHC( 0xc980 ), SHC( 0x73d1 ), SHC( 0xdedf ), SHC( 0x7ba3 ), SHC( 0xf54a ), SHC( 0x7f8d ), SHC( 0x0c0c ), SHC( 0x7f6f ),
+ SHC( 0x226c ), SHC( 0x7b49 ), SHC( 0x37b6 ), SHC( 0x733e ), SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7d7a ), SHC( 0xe6b3 ),
+ SHC( 0x7600 ), SHC( 0xce66 ), SHC( 0x69de ), SHC( 0xb80e ), SHC( 0x598f ), SHC( 0xa48c ), SHC( 0x45b7 ), SHC( 0x94a6 ),
+ SHC( 0x2f1f ), SHC( 0x88fd ), SHC( 0x16ab ), SHC( 0x8206 ), SHC( 0xfd52 ), SHC( 0x8007 ), SHC( 0xe414 ), SHC( 0x8315 ),
+ SHC( 0xcbf0 ), SHC( 0x8b11 ), SHC( 0xb5da ), SHC( 0x97aa ), SHC( 0xa2b1 ), SHC( 0xa861 ), SHC( 0x9337 ), SHC( 0xbc8d ),
+ SHC( 0x8807 ), SHC( 0xd362 ), SHC( 0x8193 ), SHC( 0xebfa ), SHC( 0x801d ), SHC( 0x055c ), SHC( 0x83b2 ), SHC( 0x1e88 ),
+ SHC( 0x8c2f ), SHC( 0x3680 ), SHC( 0x993d ), SHC( 0x4c51 ), SHC( 0xaa5a ), SHC( 0x5f1f ), SHC( 0xbed8 ), SHC( 0x6e2d ),
+ SHC( 0xd5e8 ), SHC( 0x78e1 ), SHC( 0xeea1 ), SHC( 0x7ed1 ), SHC( 0x080a ), SHC( 0x7fbf ), SHC( 0x2121 ), SHC( 0x7ba3 ),
+ SHC( 0x38ea ), SHC( 0x72a7 ), SHC( 0x4e74 ), SHC( 0x6524 ), SHC( 0x60e5 ), SHC( 0x53a3 ), SHC( 0x6f84 ), SHC( 0x3ed6 )
+};
+
+
+/**
+ * \brief Twiddle factors are unscaled
+ */
+const Word16 RotVector_256[2 * ( 256 - 32 )] = { // Q15
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ff6 ), SHC( 0xfcdc ), SHC( 0x7fd9 ), SHC( 0xf9b8 ), SHC( 0x7fa7 ), SHC( 0xf695 ),
+ SHC( 0x7f62 ), SHC( 0xf374 ), SHC( 0x7f0a ), SHC( 0xf055 ), SHC( 0x7e9d ), SHC( 0xed38 ), SHC( 0x7e1e ), SHC( 0xea1e ),
+ SHC( 0x7d8a ), SHC( 0xe707 ), SHC( 0x7ce4 ), SHC( 0xe3f4 ), SHC( 0x7c2a ), SHC( 0xe0e6 ), SHC( 0x7b5d ), SHC( 0xdddc ),
+ SHC( 0x7a7d ), SHC( 0xdad8 ), SHC( 0x798a ), SHC( 0xd7d9 ), SHC( 0x7885 ), SHC( 0xd4e1 ), SHC( 0x776c ), SHC( 0xd1ef ),
+ SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x7505 ), SHC( 0xcc21 ), SHC( 0x73b6 ), SHC( 0xc946 ), SHC( 0x7255 ), SHC( 0xc673 ),
+ SHC( 0x70e3 ), SHC( 0xc3a9 ), SHC( 0x6f5f ), SHC( 0xc0e9 ), SHC( 0x6dca ), SHC( 0xbe32 ), SHC( 0x6c24 ), SHC( 0xbb85 ),
+ SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x68a7 ), SHC( 0xb64c ), SHC( 0x66d0 ), SHC( 0xb3c0 ), SHC( 0x64e9 ), SHC( 0xb140 ),
+ SHC( 0x62f2 ), SHC( 0xaecc ), SHC( 0x60ec ), SHC( 0xac65 ), SHC( 0x5ed7 ), SHC( 0xaa0a ), SHC( 0x5cb4 ), SHC( 0xa7bd ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fd9 ), SHC( 0xf9b8 ), SHC( 0x7f62 ), SHC( 0xf374 ), SHC( 0x7e9d ), SHC( 0xed38 ),
+ SHC( 0x7d8a ), SHC( 0xe707 ), SHC( 0x7c2a ), SHC( 0xe0e6 ), SHC( 0x7a7d ), SHC( 0xdad8 ), SHC( 0x7885 ), SHC( 0xd4e1 ),
+ SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x73b6 ), SHC( 0xc946 ), SHC( 0x70e3 ), SHC( 0xc3a9 ), SHC( 0x6dca ), SHC( 0xbe32 ),
+ SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x66d0 ), SHC( 0xb3c0 ), SHC( 0x62f2 ), SHC( 0xaecc ), SHC( 0x5ed7 ), SHC( 0xaa0a ),
+ SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x55f6 ), SHC( 0xa129 ), SHC( 0x5134 ), SHC( 0x9d0e ), SHC( 0x4c40 ), SHC( 0x9930 ),
+ SHC( 0x471d ), SHC( 0x9592 ), SHC( 0x41ce ), SHC( 0x9236 ), SHC( 0x3c57 ), SHC( 0x8f1d ), SHC( 0x36ba ), SHC( 0x8c4a ),
+ SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x2b1f ), SHC( 0x877b ), SHC( 0x2528 ), SHC( 0x8583 ), SHC( 0x1f1a ), SHC( 0x83d6 ),
+ SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0x12c8 ), SHC( 0x8163 ), SHC( 0x0c8c ), SHC( 0x809e ), SHC( 0x0648 ), SHC( 0x8027 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fa7 ), SHC( 0xf695 ), SHC( 0x7e9d ), SHC( 0xed38 ), SHC( 0x7ce4 ), SHC( 0xe3f4 ),
+ SHC( 0x7a7d ), SHC( 0xdad8 ), SHC( 0x776c ), SHC( 0xd1ef ), SHC( 0x73b6 ), SHC( 0xc946 ), SHC( 0x6f5f ), SHC( 0xc0e9 ),
+ SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x64e9 ), SHC( 0xb140 ), SHC( 0x5ed7 ), SHC( 0xaa0a ), SHC( 0x5843 ), SHC( 0xa34c ),
+ SHC( 0x5134 ), SHC( 0x9d0e ), SHC( 0x49b4 ), SHC( 0x9759 ), SHC( 0x41ce ), SHC( 0x9236 ), SHC( 0x398d ), SHC( 0x8dab ),
+ SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x2827 ), SHC( 0x8676 ), SHC( 0x1f1a ), SHC( 0x83d6 ), SHC( 0x15e2 ), SHC( 0x81e2 ),
+ SHC( 0x0c8c ), SHC( 0x809e ), SHC( 0x0324 ), SHC( 0x800a ), SHC( 0xf9b8 ), SHC( 0x8027 ), SHC( 0xf055 ), SHC( 0x80f6 ),
+ SHC( 0xe707 ), SHC( 0x8276 ), SHC( 0xdddc ), SHC( 0x84a3 ), SHC( 0xd4e1 ), SHC( 0x877b ), SHC( 0xcc21 ), SHC( 0x8afb ),
+ SHC( 0xc3a9 ), SHC( 0x8f1d ), SHC( 0xbb85 ), SHC( 0x93dc ), SHC( 0xb3c0 ), SHC( 0x9930 ), SHC( 0xac65 ), SHC( 0x9f14 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f62 ), SHC( 0xf374 ), SHC( 0x7d8a ), SHC( 0xe707 ), SHC( 0x7a7d ), SHC( 0xdad8 ),
+ SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x70e3 ), SHC( 0xc3a9 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x62f2 ), SHC( 0xaecc ),
+ SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x5134 ), SHC( 0x9d0e ), SHC( 0x471d ), SHC( 0x9592 ), SHC( 0x3c57 ), SHC( 0x8f1d ),
+ SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x2528 ), SHC( 0x8583 ), SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0x0c8c ), SHC( 0x809e ),
+ SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xf374 ), SHC( 0x809e ), SHC( 0xe707 ), SHC( 0x8276 ), SHC( 0xdad8 ), SHC( 0x8583 ),
+ SHC( 0xcf04 ), SHC( 0x89be ), SHC( 0xc3a9 ), SHC( 0x8f1d ), SHC( 0xb8e3 ), SHC( 0x9592 ), SHC( 0xaecc ), SHC( 0x9d0e ),
+ SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x9d0e ), SHC( 0xaecc ), SHC( 0x9592 ), SHC( 0xb8e3 ), SHC( 0x8f1d ), SHC( 0xc3a9 ),
+ SHC( 0x89be ), SHC( 0xcf04 ), SHC( 0x8583 ), SHC( 0xdad8 ), SHC( 0x8276 ), SHC( 0xe707 ), SHC( 0x809e ), SHC( 0xf374 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f0a ), SHC( 0xf055 ), SHC( 0x7c2a ), SHC( 0xe0e6 ), SHC( 0x776c ), SHC( 0xd1ef ),
+ SHC( 0x70e3 ), SHC( 0xc3a9 ), SHC( 0x68a7 ), SHC( 0xb64c ), SHC( 0x5ed7 ), SHC( 0xaa0a ), SHC( 0x539b ), SHC( 0x9f14 ),
+ SHC( 0x471d ), SHC( 0x9592 ), SHC( 0x398d ), SHC( 0x8dab ), SHC( 0x2b1f ), SHC( 0x877b ), SHC( 0x1c0c ), SHC( 0x831c ),
+ SHC( 0x0c8c ), SHC( 0x809e ), SHC( 0xfcdc ), SHC( 0x800a ), SHC( 0xed38 ), SHC( 0x8163 ), SHC( 0xdddc ), SHC( 0x84a3 ),
+ SHC( 0xcf04 ), SHC( 0x89be ), SHC( 0xc0e9 ), SHC( 0x90a1 ), SHC( 0xb3c0 ), SHC( 0x9930 ), SHC( 0xa7bd ), SHC( 0xa34c ),
+ SHC( 0x9d0e ), SHC( 0xaecc ), SHC( 0x93dc ), SHC( 0xbb85 ), SHC( 0x8c4a ), SHC( 0xc946 ), SHC( 0x8676 ), SHC( 0xd7d9 ),
+ SHC( 0x8276 ), SHC( 0xe707 ), SHC( 0x8059 ), SHC( 0xf695 ), SHC( 0x8027 ), SHC( 0x0648 ), SHC( 0x81e2 ), SHC( 0x15e2 ),
+ SHC( 0x8583 ), SHC( 0x2528 ), SHC( 0x8afb ), SHC( 0x33df ), SHC( 0x9236 ), SHC( 0x41ce ), SHC( 0x9b17 ), SHC( 0x4ec0 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e9d ), SHC( 0xed38 ), SHC( 0x7a7d ), SHC( 0xdad8 ), SHC( 0x73b6 ), SHC( 0xc946 ),
+ SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x5ed7 ), SHC( 0xaa0a ), SHC( 0x5134 ), SHC( 0x9d0e ), SHC( 0x41ce ), SHC( 0x9236 ),
+ SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x1f1a ), SHC( 0x83d6 ), SHC( 0x0c8c ), SHC( 0x809e ), SHC( 0xf9b8 ), SHC( 0x8027 ),
+ SHC( 0xe707 ), SHC( 0x8276 ), SHC( 0xd4e1 ), SHC( 0x877b ), SHC( 0xc3a9 ), SHC( 0x8f1d ), SHC( 0xb3c0 ), SHC( 0x9930 ),
+ SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x9930 ), SHC( 0xb3c0 ), SHC( 0x8f1d ), SHC( 0xc3a9 ), SHC( 0x877b ), SHC( 0xd4e1 ),
+ SHC( 0x8276 ), SHC( 0xe707 ), SHC( 0x8027 ), SHC( 0xf9b8 ), SHC( 0x809e ), SHC( 0x0c8c ), SHC( 0x83d6 ), SHC( 0x1f1a ),
+ SHC( 0x89be ), SHC( 0x30fc ), SHC( 0x9236 ), SHC( 0x41ce ), SHC( 0x9d0e ), SHC( 0x5134 ), SHC( 0xaa0a ), SHC( 0x5ed7 ),
+ SHC( 0xb8e3 ), SHC( 0x6a6e ), SHC( 0xc946 ), SHC( 0x73b6 ), SHC( 0xdad8 ), SHC( 0x7a7d ), SHC( 0xed38 ), SHC( 0x7e9d ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e1e ), SHC( 0xea1e ), SHC( 0x7885 ), SHC( 0xd4e1 ), SHC( 0x6f5f ), SHC( 0xc0e9 ),
+ SHC( 0x62f2 ), SHC( 0xaecc ), SHC( 0x539b ), SHC( 0x9f14 ), SHC( 0x41ce ), SHC( 0x9236 ), SHC( 0x2e11 ), SHC( 0x8894 ),
+ SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0x0324 ), SHC( 0x800a ), SHC( 0xed38 ), SHC( 0x8163 ), SHC( 0xd7d9 ), SHC( 0x8676 ),
+ SHC( 0xc3a9 ), SHC( 0x8f1d ), SHC( 0xb140 ), SHC( 0x9b17 ), SHC( 0xa129 ), SHC( 0xaa0a ), SHC( 0x93dc ), SHC( 0xbb85 ),
+ SHC( 0x89be ), SHC( 0xcf04 ), SHC( 0x831c ), SHC( 0xe3f4 ), SHC( 0x8027 ), SHC( 0xf9b8 ), SHC( 0x80f6 ), SHC( 0x0fab ),
+ SHC( 0x8583 ), SHC( 0x2528 ), SHC( 0x8dab ), SHC( 0x398d ), SHC( 0x9930 ), SHC( 0x4c40 ), SHC( 0xa7bd ), SHC( 0x5cb4 ),
+ SHC( 0xb8e3 ), SHC( 0x6a6e ), SHC( 0xcc21 ), SHC( 0x7505 ), SHC( 0xe0e6 ), SHC( 0x7c2a ), SHC( 0xf695 ), SHC( 0x7fa7 ),
+ SHC( 0x0c8c ), SHC( 0x7f62 ), SHC( 0x2224 ), SHC( 0x7b5d ), SHC( 0x36ba ), SHC( 0x73b6 ), SHC( 0x49b4 ), SHC( 0x68a7 )
+};
+
+/**
+ * \brief Twiddle factors are unscaled
+ */
+const Word16 RotVector_320[2 * ( 320 - 20 )] = { // Q15
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fe7 ), SHC( 0xfafa ), SHC( 0x7f9b ), SHC( 0xf5f5 ), SHC( 0x7f1d ), SHC( 0xf0f5 ),
+ SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7d8a ), SHC( 0xe707 ), SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x7b32 ), SHC( 0xdd41 ),
+ SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x7817 ), SHC( 0xd3b2 ), SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x743e ), SHC( 0xca69 ),
+ SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6fae ), SHC( 0xc175 ), SHC( 0x6d23 ), SHC( 0xbd1f ), SHC( 0x6a6e ), SHC( 0xb8e3 ),
+ SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x6485 ), SHC( 0xb0c2 ), SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x5dfe ), SHC( 0xa91d ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f9b ), SHC( 0xf5f5 ), SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7c77 ), SHC( 0xe21e ),
+ SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6d23 ), SHC( 0xbd1f ),
+ SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x5321 ), SHC( 0x9eab ),
+ SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x42e1 ), SHC( 0x92dd ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x30fc ), SHC( 0x89be ),
+ SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1de2 ), SHC( 0x8389 ), SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0x0a0b ), SHC( 0x8065 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f1d ), SHC( 0xf0f5 ), SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x7817 ), SHC( 0xd3b2 ),
+ SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x56e3 ), SHC( 0xa202 ),
+ SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x3e8b ), SHC( 0x9052 ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x22bf ), SHC( 0x84ce ),
+ SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0x0506 ), SHC( 0x8019 ), SHC( 0xf5f5 ), SHC( 0x8065 ), SHC( 0xe707 ), SHC( 0x8276 ),
+ SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xca69 ), SHC( 0x8bc2 ), SHC( 0xbd1f ), SHC( 0x92dd ), SHC( 0xb0c2 ), SHC( 0x9b7b ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x720d ), SHC( 0xc5e4 ),
+ SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x3a1c ), SHC( 0x8df3 ),
+ SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xebfa ), SHC( 0x8193 ),
+ SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xc5e4 ), SHC( 0x8df3 ), SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xa57e ), SHC( 0xa57e ),
+ SHC( 0x9872 ), SHC( 0xb4c3 ), SHC( 0x8df3 ), SHC( 0xc5e4 ), SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8193 ), SHC( 0xebfa ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7d8a ), SHC( 0xe707 ), SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x6a6e ), SHC( 0xb8e3 ),
+ SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x471d ), SHC( 0x9592 ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x18f9 ), SHC( 0x8276 ),
+ SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xe707 ), SHC( 0x8276 ), SHC( 0xcf04 ), SHC( 0x89be ), SHC( 0xb8e3 ), SHC( 0x9592 ),
+ SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x9592 ), SHC( 0xb8e3 ), SHC( 0x89be ), SHC( 0xcf04 ), SHC( 0x8276 ), SHC( 0xe707 ),
+ SHC( 0x8000 ), SHC( 0x0000 ), SHC( 0x8276 ), SHC( 0x18f9 ), SHC( 0x89be ), SHC( 0x30fc ), SHC( 0x9592 ), SHC( 0x471d ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6155 ), SHC( 0xacdf ),
+ SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0xf5f5 ), SHC( 0x8065 ),
+ SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xbd1f ), SHC( 0x92dd ), SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x92dd ), SHC( 0xbd1f ),
+ SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8065 ), SHC( 0xf5f5 ), SHC( 0x8193 ), SHC( 0x1406 ), SHC( 0x89be ), SHC( 0x30fc ),
+ SHC( 0x9872 ), SHC( 0x4b3d ), SHC( 0xacdf ), SHC( 0x6155 ), SHC( 0xc5e4 ), SHC( 0x720d ), SHC( 0xe21e ), SHC( 0x7c77 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7b32 ), SHC( 0xdd41 ), SHC( 0x6d23 ), SHC( 0xbd1f ), SHC( 0x56e3 ), SHC( 0xa202 ),
+ SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0xf5f5 ), SHC( 0x8065 ), SHC( 0xd3b2 ), SHC( 0x87e9 ),
+ SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0x9b7b ), SHC( 0xb0c2 ), SHC( 0x89be ), SHC( 0xcf04 ), SHC( 0x80e3 ), SHC( 0xf0f5 ),
+ SHC( 0x8193 ), SHC( 0x1406 ), SHC( 0x8bc2 ), SHC( 0x3597 ), SHC( 0x9eab ), SHC( 0x5321 ), SHC( 0xb8e3 ), SHC( 0x6a6e ),
+ SHC( 0xd872 ), SHC( 0x79bc ), SHC( 0xfafa ), SHC( 0x7fe7 ), SHC( 0x1de2 ), SHC( 0x7c77 ), SHC( 0x3e8b ), SHC( 0x6fae ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ffa ), SHC( 0xfd7d ), SHC( 0x7fe7 ), SHC( 0xfafa ), SHC( 0x7fc7 ), SHC( 0xf877 ),
+ SHC( 0x7f9b ), SHC( 0xf5f5 ), SHC( 0x7f62 ), SHC( 0xf374 ), SHC( 0x7f1d ), SHC( 0xf0f5 ), SHC( 0x7ecb ), SHC( 0xee76 ),
+ SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7e02 ), SHC( 0xe980 ), SHC( 0x7d8a ), SHC( 0xe707 ), SHC( 0x7d07 ), SHC( 0xe492 ),
+ SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x7bda ), SHC( 0xdfae ), SHC( 0x7b32 ), SHC( 0xdd41 ), SHC( 0x7a7d ), SHC( 0xdad8 ),
+ SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x78ef ), SHC( 0xd610 ), SHC( 0x7817 ), SHC( 0xd3b2 ), SHC( 0x7732 ), SHC( 0xd159 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fc7 ), SHC( 0xf877 ), SHC( 0x7f1d ), SHC( 0xf0f5 ), SHC( 0x7e02 ), SHC( 0xe980 ),
+ SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x7a7d ), SHC( 0xdad8 ), SHC( 0x7817 ), SHC( 0xd3b2 ), SHC( 0x7546 ), SHC( 0xccb4 ),
+ SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6e6e ), SHC( 0xbf47 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x660f ), SHC( 0xb2bf ),
+ SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x5c45 ), SHC( 0xa749 ), SHC( 0x56e3 ), SHC( 0xa202 ), SHC( 0x5134 ), SHC( 0x9d0e ),
+ SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x4502 ), SHC( 0x9432 ), SHC( 0x3e8b ), SHC( 0x9052 ), SHC( 0x37dc ), SHC( 0x8cd5 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f62 ), SHC( 0xf374 ), SHC( 0x7d8a ), SHC( 0xe707 ), SHC( 0x7a7d ), SHC( 0xdad8 ),
+ SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x70e3 ), SHC( 0xc3a9 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x62f2 ), SHC( 0xaecc ),
+ SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x5134 ), SHC( 0x9d0e ), SHC( 0x471d ), SHC( 0x9592 ), SHC( 0x3c57 ), SHC( 0x8f1d ),
+ SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x2528 ), SHC( 0x8583 ), SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0x0c8c ), SHC( 0x809e ),
+ SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xf374 ), SHC( 0x809e ), SHC( 0xe707 ), SHC( 0x8276 ), SHC( 0xdad8 ), SHC( 0x8583 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ecb ), SHC( 0xee76 ), SHC( 0x7b32 ), SHC( 0xdd41 ), SHC( 0x7546 ), SHC( 0xccb4 ),
+ SHC( 0x6d23 ), SHC( 0xbd1f ), SHC( 0x62f2 ), SHC( 0xaecc ), SHC( 0x56e3 ), SHC( 0xa202 ), SHC( 0x4930 ), SHC( 0x96fd ),
+ SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x29f0 ), SHC( 0x8711 ), SHC( 0x18f9 ), SHC( 0x8276 ), SHC( 0x0789 ), SHC( 0x8039 ),
+ SHC( 0xf5f5 ), SHC( 0x8065 ), SHC( 0xe492 ), SHC( 0x82f9 ), SHC( 0xd3b2 ), SHC( 0x87e9 ), SHC( 0xc3a9 ), SHC( 0x8f1d ),
+ SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xa749 ), SHC( 0xa3bb ), SHC( 0x9b7b ), SHC( 0xb0c2 ), SHC( 0x9192 ), SHC( 0xbf47 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e02 ), SHC( 0xe980 ), SHC( 0x7817 ), SHC( 0xd3b2 ), SHC( 0x6e6e ), SHC( 0xbf47 ),
+ SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x5134 ), SHC( 0x9d0e ), SHC( 0x3e8b ), SHC( 0x9052 ), SHC( 0x29f0 ), SHC( 0x8711 ),
+ SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0xfd7d ), SHC( 0x8006 ), SHC( 0xe707 ), SHC( 0x8276 ), SHC( 0xd159 ), SHC( 0x88ce ),
+ SHC( 0xbd1f ), SHC( 0x92dd ), SHC( 0xaafa ), SHC( 0xa052 ), SHC( 0x9b7b ), SHC( 0xb0c2 ), SHC( 0x8f1d ), SHC( 0xc3a9 ),
+ SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8135 ), SHC( 0xee76 ), SHC( 0x8019 ), SHC( 0x0506 ), SHC( 0x82f9 ), SHC( 0x1b6e ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7d07 ), SHC( 0xe492 ), SHC( 0x743e ), SHC( 0xca69 ), SHC( 0x660f ), SHC( 0xb2bf ),
+ SHC( 0x5321 ), SHC( 0x9eab ), SHC( 0x3c57 ), SHC( 0x8f1d ), SHC( 0x22bf ), SHC( 0x84ce ), SHC( 0x0789 ), SHC( 0x8039 ),
+ SHC( 0xebfa ), SHC( 0x8193 ), SHC( 0xd159 ), SHC( 0x88ce ), SHC( 0xb8e3 ), SHC( 0x9592 ), SHC( 0xa3bb ), SHC( 0xa749 ),
+ SHC( 0x92dd ), SHC( 0xbd1f ), SHC( 0x8711 ), SHC( 0xd610 ), SHC( 0x80e3 ), SHC( 0xf0f5 ), SHC( 0x809e ), SHC( 0x0c8c ),
+ SHC( 0x8644 ), SHC( 0x278e ), SHC( 0x9192 ), SHC( 0x40b9 ), SHC( 0xa202 ), SHC( 0x56e3 ), SHC( 0xb6d0 ), SHC( 0x6903 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7bda ), SHC( 0xdfae ), SHC( 0x6fae ), SHC( 0xc175 ), SHC( 0x5c45 ), SHC( 0xa749 ),
+ SHC( 0x42e1 ), SHC( 0x92dd ), SHC( 0x2528 ), SHC( 0x8583 ), SHC( 0x0506 ), SHC( 0x8019 ), SHC( 0xe492 ), SHC( 0x82f9 ),
+ SHC( 0xc5e4 ), SHC( 0x8df3 ), SHC( 0xaafa ), SHC( 0xa052 ), SHC( 0x9592 ), SHC( 0xb8e3 ), SHC( 0x8711 ), SHC( 0xd610 ),
+ SHC( 0x8065 ), SHC( 0xf5f5 ), SHC( 0x81fe ), SHC( 0x1680 ), SHC( 0x8bc2 ), SHC( 0x3597 ), SHC( 0x9d0e ), SHC( 0x5134 ),
+ SHC( 0xb4c3 ), SHC( 0x678e ), SHC( 0xd159 ), SHC( 0x7732 ), SHC( 0xf0f5 ), SHC( 0x7f1d ), SHC( 0x118a ), SHC( 0x7ecb ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7a7d ), SHC( 0xdad8 ), SHC( 0x6a6e ), SHC( 0xb8e3 ), SHC( 0x5134 ), SHC( 0x9d0e ),
+ SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x0c8c ), SHC( 0x809e ), SHC( 0xe707 ), SHC( 0x8276 ), SHC( 0xc3a9 ), SHC( 0x8f1d ),
+ SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x8f1d ), SHC( 0xc3a9 ), SHC( 0x8276 ), SHC( 0xe707 ), SHC( 0x809e ), SHC( 0x0c8c ),
+ SHC( 0x89be ), SHC( 0x30fc ), SHC( 0x9d0e ), SHC( 0x5134 ), SHC( 0xb8e3 ), SHC( 0x6a6e ), SHC( 0xdad8 ), SHC( 0x7a7d ),
+ SHC( 0x0000 ), SHC( 0x7fff ), SHC( 0x2528 ), SHC( 0x7a7d ), SHC( 0x471d ), SHC( 0x6a6e ), SHC( 0x62f2 ), SHC( 0x5134 )
+};
+
+
+/**
+ * \brief Twiddle factors are unscaled
+ * Rotation factor table, real and imaginary part interleaved, for dim1=20,dim2=20
+ */
+
+const Word16 RotVector_400[2 * ( 400 - 20 )] = { // Q15
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ff0 ), SHC( 0xfbfb ), SHC( 0x7fbf ), SHC( 0xf7f6 ), SHC( 0x7f6f ), SHC( 0xf3f4 ),
+ SHC( 0x7efe ), SHC( 0xeff5 ), SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7dbc ), SHC( 0xe804 ), SHC( 0x7ceb ), SHC( 0xe414 ),
+ SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x7aeb ), SHC( 0xdc4a ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x786f ), SHC( 0xd4a4 ),
+ SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x7579 ), SHC( 0xcd2a ), SHC( 0x73d1 ), SHC( 0xc980 ), SHC( 0x720d ), SHC( 0xc5e4 ),
+ SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x6e2d ), SHC( 0xbed8 ), SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x69de ), SHC( 0xb80e ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fbf ), SHC( 0xf7f6 ), SHC( 0x7efe ), SHC( 0xeff5 ), SHC( 0x7dbc ), SHC( 0xe804 ),
+ SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x73d1 ), SHC( 0xc980 ),
+ SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x62a0 ), SHC( 0xae69 ),
+ SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x579f ), SHC( 0xa2b1 ), SHC( 0x5197 ), SHC( 0x9d60 ), SHC( 0x4b3d ), SHC( 0x9872 ),
+ SHC( 0x4496 ), SHC( 0x93ed ), SHC( 0x3daa ), SHC( 0x8fd5 ), SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x2f1f ), SHC( 0x88fd ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f6f ), SHC( 0xf3f4 ), SHC( 0x7dbc ), SHC( 0xe804 ), SHC( 0x7aeb ), SHC( 0xdc4a ),
+ SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x6524 ), SHC( 0xb18c ),
+ SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x54a6 ), SHC( 0x9ffc ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x4128 ), SHC( 0x91d3 ),
+ SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x2b5c ), SHC( 0x8791 ), SHC( 0x1fd5 ), SHC( 0x8405 ), SHC( 0x1406 ), SHC( 0x8193 ),
+ SHC( 0x080a ), SHC( 0x8041 ), SHC( 0xfbfb ), SHC( 0x8010 ), SHC( 0xeff5 ), SHC( 0x8102 ), SHC( 0xe414 ), SHC( 0x8315 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7efe ), SHC( 0xeff5 ), SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x7703 ), SHC( 0xd0e1 ),
+ SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x5197 ), SHC( 0x9d60 ),
+ SHC( 0x4496 ), SHC( 0x93ed ), SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x17fc ), SHC( 0x8244 ),
+ SHC( 0x080a ), SHC( 0x8041 ), SHC( 0xf7f6 ), SHC( 0x8041 ), SHC( 0xe804 ), SHC( 0x8244 ), SHC( 0xd872 ), SHC( 0x8644 ),
+ SHC( 0xc980 ), SHC( 0x8c2f ), SHC( 0xbb6a ), SHC( 0x93ed ), SHC( 0xae69 ), SHC( 0x9d60 ), SHC( 0xa2b1 ), SHC( 0xa861 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x720d ), SHC( 0xc5e4 ),
+ SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x3a1c ), SHC( 0x8df3 ),
+ SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0x0000 ), SHC( 0x8000 ), SHC( 0xebfa ), SHC( 0x8193 ),
+ SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xc5e4 ), SHC( 0x8df3 ), SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0xa57e ), SHC( 0xa57e ),
+ SHC( 0x9872 ), SHC( 0xb4c3 ), SHC( 0x8df3 ), SHC( 0xc5e4 ), SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8193 ), SHC( 0xebfa ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7dbc ), SHC( 0xe804 ), SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x6c13 ), SHC( 0xbb6a ),
+ SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x1fd5 ), SHC( 0x8405 ),
+ SHC( 0x080a ), SHC( 0x8041 ), SHC( 0xeff5 ), SHC( 0x8102 ), SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xc256 ), SHC( 0x8fd5 ),
+ SHC( 0xae69 ), SHC( 0x9d60 ), SHC( 0x9d60 ), SHC( 0xae69 ), SHC( 0x8fd5 ), SHC( 0xc256 ), SHC( 0x8644 ), SHC( 0xd872 ),
+ SHC( 0x8102 ), SHC( 0xeff5 ), SHC( 0x8041 ), SHC( 0x080a ), SHC( 0x8405 ), SHC( 0x1fd5 ), SHC( 0x8c2f ), SHC( 0x3680 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ceb ), SHC( 0xe414 ), SHC( 0x73d1 ), SHC( 0xc980 ), SHC( 0x6524 ), SHC( 0xb18c ),
+ SHC( 0x5197 ), SHC( 0x9d60 ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x1fd5 ), SHC( 0x8405 ), SHC( 0x0405 ), SHC( 0x8010 ),
+ SHC( 0xe804 ), SHC( 0x8244 ), SHC( 0xcd2a ), SHC( 0x8a87 ), SHC( 0xb4c3 ), SHC( 0x9872 ), SHC( 0x9ffc ), SHC( 0xab5a ),
+ SHC( 0x8fd5 ), SHC( 0xc256 ), SHC( 0x8515 ), SHC( 0xdc4a ), SHC( 0x8041 ), SHC( 0xf7f6 ), SHC( 0x8193 ), SHC( 0x1406 ),
+ SHC( 0x88fd ), SHC( 0x2f1f ), SHC( 0x9622 ), SHC( 0x47f2 ), SHC( 0xa861 ), SHC( 0x5d4f ), SHC( 0xbed8 ), SHC( 0x6e2d ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x702b ), SHC( 0xc256 ), SHC( 0x5d4f ), SHC( 0xa861 ),
+ SHC( 0x4496 ), SHC( 0x93ed ), SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x080a ), SHC( 0x8041 ), SHC( 0xe804 ), SHC( 0x8244 ),
+ SHC( 0xc980 ), SHC( 0x8c2f ), SHC( 0xae69 ), SHC( 0x9d60 ), SHC( 0x9872 ), SHC( 0xb4c3 ), SHC( 0x88fd ), SHC( 0xd0e1 ),
+ SHC( 0x8102 ), SHC( 0xeff5 ), SHC( 0x8102 ), SHC( 0x100b ), SHC( 0x88fd ), SHC( 0x2f1f ), SHC( 0x9872 ), SHC( 0x4b3d ),
+ SHC( 0xae69 ), SHC( 0x62a0 ), SHC( 0xc980 ), SHC( 0x73d1 ), SHC( 0xe804 ), SHC( 0x7dbc ), SHC( 0x080a ), SHC( 0x7fbf ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7aeb ), SHC( 0xdc4a ), SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x54a6 ), SHC( 0x9ffc ),
+ SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0xeff5 ), SHC( 0x8102 ), SHC( 0xcd2a ), SHC( 0x8a87 ),
+ SHC( 0xae69 ), SHC( 0x9d60 ), SHC( 0x9622 ), SHC( 0xb80e ), SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8010 ), SHC( 0xfbfb ),
+ SHC( 0x8405 ), SHC( 0x1fd5 ), SHC( 0x91d3 ), SHC( 0x4128 ), SHC( 0xa861 ), SHC( 0x5d4f ), SHC( 0xc5e4 ), SHC( 0x720d ),
+ SHC( 0xe804 ), SHC( 0x7dbc ), SHC( 0x0c0c ), SHC( 0x7f6f ), SHC( 0x2f1f ), SHC( 0x7703 ), SHC( 0x4e74 ), SHC( 0x6524 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7ffc ), SHC( 0xfdfd ), SHC( 0x7ff0 ), SHC( 0xfbfb ), SHC( 0x7fdc ), SHC( 0xf9f8 ),
+ SHC( 0x7fbf ), SHC( 0xf7f6 ), SHC( 0x7f9b ), SHC( 0xf5f5 ), SHC( 0x7f6f ), SHC( 0xf3f4 ), SHC( 0x7f3a ), SHC( 0xf1f4 ),
+ SHC( 0x7efe ), SHC( 0xeff5 ), SHC( 0x7eb9 ), SHC( 0xedf7 ), SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7e18 ), SHC( 0xe9fe ),
+ SHC( 0x7dbc ), SHC( 0xe804 ), SHC( 0x7d57 ), SHC( 0xe60b ), SHC( 0x7ceb ), SHC( 0xe414 ), SHC( 0x7c77 ), SHC( 0xe21e ),
+ SHC( 0x7bfb ), SHC( 0xe02b ), SHC( 0x7b77 ), SHC( 0xde39 ), SHC( 0x7aeb ), SHC( 0xdc4a ), SHC( 0x7a57 ), SHC( 0xda5d ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7fdc ), SHC( 0xf9f8 ), SHC( 0x7f6f ), SHC( 0xf3f4 ), SHC( 0x7eb9 ), SHC( 0xedf7 ),
+ SHC( 0x7dbc ), SHC( 0xe804 ), SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x7aeb ), SHC( 0xdc4a ), SHC( 0x7919 ), SHC( 0xd68a ),
+ SHC( 0x7703 ), SHC( 0xd0e1 ), SHC( 0x74a9 ), SHC( 0xcb53 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6f2f ), SHC( 0xc095 ),
+ SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x68b9 ), SHC( 0xb666 ), SHC( 0x6524 ), SHC( 0xb18c ), SHC( 0x6155 ), SHC( 0xacdf ),
+ SHC( 0x5d4f ), SHC( 0xa861 ), SHC( 0x5914 ), SHC( 0xa414 ), SHC( 0x54a6 ), SHC( 0x9ffc ), SHC( 0x5008 ), SHC( 0x9c1b ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f9b ), SHC( 0xf5f5 ), SHC( 0x7e6d ), SHC( 0xebfa ), SHC( 0x7c77 ), SHC( 0xe21e ),
+ SHC( 0x79bc ), SHC( 0xd872 ), SHC( 0x7642 ), SHC( 0xcf04 ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6d23 ), SHC( 0xbd1f ),
+ SHC( 0x678e ), SHC( 0xb4c3 ), SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x5a82 ), SHC( 0xa57e ), SHC( 0x5321 ), SHC( 0x9eab ),
+ SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x42e1 ), SHC( 0x92dd ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x30fc ), SHC( 0x89be ),
+ SHC( 0x278e ), SHC( 0x8644 ), SHC( 0x1de2 ), SHC( 0x8389 ), SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0x0a0b ), SHC( 0x8065 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7f3a ), SHC( 0xf1f4 ), SHC( 0x7ceb ), SHC( 0xe414 ), SHC( 0x7919 ), SHC( 0xd68a ),
+ SHC( 0x73d1 ), SHC( 0xc980 ), SHC( 0x6d23 ), SHC( 0xbd1f ), SHC( 0x6524 ), SHC( 0xb18c ), SHC( 0x5bec ), SHC( 0xa6ec ),
+ SHC( 0x5197 ), SHC( 0x9d60 ), SHC( 0x4646 ), SHC( 0x9504 ), SHC( 0x3a1c ), SHC( 0x8df3 ), SHC( 0x2d3f ), SHC( 0x8843 ),
+ SHC( 0x1fd5 ), SHC( 0x8405 ), SHC( 0x1209 ), SHC( 0x8147 ), SHC( 0x0405 ), SHC( 0x8010 ), SHC( 0xf5f5 ), SHC( 0x8065 ),
+ SHC( 0xe804 ), SHC( 0x8244 ), SHC( 0xda5d ), SHC( 0x85a9 ), SHC( 0xcd2a ), SHC( 0x8a87 ), SHC( 0xc095 ), SHC( 0x90d1 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7eb9 ), SHC( 0xedf7 ), SHC( 0x7aeb ), SHC( 0xdc4a ), SHC( 0x74a9 ), SHC( 0xcb53 ),
+ SHC( 0x6c13 ), SHC( 0xbb6a ), SHC( 0x6155 ), SHC( 0xacdf ), SHC( 0x54a6 ), SHC( 0x9ffc ), SHC( 0x4646 ), SHC( 0x9504 ),
+ SHC( 0x3680 ), SHC( 0x8c2f ), SHC( 0x25a3 ), SHC( 0x85a9 ), SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0x0203 ), SHC( 0x8004 ),
+ SHC( 0xeff5 ), SHC( 0x8102 ), SHC( 0xde39 ), SHC( 0x8489 ), SHC( 0xcd2a ), SHC( 0x8a87 ), SHC( 0xbd1f ), SHC( 0x92dd ),
+ SHC( 0xae69 ), SHC( 0x9d60 ), SHC( 0xa154 ), SHC( 0xa9db ), SHC( 0x9622 ), SHC( 0xb80e ), SHC( 0x8d0d ), SHC( 0xc7b0 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7e18 ), SHC( 0xe9fe ), SHC( 0x786f ), SHC( 0xd4a4 ), SHC( 0x6f2f ), SHC( 0xc095 ),
+ SHC( 0x62a0 ), SHC( 0xae69 ), SHC( 0x5321 ), SHC( 0x9eab ), SHC( 0x4128 ), SHC( 0x91d3 ), SHC( 0x2d3f ), SHC( 0x8843 ),
+ SHC( 0x17fc ), SHC( 0x8244 ), SHC( 0x0203 ), SHC( 0x8004 ), SHC( 0xebfa ), SHC( 0x8193 ), SHC( 0xd68a ), SHC( 0x86e7 ),
+ SHC( 0xc256 ), SHC( 0x8fd5 ), SHC( 0xaff8 ), SHC( 0x9c1b ), SHC( 0x9ffc ), SHC( 0xab5a ), SHC( 0x92dd ), SHC( 0xbd1f ),
+ SHC( 0x88fd ), SHC( 0xd0e1 ), SHC( 0x82a9 ), SHC( 0xe60b ), SHC( 0x8010 ), SHC( 0xfbfb ), SHC( 0x8147 ), SHC( 0x1209 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7d57 ), SHC( 0xe60b ), SHC( 0x7579 ), SHC( 0xcd2a ), SHC( 0x68b9 ), SHC( 0xb666 ),
+ SHC( 0x579f ), SHC( 0xa2b1 ), SHC( 0x42e1 ), SHC( 0x92dd ), SHC( 0x2b5c ), SHC( 0x8791 ), SHC( 0x1209 ), SHC( 0x8147 ),
+ SHC( 0xf7f6 ), SHC( 0x8041 ), SHC( 0xde39 ), SHC( 0x8489 ), SHC( 0xc5e4 ), SHC( 0x8df3 ), SHC( 0xaff8 ), SHC( 0x9c1b ),
+ SHC( 0x9d60 ), SHC( 0xae69 ), SHC( 0x8ee1 ), SHC( 0xc41b ), SHC( 0x8515 ), SHC( 0xdc4a ), SHC( 0x8065 ), SHC( 0xf5f5 ),
+ SHC( 0x8102 ), SHC( 0x100b ), SHC( 0x86e7 ), SHC( 0x2976 ), SHC( 0x91d3 ), SHC( 0x4128 ), SHC( 0xa154 ), SHC( 0x5625 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7c77 ), SHC( 0xe21e ), SHC( 0x720d ), SHC( 0xc5e4 ), SHC( 0x6155 ), SHC( 0xacdf ),
+ SHC( 0x4b3d ), SHC( 0x9872 ), SHC( 0x30fc ), SHC( 0x89be ), SHC( 0x1406 ), SHC( 0x8193 ), SHC( 0xf5f5 ), SHC( 0x8065 ),
+ SHC( 0xd872 ), SHC( 0x8644 ), SHC( 0xbd1f ), SHC( 0x92dd ), SHC( 0xa57e ), SHC( 0xa57e ), SHC( 0x92dd ), SHC( 0xbd1f ),
+ SHC( 0x8644 ), SHC( 0xd872 ), SHC( 0x8065 ), SHC( 0xf5f5 ), SHC( 0x8193 ), SHC( 0x1406 ), SHC( 0x89be ), SHC( 0x30fc ),
+ SHC( 0x9872 ), SHC( 0x4b3d ), SHC( 0xacdf ), SHC( 0x6155 ), SHC( 0xc5e4 ), SHC( 0x720d ), SHC( 0xe21e ), SHC( 0x7c77 ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7b77 ), SHC( 0xde39 ), SHC( 0x6e2d ), SHC( 0xbed8 ), SHC( 0x5914 ), SHC( 0xa414 ),
+ SHC( 0x3daa ), SHC( 0x8fd5 ), SHC( 0x1de2 ), SHC( 0x8389 ), SHC( 0xfbfb ), SHC( 0x8010 ), SHC( 0xda5d ), SHC( 0x85a9 ),
+ SHC( 0xbb6a ), SHC( 0x93ed ), SHC( 0xa154 ), SHC( 0xa9db ), SHC( 0x8df3 ), SHC( 0xc5e4 ), SHC( 0x82a9 ), SHC( 0xe60b ),
+ SHC( 0x8041 ), SHC( 0x080a ), SHC( 0x86e7 ), SHC( 0x2976 ), SHC( 0x9622 ), SHC( 0x47f2 ), SHC( 0xacdf ), SHC( 0x6155 ),
+ SHC( 0xc980 ), SHC( 0x73d1 ), SHC( 0xe9fe ), SHC( 0x7e18 ), SHC( 0x0c0c ), SHC( 0x7f6f ), SHC( 0x2d3f ), SHC( 0x77bd ),
+ SHC( 0x7fff ), SHC( 0x0000 ), SHC( 0x7a57 ), SHC( 0xda5d ), SHC( 0x69de ), SHC( 0xb80e ), SHC( 0x5008 ), SHC( 0x9c1b ),
+ SHC( 0x2f1f ), SHC( 0x88fd ), SHC( 0x0a0b ), SHC( 0x8065 ), SHC( 0xe414 ), SHC( 0x8315 ), SHC( 0xc095 ), SHC( 0x90d1 ),
+ SHC( 0xa2b1 ), SHC( 0xa861 ), SHC( 0x8d0d ), SHC( 0xc7b0 ), SHC( 0x8193 ), SHC( 0xebfa ), SHC( 0x8147 ), SHC( 0x1209 ),
+ SHC( 0x8c2f ), SHC( 0x3680 ), SHC( 0xa154 ), SHC( 0x5625 ), SHC( 0xbed8 ), SHC( 0x6e2d ), SHC( 0xe21e ), SHC( 0x7c77 ),
+ SHC( 0x080a ), SHC( 0x7fbf ), SHC( 0x2d3f ), SHC( 0x77bd ), SHC( 0x4e74 ), SHC( 0x6524 ), SHC( 0x68b9 ), SHC( 0x499a )
+};
+
+const Word16 FFT_W64[( 64 * 2 ) * 2] = { // Q15
+ 16384, 0, 16364, -804, 16305, -1606, 16207, -2404,
+ 16069, -3196, 15893, -3981, 15679, -4756, 15426, -5520,
+ 15137, -6270, 14811, -7005, 14449, -7723, 14053, -8423,
+ 13623, -9102, 13160, -9760, 12665, -10394, 12140, -11003,
+ 11585, -11585, 11003, -12140, 10394, -12665, 9760, -13160,
+ 9102, -13623, 8423, -14053, 7723, -14449, 7005, -14811,
+ 6270, -15137, 5520, -15426, 4756, -15679, 3981, -15893,
+ 3196, -16069, 2404, -16207, 1606, -16305, 804, -16364,
+ 0, -16384, -804, -16364, -1606, -16305, -2404, -16207,
+ -3196, -16069, -3981, -15893, -4756, -15679, -5520, -15426,
+ -6270, -15137, -7005, -14811, -7723, -14449, -8423, -14053,
+ -9102, -13623, -9760, -13160, -10394, -12665, -11003, -12140,
+ -11585, -11585, -12140, -11003, -12665, -10394, -13160, -9760,
+ -13623, -9102, -14053, -8423, -14449, -7723, -14811, -7005,
+ -15137, -6270, -15426, -5520, -15679, -4756, -15893, -3981,
+ -16069, -3196, -16207, -2404, -16305, -1606, -16364, -804,
+ /* The following is a duplication of the above but scaled up by a factor of 2.
+ * This save one operation in inverse FFT inner loops */
+ 32767, 0, 32729, -1608, 32610, -3212, 32413, -4808,
+ 32138, -6393, 31786, -7962, 31357, -9512, 30853, -11039,
+ 30274, -12540, 29622, -14010, 28899, -15447, 28106, -16846,
+ 27246, -18205, 26320, -19520, 25330, -20788, 24279, -22006,
+ 23170, -23170, 22006, -24279, 20788, -25330, 19520, -26320,
+ 18205, -27246, 16846, -28106, 15447, -28899, 14010, -29622,
+ 12540, -30274, 11039, -30853, 9512, -31357, 7962, -31786,
+ 6393, -32138, 4808, -32413, 3212, -32610, 1608, -32729,
+ 0, -32768, -1608, -32729, -3212, -32610, -4808, -32413,
+ -6393, -32138, -7962, -31786, -9512, -31357, -11039, -30853,
+ -12540, -30274, -14010, -29622, -15447, -28899, -16846, -28106,
+ -18205, -27246, -19520, -26320, -20788, -25330, -22006, -24279,
+ -23170, -23170, -24279, -22006, -25330, -20788, -26320, -19520,
+ -27246, -18205, -28106, -16846, -28899, -15447, -29622, -14010,
+ -30274, -12540, -30853, -11039, -31357, -9512, -31786, -7962,
+ -32138, -6393, -32413, -4808, -32610, -3212, -32729, -1608
+};
+
+const Word16 FFT_W128[] = { // Q15
+ /* part of table that is not scaled by 2 */
+ 16384, 0, 16379, -402, 16364, -804, 16339, -1205,
+ 16305, -1606, 16260, -2006, 16206, -2404, 16142, -2801,
+ 16069, -3196, 15985, -3590, 15893, -3981, 15790, -4370,
+ 15678, -4756, 15557, -5139, 15426, -5519, 15286, -5896,
+ 15136, -6270, 14978, -6639, 14811, -7005, 14634, -7366,
+ 14449, -7723, 14255, -8075, 14053, -8423, 13842, -8765,
+ 13622, -9102, 13395, -9434, 13159, -9760, 12916, -10080,
+ 12665, -10394, 12406, -10701, 12139, -11002, 11866, -11297,
+ 11585, -11585, 11297, -11866, 11002, -12139, 10701, -12406,
+ 10394, -12665, 10080, -12916, 9760, -13159, 9434, -13395,
+ 9102, -13622, 8765, -13842, 8423, -14053, 8075, -14255,
+ 7723, -14449, 7366, -14634, 7005, -14811, 6639, -14978,
+ 6270, -15136, 5896, -15286, 5519, -15426, 5139, -15557,
+ 4756, -15678, 4370, -15790, 3981, -15893, 3590, -15985,
+ 3196, -16069, 2801, -16142, 2404, -16206, 2006, -16260,
+ 1606, -16305, 1205, -16339, 804, -16364, 402, -16379,
+ 0, -16384, -402, -16379, -804, -16364, -1205, -16339,
+ -1606, -16305, -2006, -16260, -2404, -16206, -2801, -16142,
+ -3196, -16069, -3590, -15985, -3981, -15893, -4370, -15790,
+ -4756, -15678, -5139, -15557, -5519, -15426, -5896, -15286,
+ -6270, -15136, -6639, -14978, -7005, -14811, -7366, -14634,
+ -7723, -14449, -8075, -14255, -8423, -14053, -8765, -13842,
+ -9102, -13622, -9434, -13395, -9760, -13159, -10080, -12916,
+ -10394, -12665, -10701, -12406, -11002, -12139, -11297, -11866,
+ -11585, -11585, -11866, -11297, -12139, -11002, -12406, -10701,
+ -12665, -10394, -12916, -10080, -13159, -9760, -13395, -9434,
+ -13622, -9102, -13842, -8765, -14053, -8423, -14255, -8075,
+ -14449, -7723, -14634, -7366, -14811, -7005, -14978, -6639,
+ -15136, -6270, -15286, -5896, -15426, -5519, -15557, -5139,
+ -15678, -4756, -15790, -4370, -15893, -3981, -15985, -3590,
+ -16069, -3196, -16142, -2801, -16206, -2404, -16260, -2006,
+ -16305, -1606, -16339, -1205, -16364, -804, -16379, -402,
+ /* part of table that is scaled by 2 (this save one operation in FFT inner loops) */
+ 32767, 0, 32758, -804, 32728, -1608, 32678, -2410,
+ 32610, -3212, 32520, -4012, 32412, -4808, 32284, -5602,
+ 32138, -6392, 31970, -7180, 31786, -7962, 31580, -8740,
+ 31356, -9512, 31114, -10278, 30852, -11038, 30572, -11792,
+ 30272, -12540, 29956, -13278, 29622, -14010, 29268, -14732,
+ 28898, -15446, 28510, -16150, 28106, -16846, 27684, -17530,
+ 27244, -18204, 26790, -18868, 26318, -19520, 25832, -20160,
+ 25330, -20788, 24812, -21402, 24278, -22004, 23732, -22594,
+ 23170, -23170, 22594, -23732, 22004, -24278, 21402, -24812,
+ 20788, -25330, 20160, -25832, 19520, -26318, 18868, -26790,
+ 18204, -27244, 17530, -27684, 16846, -28106, 16150, -28510,
+ 15446, -28898, 14732, -29268, 14010, -29622, 13278, -29956,
+ 12540, -30272, 11792, -30572, 11038, -30852, 10278, -31114,
+ 9512, -31356, 8740, -31580, 7962, -31786, 7180, -31970,
+ 6392, -32138, 5602, -32284, 4808, -32412, 4012, -32520,
+ 3212, -32610, 2410, -32678, 1608, -32728, 804, -32758,
+ 0, -32768, -804, -32758, -1608, -32728, -2410, -32678,
+ -3212, -32610, -4012, -32520, -4808, -32412, -5602, -32284,
+ -6392, -32138, -7180, -31970, -7962, -31786, -8740, -31580,
+ -9512, -31356, -10278, -31114, -11038, -30852, -11792, -30572,
+ -12540, -30272, -13278, -29956, -14010, -29622, -14732, -29268,
+ -15446, -28898, -16150, -28510, -16846, -28106, -17530, -27684,
+ -18204, -27244, -18868, -26790, -19520, -26318, -20160, -25832,
+ -20788, -25330, -21402, -24812, -22004, -24278, -22594, -23732,
+ -23170, -23170, -23732, -22594, -24278, -22004, -24812, -21402,
+ -25330, -20788, -25832, -20160, -26318, -19520, -26790, -18868,
+ -27244, -18204, -27684, -17530, -28106, -16846, -28510, -16150,
+ -28898, -15446, -29268, -14732, -29622, -14010, -29956, -13278,
+ -30272, -12540, -30572, -11792, -30852, -11038, -31114, -10278,
+ -31356, -9512, -31580, -8740, -31786, -7962, -31970, -7180,
+ -32138, -6392, -32284, -5602, -32412, -4808, -32520, -4012,
+ -32610, -3212, -32678, -2410, -32728, -1608, -32758, -804
+};
+
+const Word16 FFT_W256[( 256 * 2 ) * 2] = { // Q15
+ /* Each adjacent pair represents the real and imaginary part of a complex number: */
+ /* W = exp{-j*(PI*n/256)} = cos(PI*n/256)*16384 -j*sin(PI*n/256)*16384 for n=0, 1, ..., 255. */
+ 16384, 0, 16383, -201, 16379, -402, 16373, -603,
+ 16364, -804, 16353, -1005, 16340, -1205, 16324, -1406,
+ 16305, -1606, 16284, -1806, 16261, -2006, 16235, -2205,
+ 16207, -2404, 16176, -2603, 16143, -2801, 16107, -2999,
+ 16069, -3196, 16029, -3393, 15986, -3590, 15941, -3786,
+ 15893, -3981, 15843, -4176, 15791, -4370, 15736, -4563,
+ 15679, -4756, 15619, -4948, 15557, -5139, 15493, -5330,
+ 15426, -5520, 15357, -5708, 15286, -5897, 15213, -6084,
+ 15137, -6270, 15059, -6455, 14978, -6639, 14896, -6823,
+ 14811, -7005, 14724, -7186, 14635, -7366, 14543, -7545,
+ 14449, -7723, 14354, -7900, 14256, -8076, 14155, -8250,
+ 14053, -8423, 13949, -8595, 13842, -8765, 13733, -8935,
+ 13623, -9102, 13510, -9269, 13395, -9434, 13279, -9598,
+ 13160, -9760, 13039, -9921, 12916, -10080, 12792, -10238,
+ 12665, -10394, 12537, -10549, 12406, -10702, 12274, -10853,
+ 12140, -11003, 12004, -11151, 11866, -11297, 11727, -11442,
+ 11585, -11585, 11442, -11727, 11297, -11866, 11151, -12004,
+ 11003, -12140, 10853, -12274, 10702, -12406, 10549, -12537,
+ 10394, -12665, 10238, -12792, 10080, -12916, 9921, -13039,
+ 9760, -13160, 9598, -13279, 9434, -13395, 9269, -13510,
+ 9102, -13623, 8935, -13733, 8765, -13842, 8595, -13949,
+ 8423, -14053, 8250, -14155, 8076, -14256, 7900, -14354,
+ 7723, -14449, 7545, -14543, 7366, -14635, 7186, -14724,
+ 7005, -14811, 6823, -14896, 6639, -14978, 6455, -15059,
+ 6270, -15137, 6084, -15213, 5897, -15286, 5708, -15357,
+ 5520, -15426, 5330, -15493, 5139, -15557, 4948, -15619,
+ 4756, -15679, 4563, -15736, 4370, -15791, 4176, -15843,
+ 3981, -15893, 3786, -15941, 3590, -15986, 3393, -16029,
+ 3196, -16069, 2999, -16107, 2801, -16143, 2603, -16176,
+ 2404, -16207, 2205, -16235, 2006, -16261, 1806, -16284,
+ 1606, -16305, 1406, -16324, 1205, -16340, 1005, -16353,
+ 804, -16364, 603, -16373, 402, -16379, 201, -16383,
+ 0, -16384, -201, -16383, -402, -16379, -603, -16373,
+ -804, -16364, -1005, -16353, -1205, -16340, -1406, -16324,
+ -1606, -16305, -1806, -16284, -2006, -16261, -2205, -16235,
+ -2404, -16207, -2603, -16176, -2801, -16143, -2999, -16107,
+ -3196, -16069, -3393, -16029, -3590, -15986, -3786, -15941,
+ -3981, -15893, -4176, -15843, -4370, -15791, -4563, -15736,
+ -4756, -15679, -4948, -15619, -5139, -15557, -5330, -15493,
+ -5520, -15426, -5708, -15357, -5897, -15286, -6084, -15213,
+ -6270, -15137, -6455, -15059, -6639, -14978, -6823, -14896,
+ -7005, -14811, -7186, -14724, -7366, -14635, -7545, -14543,
+ -7723, -14449, -7900, -14354, -8076, -14256, -8250, -14155,
+ -8423, -14053, -8595, -13949, -8765, -13842, -8935, -13733,
+ -9102, -13623, -9269, -13510, -9434, -13395, -9598, -13279,
+ -9760, -13160, -9921, -13039, -10080, -12916, -10238, -12792,
+ -10394, -12665, -10549, -12537, -10702, -12406, -10853, -12274,
+ -11003, -12140, -11151, -12004, -11297, -11866, -11442, -11727,
+ -11585, -11585, -11727, -11442, -11866, -11297, -12004, -11151,
+ -12140, -11003, -12274, -10853, -12406, -10702, -12537, -10549,
+ -12665, -10394, -12792, -10238, -12916, -10080, -13039, -9921,
+ -13160, -9760, -13279, -9598, -13395, -9434, -13510, -9269,
+ -13623, -9102, -13733, -8935, -13842, -8765, -13949, -8595,
+ -14053, -8423, -14155, -8250, -14256, -8076, -14354, -7900,
+ -14449, -7723, -14543, -7545, -14635, -7366, -14724, -7186,
+ -14811, -7005, -14896, -6823, -14978, -6639, -15059, -6455,
+ -15137, -6270, -15213, -6084, -15286, -5897, -15357, -5708,
+ -15426, -5520, -15493, -5330, -15557, -5139, -15619, -4948,
+ -15679, -4756, -15736, -4563, -15791, -4370, -15843, -4176,
+ -15893, -3981, -15941, -3786, -15986, -3590, -16029, -3393,
+ -16069, -3196, -16107, -2999, -16143, -2801, -16176, -2603,
+ -16207, -2404, -16235, -2205, -16261, -2006, -16284, -1806,
+ -16305, -1606, -16324, -1406, -16340, -1205, -16353, -1005,
+ -16364, -804, -16373, -603, -16379, -402, -16383, -201,
+
+ /* The following is a duplication of the above but scaled up by a factor of 2.
+ * This save one operation in inverse FFT inner loops */
+ 32767, 0, 32766, -402, 32758, -804, 32746, -1206,
+ 32729, -1608, 32706, -2009, 32679, -2411, 32647, -2811,
+ 32610, -3212, 32568, -3612, 32522, -4011, 32470, -4410,
+ 32413, -4808, 32352, -5205, 32286, -5602, 32214, -5998,
+ 32138, -6393, 32058, -6787, 31972, -7180, 31881, -7571,
+ 31786, -7962, 31686, -8351, 31581, -8740, 31471, -9127,
+ 31357, -9512, 31238, -9896, 31114, -10279, 30986, -10660,
+ 30853, -11039, 30715, -11417, 30572, -11793, 30425, -12167,
+ 30274, -12540, 30118, -12910, 29957, -13279, 29792, -13646,
+ 29622, -14010, 29448, -14373, 29269, -14733, 29086, -15091,
+ 28899, -15447, 28707, -15800, 28511, -16151, 28311, -16500,
+ 28106, -16846, 27897, -17190, 27684, -17531, 27467, -17869,
+ 27246, -18205, 27020, -18538, 26791, -18868, 26557, -19195,
+ 26320, -19520, 26078, -19841, 25833, -20160, 25583, -20475,
+ 25330, -20788, 25073, -21097, 24812, -21403, 24548, -21706,
+ 24279, -22006, 24008, -22302, 23732, -22595, 23453, -22884,
+ 23170, -23170, 22884, -23453, 22595, -23732, 22302, -24008,
+ 22006, -24279, 21706, -24548, 21403, -24812, 21097, -25073,
+ 20788, -25330, 20475, -25583, 20160, -25833, 19841, -26078,
+ 19520, -26320, 19195, -26557, 18868, -26791, 18538, -27020,
+ 18205, -27246, 17869, -27467, 17531, -27684, 17190, -27897,
+ 16846, -28106, 16500, -28311, 16151, -28511, 15800, -28707,
+ 15447, -28899, 15091, -29086, 14733, -29269, 14373, -29448,
+ 14010, -29622, 13646, -29792, 13279, -29957, 12910, -30118,
+ 12540, -30274, 12167, -30425, 11793, -30572, 11417, -30715,
+ 11039, -30853, 10660, -30986, 10279, -31114, 9896, -31238,
+ 9512, -31357, 9127, -31471, 8740, -31581, 8351, -31686,
+ 7962, -31786, 7571, -31881, 7180, -31972, 6787, -32058,
+ 6393, -32138, 5998, -32214, 5602, -32286, 5205, -32352,
+ 4808, -32413, 4410, -32470, 4011, -32522, 3612, -32568,
+ 3212, -32610, 2811, -32647, 2411, -32679, 2009, -32706,
+ 1608, -32729, 1206, -32746, 804, -32758, 402, -32766,
+ 0, -32768, -402, -32766, -804, -32758, -1206, -32746,
+ -1608, -32729, -2009, -32706, -2411, -32679, -2811, -32647,
+ -3212, -32610, -3612, -32568, -4011, -32522, -4410, -32470,
+ -4808, -32413, -5205, -32352, -5602, -32286, -5998, -32214,
+ -6393, -32138, -6787, -32058, -7180, -31972, -7571, -31881,
+ -7962, -31786, -8351, -31686, -8740, -31581, -9127, -31471,
+ -9512, -31357, -9896, -31238, -10279, -31114, -10660, -30986,
+ -11039, -30853, -11417, -30715, -11793, -30572, -12167, -30425,
+ -12540, -30274, -12910, -30118, -13279, -29957, -13646, -29792,
+ -14010, -29622, -14373, -29448, -14733, -29269, -15091, -29086,
+ -15447, -28899, -15800, -28707, -16151, -28511, -16500, -28311,
+ -16846, -28106, -17190, -27897, -17531, -27684, -17869, -27467,
+ -18205, -27246, -18538, -27020, -18868, -26791, -19195, -26557,
+ -19520, -26320, -19841, -26078, -20160, -25833, -20475, -25583,
+ -20788, -25330, -21097, -25073, -21403, -24812, -21706, -24548,
+ -22006, -24279, -22302, -24008, -22595, -23732, -22884, -23453,
+ -23170, -23170, -23453, -22884, -23732, -22595, -24008, -22302,
+ -24279, -22006, -24548, -21706, -24812, -21403, -25073, -21097,
+ -25330, -20788, -25583, -20475, -25833, -20160, -26078, -19841,
+ -26320, -19520, -26557, -19195, -26791, -18868, -27020, -18538,
+ -27246, -18205, -27467, -17869, -27684, -17531, -27897, -17190,
+ -28106, -16846, -28311, -16500, -28511, -16151, -28707, -15800,
+ -28899, -15447, -29086, -15091, -29269, -14733, -29448, -14373,
+ -29622, -14010, -29792, -13646, -29957, -13279, -30118, -12910,
+ -30274, -12540, -30425, -12167, -30572, -11793, -30715, -11417,
+ -30853, -11039, -30986, -10660, -31114, -10279, -31238, -9896,
+ -31357, -9512, -31471, -9127, -31581, -8740, -31686, -8351,
+ -31786, -7962, -31881, -7571, -31972, -7180, -32058, -6787,
+ -32138, -6393, -32214, -5998, -32286, -5602, -32352, -5205,
+ -32413, -4808, -32470, -4410, -32522, -4011, -32568, -3612,
+ -32610, -3212, -32647, -2811, -32679, -2411, -32706, -2009,
+ -32729, -1608, -32746, -1206, -32758, -804, -32766, -402
+};
+
+const Word16 FFT_W512[( 512 * 2 ) * 2] = { // Q15
+ 16384, 0, 16384, -101, 16383, -201, 16381, -302,
+ 16379, -402, 16376, -503, 16373, -603, 16369, -704,
+ 16364, -804, 16359, -904, 16353, -1005, 16347, -1105,
+ 16340, -1205, 16332, -1306, 16324, -1406, 16315, -1506,
+ 16305, -1606, 16295, -1706, 16284, -1806, 16273, -1906,
+ 16261, -2006, 16248, -2105, 16235, -2205, 16221, -2305,
+ 16207, -2404, 16192, -2503, 16176, -2603, 16160, -2702,
+ 16143, -2801, 16125, -2900, 16107, -2999, 16088, -3098,
+ 16069, -3196, 16049, -3295, 16029, -3393, 16008, -3492,
+ 15986, -3590, 15964, -3688, 15941, -3786, 15917, -3883,
+ 15893, -3981, 15868, -4078, 15843, -4176, 15817, -4273,
+ 15791, -4370, 15763, -4467, 15736, -4563, 15707, -4660,
+ 15679, -4756, 15649, -4852, 15619, -4948, 15588, -5044,
+ 15557, -5139, 15525, -5235, 15493, -5330, 15460, -5425,
+ 15426, -5520, 15392, -5614, 15357, -5708, 15322, -5803,
+ 15286, -5897, 15250, -5990, 15213, -6084, 15175, -6177,
+ 15137, -6270, 15098, -6363, 15059, -6455, 15019, -6547,
+ 14978, -6639, 14937, -6731, 14896, -6823, 14854, -6914,
+ 14811, -7005, 14768, -7096, 14724, -7186, 14680, -7276,
+ 14635, -7366, 14589, -7456, 14543, -7545, 14497, -7635,
+ 14449, -7723, 14402, -7812, 14354, -7900, 14305, -7988,
+ 14256, -8076, 14206, -8163, 14155, -8250, 14104, -8337,
+ 14053, -8423, 14001, -8509, 13949, -8595, 13896, -8680,
+ 13842, -8765, 13788, -8850, 13733, -8935, 13678, -9019,
+ 13623, -9102, 13567, -9186, 13510, -9269, 13453, -9352,
+ 13395, -9434, 13337, -9516, 13279, -9598, 13219, -9679,
+ 13160, -9760, 13100, -9841, 13039, -9921, 12978, -10001,
+ 12916, -10080, 12854, -10159, 12792, -10238, 12729, -10316,
+ 12665, -10394, 12601, -10471, 12537, -10549, 12472, -10625,
+ 12406, -10702, 12340, -10778, 12274, -10853, 12207, -10928,
+ 12140, -11003, 12072, -11077, 12004, -11151, 11935, -11224,
+ 11866, -11297, 11797, -11370, 11727, -11442, 11656, -11514,
+ 11585, -11585, 11514, -11656, 11442, -11727, 11370, -11797,
+ 11297, -11866, 11224, -11935, 11151, -12004, 11077, -12072,
+ 11003, -12140, 10928, -12207, 10853, -12274, 10778, -12340,
+ 10702, -12406, 10625, -12472, 10549, -12537, 10471, -12601,
+ 10394, -12665, 10316, -12729, 10238, -12792, 10159, -12854,
+ 10080, -12916, 10001, -12978, 9921, -13039, 9841, -13100,
+ 9760, -13160, 9679, -13219, 9598, -13279, 9516, -13337,
+ 9434, -13395, 9352, -13453, 9269, -13510, 9186, -13567,
+ 9102, -13623, 9019, -13678, 8935, -13733, 8850, -13788,
+ 8765, -13842, 8680, -13896, 8595, -13949, 8509, -14001,
+ 8423, -14053, 8337, -14104, 8250, -14155, 8163, -14206,
+ 8076, -14256, 7988, -14305, 7900, -14354, 7812, -14402,
+ 7723, -14449, 7635, -14497, 7545, -14543, 7456, -14589,
+ 7366, -14635, 7276, -14680, 7186, -14724, 7096, -14768,
+ 7005, -14811, 6914, -14854, 6823, -14896, 6731, -14937,
+ 6639, -14978, 6547, -15019, 6455, -15059, 6363, -15098,
+ 6270, -15137, 6177, -15175, 6084, -15213, 5990, -15250,
+ 5897, -15286, 5803, -15322, 5708, -15357, 5614, -15392,
+ 5520, -15426, 5425, -15460, 5330, -15493, 5235, -15525,
+ 5139, -15557, 5044, -15588, 4948, -15619, 4852, -15649,
+ 4756, -15679, 4660, -15707, 4563, -15736, 4467, -15763,
+ 4370, -15791, 4273, -15817, 4176, -15843, 4078, -15868,
+ 3981, -15893, 3883, -15917, 3786, -15941, 3688, -15964,
+ 3590, -15986, 3492, -16008, 3393, -16029, 3295, -16049,
+ 3196, -16069, 3098, -16088, 2999, -16107, 2900, -16125,
+ 2801, -16143, 2702, -16160, 2603, -16176, 2503, -16192,
+ 2404, -16207, 2305, -16221, 2205, -16235, 2105, -16248,
+ 2006, -16261, 1906, -16273, 1806, -16284, 1706, -16295,
+ 1606, -16305, 1506, -16315, 1406, -16324, 1306, -16332,
+ 1205, -16340, 1105, -16347, 1005, -16353, 904, -16359,
+ 804, -16364, 703, -16369, 603, -16373, 503, -16376,
+ 402, -16379, 302, -16381, 201, -16383, 101, -16384,
+ 0, -16384, -101, -16384, -201, -16383, -302, -16381,
+ -402, -16379, -503, -16376, -603, -16373, -704, -16369,
+ -804, -16364, -904, -16359, -1005, -16353, -1105, -16347,
+ -1205, -16340, -1306, -16332, -1406, -16324, -1506, -16315,
+ -1606, -16305, -1706, -16295, -1806, -16284, -1906, -16273,
+ -2006, -16261, -2105, -16248, -2205, -16235, -2305, -16221,
+ -2404, -16207, -2503, -16192, -2603, -16176, -2702, -16160,
+ -2801, -16143, -2900, -16125, -2999, -16107, -3098, -16088,
+ -3196, -16069, -3295, -16049, -3393, -16029, -3492, -16008,
+ -3590, -15986, -3688, -15964, -3786, -15941, -3883, -15917,
+ -3981, -15893, -4078, -15868, -4176, -15843, -4273, -15817,
+ -4370, -15791, -4467, -15763, -4563, -15736, -4660, -15707,
+ -4756, -15679, -4852, -15649, -4948, -15619, -5044, -15588,
+ -5139, -15557, -5235, -15525, -5330, -15493, -5425, -15460,
+ -5520, -15426, -5614, -15392, -5708, -15357, -5803, -15322,
+ -5897, -15286, -5990, -15250, -6084, -15213, -6177, -15175,
+ -6270, -15137, -6363, -15098, -6455, -15059, -6547, -15019,
+ -6639, -14978, -6731, -14937, -6823, -14896, -6914, -14854,
+ -7005, -14811, -7096, -14768, -7186, -14724, -7276, -14680,
+ -7366, -14635, -7456, -14589, -7545, -14543, -7635, -14497,
+ -7723, -14449, -7812, -14402, -7900, -14354, -7988, -14305,
+ -8076, -14256, -8163, -14206, -8250, -14155, -8337, -14104,
+ -8423, -14053, -8509, -14001, -8595, -13949, -8680, -13896,
+ -8765, -13842, -8850, -13788, -8935, -13733, -9019, -13678,
+ -9102, -13623, -9186, -13567, -9269, -13510, -9352, -13453,
+ -9434, -13395, -9516, -13337, -9598, -13279, -9679, -13219,
+ -9760, -13160, -9841, -13100, -9921, -13039, -10001, -12978,
+ -10080, -12916, -10159, -12854, -10238, -12792, -10316, -12729,
+ -10394, -12665, -10471, -12601, -10549, -12537, -10625, -12472,
+ -10702, -12406, -10778, -12340, -10853, -12274, -10928, -12207,
+ -11003, -12140, -11077, -12072, -11151, -12004, -11224, -11935,
+ -11297, -11866, -11370, -11797, -11442, -11727, -11514, -11656,
+ -11585, -11585, -11656, -11514, -11727, -11442, -11797, -11370,
+ -11866, -11297, -11935, -11224, -12004, -11151, -12072, -11077,
+ -12140, -11003, -12207, -10928, -12274, -10853, -12340, -10778,
+ -12406, -10702, -12472, -10625, -12537, -10549, -12601, -10471,
+ -12665, -10394, -12729, -10316, -12792, -10238, -12854, -10159,
+ -12916, -10080, -12978, -10001, -13039, -9921, -13100, -9840,
+ -13160, -9760, -13219, -9679, -13279, -9598, -13337, -9516,
+ -13395, -9434, -13453, -9352, -13510, -9269, -13567, -9186,
+ -13623, -9102, -13678, -9019, -13733, -8935, -13788, -8850,
+ -13842, -8765, -13896, -8680, -13949, -8595, -14001, -8509,
+ -14053, -8423, -14104, -8337, -14155, -8250, -14206, -8163,
+ -14256, -8076, -14305, -7988, -14354, -7900, -14402, -7812,
+ -14449, -7723, -14497, -7635, -14543, -7545, -14589, -7456,
+ -14635, -7366, -14680, -7276, -14724, -7186, -14768, -7096,
+ -14811, -7005, -14854, -6914, -14896, -6823, -14937, -6731,
+ -14978, -6639, -15019, -6547, -15059, -6455, -15098, -6363,
+ -15137, -6270, -15175, -6177, -15213, -6084, -15250, -5990,
+ -15286, -5897, -15322, -5803, -15357, -5708, -15392, -5614,
+ -15426, -5520, -15460, -5425, -15493, -5330, -15525, -5235,
+ -15557, -5139, -15588, -5044, -15619, -4948, -15649, -4852,
+ -15679, -4756, -15707, -4660, -15736, -4563, -15763, -4467,
+ -15791, -4370, -15817, -4273, -15843, -4176, -15868, -4078,
+ -15893, -3981, -15917, -3883, -15941, -3786, -15964, -3688,
+ -15986, -3590, -16008, -3492, -16029, -3393, -16049, -3295,
+ -16069, -3196, -16088, -3098, -16107, -2999, -16125, -2900,
+ -16143, -2801, -16160, -2702, -16176, -2603, -16192, -2503,
+ -16207, -2404, -16221, -2305, -16235, -2205, -16248, -2105,
+ -16261, -2006, -16273, -1906, -16284, -1806, -16295, -1706,
+ -16305, -1606, -16315, -1506, -16324, -1406, -16332, -1306,
+ -16340, -1205, -16347, -1105, -16353, -1005, -16359, -904,
+ -16364, -804, -16369, -703, -16373, -603, -16376, -503,
+ -16379, -402, -16381, -302, -16383, -201, -16384, -101,
+ /* The following is a duplication of the above but scaled up by a factor of 2.
+ * This save one operation in inverse FFT inner loops */
+ 32767, 0, 32767, -201, 32766, -402, 32762, -603,
+ 32758, -804, 32753, -1005, 32746, -1206, 32738, -1407,
+ 32729, -1608, 32718, -1809, 32706, -2009, 32693, -2210,
+ 32679, -2411, 32664, -2611, 32647, -2811, 32629, -3012,
+ 32610, -3212, 32590, -3412, 32568, -3612, 32546, -3812,
+ 32522, -4011, 32496, -4211, 32470, -4410, 32442, -4609,
+ 32413, -4808, 32383, -5007, 32352, -5205, 32319, -5404,
+ 32286, -5602, 32251, -5800, 32214, -5998, 32177, -6195,
+ 32138, -6393, 32099, -6590, 32058, -6787, 32015, -6983,
+ 31972, -7180, 31927, -7376, 31881, -7571, 31834, -7767,
+ 31786, -7962, 31737, -8157, 31686, -8351, 31634, -8546,
+ 31581, -8740, 31527, -8933, 31471, -9127, 31415, -9319,
+ 31357, -9512, 31298, -9704, 31238, -9896, 31177, -10088,
+ 31114, -10279, 31050, -10469, 30986, -10660, 30920, -10850,
+ 30853, -11039, 30784, -11228, 30715, -11417, 30644, -11605,
+ 30572, -11793, 30499, -11980, 30425, -12167, 30350, -12354,
+ 30274, -12540, 30196, -12725, 30118, -12910, 30038, -13095,
+ 29957, -13279, 29875, -13463, 29792, -13646, 29707, -13828,
+ 29622, -14010, 29535, -14192, 29448, -14373, 29359, -14553,
+ 29269, -14733, 29178, -14912, 29086, -15091, 28993, -15269,
+ 28899, -15447, 28803, -15624, 28707, -15800, 28610, -15976,
+ 28511, -16151, 28411, -16326, 28311, -16500, 28209, -16673,
+ 28106, -16846, 28002, -17018, 27897, -17190, 27791, -17361,
+ 27684, -17531, 27576, -17700, 27467, -17869, 27357, -18037,
+ 27246, -18205, 27133, -18372, 27020, -18538, 26906, -18703,
+ 26791, -18868, 26674, -19032, 26557, -19195, 26439, -19358,
+ 26320, -19520, 26199, -19681, 26078, -19841, 25956, -20001,
+ 25833, -20160, 25708, -20318, 25583, -20475, 25457, -20632,
+ 25330, -20788, 25202, -20943, 25073, -21097, 24943, -21251,
+ 24812, -21403, 24680, -21555, 24548, -21706, 24414, -21856,
+ 24279, -22006, 24144, -22154, 24008, -22302, 23870, -22449,
+ 23732, -22595, 23593, -22740, 23453, -22884, 23312, -23028,
+ 23170, -23170, 23028, -23312, 22884, -23453, 22740, -23593,
+ 22595, -23732, 22449, -23870, 22302, -24008, 22154, -24144,
+ 22006, -24279, 21856, -24414, 21706, -24548, 21555, -24680,
+ 21403, -24812, 21251, -24943, 21097, -25073, 20943, -25202,
+ 20788, -25330, 20632, -25457, 20475, -25583, 20318, -25708,
+ 20160, -25833, 20001, -25956, 19841, -26078, 19681, -26199,
+ 19520, -26320, 19358, -26439, 19195, -26557, 19032, -26674,
+ 18868, -26791, 18703, -26906, 18538, -27020, 18372, -27133,
+ 18205, -27246, 18037, -27357, 17869, -27467, 17700, -27576,
+ 17531, -27684, 17361, -27791, 17190, -27897, 17018, -28002,
+ 16846, -28106, 16673, -28209, 16500, -28311, 16326, -28411,
+ 16151, -28511, 15976, -28610, 15800, -28707, 15624, -28803,
+ 15447, -28899, 15269, -28993, 15091, -29086, 14912, -29178,
+ 14733, -29269, 14553, -29359, 14373, -29448, 14192, -29535,
+ 14010, -29622, 13828, -29707, 13646, -29792, 13463, -29875,
+ 13279, -29957, 13095, -30038, 12910, -30118, 12725, -30196,
+ 12540, -30274, 12354, -30350, 12167, -30425, 11980, -30499,
+ 11793, -30572, 11605, -30644, 11417, -30715, 11228, -30784,
+ 11039, -30853, 10850, -30920, 10660, -30986, 10469, -31050,
+ 10279, -31114, 10088, -31177, 9896, -31238, 9704, -31298,
+ 9512, -31357, 9319, -31415, 9127, -31471, 8933, -31527,
+ 8740, -31581, 8546, -31634, 8351, -31686, 8157, -31737,
+ 7962, -31786, 7767, -31834, 7571, -31881, 7376, -31927,
+ 7180, -31972, 6983, -32015, 6787, -32058, 6590, -32099,
+ 6393, -32138, 6195, -32177, 5998, -32214, 5800, -32251,
+ 5602, -32286, 5404, -32319, 5205, -32352, 5007, -32383,
+ 4808, -32413, 4609, -32442, 4410, -32470, 4211, -32496,
+ 4011, -32522, 3812, -32546, 3612, -32568, 3412, -32590,
+ 3212, -32610, 3012, -32629, 2811, -32647, 2611, -32664,
+ 2411, -32679, 2210, -32693, 2009, -32706, 1809, -32718,
+ 1608, -32729, 1407, -32738, 1206, -32746, 1005, -32753,
+ 804, -32758, 603, -32762, 402, -32766, 201, -32767,
+ 0, -32768, -201, -32767, -402, -32766, -603, -32762,
+ -804, -32758, -1005, -32753, -1206, -32746, -1407, -32738,
+ -1608, -32729, -1809, -32718, -2009, -32706, -2210, -32693,
+ -2411, -32679, -2611, -32664, -2811, -32647, -3012, -32629,
+ -3212, -32610, -3412, -32590, -3612, -32568, -3812, -32546,
+ -4011, -32522, -4211, -32496, -4410, -32470, -4609, -32442,
+ -4808, -32413, -5007, -32383, -5205, -32352, -5404, -32319,
+ -5602, -32286, -5800, -32251, -5998, -32214, -6195, -32177,
+ -6393, -32138, -6590, -32099, -6787, -32058, -6983, -32015,
+ -7180, -31972, -7376, -31927, -7571, -31881, -7767, -31834,
+ -7962, -31786, -8157, -31737, -8351, -31686, -8546, -31634,
+ -8740, -31581, -8933, -31527, -9127, -31471, -9319, -31415,
+ -9512, -31357, -9704, -31298, -9896, -31238, -10088, -31177,
+ -10279, -31114, -10469, -31050, -10660, -30986, -10850, -30920,
+ -11039, -30853, -11228, -30784, -11417, -30715, -11605, -30644,
+ -11793, -30572, -11980, -30499, -12167, -30425, -12354, -30350,
+ -12540, -30274, -12725, -30196, -12910, -30118, -13095, -30038,
+ -13279, -29957, -13463, -29875, -13646, -29792, -13828, -29707,
+ -14010, -29622, -14192, -29535, -14373, -29448, -14553, -29359,
+ -14733, -29269, -14912, -29178, -15091, -29086, -15269, -28993,
+ -15447, -28899, -15624, -28803, -15800, -28707, -15976, -28610,
+ -16151, -28511, -16326, -28411, -16500, -28311, -16673, -28209,
+ -16846, -28106, -17018, -28002, -17190, -27897, -17361, -27791,
+ -17531, -27684, -17700, -27576, -17869, -27467, -18037, -27357,
+ -18205, -27246, -18372, -27133, -18538, -27020, -18703, -26906,
+ -18868, -26791, -19032, -26674, -19195, -26557, -19358, -26439,
+ -19520, -26320, -19681, -26199, -19841, -26078, -20001, -25956,
+ -20160, -25833, -20318, -25708, -20475, -25583, -20632, -25457,
+ -20788, -25330, -20943, -25202, -21097, -25073, -21251, -24943,
+ -21403, -24812, -21555, -24680, -21706, -24548, -21856, -24414,
+ -22006, -24279, -22154, -24144, -22302, -24008, -22449, -23870,
+ -22595, -23732, -22740, -23593, -22884, -23453, -23028, -23312,
+ -23170, -23170, -23312, -23028, -23453, -22884, -23593, -22740,
+ -23732, -22595, -23870, -22449, -24008, -22302, -24144, -22154,
+ -24279, -22006, -24414, -21856, -24548, -21706, -24680, -21555,
+ -24812, -21403, -24943, -21251, -25073, -21097, -25202, -20943,
+ -25330, -20788, -25457, -20632, -25583, -20475, -25708, -20318,
+ -25833, -20160, -25956, -20001, -26078, -19841, -26199, -19681,
+ -26320, -19520, -26439, -19358, -26557, -19195, -26674, -19032,
+ -26791, -18868, -26906, -18703, -27020, -18538, -27133, -18372,
+ -27246, -18205, -27357, -18037, -27467, -17869, -27576, -17700,
+ -27684, -17531, -27791, -17361, -27897, -17190, -28002, -17018,
+ -28106, -16846, -28209, -16673, -28311, -16500, -28411, -16326,
+ -28511, -16151, -28610, -15976, -28707, -15800, -28803, -15624,
+ -28899, -15447, -28993, -15269, -29086, -15091, -29178, -14912,
+ -29269, -14733, -29359, -14553, -29448, -14373, -29535, -14192,
+ -29622, -14010, -29707, -13828, -29792, -13646, -29875, -13463,
+ -29957, -13279, -30038, -13095, -30118, -12910, -30196, -12725,
+ -30274, -12540, -30350, -12354, -30425, -12167, -30499, -11980,
+ -30572, -11793, -30644, -11605, -30715, -11417, -30784, -11228,
+ -30853, -11039, -30920, -10850, -30986, -10660, -31050, -10469,
+ -31114, -10279, -31177, -10088, -31238, -9896, -31298, -9704,
+ -31357, -9512, -31415, -9319, -31471, -9127, -31527, -8933,
+ -31581, -8740, -31634, -8546, -31686, -8351, -31737, -8157,
+ -31786, -7962, -31834, -7767, -31881, -7571, -31927, -7376,
+ -31972, -7180, -32015, -6983, -32058, -6787, -32099, -6590,
+ -32138, -6393, -32177, -6195, -32214, -5998, -32251, -5800,
+ -32286, -5602, -32319, -5404, -32352, -5205, -32383, -5007,
+ -32413, -4808, -32442, -4609, -32470, -4410, -32496, -4211,
+ -32522, -4011, -32546, -3812, -32568, -3612, -32590, -3412,
+ -32610, -3212, -32629, -3012, -32647, -2811, -32664, -2611,
+ -32679, -2411, -32693, -2210, -32706, -2009, -32718, -1809,
+ -32729, -1608, -32738, -1407, -32746, -1206, -32753, -1005,
+ -32758, -804, -32762, -603, -32766, -402, -32767, -201
+};
+
+const Word16 FFT_REORDER_1024[512] = {
+ 0, 512, 256, 768, 128, 640, 384, 896,
+ 64, 576, 320, 832, 192, 704, 448, 960,
+ 32, 544, 288, 800, 160, 672, 416, 928,
+ 96, 608, 352, 864, 224, 736, 480, 992,
+ 16, 528, 272, 784, 144, 656, 400, 912,
+ 80, 592, 336, 848, 208, 720, 464, 976,
+ 48, 560, 304, 816, 176, 688, 432, 944,
+ 112, 624, 368, 880, 240, 752, 496, 1008,
+ 8, 520, 264, 776, 136, 648, 392, 904,
+ 72, 584, 328, 840, 200, 712, 456, 968,
+ 40, 552, 296, 808, 168, 680, 424, 936,
+ 104, 616, 360, 872, 232, 744, 488, 1000,
+ 24, 536, 280, 792, 152, 664, 408, 920,
+ 88, 600, 344, 856, 216, 728, 472, 984,
+ 56, 568, 312, 824, 184, 696, 440, 952,
+ 120, 632, 376, 888, 248, 760, 504, 1016,
+ 4, 516, 260, 772, 132, 644, 388, 900,
+ 68, 580, 324, 836, 196, 708, 452, 964,
+ 36, 548, 292, 804, 164, 676, 420, 932,
+ 100, 612, 356, 868, 228, 740, 484, 996,
+ 20, 532, 276, 788, 148, 660, 404, 916,
+ 84, 596, 340, 852, 212, 724, 468, 980,
+ 52, 564, 308, 820, 180, 692, 436, 948,
+ 116, 628, 372, 884, 244, 756, 500, 1012,
+ 12, 524, 268, 780, 140, 652, 396, 908,
+ 76, 588, 332, 844, 204, 716, 460, 972,
+ 44, 556, 300, 812, 172, 684, 428, 940,
+ 108, 620, 364, 876, 236, 748, 492, 1004,
+ 28, 540, 284, 796, 156, 668, 412, 924,
+ 92, 604, 348, 860, 220, 732, 476, 988,
+ 60, 572, 316, 828, 188, 700, 444, 956,
+ 124, 636, 380, 892, 252, 764, 508, 1020,
+ 2, 514, 258, 770, 130, 642, 386, 898,
+ 66, 578, 322, 834, 194, 706, 450, 962,
+ 34, 546, 290, 802, 162, 674, 418, 930,
+ 98, 610, 354, 866, 226, 738, 482, 994,
+ 18, 530, 274, 786, 146, 658, 402, 914,
+ 82, 594, 338, 850, 210, 722, 466, 978,
+ 50, 562, 306, 818, 178, 690, 434, 946,
+ 114, 626, 370, 882, 242, 754, 498, 1010,
+ 10, 522, 266, 778, 138, 650, 394, 906,
+ 74, 586, 330, 842, 202, 714, 458, 970,
+ 42, 554, 298, 810, 170, 682, 426, 938,
+ 106, 618, 362, 874, 234, 746, 490, 1002,
+ 26, 538, 282, 794, 154, 666, 410, 922,
+ 90, 602, 346, 858, 218, 730, 474, 986,
+ 58, 570, 314, 826, 186, 698, 442, 954,
+ 122, 634, 378, 890, 250, 762, 506, 1018,
+ 6, 518, 262, 774, 134, 646, 390, 902,
+ 70, 582, 326, 838, 198, 710, 454, 966,
+ 38, 550, 294, 806, 166, 678, 422, 934,
+ 102, 614, 358, 870, 230, 742, 486, 998,
+ 22, 534, 278, 790, 150, 662, 406, 918,
+ 86, 598, 342, 854, 214, 726, 470, 982,
+ 54, 566, 310, 822, 182, 694, 438, 950,
+ 118, 630, 374, 886, 246, 758, 502, 1014,
+ 14, 526, 270, 782, 142, 654, 398, 910,
+ 78, 590, 334, 846, 206, 718, 462, 974,
+ 46, 558, 302, 814, 174, 686, 430, 942,
+ 110, 622, 366, 878, 238, 750, 494, 1006,
+ 30, 542, 286, 798, 158, 670, 414, 926,
+ 94, 606, 350, 862, 222, 734, 478, 990,
+ 62, 574, 318, 830, 190, 702, 446, 958,
+ 126, 638, 382, 894, 254, 766, 510, 1022
+};
+
+const Word16 Gamma_19661_Tbl_fx[] = {
+ 19661, 11797, 7078, 4247, 2548, 1529, 917, 550, 330, 198, 119, 71, 43, 26, 16, 10
+}; /*Q15 */
+
+const Word16 Gamma_29491_Tbl[] = {
+ 29491, 26542, 23888, 21499, 19349, 17414, 15672, 14105,
+ 12694, 11425, 10282, 9254, 8329, 7496, 6746, 6071
+}; // Q15
+
+/*---------------------------------------------------------------------*
+ * NB post-filter tables
+ *---------------------------------------------------------------------*/
+
+const Word16 tab_hup_s_fx[SIZ_TAB_HUP_S] = { // Q15
+ -188, 2873, 31650, -1597, -484, 7041, 28469, -2147, -933, 12266,
+ 23705, -1992, -1492, 18050, 18050, -1492, -1992, 23705, 12266, -933,
+ -2147, 28469, 7041, -484, -1597, 31650, 2873, -188
+};
+
+const Word16 tab_hup_l_fx[SIZ_TAB_HUP_L] = { // Q15
+ -40, 72, -156, 315, -579, 1023, -1874, 4439,
+ 31915, -3390, 1595, -887, 501, -266, 130, -59,
+ -77, 147, -317, 631, -1150, 2030, -3773, 9639,
+ 29436, -5579, 2727, -1527, 859, -453, 218, -101,
+ -106, 212, -455, 892, -1614, 2850, -5392, 15206,
+ 25569, -6549, 3303, -1860, 1041, -543, 258, -122,
+ -123, 253, -538, 1044, -1876, 3319, -6414, 20676,
+ 20676, -6414, 3319, -1876, 1044, -538, 253, -123,
+ -122, 258, -543, 1041, -1860, 3303, -6549, 25569,
+ 15206, -5392, 2850, -1614, 892, -455, 212, -106,
+ -101, 218, -453, 859, -1527, 2727, -5579, 29436,
+ 9639, -3773, 2030, -1150, 631, -317, 147, -77,
+ -59, 130, -266, 501, -887, 1595, -3390, 31915,
+ 4439, -1874, 1023, -579, 315, -156, 72, -40
+};
+
+const Word16 mfreq_loc_Q2fx[] = { 700, 1500, 3100, 4700, 6300, 7900, 9500, 11100, 12700, 14300, 15900, 17500, 19100, 20700, 22300, 25500, 28700, 31900 }; // Q0
+const Word16 mfreq_loc_div_25[] = { 7, 15, 31, 47, 63, 79, 95, 111, 127, 143, 159, 175, 191, 207, 223, 255, 287, 319 }; // Q0
+
+// low_rate_band_att_fx.c
+/* %* lowered Table ROM, call with band_len_idx[sfm_size>>3] */
+/* % sfms =[ 8, 16, 24, 32, 48, 64, 80, 96 ], */
+/* sfm/8= [ 1 2 3 4 6 8 10 12]; */
+/* % idx= 0 1 2 3 4 5 6 7; */
+/* call with band_len_idx[sfm_size>>3] */
+const Word16 band_len_idx[1 + ( MAX_SFM_LEN_FX / 8 )] = {
+ // Q0
+ /*sfm/8*/ /*1*/ /*2 */ /*3 */ /*4 */ /*6 */ /*8 */ /*10*/ /*12*/
+ -1, 0 /*8*/, 1 /*16*/, 2 /*24*/, 3 /*32*/, -1, 4 /*48 */, -1, 5 /*64 */, -1, 6 /*80*/, -1, 7 /*96*/
+};
+const Word16 band_len_ener_shift[8] = { 1, 2, 2, 2, 3, 3, 4 /*sfm==80*/, 4 /*sfm==96*/ }; /* 96 requires 1 bit more than 48 */ // Q0
+/*% sfms=[8,16,24,32,48,64,80,96], round(sqrt(sfms)*2^11) */
+const Word16 fine_gain_pred_sqrt_bw[8] = { 5793, 8192, 10033, 11585, 14189, 16384, 18318, 20066 }; /* (Q11) */
+const Word16 ivas_band_len_idx[1 + ( MAX_SFM_LEN_FX / 8 )] = {
+ /*sfm/8*/ /*1*/ /*2 */ /*3 */ /*4 */ /*6 */ /*8 */ /*10*/ /*12*/
+ -1, 0 /*8*/, 1 /*16*/, 2 /*24*/, 3 /*32*/, 4 /*40*/, 5 /*48 */, -1, 6 /*64 */, -1, 7 /*80*/, -1, 8 /*96*/
+}; // Q0
+const Word16 ivas_band_len_ener_shift[9] = { 1, 2, 2, 2, 3, 3, 3, 4 /*sfm==80*/, 4 /*sfm==96*/ }; // Q0 /* 96 requires 1 bit more than 48 */
+const Word16 ivas_fine_gain_pred_sqrt_bw[9] = { 5793, 8192, 10033, 11585, 12953, 14189, 16384, 18318, 20066 }; /* (Q11) */
+/*% sfms=[8,16,24,32,40,48,64,80,96], round(sqrt(sfms)*2^11) */
+/*----------------------------------------------------------------------------------*
+ * means of ISFs for WB active speech
+ *----------------------------------------------------------------------------------*/
+const Word16 Mean_isf_wb[M] = /* G722.2 active speech ISF's means Q2.56*/
+ {
+ 738, 1326, 2336, 3578, 4596, 5662, 6711, 7730,
+ 8750, 9753, 10705, 11728, 12833, 13971, 15043, 4037
+ };
+
+const Word16 lsp_shb_prev_tbl_fx[LPC_SHB_ORDER] = {
+ /*Q15 */
+ 0,
+ 1638,
+ 3277,
+ 4915,
+ 6554,
+ 8192,
+ 9830,
+ 11469,
+ 13107,
+ 14746
+};
+
+const Word16 lsp_shb_prev_tbl_swb_tbe_enc_fx[LPC_SHB_ORDER] = {
+ // Q15
+ 32767,
+ 31165,
+ 26509,
+ 19262,
+ 10123,
+ 0,
+ -10124,
+ -19261,
+ -26509,
+ -31166,
+};
+
+const Word16 ivas_lsp_shb_prev_tbl_fx[LPC_SHB_ORDER] = {
+ /* Q15 */
+ 1489,
+ 2979,
+ 4468,
+ 5958,
+ 7447,
+ 8937,
+ 10426,
+ 11916,
+ 13405,
+ 14895
+};
+
+/* These words are subtracted from high/low/value with a shift left by 1. */
+/* The value 0x0CCC should never be referenced, low is less/equal high */
+/* The value 0x0BBB should never be referenced, loop must break instead. */
+/* Refer to this table with indices: tab_ari_qnew[msb_high][msb_low] */
+const Word16 tab_ari_qnew[4][4] = { { 0x0000, 0x0CCC, 0x0CCC, 0x0CCC },
+ { 0x0000, 0x0000, 0x0CCC, 0x0CCC },
+ { 0x0BBB, 0x2000, 0x4000, 0x0CCC },
+ { 0x0BBB, 0x0BBB, 0x4000, 0x4000 } };
+
+const Word16 phs_tbl_dec[64 * 2] = { // Q15
+ /* part of table that is not scaled by 2 */
+ 16384, 0, 16305, -1606, 16069, -3196, 15678, -4756, 15136, -6270,
+ 14449, -7723, 13622, -9102, 12665, -10394, 11585, -11585, 10394, -12665,
+ 9102, -13622, 7723, -14449, 6270, -15136, 4756, -15678, 3196, -16069,
+ 1606, -16305, 0, -16384, -1606, -16305, -3196, -16069, -4756, -15678,
+ -6270, -15136, -7723, -14449, -9102, -13622, -10394, -12665, -11585, -11585,
+ -12665, -10394, -13622, -9102, -14449, -7723, -15136, -6270, -15678, -4756,
+ -16069, -3196, -16305, -1606,
+ /* part of table that is scaled by 2 (this save one operation in FFT inner loops) */
+ 32767, 0, 32610, -3212, 32138, -6392, 31356, -9512, 30272, -12540,
+ 28898, -15446, 27244, -18204, 25330, -20788, 23170, -23170, 20788, -25330,
+ 18204, -27244, 15446, -28898, 12540, -30272, 9512, -31356, 6392, -32138,
+ 3212, -32610, 0, -32768, -3212, -32610, -6392, -32138, -9512, -31356,
+ -12540, -30272, -15446, -28898, -18204, -27244, -20788, -25330, -23170, -23170,
+ -25330, -20788, -27244, -18204, -28898, -15446, -30272, -12540, -31356, -9512,
+ -32138, -6392, -32610, -3212
+};
+
+/* 2.0 - 6.4 kHz phase dispersion */
+const Word16 Low_H_phasedisp[L_SUBFR] = { // Q15
+ 16389, 16381, 16386, 16382, 16382, 16383, 16381, 16384, 16385, 10265,
+ 10154, 9894, 14052, 16343, -531, 13216, 16373, 15510, 9407, 15949,
+ 4726, 14593, 10404, 9796, -16336, -1815, -10623, 12647, 14556, -12683,
+ 11389, 8176, 16382, -14197, 11781, 10379, 7516, 10424, -12472, 16285,
+ -1200, -13137, 12659, -7446, 15684, -3763, -13418, -5280, 521, -9685,
+ -16375, -1219, 8436, -13059, -12861, -12775, 0, 3, 0, -2,
+ -1, -1, -1, 2
+};
+
+/* 3.2 - 6.4 kHz phase dispersion */
+const Word16 Mid_H_phasedisp[L_SUBFR] = { // Q15
+ 16382, 16382, 16384, 16385, 16386, 16388, 16387, 16383, 16387, 16383,
+ 16386, 16386, 16386, 16384, 16382, 16388, 14847, 9629, 13249, 14487,
+ 10995, 643, 13818, 13779, 6468, 8665, 11634, 9781, -14636, -982,
+ 11746, -722, 16386, -16365, -11422, 16354, 7363, 13148, -11538, -13903,
+ -15051, -8862, 8812, -16371, -12146, 7661, -9637, -13253, -6922, 4,
+ -4, -1, -5, 1, 7, 6, -7, -1, 4, -4,
+ 0, -1, -3, 3
+};
+
+// ACcontextMapping_dec_fx.c
+const Word16 Tab_esc_nb[4] = { 0 << ( NBITS_CONTEXT + NBITS_RATEQ ),
+ 1 << ( NBITS_CONTEXT + NBITS_RATEQ ),
+ 2 << ( NBITS_CONTEXT + NBITS_RATEQ ),
+ 3 << ( NBITS_CONTEXT + NBITS_RATEQ ) }; // Q0
+
+const Word16 pow2tab[15] = { 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 }; // Q0
+const Word32 pow2[] = { // Q0
+ 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576
+};
+// d_gain2p.c
+const Word16 Es_pred_qua[8] = {
+ 1521 /* 5.9422f Q8*/,
+ 3909 /*15.2711f Q8*/,
+ 5987 /*23.3857f Q8*/,
+ 7816 /*30.5310f Q8*/,
+ 9477 /*37.0190f Q8*/,
+ 11124 /*43.4539f Q8*/,
+ 12863 /*50.2442f Q8*/,
+ 15031 /*58.7164f Q8*/
+};
+
+const Word16 Es_pred_qua_2[16] = {
+ -1280 /*-5.f Q8*/,
+ 0 /* 0.f Q8*/,
+ 1280 /* 5.f Q8*/,
+ 2560 /*10.f Q8*/,
+ 3840 /*15.f Q8*/,
+ 5120 /*20.f Q8*/,
+ 6400 /*25.f Q8*/,
+ 7680 /*30.f Q8*/,
+ 8960 /*35.f Q8*/,
+ 10240 /*40.f Q8*/,
+ 11520 /*45.f Q8*/,
+ 12800 /*50.f Q8*/,
+ 14080 /*55.f Q8*/,
+ 15360 /*60.f Q8*/,
+ 16640 /*65.f Q8*/,
+ 17920 /*70.f Q8*/
+};
+const Word16 T_DIV_L_Frame[] = /*0Q15 * 2^-7 */
+ {
+ 26214 /*160*/
+ ,
+ 16384 /*256*/
+ ,
+ 13107 /*320*/
+ ,
+ 8738 /*480*/
+ ,
+ 8192 /*512*/
+ ,
+ 6553 /*640*/
+ };
+
+/* order 8 LPF for nelp frames when non-native sampling freq inputs used with -max_band NB */
+/* used to suppress frequencies above 4kHz present at the output of filters in pre_proc() */
+
+const Word16 num_nelp_lp_fx[NELP_LP_ORDER + 1] = /*Q13*/
+ {
+ 727,
+ 3506,
+ 8988,
+ 15029,
+ 17732,
+ 15022,
+ 8979,
+ 3501,
+ 726
+ };
+
+const Word16 den_nelp_lp_fx[NELP_LP_ORDER + 1] = { // Q13
+ 8192,
+ 8819,
+ 21618,
+ 12167,
+ 15902,
+ 3553,
+ 3998,
+ -120,
+ 353
+};
+
+/*----------------------------------------------------------------------------------*
+ * AMR-WB IO WB BWE - band-pass 6-8kHz FIR filter, values in Q15:
+ *----------------------------------------------------------------------------------*/
+const Word16 fir_6k_8k_fx[31] = { // Q15
+ 44, -155, 323, -482, 563, -590, 726, -1180, 1986, -2818, 3028,
+ -1991, -423, 3583, -6281, 7342, -6281, 3583, -423, -1991, 3028,
+ -2818, 1986, -1180, 726, -590, 563, -482, 323, -155, 44
+};
+
+const Word16 pwf78_fx[17] = { 25559, 19936, 15550, 12129, 9460, 7379, 5755, 4489,
+ 3501, 2731, 2130, 1661, 1296, 1011, 788, 615,
+ 479 }; /* 0.78^i (i=1,...,17), Q15 */
+
+/*------------------------------------------------------------------------------*
+ * lag window for windowing the autocorrelations in LP analysis
+ * Used in lib_enc\analy_lp_fx.c
+ *------------------------------------------------------------------------------*/
+const Word16 hamcos_window_fx[L_LP_AMR_WB] = { // Q15
+ 2621, 2622, 2626, 2632, 2640, 2650, 2662, 2677,
+ 2694, 2714, 2735, 2759, 2785, 2814, 2844, 2877,
+ 2912, 2949, 2989, 3031, 3075, 3121, 3169, 3220,
+ 3273, 3328, 3385, 3444, 3506, 3569, 3635, 3703,
+ 3773, 3845, 3919, 3996, 4074, 4155, 4237, 4321,
+ 4408, 4496, 4587, 4680, 4774, 4870, 4969, 5069,
+ 5171, 5275, 5381, 5489, 5599, 5710, 5824, 5939,
+ 6056, 6174, 6295, 6417, 6541, 6666, 6793, 6922,
+ 7052, 7185, 7318, 7453, 7590, 7728, 7868, 8009,
+ 8152, 8296, 8442, 8589, 8737, 8887, 9038, 9191,
+ 9344, 9499, 9655, 9813, 9971, 10131, 10292, 10454,
+ 10617, 10781, 10946, 11113, 11280, 11448, 11617, 11787,
+ 11958, 12130, 12303, 12476, 12650, 12825, 13001, 13178,
+ 13355, 13533, 13711, 13890, 14070, 14250, 14431, 14612,
+ 14793, 14975, 15158, 15341, 15524, 15708, 15891, 16076,
+ 16260, 16445, 16629, 16814, 16999, 17185, 17370, 17555,
+ 17740, 17926, 18111, 18296, 18481, 18666, 18851, 19036,
+ 19221, 19405, 19589, 19773, 19956, 20139, 20322, 20504,
+ 20686, 20867, 21048, 21229, 21408, 21588, 21767, 21945,
+ 22122, 22299, 22475, 22651, 22825, 22999, 23172, 23344,
+ 23516, 23686, 23856, 24025, 24192, 24359, 24525, 24689,
+ 24853, 25016, 25177, 25337, 25496, 25654, 25811, 25967,
+ 26121, 26274, 26426, 26576, 26725, 26873, 27019, 27164,
+ 27308, 27450, 27590, 27729, 27867, 28003, 28137, 28270,
+ 28401, 28531, 28659, 28785, 28910, 29033, 29154, 29274,
+ 29391, 29507, 29622, 29734, 29845, 29953, 30060, 30165,
+ 30268, 30370, 30469, 30566, 30662, 30755, 30847, 30936,
+ 31024, 31109, 31193, 31274, 31354, 31431, 31506, 31579,
+ 31651, 31719, 31786, 31851, 31914, 31974, 32032, 32088,
+ 32142, 32194, 32243, 32291, 32336, 32379, 32419, 32458,
+ 32494, 32528, 32560, 32589, 32617, 32642, 32664, 32685,
+ 32703, 32719, 32733, 32744, 32753, 32760, 32764, 32767,
+ 32767, 32765, 32757, 32745, 32727, 32705, 32678, 32646,
+ 32609, 32567, 32520, 32468, 32411, 32349, 32283, 32211,
+ 32135, 32054, 31968, 31877, 31781, 31681, 31575, 31465,
+ 31351, 31231, 31107, 30978, 30844, 30706, 30563, 30415,
+ 30263, 30106, 29945, 29779, 29609, 29434, 29255, 29071,
+ 28883, 28691, 28494, 28293, 28087, 27878, 27664, 27446,
+ 27224, 26997, 26767, 26533, 26294, 26052, 25806, 25555,
+ 25301, 25043, 24782, 24516, 24247, 23974, 23698, 23418,
+ 23134, 22847, 22557, 22263, 21965, 21665, 21361, 21054,
+ 20743, 20430, 20113, 19794, 19471, 19146, 18817, 18486,
+ 18152, 17815, 17476, 17134, 16789, 16442, 16092, 15740,
+ 15385, 15028, 14669, 14308, 13944, 13579, 13211, 12841,
+ 12470, 12096, 11721, 11344, 10965, 10584, 10202, 9819,
+ 9433, 9047, 8659, 8270, 7879, 7488, 7095, 6701,
+ 6306, 5910, 5514, 5116, 4718, 4319, 3919, 3519,
+ 3118, 2716, 2315, 1913, 1510, 1108, 705, 302
+};
+
+
+const Word16 CNG_burst_att_fx[6][8] = { // Q15
+ { 30076, 27793, 25832, 24129, 22637, 21319, 20146, 19095 },
+ { 29714, 27181, 25046, 23222, 21646, 20270, 20205, 20205 },
+ { 29415, 26685, 24418, 22506, 22410, 22410, 22410, 22410 },
+ { 29310, 26512, 24201, 23198, 23198, 23198, 23198, 23198 },
+ { 29310, 26512, 24201, 23198, 23198, 23198, 23198, 23198 },
+ { 29789, 27307, 25206, 23406, 21845, 20480, 19661, 19661 }
+};
+
+const Word16 lpc_weights_fx[LPC_SHB_ORDER + 1] = { // Q15
+ 32767, 31948, 31150, 30371, 29612,
+ 28871, 28149, 27446, 26760, 26091, 25438
+};
+
+const Word16 SHBCB_SubGain5bit_12_fx[128] = {
+ /*Q12 */
+ -597,
+ -1952,
+ -1644,
+ -1506,
+ -1767,
+ -1357,
+ -1249,
+ -874,
+ -4181,
+ -3836,
+ -240,
+ -1985,
+ -6573,
+ -1480,
+ -1229,
+ -1094,
+ -381,
+ -1655,
+ -2119,
+ -2406,
+ -2012,
+ -1022,
+ -2235,
+ -761,
+ -908,
+ -1282,
+ -1241,
+ -1845,
+ -68,
+ -4666,
+ -6058,
+ -6355,
+ -2311,
+ -1888,
+ -1396,
+ -513,
+ -523,
+ -1155,
+ -2300,
+ -3657,
+ -1161,
+ -549,
+ -2564,
+ -2424,
+ -609,
+ -2346,
+ -2934,
+ -1142,
+ -3591,
+ -2859,
+ -2063,
+ -205,
+ -4048,
+ -4083,
+ -4261,
+ -56,
+ -1352,
+ -2147,
+ -1894,
+ -574,
+ -6577,
+ -5483,
+ -1881,
+ -628,
+ -815,
+ -1061,
+ -1987,
+ -1654,
+ -455,
+ -1380,
+ -3818,
+ -4941,
+ -926,
+ -934,
+ -1463,
+ -2630,
+ -2520,
+ -1013,
+ -1016,
+ -1250,
+ -977,
+ -2477,
+ -720,
+ -2401,
+ -130,
+ -2789,
+ -3155,
+ -3192,
+ -1135,
+ -1287,
+ -1552,
+ -1115,
+ -1217,
+ -1918,
+ -1059,
+ -1102,
+ -2291,
+ -3353,
+ -744,
+ -979,
+ -3067,
+ -1892,
+ -961,
+ -707,
+ -1795,
+ -1229,
+ -652,
+ -2348,
+ -1569,
+ -717,
+ -1490,
+ -1628,
+ -3240,
+ -258,
+ -2129,
+ -2748,
+ -2062,
+ -1902,
+ -625,
+ -1257,
+ -1453,
+ -1250,
+ -965,
+ -1445,
+ -4227,
+ -1494,
+ -1108,
+ -819,
+
+
+};
+
+
+const Word16 E_ROM_inter4_1_fx[UP_SAMP * L_INTERPOL1 + 1] = {
+ /* cut-off frequency at 0.9*fs/2 */
+ 14746 /*0.900000F Q14*/,
+ 13418 /*0.818959F Q14*/, 9910 /*0.604850F Q14*/, 5429 /*0.331379F Q14*/, 1376 /*0.083958F Q14*/,
+ -1242 /*-0.075795F Q14*/, -2142 /*-0.130717F Q14*/, -1732 /*-0.105685F Q14*/, -766 /*-0.046774F Q14*/,
+ 73 /*0.004467F Q14*/, 455 /*0.027789F Q14*/, 420 /*0.025642F Q14*/, 206 /*0.012571F Q14*/,
+ 32 /*0.001927F Q14*/, -26 /*-0.001571F Q14*/, -12 /*-0.000753F Q14*/, 0 /*0.000000f Q14*/
+};
+const Word16 E_ROM_inter6_1_fx[PIT_UP_SAMP6 * L_INTERPOL1 + 1] = {
+ 14759 /*0.900848F Q14*/,
+ 14158 /*0.864136F Q14*/,
+ 12453 /*0.760071F Q14*/,
+ 9919 /*0.605408F Q14*/,
+ 6948 /*0.424072F Q14*/,
+ 3972 /*0.242462F Q14*/,
+ 1377 /*0.0840759F Q14*/,
+ -563 /*-0.0343933F Q14*/,
+ -1729 /*-0.105560F Q14*/,
+ -2152 /*-0.131348F Q14*/,
+ -1984 /*-0.121124F Q14*/,
+ -1450 /*-0.0884705F Q14*/,
+ -780 /*-0.0476379F Q14*/,
+ -168 /*-0.0102539F Q14*/,
+ 267 /*0.0162964F Q14*/,
+ 485 /*0.0296021F Q14*/,
+ 512 /*0.0312195F Q14*/,
+ 412 /*0.0251160F Q14*/,
+ 258 /*0.0157471F Q14*/,
+ 110 /*0.00671387F Q14*/,
+ 0 /*0.000000F Q14*/,
+ -65 /*-0.00399780F Q14*/,
+ -97 /*-0.00592041F Q14*/,
+ -108 /*-0.00656128F Q14*/,
+ 0 /*0.000000F Q14*/
+};
+const Word16 kLog2TableFrac_x[256] = { // Q8
+ 0, 1, 3, 4, 6, 7, 9, 10,
+ 11, 13, 14, 16, 17, 18, 20, 21,
+ 22, 24, 25, 26, 28, 29, 30, 32,
+ 33, 34, 36, 37, 38, 40, 41, 42,
+ 44, 45, 46, 47, 49, 50, 51, 52,
+ 54, 55, 56, 57, 59, 60, 61, 62,
+ 63, 65, 66, 67, 68, 69, 71, 72,
+ 73, 74, 75, 77, 78, 79, 80, 81,
+ 82, 84, 85, 86, 87, 88, 89, 90,
+ 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 102, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 112, 113, 114, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 138, 139, 140, 141,
+ 142, 143, 144, 145, 146, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164,
+ 165, 166, 167, 168, 169, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 178, 178,
+ 179, 180, 181, 182, 183, 184, 185, 185,
+ 186, 187, 188, 189, 190, 191, 192, 192,
+ 193, 194, 195, 196, 197, 198, 198, 199,
+ 200, 201, 202, 203, 203, 204, 205, 206,
+ 207, 208, 208, 209, 210, 211, 212, 212,
+ 213, 214, 215, 216, 216, 217, 218, 219,
+ 220, 220, 221, 222, 223, 224, 224, 225,
+ 226, 227, 228, 228, 229, 230, 231, 231,
+ 232, 233, 234, 234, 235, 236, 237, 238,
+ 238, 239, 240, 241, 241, 242, 243, 244,
+ 244, 245, 246, 247, 247, 248, 249, 249,
+ 250, 251, 252, 252, 253, 254, 255, 255
+};
+
+const Word16 kExp2TableFrac_x[256] = /* Q15 */
+ {
+ 32767, 32678, 32590, 32502, 32414, 32326, 32239, 32152,
+ 32065, 31978, 31892, 31805, 31719, 31634, 31548, 31463,
+ 31378, 31293, 31208, 31124, 31040, 30956, 30872, 30789,
+ 30705, 30622, 30540, 30457, 30375, 30293, 30211, 30129,
+ 30047, 29966, 29885, 29804, 29724, 29643, 29563, 29483,
+ 29404, 29324, 29245, 29166, 29087, 29008, 28930, 28852,
+ 28774, 28696, 28618, 28541, 28464, 28387, 28310, 28233,
+ 28157, 28081, 28005, 27929, 27854, 27778, 27703, 27628,
+ 27554, 27479, 27405, 27331, 27257, 27183, 27110, 27036,
+ 26963, 26890, 26818, 26745, 26673, 26601, 26529, 26457,
+ 26385, 26314, 26243, 26172, 26101, 26031, 25960, 25890,
+ 25820, 25750, 25681, 25611, 25542, 25473, 25404, 25335,
+ 25267, 25198, 25130, 25062, 24995, 24927, 24860, 24792,
+ 24725, 24659, 24592, 24525, 24459, 24393, 24327, 24261,
+ 24196, 24130, 24065, 24000, 23935, 23870, 23806, 23741,
+ 23677, 23613, 23549, 23486, 23422, 23359, 23296, 23233,
+ 23170, 23107, 23045, 22982, 22920, 22858, 22796, 22735,
+ 22673, 22612, 22551, 22490, 22429, 22368, 22308, 22248,
+ 22187, 22127, 22068, 22008, 21948, 21889, 21830, 21771,
+ 21712, 21653, 21595, 21536, 21478, 21420, 21362, 21304,
+ 21247, 21189, 21132, 21075, 21018, 20961, 20904, 20848,
+ 20791, 20735, 20679, 20623, 20568, 20512, 20456, 20401,
+ 20346, 20291, 20236, 20181, 20127, 20072, 20018, 19964,
+ 19910, 19856, 19802, 19749, 19696, 19642, 19589, 19536,
+ 19483, 19431, 19378, 19326, 19274, 19221, 19169, 19118,
+ 19066, 19014, 18963, 18912, 18861, 18810, 18759, 18708,
+ 18657, 18607, 18557, 18506, 18456, 18406, 18357, 18307,
+ 18258, 18208, 18159, 18110, 18061, 18012, 17963, 17915,
+ 17866, 17818, 17770, 17722, 17674, 17626, 17578, 17531,
+ 17483, 17436, 17389, 17342, 17295, 17248, 17202, 17155,
+ 17109, 17063, 17016, 16970, 16925, 16879, 16833, 16788,
+ 16742, 16697, 16652, 16607, 16562, 16517, 16472, 16428
+ };
+
+/*-------------------------------------------------------------------*
+ * inverse (reciprocal) of integer, used in FEC_fx.c, pitch_extr and in pitchDoubling_det
+ * 1/n = One_div[n-1]
+ *-------------------------------------------------------------------*/
+const Word16 One_div_fx[] = /* in Q15 */
+ {
+ 32767, /* 1/1 */
+ 16384, /* 1/2 */
+ 10923, /* 1/3 */
+ 8192, /* 1/4 */
+ 6554, /* 1/5 */
+ 5461, /* 1/6 */
+ 4681, /* 1/7 */
+ 4096 /* 1/8 */
+ };
+
+const Word32 tbl_two_pow_shift_by_4[35] = { // Q30
+ 1073741824, 902905664, 759250112, 638450688, 536870912, 451452832, 379625056, 319225344,
+ 268435456, 225726416, 189812528, 159612672, 134217728, 112863208, 94906264, 79806336,
+ 67108864, 56431604, 47453132, 39903168, 33554432, 28215802, 23726566, 19951584,
+ 16777216, 14107901, 11863283, 9975792, 8388608, 7053950, 5931641, 4987896,
+ 4194304, 3526975, 2965820
+};
+
+
+const Word16 ivas_tan_panning_gain_tbl_fx[601] = { // Q15
+ SHC( 0x0000 ), SHC( 0x0042 ), SHC( 0x0084 ), SHC( 0x00c6 ), SHC( 0x0109 ), SHC( 0x014b ), SHC( 0x018e ), SHC( 0x01d1 ),
+ SHC( 0x0214 ), SHC( 0x0257 ), SHC( 0x029b ), SHC( 0x02de ), SHC( 0x0322 ), SHC( 0x0365 ), SHC( 0x03a9 ), SHC( 0x03ed ),
+ SHC( 0x0431 ), SHC( 0x0475 ), SHC( 0x04ba ), SHC( 0x04fe ), SHC( 0x0543 ), SHC( 0x0588 ), SHC( 0x05cd ), SHC( 0x0612 ),
+ SHC( 0x0657 ), SHC( 0x069c ), SHC( 0x06e1 ), SHC( 0x0727 ), SHC( 0x076d ), SHC( 0x07b2 ), SHC( 0x07f8 ), SHC( 0x083e ),
+ SHC( 0x0885 ), SHC( 0x08cb ), SHC( 0x0911 ), SHC( 0x0958 ), SHC( 0x099f ), SHC( 0x09e6 ), SHC( 0x0a2d ), SHC( 0x0a74 ),
+ SHC( 0x0abb ), SHC( 0x0b02 ), SHC( 0x0b4a ), SHC( 0x0b91 ), SHC( 0x0bd9 ), SHC( 0x0c21 ), SHC( 0x0c69 ), SHC( 0x0cb1 ),
+ SHC( 0x0cf9 ), SHC( 0x0d42 ), SHC( 0x0d8a ), SHC( 0x0dd3 ), SHC( 0x0e1c ), SHC( 0x0e65 ), SHC( 0x0eae ), SHC( 0x0ef7 ),
+ SHC( 0x0f40 ), SHC( 0x0f89 ), SHC( 0x0fd3 ), SHC( 0x101d ), SHC( 0x1066 ), SHC( 0x10b0 ), SHC( 0x10fa ), SHC( 0x1144 ),
+ SHC( 0x118f ), SHC( 0x11d9 ), SHC( 0x1223 ), SHC( 0x126e ), SHC( 0x12b9 ), SHC( 0x1304 ), SHC( 0x134f ), SHC( 0x139a ),
+ SHC( 0x13e5 ), SHC( 0x1430 ), SHC( 0x147c ), SHC( 0x14c7 ), SHC( 0x1513 ), SHC( 0x155f ), SHC( 0x15aa ), SHC( 0x15f6 ),
+ SHC( 0x1643 ), SHC( 0x168f ), SHC( 0x16db ), SHC( 0x1728 ), SHC( 0x1774 ), SHC( 0x17c1 ), SHC( 0x180e ), SHC( 0x185a ),
+ SHC( 0x18a7 ), SHC( 0x18f5 ), SHC( 0x1942 ), SHC( 0x198f ), SHC( 0x19dd ), SHC( 0x1a2a ), SHC( 0x1a78 ), SHC( 0x1ac5 ),
+ SHC( 0x1b13 ), SHC( 0x1b61 ), SHC( 0x1baf ), SHC( 0x1bfd ), SHC( 0x1c4c ), SHC( 0x1c9a ), SHC( 0x1ce8 ), SHC( 0x1d37 ),
+ SHC( 0x1d86 ), SHC( 0x1dd4 ), SHC( 0x1e23 ), SHC( 0x1e72 ), SHC( 0x1ec1 ), SHC( 0x1f10 ), SHC( 0x1f5f ), SHC( 0x1faf ),
+ SHC( 0x1ffe ), SHC( 0x204d ), SHC( 0x209d ), SHC( 0x20ed ), SHC( 0x213c ), SHC( 0x218c ), SHC( 0x21dc ), SHC( 0x222c ),
+ SHC( 0x227c ), SHC( 0x22cc ), SHC( 0x231c ), SHC( 0x236d ), SHC( 0x23bd ), SHC( 0x240e ), SHC( 0x245e ), SHC( 0x24af ),
+ SHC( 0x24ff ), SHC( 0x2550 ), SHC( 0x25a1 ), SHC( 0x25f2 ), SHC( 0x2643 ), SHC( 0x2694 ), SHC( 0x26e5 ), SHC( 0x2736 ),
+ SHC( 0x2787 ), SHC( 0x27d9 ), SHC( 0x282a ), SHC( 0x287b ), SHC( 0x28cd ), SHC( 0x291e ), SHC( 0x2970 ), SHC( 0x29c2 ),
+ SHC( 0x2a13 ), SHC( 0x2a65 ), SHC( 0x2ab7 ), SHC( 0x2b09 ), SHC( 0x2b5b ), SHC( 0x2bad ), SHC( 0x2bff ), SHC( 0x2c51 ),
+ SHC( 0x2ca3 ), SHC( 0x2cf5 ), SHC( 0x2d47 ), SHC( 0x2d99 ), SHC( 0x2dec ), SHC( 0x2e3e ), SHC( 0x2e90 ), SHC( 0x2ee3 ),
+ SHC( 0x2f35 ), SHC( 0x2f87 ), SHC( 0x2fda ), SHC( 0x302c ), SHC( 0x307f ), SHC( 0x30d2 ), SHC( 0x3124 ), SHC( 0x3177 ),
+ SHC( 0x31c9 ), SHC( 0x321c ), SHC( 0x326f ), SHC( 0x32c1 ), SHC( 0x3314 ), SHC( 0x3367 ), SHC( 0x33ba ), SHC( 0x340c ),
+ SHC( 0x345f ), SHC( 0x34b2 ), SHC( 0x3505 ), SHC( 0x3557 ), SHC( 0x35aa ), SHC( 0x35fd ), SHC( 0x3650 ), SHC( 0x36a2 ),
+ SHC( 0x36f5 ), SHC( 0x3748 ), SHC( 0x379b ), SHC( 0x37ed ), SHC( 0x3840 ), SHC( 0x3893 ), SHC( 0x38e6 ), SHC( 0x3938 ),
+ SHC( 0x398b ), SHC( 0x39de ), SHC( 0x3a30 ), SHC( 0x3a83 ), SHC( 0x3ad6 ), SHC( 0x3b28 ), SHC( 0x3b7b ), SHC( 0x3bcd ),
+ SHC( 0x3c20 ), SHC( 0x3c72 ), SHC( 0x3cc5 ), SHC( 0x3d17 ), SHC( 0x3d69 ), SHC( 0x3dbc ), SHC( 0x3e0e ), SHC( 0x3e60 ),
+ SHC( 0x3eb2 ), SHC( 0x3f04 ), SHC( 0x3f57 ), SHC( 0x3fa9 ), SHC( 0x3ffb ), SHC( 0x404c ), SHC( 0x409e ), SHC( 0x40f0 ),
+ SHC( 0x4142 ), SHC( 0x4194 ), SHC( 0x41e5 ), SHC( 0x4237 ), SHC( 0x4288 ), SHC( 0x42da ), SHC( 0x432b ), SHC( 0x437c ),
+ SHC( 0x43ce ), SHC( 0x441f ), SHC( 0x4470 ), SHC( 0x44c1 ), SHC( 0x4512 ), SHC( 0x4563 ), SHC( 0x45b3 ), SHC( 0x4604 ),
+ SHC( 0x4654 ), SHC( 0x46a5 ), SHC( 0x46f5 ), SHC( 0x4746 ), SHC( 0x4796 ), SHC( 0x47e6 ), SHC( 0x4836 ), SHC( 0x4886 ),
+ SHC( 0x48d5 ), SHC( 0x4925 ), SHC( 0x4975 ), SHC( 0x49c4 ), SHC( 0x4a13 ), SHC( 0x4a63 ), SHC( 0x4ab2 ), SHC( 0x4b01 ),
+ SHC( 0x4b50 ), SHC( 0x4b9e ), SHC( 0x4bed ), SHC( 0x4c3b ), SHC( 0x4c8a ), SHC( 0x4cd8 ), SHC( 0x4d26 ), SHC( 0x4d74 ),
+ SHC( 0x4dc2 ), SHC( 0x4e10 ), SHC( 0x4e5d ), SHC( 0x4eab ), SHC( 0x4ef8 ), SHC( 0x4f45 ), SHC( 0x4f92 ), SHC( 0x4fdf ),
+ SHC( 0x502c ), SHC( 0x5078 ), SHC( 0x50c4 ), SHC( 0x5111 ), SHC( 0x515d ), SHC( 0x51a9 ), SHC( 0x51f4 ), SHC( 0x5240 ),
+ SHC( 0x528b ), SHC( 0x52d7 ), SHC( 0x5322 ), SHC( 0x536d ), SHC( 0x53b8 ), SHC( 0x5402 ), SHC( 0x544d ), SHC( 0x5497 ),
+ SHC( 0x54e1 ), SHC( 0x552b ), SHC( 0x5574 ), SHC( 0x55be ), SHC( 0x5607 ), SHC( 0x5650 ), SHC( 0x5699 ), SHC( 0x56e2 ),
+ SHC( 0x572b ), SHC( 0x5773 ), SHC( 0x57bb ), SHC( 0x5803 ), SHC( 0x584b ), SHC( 0x5893 ), SHC( 0x58da ), SHC( 0x5921 ),
+ SHC( 0x5968 ), SHC( 0x59af ), SHC( 0x59f5 ), SHC( 0x5a3c ), SHC( 0x5a82 ), SHC( 0x5ac8 ), SHC( 0x5b0e ), SHC( 0x5b53 ),
+ SHC( 0x5b98 ), SHC( 0x5bde ), SHC( 0x5c22 ), SHC( 0x5c67 ), SHC( 0x5cab ), SHC( 0x5cf0 ), SHC( 0x5d34 ), SHC( 0x5d77 ),
+ SHC( 0x5dbb ), SHC( 0x5dfe ), SHC( 0x5e41 ), SHC( 0x5e84 ), SHC( 0x5ec7 ), SHC( 0x5f09 ), SHC( 0x5f4b ), SHC( 0x5f8d ),
+ SHC( 0x5fcf ), SHC( 0x6010 ), SHC( 0x6051 ), SHC( 0x6092 ), SHC( 0x60d3 ), SHC( 0x6113 ), SHC( 0x6153 ), SHC( 0x6193 ),
+ SHC( 0x61d3 ), SHC( 0x6213 ), SHC( 0x6252 ), SHC( 0x6291 ), SHC( 0x62cf ), SHC( 0x630e ), SHC( 0x634c ), SHC( 0x638a ),
+ SHC( 0x63c8 ), SHC( 0x6405 ), SHC( 0x6442 ), SHC( 0x647f ), SHC( 0x64bc ), SHC( 0x64f8 ), SHC( 0x6534 ), SHC( 0x6570 ),
+ SHC( 0x65ac ), SHC( 0x65e7 ), SHC( 0x6622 ), SHC( 0x665d ), SHC( 0x6698 ), SHC( 0x66d2 ), SHC( 0x670c ), SHC( 0x6746 ),
+ SHC( 0x677f ), SHC( 0x67b8 ), SHC( 0x67f1 ), SHC( 0x682a ), SHC( 0x6862 ), SHC( 0x689a ), SHC( 0x68d2 ), SHC( 0x690a ),
+ SHC( 0x6941 ), SHC( 0x6978 ), SHC( 0x69af ), SHC( 0x69e5 ), SHC( 0x6a1c ), SHC( 0x6a52 ), SHC( 0x6a87 ), SHC( 0x6abd ),
+ SHC( 0x6af2 ), SHC( 0x6b26 ), SHC( 0x6b5b ), SHC( 0x6b8f ), SHC( 0x6bc3 ), SHC( 0x6bf7 ), SHC( 0x6c2a ), SHC( 0x6c5d ),
+ SHC( 0x6c90 ), SHC( 0x6cc3 ), SHC( 0x6cf5 ), SHC( 0x6d27 ), SHC( 0x6d59 ), SHC( 0x6d8a ), SHC( 0x6dbb ), SHC( 0x6dec ),
+ SHC( 0x6e1d ), SHC( 0x6e4d ), SHC( 0x6e7d ), SHC( 0x6ead ), SHC( 0x6edc ), SHC( 0x6f0b ), SHC( 0x6f3a ), SHC( 0x6f69 ),
+ SHC( 0x6f97 ), SHC( 0x6fc5 ), SHC( 0x6ff3 ), SHC( 0x7020 ), SHC( 0x704e ), SHC( 0x707a ), SHC( 0x70a7 ), SHC( 0x70d3 ),
+ SHC( 0x70ff ), SHC( 0x712b ), SHC( 0x7157 ), SHC( 0x7182 ), SHC( 0x71ad ), SHC( 0x71d7 ), SHC( 0x7202 ), SHC( 0x722c ),
+ SHC( 0x7255 ), SHC( 0x727f ), SHC( 0x72a8 ), SHC( 0x72d1 ), SHC( 0x72fa ), SHC( 0x7322 ), SHC( 0x734a ), SHC( 0x7372 ),
+ SHC( 0x7399 ), SHC( 0x73c0 ), SHC( 0x73e7 ), SHC( 0x740e ), SHC( 0x7434 ), SHC( 0x745a ), SHC( 0x7480 ), SHC( 0x74a6 ),
+ SHC( 0x74cb ), SHC( 0x74f0 ), SHC( 0x7515 ), SHC( 0x7539 ), SHC( 0x755d ), SHC( 0x7581 ), SHC( 0x75a5 ), SHC( 0x75c8 ),
+ SHC( 0x75eb ), SHC( 0x760e ), SHC( 0x7630 ), SHC( 0x7652 ), SHC( 0x7674 ), SHC( 0x7696 ), SHC( 0x76b7 ), SHC( 0x76d9 ),
+ SHC( 0x76f9 ), SHC( 0x771a ), SHC( 0x773a ), SHC( 0x775a ), SHC( 0x777a ), SHC( 0x779a ), SHC( 0x77b9 ), SHC( 0x77d8 ),
+ SHC( 0x77f6 ), SHC( 0x7815 ), SHC( 0x7833 ), SHC( 0x7851 ), SHC( 0x786e ), SHC( 0x788c ), SHC( 0x78a9 ), SHC( 0x78c6 ),
+ SHC( 0x78e2 ), SHC( 0x78ff ), SHC( 0x791b ), SHC( 0x7937 ), SHC( 0x7952 ), SHC( 0x796d ), SHC( 0x7988 ), SHC( 0x79a3 ),
+ SHC( 0x79be ), SHC( 0x79d8 ), SHC( 0x79f2 ), SHC( 0x7a0c ), SHC( 0x7a25 ), SHC( 0x7a3e ), SHC( 0x7a57 ), SHC( 0x7a70 ),
+ SHC( 0x7a89 ), SHC( 0x7aa1 ), SHC( 0x7ab9 ), SHC( 0x7ad1 ), SHC( 0x7ae8 ), SHC( 0x7aff ), SHC( 0x7b16 ), SHC( 0x7b2d ),
+ SHC( 0x7b44 ), SHC( 0x7b5a ), SHC( 0x7b70 ), SHC( 0x7b86 ), SHC( 0x7b9b ), SHC( 0x7bb1 ), SHC( 0x7bc6 ), SHC( 0x7bdb ),
+ SHC( 0x7bef ), SHC( 0x7c04 ), SHC( 0x7c18 ), SHC( 0x7c2c ), SHC( 0x7c40 ), SHC( 0x7c53 ), SHC( 0x7c66 ), SHC( 0x7c79 ),
+ SHC( 0x7c8c ), SHC( 0x7c9e ), SHC( 0x7cb1 ), SHC( 0x7cc3 ), SHC( 0x7cd5 ), SHC( 0x7ce6 ), SHC( 0x7cf8 ), SHC( 0x7d09 ),
+ SHC( 0x7d1a ), SHC( 0x7d2b ), SHC( 0x7d3b ), SHC( 0x7d4c ), SHC( 0x7d5c ), SHC( 0x7d6b ), SHC( 0x7d7b ), SHC( 0x7d8b ),
+ SHC( 0x7d9a ), SHC( 0x7da9 ), SHC( 0x7db8 ), SHC( 0x7dc6 ), SHC( 0x7dd5 ), SHC( 0x7de3 ), SHC( 0x7df1 ), SHC( 0x7dff ),
+ SHC( 0x7e0c ), SHC( 0x7e19 ), SHC( 0x7e27 ), SHC( 0x7e34 ), SHC( 0x7e40 ), SHC( 0x7e4d ), SHC( 0x7e59 ), SHC( 0x7e65 ),
+ SHC( 0x7e71 ), SHC( 0x7e7d ), SHC( 0x7e89 ), SHC( 0x7e94 ), SHC( 0x7e9f ), SHC( 0x7eaa ), SHC( 0x7eb5 ), SHC( 0x7ebf ),
+ SHC( 0x7eca ), SHC( 0x7ed4 ), SHC( 0x7ede ), SHC( 0x7ee8 ), SHC( 0x7ef1 ), SHC( 0x7efb ), SHC( 0x7f04 ), SHC( 0x7f0d ),
+ SHC( 0x7f16 ), SHC( 0x7f1f ), SHC( 0x7f27 ), SHC( 0x7f30 ), SHC( 0x7f38 ), SHC( 0x7f40 ), SHC( 0x7f48 ), SHC( 0x7f4f ),
+ SHC( 0x7f57 ), SHC( 0x7f5e ), SHC( 0x7f65 ), SHC( 0x7f6c ), SHC( 0x7f73 ), SHC( 0x7f79 ), SHC( 0x7f80 ), SHC( 0x7f86 ),
+ SHC( 0x7f8c ), SHC( 0x7f92 ), SHC( 0x7f98 ), SHC( 0x7f9d ), SHC( 0x7fa3 ), SHC( 0x7fa8 ), SHC( 0x7fad ), SHC( 0x7fb2 ),
+ SHC( 0x7fb7 ), SHC( 0x7fbb ), SHC( 0x7fc0 ), SHC( 0x7fc4 ), SHC( 0x7fc8 ), SHC( 0x7fcc ), SHC( 0x7fd0 ), SHC( 0x7fd4 ),
+ SHC( 0x7fd7 ), SHC( 0x7fdb ), SHC( 0x7fde ), SHC( 0x7fe1 ), SHC( 0x7fe4 ), SHC( 0x7fe7 ), SHC( 0x7fe9 ), SHC( 0x7fec ),
+ SHC( 0x7fee ), SHC( 0x7ff0 ), SHC( 0x7ff2 ), SHC( 0x7ff4 ), SHC( 0x7ff6 ), SHC( 0x7ff7 ), SHC( 0x7ff9 ), SHC( 0x7ffa ),
+ SHC( 0x7ffb ), SHC( 0x7ffc ), SHC( 0x7ffd ), SHC( 0x7ffe ), SHC( 0x7ffe ), SHC( 0x7fff ), SHC( 0x7fff ), SHC( 0x7fff ),
+ SHC( 0x7fff )
+};
+
+const Word16 ivas_sine_panning_tbl_fx[601] = { // Q15
+ SHC( 0xc001 ), SHC( 0xc032 ), SHC( 0xc064 ), SHC( 0xc095 ), SHC( 0xc0c7 ), SHC( 0xc0f9 ), SHC( 0xc12b ), SHC( 0xc15c ),
+ SHC( 0xc18e ), SHC( 0xc1c0 ), SHC( 0xc1f2 ), SHC( 0xc224 ), SHC( 0xc256 ), SHC( 0xc289 ), SHC( 0xc2bb ), SHC( 0xc2ed ),
+ SHC( 0xc31f ), SHC( 0xc352 ), SHC( 0xc384 ), SHC( 0xc3b6 ), SHC( 0xc3e9 ), SHC( 0xc41b ), SHC( 0xc44e ), SHC( 0xc481 ),
+ SHC( 0xc4b3 ), SHC( 0xc4e6 ), SHC( 0xc519 ), SHC( 0xc54b ), SHC( 0xc57e ), SHC( 0xc5b1 ), SHC( 0xc5e4 ), SHC( 0xc617 ),
+ SHC( 0xc64a ), SHC( 0xc67d ), SHC( 0xc6b0 ), SHC( 0xc6e3 ), SHC( 0xc717 ), SHC( 0xc74a ), SHC( 0xc77d ), SHC( 0xc7b1 ),
+ SHC( 0xc7e4 ), SHC( 0xc817 ), SHC( 0xc84b ), SHC( 0xc87e ), SHC( 0xc8b2 ), SHC( 0xc8e6 ), SHC( 0xc919 ), SHC( 0xc94d ),
+ SHC( 0xc981 ), SHC( 0xc9b4 ), SHC( 0xc9e8 ), SHC( 0xca1c ), SHC( 0xca50 ), SHC( 0xca84 ), SHC( 0xcab8 ), SHC( 0xcaec ),
+ SHC( 0xcb20 ), SHC( 0xcb54 ), SHC( 0xcb88 ), SHC( 0xcbbc ), SHC( 0xcbf1 ), SHC( 0xcc25 ), SHC( 0xcc59 ), SHC( 0xcc8d ),
+ SHC( 0xccc2 ), SHC( 0xccf6 ), SHC( 0xcd2b ), SHC( 0xcd5f ), SHC( 0xcd94 ), SHC( 0xcdc8 ), SHC( 0xcdfd ), SHC( 0xce32 ),
+ SHC( 0xce66 ), SHC( 0xce9b ), SHC( 0xced0 ), SHC( 0xcf05 ), SHC( 0xcf3a ), SHC( 0xcf6e ), SHC( 0xcfa3 ), SHC( 0xcfd8 ),
+ SHC( 0xd00d ), SHC( 0xd042 ), SHC( 0xd078 ), SHC( 0xd0ad ), SHC( 0xd0e2 ), SHC( 0xd117 ), SHC( 0xd14c ), SHC( 0xd181 ),
+ SHC( 0xd1b7 ), SHC( 0xd1ec ), SHC( 0xd221 ), SHC( 0xd257 ), SHC( 0xd28c ), SHC( 0xd2c2 ), SHC( 0xd2f7 ), SHC( 0xd32d ),
+ SHC( 0xd362 ), SHC( 0xd398 ), SHC( 0xd3ce ), SHC( 0xd403 ), SHC( 0xd439 ), SHC( 0xd46f ), SHC( 0xd4a5 ), SHC( 0xd4db ),
+ SHC( 0xd510 ), SHC( 0xd546 ), SHC( 0xd57c ), SHC( 0xd5b2 ), SHC( 0xd5e8 ), SHC( 0xd61e ), SHC( 0xd654 ), SHC( 0xd68a ),
+ SHC( 0xd6c0 ), SHC( 0xd6f7 ), SHC( 0xd72d ), SHC( 0xd763 ), SHC( 0xd799 ), SHC( 0xd7d0 ), SHC( 0xd806 ), SHC( 0xd83c ),
+ SHC( 0xd873 ), SHC( 0xd8a9 ), SHC( 0xd8df ), SHC( 0xd916 ), SHC( 0xd94c ), SHC( 0xd983 ), SHC( 0xd9ba ), SHC( 0xd9f0 ),
+ SHC( 0xda27 ), SHC( 0xda5d ), SHC( 0xda94 ), SHC( 0xdacb ), SHC( 0xdb02 ), SHC( 0xdb38 ), SHC( 0xdb6f ), SHC( 0xdba6 ),
+ SHC( 0xdbdd ), SHC( 0xdc14 ), SHC( 0xdc4b ), SHC( 0xdc81 ), SHC( 0xdcb8 ), SHC( 0xdcef ), SHC( 0xdd26 ), SHC( 0xdd5d ),
+ SHC( 0xdd95 ), SHC( 0xddcc ), SHC( 0xde03 ), SHC( 0xde3a ), SHC( 0xde71 ), SHC( 0xdea8 ), SHC( 0xdee0 ), SHC( 0xdf17 ),
+ SHC( 0xdf4e ), SHC( 0xdf85 ), SHC( 0xdfbd ), SHC( 0xdff4 ), SHC( 0xe02b ), SHC( 0xe063 ), SHC( 0xe09a ), SHC( 0xe0d2 ),
+ SHC( 0xe109 ), SHC( 0xe141 ), SHC( 0xe178 ), SHC( 0xe1b0 ), SHC( 0xe1e7 ), SHC( 0xe21f ), SHC( 0xe257 ), SHC( 0xe28e ),
+ SHC( 0xe2c6 ), SHC( 0xe2fe ), SHC( 0xe335 ), SHC( 0xe36d ), SHC( 0xe3a5 ), SHC( 0xe3dd ), SHC( 0xe414 ), SHC( 0xe44c ),
+ SHC( 0xe484 ), SHC( 0xe4bc ), SHC( 0xe4f4 ), SHC( 0xe52c ), SHC( 0xe564 ), SHC( 0xe59c ), SHC( 0xe5d4 ), SHC( 0xe60c ),
+ SHC( 0xe644 ), SHC( 0xe67c ), SHC( 0xe6b4 ), SHC( 0xe6ec ), SHC( 0xe724 ), SHC( 0xe75c ), SHC( 0xe794 ), SHC( 0xe7cc ),
+ SHC( 0xe804 ), SHC( 0xe83d ), SHC( 0xe875 ), SHC( 0xe8ad ), SHC( 0xe8e5 ), SHC( 0xe91e ), SHC( 0xe956 ), SHC( 0xe98e ),
+ SHC( 0xe9c6 ), SHC( 0xe9ff ), SHC( 0xea37 ), SHC( 0xea6f ), SHC( 0xeaa8 ), SHC( 0xeae0 ), SHC( 0xeb19 ), SHC( 0xeb51 ),
+ SHC( 0xeb8a ), SHC( 0xebc2 ), SHC( 0xebfa ), SHC( 0xec33 ), SHC( 0xec6b ), SHC( 0xeca4 ), SHC( 0xecdd ), SHC( 0xed15 ),
+ SHC( 0xed4e ), SHC( 0xed86 ), SHC( 0xedbf ), SHC( 0xedf7 ), SHC( 0xee30 ), SHC( 0xee69 ), SHC( 0xeea1 ), SHC( 0xeeda ),
+ SHC( 0xef13 ), SHC( 0xef4b ), SHC( 0xef84 ), SHC( 0xefbd ), SHC( 0xeff6 ), SHC( 0xf02e ), SHC( 0xf067 ), SHC( 0xf0a0 ),
+ SHC( 0xf0d9 ), SHC( 0xf111 ), SHC( 0xf14a ), SHC( 0xf183 ), SHC( 0xf1bc ), SHC( 0xf1f5 ), SHC( 0xf22e ), SHC( 0xf266 ),
+ SHC( 0xf29f ), SHC( 0xf2d8 ), SHC( 0xf311 ), SHC( 0xf34a ), SHC( 0xf383 ), SHC( 0xf3bc ), SHC( 0xf3f5 ), SHC( 0xf42e ),
+ SHC( 0xf467 ), SHC( 0xf4a0 ), SHC( 0xf4d9 ), SHC( 0xf512 ), SHC( 0xf54b ), SHC( 0xf584 ), SHC( 0xf5bd ), SHC( 0xf5f6 ),
+ SHC( 0xf62f ), SHC( 0xf668 ), SHC( 0xf6a1 ), SHC( 0xf6da ), SHC( 0xf713 ), SHC( 0xf74c ), SHC( 0xf785 ), SHC( 0xf7be ),
+ SHC( 0xf7f7 ), SHC( 0xf830 ), SHC( 0xf869 ), SHC( 0xf8a2 ), SHC( 0xf8db ), SHC( 0xf914 ), SHC( 0xf94e ), SHC( 0xf987 ),
+ SHC( 0xf9c0 ), SHC( 0xf9f9 ), SHC( 0xfa32 ), SHC( 0xfa6b ), SHC( 0xfaa4 ), SHC( 0xfadd ), SHC( 0xfb17 ), SHC( 0xfb50 ),
+ SHC( 0xfb89 ), SHC( 0xfbc2 ), SHC( 0xfbfb ), SHC( 0xfc34 ), SHC( 0xfc6e ), SHC( 0xfca7 ), SHC( 0xfce0 ), SHC( 0xfd19 ),
+ SHC( 0xfd52 ), SHC( 0xfd8b ), SHC( 0xfdc5 ), SHC( 0xfdfe ), SHC( 0xfe37 ), SHC( 0xfe70 ), SHC( 0xfea9 ), SHC( 0xfee3 ),
+ SHC( 0xff1c ), SHC( 0xff55 ), SHC( 0xff8e ), SHC( 0xffc7 ), SHC( 0x0000 ), SHC( 0x0039 ), SHC( 0x0072 ), SHC( 0x00ab ),
+ SHC( 0x00e4 ), SHC( 0x011d ), SHC( 0x0157 ), SHC( 0x0190 ), SHC( 0x01c9 ), SHC( 0x0202 ), SHC( 0x023b ), SHC( 0x0275 ),
+ SHC( 0x02ae ), SHC( 0x02e7 ), SHC( 0x0320 ), SHC( 0x0359 ), SHC( 0x0392 ), SHC( 0x03cc ), SHC( 0x0405 ), SHC( 0x043e ),
+ SHC( 0x0477 ), SHC( 0x04b0 ), SHC( 0x04e9 ), SHC( 0x0523 ), SHC( 0x055c ), SHC( 0x0595 ), SHC( 0x05ce ), SHC( 0x0607 ),
+ SHC( 0x0640 ), SHC( 0x0679 ), SHC( 0x06b2 ), SHC( 0x06ec ), SHC( 0x0725 ), SHC( 0x075e ), SHC( 0x0797 ), SHC( 0x07d0 ),
+ SHC( 0x0809 ), SHC( 0x0842 ), SHC( 0x087b ), SHC( 0x08b4 ), SHC( 0x08ed ), SHC( 0x0926 ), SHC( 0x095f ), SHC( 0x0998 ),
+ SHC( 0x09d1 ), SHC( 0x0a0a ), SHC( 0x0a43 ), SHC( 0x0a7c ), SHC( 0x0ab5 ), SHC( 0x0aee ), SHC( 0x0b27 ), SHC( 0x0b60 ),
+ SHC( 0x0b99 ), SHC( 0x0bd2 ), SHC( 0x0c0b ), SHC( 0x0c44 ), SHC( 0x0c7d ), SHC( 0x0cb6 ), SHC( 0x0cef ), SHC( 0x0d28 ),
+ SHC( 0x0d61 ), SHC( 0x0d9a ), SHC( 0x0dd2 ), SHC( 0x0e0b ), SHC( 0x0e44 ), SHC( 0x0e7d ), SHC( 0x0eb6 ), SHC( 0x0eef ),
+ SHC( 0x0f27 ), SHC( 0x0f60 ), SHC( 0x0f99 ), SHC( 0x0fd2 ), SHC( 0x100a ), SHC( 0x1043 ), SHC( 0x107c ), SHC( 0x10b5 ),
+ SHC( 0x10ed ), SHC( 0x1126 ), SHC( 0x115f ), SHC( 0x1197 ), SHC( 0x11d0 ), SHC( 0x1209 ), SHC( 0x1241 ), SHC( 0x127a ),
+ SHC( 0x12b2 ), SHC( 0x12eb ), SHC( 0x1323 ), SHC( 0x135c ), SHC( 0x1395 ), SHC( 0x13cd ), SHC( 0x1406 ), SHC( 0x143e ),
+ SHC( 0x1476 ), SHC( 0x14af ), SHC( 0x14e7 ), SHC( 0x1520 ), SHC( 0x1558 ), SHC( 0x1591 ), SHC( 0x15c9 ), SHC( 0x1601 ),
+ SHC( 0x163a ), SHC( 0x1672 ), SHC( 0x16aa ), SHC( 0x16e2 ), SHC( 0x171b ), SHC( 0x1753 ), SHC( 0x178b ), SHC( 0x17c3 ),
+ SHC( 0x17fc ), SHC( 0x1834 ), SHC( 0x186c ), SHC( 0x18a4 ), SHC( 0x18dc ), SHC( 0x1914 ), SHC( 0x194c ), SHC( 0x1984 ),
+ SHC( 0x19bc ), SHC( 0x19f4 ), SHC( 0x1a2c ), SHC( 0x1a64 ), SHC( 0x1a9c ), SHC( 0x1ad4 ), SHC( 0x1b0c ), SHC( 0x1b44 ),
+ SHC( 0x1b7c ), SHC( 0x1bb4 ), SHC( 0x1bec ), SHC( 0x1c23 ), SHC( 0x1c5b ), SHC( 0x1c93 ), SHC( 0x1ccb ), SHC( 0x1d02 ),
+ SHC( 0x1d3a ), SHC( 0x1d72 ), SHC( 0x1da9 ), SHC( 0x1de1 ), SHC( 0x1e19 ), SHC( 0x1e50 ), SHC( 0x1e88 ), SHC( 0x1ebf ),
+ SHC( 0x1ef7 ), SHC( 0x1f2e ), SHC( 0x1f66 ), SHC( 0x1f9d ), SHC( 0x1fd5 ), SHC( 0x200c ), SHC( 0x2043 ), SHC( 0x207b ),
+ SHC( 0x20b2 ), SHC( 0x20e9 ), SHC( 0x2120 ), SHC( 0x2158 ), SHC( 0x218f ), SHC( 0x21c6 ), SHC( 0x21fd ), SHC( 0x2234 ),
+ SHC( 0x226b ), SHC( 0x22a3 ), SHC( 0x22da ), SHC( 0x2311 ), SHC( 0x2348 ), SHC( 0x237f ), SHC( 0x23b5 ), SHC( 0x23ec ),
+ SHC( 0x2423 ), SHC( 0x245a ), SHC( 0x2491 ), SHC( 0x24c8 ), SHC( 0x24fe ), SHC( 0x2535 ), SHC( 0x256c ), SHC( 0x25a3 ),
+ SHC( 0x25d9 ), SHC( 0x2610 ), SHC( 0x2646 ), SHC( 0x267d ), SHC( 0x26b4 ), SHC( 0x26ea ), SHC( 0x2721 ), SHC( 0x2757 ),
+ SHC( 0x278d ), SHC( 0x27c4 ), SHC( 0x27fa ), SHC( 0x2830 ), SHC( 0x2867 ), SHC( 0x289d ), SHC( 0x28d3 ), SHC( 0x2909 ),
+ SHC( 0x2940 ), SHC( 0x2976 ), SHC( 0x29ac ), SHC( 0x29e2 ), SHC( 0x2a18 ), SHC( 0x2a4e ), SHC( 0x2a84 ), SHC( 0x2aba ),
+ SHC( 0x2af0 ), SHC( 0x2b25 ), SHC( 0x2b5b ), SHC( 0x2b91 ), SHC( 0x2bc7 ), SHC( 0x2bfd ), SHC( 0x2c32 ), SHC( 0x2c68 ),
+ SHC( 0x2c9e ), SHC( 0x2cd3 ), SHC( 0x2d09 ), SHC( 0x2d3e ), SHC( 0x2d74 ), SHC( 0x2da9 ), SHC( 0x2ddf ), SHC( 0x2e14 ),
+ SHC( 0x2e49 ), SHC( 0x2e7f ), SHC( 0x2eb4 ), SHC( 0x2ee9 ), SHC( 0x2f1e ), SHC( 0x2f53 ), SHC( 0x2f88 ), SHC( 0x2fbe ),
+ SHC( 0x2ff3 ), SHC( 0x3028 ), SHC( 0x305d ), SHC( 0x3092 ), SHC( 0x30c6 ), SHC( 0x30fb ), SHC( 0x3130 ), SHC( 0x3165 ),
+ SHC( 0x319a ), SHC( 0x31ce ), SHC( 0x3203 ), SHC( 0x3238 ), SHC( 0x326c ), SHC( 0x32a1 ), SHC( 0x32d5 ), SHC( 0x330a ),
+ SHC( 0x333e ), SHC( 0x3373 ), SHC( 0x33a7 ), SHC( 0x33db ), SHC( 0x340f ), SHC( 0x3444 ), SHC( 0x3478 ), SHC( 0x34ac ),
+ SHC( 0x34e0 ), SHC( 0x3514 ), SHC( 0x3548 ), SHC( 0x357c ), SHC( 0x35b0 ), SHC( 0x35e4 ), SHC( 0x3618 ), SHC( 0x364c ),
+ SHC( 0x367f ), SHC( 0x36b3 ), SHC( 0x36e7 ), SHC( 0x371a ), SHC( 0x374e ), SHC( 0x3782 ), SHC( 0x37b5 ), SHC( 0x37e9 ),
+ SHC( 0x381c ), SHC( 0x384f ), SHC( 0x3883 ), SHC( 0x38b6 ), SHC( 0x38e9 ), SHC( 0x391d ), SHC( 0x3950 ), SHC( 0x3983 ),
+ SHC( 0x39b6 ), SHC( 0x39e9 ), SHC( 0x3a1c ), SHC( 0x3a4f ), SHC( 0x3a82 ), SHC( 0x3ab5 ), SHC( 0x3ae7 ), SHC( 0x3b1a ),
+ SHC( 0x3b4d ), SHC( 0x3b7f ), SHC( 0x3bb2 ), SHC( 0x3be5 ), SHC( 0x3c17 ), SHC( 0x3c4a ), SHC( 0x3c7c ), SHC( 0x3cae ),
+ SHC( 0x3ce1 ), SHC( 0x3d13 ), SHC( 0x3d45 ), SHC( 0x3d77 ), SHC( 0x3daa ), SHC( 0x3ddc ), SHC( 0x3e0e ), SHC( 0x3e40 ),
+ SHC( 0x3e72 ), SHC( 0x3ea4 ), SHC( 0x3ed5 ), SHC( 0x3f07 ), SHC( 0x3f39 ), SHC( 0x3f6b ), SHC( 0x3f9c ), SHC( 0x3fce ),
+ SHC( 0x3fff )
+};
+
+const Word16 ivas_sin_az_fx[361] = { // Q15
+ SHC( 0x0000 ), SHC( 0xfdc5 ), SHC( 0xfb89 ), SHC( 0xf94e ), SHC( 0xf713 ), SHC( 0xf4d9 ), SHC( 0xf29f ), SHC( 0xf067 ),
+ SHC( 0xee30 ), SHC( 0xebfa ), SHC( 0xe9c6 ), SHC( 0xe794 ), SHC( 0xe564 ), SHC( 0xe335 ), SHC( 0xe109 ), SHC( 0xdee0 ),
+ SHC( 0xdcb8 ), SHC( 0xda94 ), SHC( 0xd873 ), SHC( 0xd654 ), SHC( 0xd439 ), SHC( 0xd221 ), SHC( 0xd00d ), SHC( 0xcdfd ),
+ SHC( 0xcbf1 ), SHC( 0xc9e8 ), SHC( 0xc7e4 ), SHC( 0xc5e4 ), SHC( 0xc3e9 ), SHC( 0xc1f2 ), SHC( 0xc001 ), SHC( 0xbe14 ),
+ SHC( 0xbc2c ), SHC( 0xba4a ), SHC( 0xb86d ), SHC( 0xb696 ), SHC( 0xb4c4 ), SHC( 0xb2f8 ), SHC( 0xb133 ), SHC( 0xaf73 ),
+ SHC( 0xadba ), SHC( 0xac07 ), SHC( 0xaa5a ), SHC( 0xa8b5 ), SHC( 0xa716 ), SHC( 0xa57e ), SHC( 0xa3ed ), SHC( 0xa264 ),
+ SHC( 0xa0e1 ), SHC( 0x9f66 ), SHC( 0x9df3 ), SHC( 0x9c87 ), SHC( 0x9b23 ), SHC( 0x99c7 ), SHC( 0x9873 ), SHC( 0x9727 ),
+ SHC( 0x95e3 ), SHC( 0x94a7 ), SHC( 0x9374 ), SHC( 0x9249 ), SHC( 0x9127 ), SHC( 0x900d ), SHC( 0x8efc ), SHC( 0x8df4 ),
+ SHC( 0x8cf5 ), SHC( 0x8bff ), SHC( 0x8b11 ), SHC( 0x8a2d ), SHC( 0x8953 ), SHC( 0x8881 ), SHC( 0x87b9 ), SHC( 0x86fa ),
+ SHC( 0x8644 ), SHC( 0x8598 ), SHC( 0x84f6 ), SHC( 0x845d ), SHC( 0x83ce ), SHC( 0x8348 ), SHC( 0x82cd ), SHC( 0x825b ),
+ SHC( 0x81f2 ), SHC( 0x8194 ), SHC( 0x813f ), SHC( 0x80f5 ), SHC( 0x80b4 ), SHC( 0x807d ), SHC( 0x8050 ), SHC( 0x802d ),
+ SHC( 0x8014 ), SHC( 0x8005 ), SHC( 0x8000 ), SHC( 0x8005 ), SHC( 0x8014 ), SHC( 0x802d ), SHC( 0x8050 ), SHC( 0x807d ),
+ SHC( 0x80b4 ), SHC( 0x80f5 ), SHC( 0x813f ), SHC( 0x8194 ), SHC( 0x81f2 ), SHC( 0x825b ), SHC( 0x82cd ), SHC( 0x8348 ),
+ SHC( 0x83ce ), SHC( 0x845d ), SHC( 0x84f6 ), SHC( 0x8598 ), SHC( 0x8644 ), SHC( 0x86fa ), SHC( 0x87b9 ), SHC( 0x8881 ),
+ SHC( 0x8953 ), SHC( 0x8a2d ), SHC( 0x8b11 ), SHC( 0x8bff ), SHC( 0x8cf5 ), SHC( 0x8df4 ), SHC( 0x8efc ), SHC( 0x900d ),
+ SHC( 0x9127 ), SHC( 0x9249 ), SHC( 0x9374 ), SHC( 0x94a7 ), SHC( 0x95e3 ), SHC( 0x9727 ), SHC( 0x9873 ), SHC( 0x99c7 ),
+ SHC( 0x9b23 ), SHC( 0x9c87 ), SHC( 0x9df3 ), SHC( 0x9f66 ), SHC( 0xa0e1 ), SHC( 0xa264 ), SHC( 0xa3ed ), SHC( 0xa57e ),
+ SHC( 0xa716 ), SHC( 0xa8b5 ), SHC( 0xaa5a ), SHC( 0xac07 ), SHC( 0xadba ), SHC( 0xaf73 ), SHC( 0xb133 ), SHC( 0xb2f8 ),
+ SHC( 0xb4c4 ), SHC( 0xb696 ), SHC( 0xb86d ), SHC( 0xba4a ), SHC( 0xbc2c ), SHC( 0xbe14 ), SHC( 0xc001 ), SHC( 0xc1f2 ),
+ SHC( 0xc3e9 ), SHC( 0xc5e4 ), SHC( 0xc7e4 ), SHC( 0xc9e8 ), SHC( 0xcbf1 ), SHC( 0xcdfd ), SHC( 0xd00d ), SHC( 0xd221 ),
+ SHC( 0xd439 ), SHC( 0xd654 ), SHC( 0xd873 ), SHC( 0xda94 ), SHC( 0xdcb8 ), SHC( 0xdee0 ), SHC( 0xe109 ), SHC( 0xe335 ),
+ SHC( 0xe564 ), SHC( 0xe794 ), SHC( 0xe9c6 ), SHC( 0xebfa ), SHC( 0xee30 ), SHC( 0xf067 ), SHC( 0xf29f ), SHC( 0xf4d9 ),
+ SHC( 0xf713 ), SHC( 0xf94e ), SHC( 0xfb89 ), SHC( 0xfdc5 ), SHC( 0x0000 ), SHC( 0x023b ), SHC( 0x0477 ), SHC( 0x06b2 ),
+ SHC( 0x08ed ), SHC( 0x0b27 ), SHC( 0x0d61 ), SHC( 0x0f99 ), SHC( 0x11d0 ), SHC( 0x1406 ), SHC( 0x163a ), SHC( 0x186c ),
+ SHC( 0x1a9c ), SHC( 0x1ccb ), SHC( 0x1ef7 ), SHC( 0x2120 ), SHC( 0x2348 ), SHC( 0x256c ), SHC( 0x278d ), SHC( 0x29ac ),
+ SHC( 0x2bc7 ), SHC( 0x2ddf ), SHC( 0x2ff3 ), SHC( 0x3203 ), SHC( 0x340f ), SHC( 0x3618 ), SHC( 0x381c ), SHC( 0x3a1c ),
+ SHC( 0x3c17 ), SHC( 0x3e0e ), SHC( 0x3fff ), SHC( 0x41ec ), SHC( 0x43d4 ), SHC( 0x45b6 ), SHC( 0x4793 ), SHC( 0x496a ),
+ SHC( 0x4b3c ), SHC( 0x4d08 ), SHC( 0x4ecd ), SHC( 0x508d ), SHC( 0x5246 ), SHC( 0x53f9 ), SHC( 0x55a6 ), SHC( 0x574b ),
+ SHC( 0x58ea ), SHC( 0x5a82 ), SHC( 0x5c13 ), SHC( 0x5d9c ), SHC( 0x5f1f ), SHC( 0x609a ), SHC( 0x620d ), SHC( 0x6379 ),
+ SHC( 0x64dd ), SHC( 0x6639 ), SHC( 0x678d ), SHC( 0x68d9 ), SHC( 0x6a1d ), SHC( 0x6b59 ), SHC( 0x6c8c ), SHC( 0x6db7 ),
+ SHC( 0x6ed9 ), SHC( 0x6ff3 ), SHC( 0x7104 ), SHC( 0x720c ), SHC( 0x730b ), SHC( 0x7401 ), SHC( 0x74ef ), SHC( 0x75d3 ),
+ SHC( 0x76ad ), SHC( 0x777f ), SHC( 0x7847 ), SHC( 0x7906 ), SHC( 0x79bc ), SHC( 0x7a68 ), SHC( 0x7b0a ), SHC( 0x7ba3 ),
+ SHC( 0x7c32 ), SHC( 0x7cb8 ), SHC( 0x7d33 ), SHC( 0x7da5 ), SHC( 0x7e0e ), SHC( 0x7e6c ), SHC( 0x7ec1 ), SHC( 0x7f0b ),
+ SHC( 0x7f4c ), SHC( 0x7f83 ), SHC( 0x7fb0 ), SHC( 0x7fd3 ), SHC( 0x7fec ), SHC( 0x7ffb ), SHC( 0x7fff ), SHC( 0x7ffb ),
+ SHC( 0x7fec ), SHC( 0x7fd3 ), SHC( 0x7fb0 ), SHC( 0x7f83 ), SHC( 0x7f4c ), SHC( 0x7f0b ), SHC( 0x7ec1 ), SHC( 0x7e6c ),
+ SHC( 0x7e0e ), SHC( 0x7da5 ), SHC( 0x7d33 ), SHC( 0x7cb8 ), SHC( 0x7c32 ), SHC( 0x7ba3 ), SHC( 0x7b0a ), SHC( 0x7a68 ),
+ SHC( 0x79bc ), SHC( 0x7906 ), SHC( 0x7847 ), SHC( 0x777f ), SHC( 0x76ad ), SHC( 0x75d3 ), SHC( 0x74ef ), SHC( 0x7401 ),
+ SHC( 0x730b ), SHC( 0x720c ), SHC( 0x7104 ), SHC( 0x6ff3 ), SHC( 0x6ed9 ), SHC( 0x6db7 ), SHC( 0x6c8c ), SHC( 0x6b59 ),
+ SHC( 0x6a1d ), SHC( 0x68d9 ), SHC( 0x678d ), SHC( 0x6639 ), SHC( 0x64dd ), SHC( 0x6379 ), SHC( 0x620d ), SHC( 0x609a ),
+ SHC( 0x5f1f ), SHC( 0x5d9c ), SHC( 0x5c13 ), SHC( 0x5a82 ), SHC( 0x58ea ), SHC( 0x574b ), SHC( 0x55a6 ), SHC( 0x53f9 ),
+ SHC( 0x5246 ), SHC( 0x508d ), SHC( 0x4ecd ), SHC( 0x4d08 ), SHC( 0x4b3c ), SHC( 0x496a ), SHC( 0x4793 ), SHC( 0x45b6 ),
+ SHC( 0x43d4 ), SHC( 0x41ec ), SHC( 0x3fff ), SHC( 0x3e0e ), SHC( 0x3c17 ), SHC( 0x3a1c ), SHC( 0x381c ), SHC( 0x3618 ),
+ SHC( 0x340f ), SHC( 0x3203 ), SHC( 0x2ff3 ), SHC( 0x2ddf ), SHC( 0x2bc7 ), SHC( 0x29ac ), SHC( 0x278d ), SHC( 0x256c ),
+ SHC( 0x2348 ), SHC( 0x2120 ), SHC( 0x1ef7 ), SHC( 0x1ccb ), SHC( 0x1a9c ), SHC( 0x186c ), SHC( 0x163a ), SHC( 0x1406 ),
+ SHC( 0x11d0 ), SHC( 0x0f99 ), SHC( 0x0d61 ), SHC( 0x0b27 ), SHC( 0x08ed ), SHC( 0x06b2 ), SHC( 0x0477 ), SHC( 0x023b ),
+ SHC( 0x0000 )
+
+};
+
+/* Tables required in edxt_fx() */
+const Word16 sin_scale_tbl_960[960] = /* Q15 */
+ {
+ 0, 53, 107, 160, 214,
+ 268, 321, 375, 428, 482,
+ 536, 589, 643, 696, 750,
+ 804, 857, 911, 964, 1018,
+ 1072, 1125, 1179, 1232, 1286,
+ 1339, 1393, 1447, 1500, 1554,
+ 1607, 1661, 1714, 1768, 1821,
+ 1875, 1929, 1982, 2036, 2089,
+ 2143, 2196, 2250, 2303, 2357,
+ 2410, 2463, 2517, 2570, 2624,
+ 2677, 2731, 2784, 2838, 2891,
+ 2944, 2998, 3051, 3104, 3158,
+ 3211, 3265, 3318, 3371, 3425,
+ 3478, 3531, 3585, 3638, 3691,
+ 3744, 3798, 3851, 3904, 3957,
+ 4011, 4064, 4117, 4170, 4223,
+ 4276, 4330, 4383, 4436, 4489,
+ 4542, 4595, 4648, 4701, 4754,
+ 4807, 4860, 4913, 4966, 5019,
+ 5072, 5125, 5178, 5231, 5284,
+ 5337, 5390, 5443, 5496, 5549,
+ 5601, 5654, 5707, 5760, 5813,
+ 5865, 5918, 5971, 6024, 6076,
+ 6129, 6182, 6234, 6287, 6339,
+ 6392, 6445, 6497, 6550, 6602,
+ 6655, 6707, 6760, 6812, 6865,
+ 6917, 6969, 7022, 7074, 7126,
+ 7179, 7231, 7283, 7336, 7388,
+ 7440, 7492, 7544, 7597, 7649,
+ 7701, 7753, 7805, 7857, 7909,
+ 7961, 8013, 8065, 8117, 8169,
+ 8221, 8273, 8325, 8377, 8428,
+ 8480, 8532, 8584, 8635, 8687,
+ 8739, 8791, 8842, 8894, 8945,
+ 8997, 9048, 9100, 9151, 9203,
+ 9254, 9306, 9357, 9409, 9460,
+ 9511, 9563, 9614, 9665, 9716,
+ 9767, 9819, 9870, 9921, 9972,
+ 10023, 10074, 10125, 10176, 10227,
+ 10278, 10329, 10380, 10431, 10481,
+ 10532, 10583, 10634, 10684, 10735,
+ 10786, 10836, 10887, 10937, 10988,
+ 11038, 11089, 11139, 11190, 11240,
+ 11290, 11341, 11391, 11441, 11491,
+ 11542, 11592, 11642, 11692, 11742,
+ 11792, 11842, 11892, 11942, 11992,
+ 12042, 12092, 12142, 12191, 12241,
+ 12291, 12340, 12390, 12440, 12489,
+ 12539, 12588, 12638, 12687, 12737,
+ 12786, 12835, 12885, 12934, 12983,
+ 13033, 13082, 13131, 13180, 13229,
+ 13278, 13327, 13376, 13425, 13474,
+ 13523, 13571, 13620, 13669, 13718,
+ 13766, 13815, 13864, 13912, 13961,
+ 14009, 14058, 14106, 14154, 14203,
+ 14251, 14299, 14348, 14396, 14444,
+ 14492, 14540, 14588, 14636, 14684,
+ 14732, 14780, 14828, 14875, 14923,
+ 14971, 15019, 15066, 15114, 15161,
+ 15209, 15256, 15304, 15351, 15398,
+ 15446, 15493, 15540, 15587, 15635,
+ 15682, 15729, 15776, 15823, 15870,
+ 15917, 15963, 16010, 16057, 16104,
+ 16150, 16197, 16244, 16290, 16337,
+ 16383, 16429, 16476, 16522, 16568,
+ 16615, 16661, 16707, 16753, 16799,
+ 16845, 16891, 16937, 16983, 17029,
+ 17074, 17120, 17166, 17212, 17257,
+ 17303, 17348, 17394, 17439, 17484,
+ 17530, 17575, 17620, 17665, 17711,
+ 17756, 17801, 17846, 17891, 17936,
+ 17980, 18025, 18070, 18115, 18159,
+ 18204, 18248, 18293, 18337, 18382,
+ 18426, 18470, 18515, 18559, 18603,
+ 18647, 18691, 18735, 18779, 18823,
+ 18867, 18911, 18955, 18998, 19042,
+ 19086, 19129, 19173, 19216, 19259,
+ 19303, 19346, 19389, 19433, 19476,
+ 19519, 19562, 19605, 19648, 19691,
+ 19733, 19776, 19819, 19862, 19904,
+ 19947, 19989, 20032, 20074, 20116,
+ 20159, 20201, 20243, 20285, 20327,
+ 20369, 20411, 20453, 20495, 20537,
+ 20579, 20620, 20662, 20704, 20745,
+ 20787, 20828, 20869, 20911, 20952,
+ 20993, 21034, 21075, 21116, 21157,
+ 21198, 21239, 21280, 21321, 21361,
+ 21402, 21443, 21483, 21524, 21564,
+ 21604, 21645, 21685, 21725, 21765,
+ 21805, 21845, 21885, 21925, 21965,
+ 22004, 22044, 22084, 22123, 22163,
+ 22202, 22242, 22281, 22320, 22360,
+ 22399, 22438, 22477, 22516, 22555,
+ 22594, 22632, 22671, 22710, 22749,
+ 22787, 22826, 22864, 22902, 22941,
+ 22979, 23017, 23055, 23093, 23131,
+ 23169, 23207, 23245, 23283, 23320,
+ 23358, 23396, 23433, 23471, 23508,
+ 23545, 23583, 23620, 23657, 23694,
+ 23731, 23768, 23805, 23842, 23878,
+ 23915, 23952, 23988, 24025, 24061,
+ 24097, 24134, 24170, 24206, 24242,
+ 24278, 24314, 24350, 24386, 24422,
+ 24457, 24493, 24529, 24564, 24600,
+ 24635, 24670, 24706, 24741, 24776,
+ 24811, 24846, 24881, 24916, 24951,
+ 24985, 25020, 25054, 25089, 25123,
+ 25158, 25192, 25226, 25261, 25295,
+ 25329, 25363, 25397, 25430, 25464,
+ 25498, 25532, 25565, 25599, 25632,
+ 25665, 25699, 25732, 25765, 25798,
+ 25831, 25864, 25897, 25930, 25963,
+ 25995, 26028, 26060, 26093, 26125,
+ 26158, 26190, 26222, 26254, 26286,
+ 26318, 26350, 26382, 26414, 26445,
+ 26477, 26509, 26540, 26571, 26603,
+ 26634, 26665, 26696, 26727, 26758,
+ 26789, 26820, 26851, 26882, 26912,
+ 26943, 26973, 27004, 27034, 27064,
+ 27094, 27125, 27155, 27185, 27214,
+ 27244, 27274, 27304, 27333, 27363,
+ 27392, 27422, 27451, 27480, 27509,
+ 27538, 27567, 27596, 27625, 27654,
+ 27683, 27711, 27740, 27769, 27797,
+ 27825, 27854, 27882, 27910, 27938,
+ 27966, 27994, 28022, 28049, 28077,
+ 28105, 28132, 28160, 28187, 28214,
+ 28242, 28269, 28296, 28323, 28350,
+ 28377, 28403, 28430, 28457, 28483,
+ 28510, 28536, 28562, 28589, 28615,
+ 28641, 28667, 28693, 28719, 28744,
+ 28770, 28796, 28821, 28847, 28872,
+ 28897, 28923, 28948, 28973, 28998,
+ 29023, 29048, 29072, 29097, 29122,
+ 29146, 29171, 29195, 29219, 29244,
+ 29268, 29292, 29316, 29340, 29364,
+ 29387, 29411, 29435, 29458, 29482,
+ 29505, 29528, 29551, 29575, 29598,
+ 29621, 29643, 29666, 29689, 29712,
+ 29734, 29757, 29779, 29801, 29824,
+ 29846, 29868, 29890, 29912, 29934,
+ 29955, 29977, 29999, 30020, 30042,
+ 30063, 30084, 30106, 30127, 30148,
+ 30169, 30190, 30210, 30231, 30252,
+ 30272, 30293, 30313, 30333, 30354,
+ 30374, 30394, 30414, 30434, 30454,
+ 30473, 30493, 30513, 30532, 30552,
+ 30571, 30590, 30609, 30628, 30647,
+ 30666, 30685, 30704, 30723, 30741,
+ 30760, 30778, 30797, 30815, 30833,
+ 30851, 30869, 30887, 30905, 30923,
+ 30940, 30958, 30975, 30993, 31010,
+ 31028, 31045, 31062, 31079, 31096,
+ 31113, 31129, 31146, 31163, 31179,
+ 31196, 31212, 31228, 31245, 31261,
+ 31277, 31293, 31308, 31324, 31340,
+ 31356, 31371, 31387, 31402, 31417,
+ 31432, 31447, 31462, 31477, 31492,
+ 31507, 31522, 31536, 31551, 31565,
+ 31580, 31594, 31608, 31622, 31636,
+ 31650, 31664, 31678, 31691, 31705,
+ 31718, 31732, 31745, 31758, 31771,
+ 31785, 31797, 31810, 31823, 31836,
+ 31849, 31861, 31874, 31886, 31898,
+ 31911, 31923, 31935, 31947, 31959,
+ 31970, 31982, 31994, 32005, 32017,
+ 32028, 32039, 32050, 32062, 32073,
+ 32084, 32094, 32105, 32116, 32126,
+ 32137, 32147, 32158, 32168, 32178,
+ 32188, 32198, 32208, 32218, 32228,
+ 32237, 32247, 32256, 32266, 32275,
+ 32284, 32293, 32302, 32311, 32320,
+ 32329, 32338, 32346, 32355, 32363,
+ 32371, 32380, 32388, 32396, 32404,
+ 32412, 32420, 32427, 32435, 32443,
+ 32450, 32457, 32465, 32472, 32479,
+ 32486, 32493, 32500, 32507, 32513,
+ 32520, 32527, 32533, 32539, 32546,
+ 32552, 32558, 32564, 32570, 32576,
+ 32581, 32587, 32593, 32598, 32603,
+ 32609, 32614, 32619, 32624, 32629,
+ 32634, 32639, 32643, 32648, 32652,
+ 32657, 32661, 32665, 32670, 32674,
+ 32678, 32682, 32685, 32689, 32693,
+ 32696, 32700, 32703, 32706, 32710,
+ 32713, 32716, 32719, 32722, 32724,
+ 32727, 32730, 32732, 32735, 32737,
+ 32739, 32741, 32743, 32745, 32747,
+ 32749, 32751, 32752, 32754, 32755,
+ 32757, 32758, 32759, 32760, 32761,
+ 32762, 32763, 32764, 32764, 32765,
+ 32765, 32766, 32766, 32766, 32766
+ };
+
+const Word16 cos_scale_tbl_960[960] = /* Q15 */
+ {
+ 32767, 32766, 32766, 32766, 32766,
+ 32765, 32765, 32764, 32764, 32763,
+ 32762, 32761, 32760, 32759, 32758,
+ 32757, 32755, 32754, 32752, 32751,
+ 32749, 32747, 32745, 32743, 32741,
+ 32739, 32737, 32735, 32732, 32730,
+ 32727, 32724, 32722, 32719, 32716,
+ 32713, 32710, 32706, 32703, 32700,
+ 32696, 32693, 32689, 32685, 32682,
+ 32678, 32674, 32670, 32665, 32661,
+ 32657, 32652, 32648, 32643, 32639,
+ 32634, 32629, 32624, 32619, 32614,
+ 32609, 32603, 32598, 32593, 32587,
+ 32581, 32576, 32570, 32564, 32558,
+ 32552, 32546, 32539, 32533, 32527,
+ 32520, 32513, 32507, 32500, 32493,
+ 32486, 32479, 32472, 32465, 32457,
+ 32450, 32443, 32435, 32427, 32420,
+ 32412, 32404, 32396, 32388, 32380,
+ 32371, 32363, 32355, 32346, 32338,
+ 32329, 32320, 32311, 32302, 32293,
+ 32284, 32275, 32266, 32256, 32247,
+ 32237, 32228, 32218, 32208, 32198,
+ 32188, 32178, 32168, 32158, 32147,
+ 32137, 32126, 32116, 32105, 32094,
+ 32084, 32073, 32062, 32050, 32039,
+ 32028, 32017, 32005, 31994, 31982,
+ 31970, 31959, 31947, 31935, 31923,
+ 31911, 31898, 31886, 31874, 31861,
+ 31849, 31836, 31823, 31810, 31797,
+ 31785, 31771, 31758, 31745, 31732,
+ 31718, 31705, 31691, 31678, 31664,
+ 31650, 31636, 31622, 31608, 31594,
+ 31580, 31565, 31551, 31536, 31522,
+ 31507, 31492, 31477, 31462, 31447,
+ 31432, 31417, 31402, 31387, 31371,
+ 31356, 31340, 31324, 31308, 31293,
+ 31277, 31261, 31245, 31228, 31212,
+ 31196, 31179, 31163, 31146, 31129,
+ 31113, 31096, 31079, 31062, 31045,
+ 31028, 31010, 30993, 30975, 30958,
+ 30940, 30923, 30905, 30887, 30869,
+ 30851, 30833, 30815, 30797, 30778,
+ 30760, 30741, 30723, 30704, 30685,
+ 30666, 30647, 30628, 30609, 30590,
+ 30571, 30552, 30532, 30513, 30493,
+ 30473, 30454, 30434, 30414, 30394,
+ 30374, 30354, 30333, 30313, 30293,
+ 30272, 30252, 30231, 30210, 30190,
+ 30169, 30148, 30127, 30106, 30084,
+ 30063, 30042, 30020, 29999, 29977,
+ 29955, 29934, 29912, 29890, 29868,
+ 29846, 29824, 29801, 29779, 29757,
+ 29734, 29712, 29689, 29666, 29643,
+ 29621, 29598, 29575, 29551, 29528,
+ 29505, 29482, 29458, 29435, 29411,
+ 29387, 29364, 29340, 29316, 29292,
+ 29268, 29244, 29219, 29195, 29171,
+ 29146, 29122, 29097, 29072, 29048,
+ 29023, 28998, 28973, 28948, 28923,
+ 28897, 28872, 28847, 28821, 28796,
+ 28770, 28744, 28719, 28693, 28667,
+ 28641, 28615, 28589, 28562, 28536,
+ 28510, 28483, 28457, 28430, 28403,
+ 28377, 28350, 28323, 28296, 28269,
+ 28242, 28214, 28187, 28160, 28132,
+ 28105, 28077, 28049, 28022, 27994,
+ 27966, 27938, 27910, 27882, 27854,
+ 27825, 27797, 27769, 27740, 27711,
+ 27683, 27654, 27625, 27596, 27567,
+ 27538, 27509, 27480, 27451, 27422,
+ 27392, 27363, 27333, 27304, 27274,
+ 27244, 27214, 27185, 27155, 27125,
+ 27094, 27064, 27034, 27004, 26973,
+ 26943, 26912, 26882, 26851, 26820,
+ 26789, 26758, 26727, 26696, 26665,
+ 26634, 26603, 26571, 26540, 26509,
+ 26477, 26445, 26414, 26382, 26350,
+ 26318, 26286, 26254, 26222, 26190,
+ 26158, 26125, 26093, 26060, 26028,
+ 25995, 25963, 25930, 25897, 25864,
+ 25831, 25798, 25765, 25732, 25699,
+ 25665, 25632, 25599, 25565, 25532,
+ 25498, 25464, 25430, 25397, 25363,
+ 25329, 25295, 25261, 25226, 25192,
+ 25158, 25123, 25089, 25054, 25020,
+ 24985, 24951, 24916, 24881, 24846,
+ 24811, 24776, 24741, 24706, 24670,
+ 24635, 24600, 24564, 24529, 24493,
+ 24457, 24422, 24386, 24350, 24314,
+ 24278, 24242, 24206, 24170, 24134,
+ 24097, 24061, 24025, 23988, 23952,
+ 23915, 23878, 23842, 23805, 23768,
+ 23731, 23694, 23657, 23620, 23583,
+ 23545, 23508, 23471, 23433, 23396,
+ 23358, 23320, 23283, 23245, 23207,
+ 23169, 23131, 23093, 23055, 23017,
+ 22979, 22941, 22902, 22864, 22826,
+ 22787, 22749, 22710, 22671, 22632,
+ 22594, 22555, 22516, 22477, 22438,
+ 22399, 22360, 22320, 22281, 22242,
+ 22202, 22163, 22123, 22084, 22044,
+ 22004, 21965, 21925, 21885, 21845,
+ 21805, 21765, 21725, 21685, 21645,
+ 21604, 21564, 21524, 21483, 21443,
+ 21402, 21361, 21321, 21280, 21239,
+ 21198, 21157, 21116, 21075, 21034,
+ 20993, 20952, 20911, 20869, 20828,
+ 20787, 20745, 20704, 20662, 20620,
+ 20579, 20537, 20495, 20453, 20411,
+ 20369, 20327, 20285, 20243, 20201,
+ 20159, 20116, 20074, 20032, 19989,
+ 19947, 19904, 19862, 19819, 19776,
+ 19733, 19691, 19648, 19605, 19562,
+ 19519, 19476, 19433, 19389, 19346,
+ 19303, 19259, 19216, 19173, 19129,
+ 19086, 19042, 18998, 18955, 18911,
+ 18867, 18823, 18779, 18735, 18691,
+ 18647, 18603, 18559, 18515, 18470,
+ 18426, 18382, 18337, 18293, 18248,
+ 18204, 18159, 18115, 18070, 18025,
+ 17980, 17936, 17891, 17846, 17801,
+ 17756, 17711, 17665, 17620, 17575,
+ 17530, 17484, 17439, 17394, 17348,
+ 17303, 17257, 17212, 17166, 17120,
+ 17074, 17029, 16983, 16937, 16891,
+ 16845, 16799, 16753, 16707, 16661,
+ 16615, 16568, 16522, 16476, 16429,
+ 16383, 16337, 16290, 16244, 16197,
+ 16150, 16104, 16057, 16010, 15963,
+ 15917, 15870, 15823, 15776, 15729,
+ 15682, 15635, 15587, 15540, 15493,
+ 15446, 15398, 15351, 15304, 15256,
+ 15209, 15161, 15114, 15066, 15019,
+ 14971, 14923, 14875, 14828, 14780,
+ 14732, 14684, 14636, 14588, 14540,
+ 14492, 14444, 14396, 14348, 14299,
+ 14251, 14203, 14154, 14106, 14058,
+ 14009, 13961, 13912, 13864, 13815,
+ 13766, 13718, 13669, 13620, 13571,
+ 13523, 13474, 13425, 13376, 13327,
+ 13278, 13229, 13180, 13131, 13082,
+ 13033, 12983, 12934, 12885, 12835,
+ 12786, 12737, 12687, 12638, 12588,
+ 12539, 12489, 12440, 12390, 12340,
+ 12291, 12241, 12191, 12142, 12092,
+ 12042, 11992, 11942, 11892, 11842,
+ 11792, 11742, 11692, 11642, 11592,
+ 11542, 11491, 11441, 11391, 11341,
+ 11290, 11240, 11190, 11139, 11089,
+ 11038, 10988, 10937, 10887, 10836,
+ 10786, 10735, 10684, 10634, 10583,
+ 10532, 10481, 10431, 10380, 10329,
+ 10278, 10227, 10176, 10125, 10074,
+ 10023, 9972, 9921, 9870, 9819,
+ 9767, 9716, 9665, 9614, 9563,
+ 9511, 9460, 9409, 9357, 9306,
+ 9254, 9203, 9151, 9100, 9048,
+ 8997, 8945, 8894, 8842, 8791,
+ 8739, 8687, 8635, 8584, 8532,
+ 8480, 8428, 8377, 8325, 8273,
+ 8221, 8169, 8117, 8065, 8013,
+ 7961, 7909, 7857, 7805, 7753,
+ 7701, 7649, 7597, 7544, 7492,
+ 7440, 7388, 7336, 7283, 7231,
+ 7179, 7126, 7074, 7022, 6969,
+ 6917, 6865, 6812, 6760, 6707,
+ 6655, 6602, 6550, 6497, 6445,
+ 6392, 6339, 6287, 6234, 6182,
+ 6129, 6076, 6024, 5971, 5918,
+ 5865, 5813, 5760, 5707, 5654,
+ 5601, 5549, 5496, 5443, 5390,
+ 5337, 5284, 5231, 5178, 5125,
+ 5072, 5019, 4966, 4913, 4860,
+ 4807, 4754, 4701, 4648, 4595,
+ 4542, 4489, 4436, 4383, 4330,
+ 4276, 4223, 4170, 4117, 4064,
+ 4011, 3957, 3904, 3851, 3798,
+ 3744, 3691, 3638, 3585, 3531,
+ 3478, 3425, 3371, 3318, 3265,
+ 3211, 3158, 3104, 3051, 2998,
+ 2944, 2891, 2838, 2784, 2731,
+ 2677, 2624, 2570, 2517, 2463,
+ 2410, 2357, 2303, 2250, 2196,
+ 2143, 2089, 2036, 1982, 1929,
+ 1875, 1821, 1768, 1714, 1661,
+ 1607, 1554, 1500, 1447, 1393,
+ 1339, 1286, 1232, 1179, 1125,
+ 1072, 1018, 964, 911, 857,
+ 804, 750, 696, 643, 589,
+ 536, 482, 428, 375, 321,
+ 268, 214, 160, 107, 53
+ };
+
+const Word16 cos_scale_tbl_640[640] = /* Q15 */
+ {
+ 32767, 32766, 32766, 32766, 32765,
+ 32764, 32763, 32762, 32760, 32759,
+ 32757, 32755, 32752, 32750, 32747,
+ 32744, 32741, 32738, 32735, 32731,
+ 32727, 32723, 32719, 32714, 32710,
+ 32705, 32700, 32695, 32689, 32684,
+ 32678, 32672, 32665, 32659, 32652,
+ 32646, 32639, 32631, 32624, 32617,
+ 32609, 32601, 32593, 32584, 32576,
+ 32567, 32558, 32549, 32539, 32530,
+ 32520, 32510, 32500, 32490, 32479,
+ 32468, 32457, 32446, 32435, 32424,
+ 32412, 32400, 32388, 32376, 32363,
+ 32350, 32338, 32324, 32311, 32298,
+ 32284, 32270, 32256, 32242, 32228,
+ 32213, 32198, 32183, 32168, 32152,
+ 32137, 32121, 32105, 32089, 32073,
+ 32056, 32039, 32022, 32005, 31988,
+ 31970, 31953, 31935, 31917, 31898,
+ 31880, 31861, 31842, 31823, 31804,
+ 31785, 31765, 31745, 31725, 31705,
+ 31684, 31664, 31643, 31622, 31601,
+ 31580, 31558, 31536, 31514, 31492,
+ 31470, 31447, 31425, 31402, 31379,
+ 31356, 31332, 31308, 31285, 31261,
+ 31236, 31212, 31188, 31163, 31138,
+ 31113, 31087, 31062, 31036, 31010,
+ 30984, 30958, 30932, 30905, 30878,
+ 30851, 30824, 30797, 30769, 30741,
+ 30713, 30685, 30657, 30628, 30600,
+ 30571, 30542, 30513, 30483, 30454,
+ 30424, 30394, 30364, 30333, 30303,
+ 30272, 30241, 30210, 30179, 30148,
+ 30116, 30084, 30052, 30020, 29988,
+ 29955, 29923, 29890, 29857, 29824,
+ 29790, 29757, 29723, 29689, 29655,
+ 29621, 29586, 29551, 29517, 29482,
+ 29446, 29411, 29375, 29340, 29304,
+ 29268, 29232, 29195, 29159, 29122,
+ 29085, 29048, 29010, 28973, 28935,
+ 28897, 28859, 28821, 28783, 28744,
+ 28706, 28667, 28628, 28589, 28549,
+ 28510, 28470, 28430, 28390, 28350,
+ 28309, 28269, 28228, 28187, 28146,
+ 28105, 28063, 28022, 27980, 27938,
+ 27896, 27854, 27811, 27769, 27726,
+ 27683, 27640, 27596, 27553, 27509,
+ 27466, 27422, 27378, 27333, 27289,
+ 27244, 27200, 27155, 27109, 27064,
+ 27019, 26973, 26927, 26882, 26836,
+ 26789, 26743, 26696, 26650, 26603,
+ 26556, 26509, 26461, 26414, 26366,
+ 26318, 26270, 26222, 26174, 26125,
+ 26077, 26028, 25979, 25930, 25881,
+ 25831, 25782, 25732, 25682, 25632,
+ 25582, 25532, 25481, 25430, 25380,
+ 25329, 25278, 25226, 25175, 25123,
+ 25072, 25020, 24968, 24916, 24863,
+ 24811, 24758, 24706, 24653, 24600,
+ 24546, 24493, 24440, 24386, 24332,
+ 24278, 24224, 24170, 24116, 24061,
+ 24006, 23952, 23897, 23842, 23786,
+ 23731, 23675, 23620, 23564, 23508,
+ 23452, 23396, 23339, 23283, 23226,
+ 23169, 23112, 23055, 22998, 22941,
+ 22883, 22826, 22768, 22710, 22652,
+ 22594, 22535, 22477, 22418, 22360,
+ 22301, 22242, 22183, 22123, 22064,
+ 22004, 21945, 21885, 21825, 21765,
+ 21705, 21645, 21584, 21524, 21463,
+ 21402, 21341, 21280, 21219, 21157,
+ 21096, 21034, 20973, 20911, 20849,
+ 20787, 20724, 20662, 20600, 20537,
+ 20474, 20411, 20348, 20285, 20222,
+ 20159, 20095, 20032, 19968, 19904,
+ 19840, 19776, 19712, 19648, 19583,
+ 19519, 19454, 19389, 19324, 19259,
+ 19194, 19129, 19064, 18998, 18933,
+ 18867, 18801, 18735, 18669, 18603,
+ 18537, 18470, 18404, 18337, 18271,
+ 18204, 18137, 18070, 18003, 17936,
+ 17868, 17801, 17733, 17665, 17598,
+ 17530, 17462, 17394, 17325, 17257,
+ 17189, 17120, 17052, 16983, 16914,
+ 16845, 16776, 16707, 16638, 16568,
+ 16499, 16429, 16360, 16290, 16220,
+ 16150, 16080, 16010, 15940, 15870,
+ 15799, 15729, 15658, 15587, 15517,
+ 15446, 15375, 15304, 15233, 15161,
+ 15090, 15019, 14947, 14875, 14804,
+ 14732, 14660, 14588, 14516, 14444,
+ 14372, 14299, 14227, 14154, 14082,
+ 14009, 13936, 13864, 13791, 13718,
+ 13645, 13571, 13498, 13425, 13352,
+ 13278, 13204, 13131, 13057, 12983,
+ 12909, 12835, 12761, 12687, 12613,
+ 12539, 12465, 12390, 12316, 12241,
+ 12166, 12092, 12017, 11942, 11867,
+ 11792, 11717, 11642, 11567, 11491,
+ 11416, 11341, 11265, 11190, 11114,
+ 11038, 10963, 10887, 10811, 10735,
+ 10659, 10583, 10507, 10431, 10354,
+ 10278, 10202, 10125, 10049, 9972,
+ 9895, 9819, 9742, 9665, 9588,
+ 9511, 9434, 9357, 9280, 9203,
+ 9126, 9048, 8971, 8894, 8816,
+ 8739, 8661, 8584, 8506, 8428,
+ 8351, 8273, 8195, 8117, 8039,
+ 7961, 7883, 7805, 7727, 7649,
+ 7571, 7492, 7414, 7336, 7257,
+ 7179, 7100, 7022, 6943, 6865,
+ 6786, 6707, 6628, 6550, 6471,
+ 6392, 6313, 6234, 6155, 6076,
+ 5997, 5918, 5839, 5760, 5681,
+ 5601, 5522, 5443, 5364, 5284,
+ 5205, 5125, 5046, 4966, 4887,
+ 4807, 4728, 4648, 4569, 4489,
+ 4409, 4330, 4250, 4170, 4090,
+ 4011, 3931, 3851, 3771, 3691,
+ 3611, 3531, 3451, 3371, 3291,
+ 3211, 3131, 3051, 2971, 2891,
+ 2811, 2731, 2651, 2570, 2490,
+ 2410, 2330, 2250, 2169, 2089,
+ 2009, 1929, 1848, 1768, 1688,
+ 1607, 1527, 1447, 1366, 1286,
+ 1206, 1125, 1045, 964, 884,
+ 804, 723, 643, 562, 482,
+ 402, 321, 241, 160, 80
+ };
+
+const Word16 sin_scale_tbl_640[640] = /* Q15 */
+ {
+ 0, 80, 160, 241, 321,
+ 402, 482, 562, 643, 723,
+ 804, 884, 964, 1045, 1125,
+ 1206, 1286, 1366, 1447, 1527,
+ 1607, 1688, 1768, 1848, 1929,
+ 2009, 2089, 2169, 2250, 2330,
+ 2410, 2490, 2570, 2651, 2731,
+ 2811, 2891, 2971, 3051, 3131,
+ 3211, 3291, 3371, 3451, 3531,
+ 3611, 3691, 3771, 3851, 3931,
+ 4011, 4090, 4170, 4250, 4330,
+ 4409, 4489, 4569, 4648, 4728,
+ 4807, 4887, 4966, 5046, 5125,
+ 5205, 5284, 5364, 5443, 5522,
+ 5601, 5681, 5760, 5839, 5918,
+ 5997, 6076, 6155, 6234, 6313,
+ 6392, 6471, 6550, 6628, 6707,
+ 6786, 6865, 6943, 7022, 7100,
+ 7179, 7257, 7336, 7414, 7492,
+ 7571, 7649, 7727, 7805, 7883,
+ 7961, 8039, 8117, 8195, 8273,
+ 8351, 8428, 8506, 8584, 8661,
+ 8739, 8816, 8894, 8971, 9048,
+ 9126, 9203, 9280, 9357, 9434,
+ 9511, 9588, 9665, 9742, 9819,
+ 9895, 9972, 10049, 10125, 10202,
+ 10278, 10354, 10431, 10507, 10583,
+ 10659, 10735, 10811, 10887, 10963,
+ 11038, 11114, 11190, 11265, 11341,
+ 11416, 11491, 11567, 11642, 11717,
+ 11792, 11867, 11942, 12017, 12092,
+ 12166, 12241, 12316, 12390, 12465,
+ 12539, 12613, 12687, 12761, 12835,
+ 12909, 12983, 13057, 13131, 13204,
+ 13278, 13352, 13425, 13498, 13571,
+ 13645, 13718, 13791, 13864, 13936,
+ 14009, 14082, 14154, 14227, 14299,
+ 14372, 14444, 14516, 14588, 14660,
+ 14732, 14804, 14875, 14947, 15019,
+ 15090, 15161, 15233, 15304, 15375,
+ 15446, 15517, 15587, 15658, 15729,
+ 15799, 15870, 15940, 16010, 16080,
+ 16150, 16220, 16290, 16360, 16429,
+ 16499, 16568, 16638, 16707, 16776,
+ 16845, 16914, 16983, 17052, 17120,
+ 17189, 17257, 17325, 17394, 17462,
+ 17530, 17598, 17665, 17733, 17801,
+ 17868, 17936, 18003, 18070, 18137,
+ 18204, 18271, 18337, 18404, 18470,
+ 18537, 18603, 18669, 18735, 18801,
+ 18867, 18933, 18998, 19064, 19129,
+ 19194, 19259, 19324, 19389, 19454,
+ 19519, 19583, 19648, 19712, 19776,
+ 19840, 19904, 19968, 20032, 20095,
+ 20159, 20222, 20285, 20348, 20411,
+ 20474, 20537, 20600, 20662, 20724,
+ 20787, 20849, 20911, 20973, 21034,
+ 21096, 21157, 21219, 21280, 21341,
+ 21402, 21463, 21524, 21584, 21645,
+ 21705, 21765, 21825, 21885, 21945,
+ 22004, 22064, 22123, 22183, 22242,
+ 22301, 22360, 22418, 22477, 22535,
+ 22594, 22652, 22710, 22768, 22826,
+ 22883, 22941, 22998, 23055, 23112,
+ 23169, 23226, 23283, 23339, 23396,
+ 23452, 23508, 23564, 23620, 23675,
+ 23731, 23786, 23842, 23897, 23952,
+ 24006, 24061, 24116, 24170, 24224,
+ 24278, 24332, 24386, 24440, 24493,
+ 24546, 24600, 24653, 24706, 24758,
+ 24811, 24863, 24916, 24968, 25020,
+ 25072, 25123, 25175, 25226, 25278,
+ 25329, 25380, 25430, 25481, 25532,
+ 25582, 25632, 25682, 25732, 25782,
+ 25831, 25881, 25930, 25979, 26028,
+ 26077, 26125, 26174, 26222, 26270,
+ 26318, 26366, 26414, 26461, 26509,
+ 26556, 26603, 26650, 26696, 26743,
+ 26789, 26836, 26882, 26927, 26973,
+ 27019, 27064, 27109, 27155, 27200,
+ 27244, 27289, 27333, 27378, 27422,
+ 27466, 27509, 27553, 27596, 27640,
+ 27683, 27726, 27769, 27811, 27854,
+ 27896, 27938, 27980, 28022, 28063,
+ 28105, 28146, 28187, 28228, 28269,
+ 28309, 28350, 28390, 28430, 28470,
+ 28510, 28549, 28589, 28628, 28667,
+ 28706, 28744, 28783, 28821, 28859,
+ 28897, 28935, 28973, 29010, 29048,
+ 29085, 29122, 29159, 29195, 29232,
+ 29268, 29304, 29340, 29375, 29411,
+ 29446, 29482, 29517, 29551, 29586,
+ 29621, 29655, 29689, 29723, 29757,
+ 29790, 29824, 29857, 29890, 29923,
+ 29955, 29988, 30020, 30052, 30084,
+ 30116, 30148, 30179, 30210, 30241,
+ 30272, 30303, 30333, 30364, 30394,
+ 30424, 30454, 30483, 30513, 30542,
+ 30571, 30600, 30628, 30657, 30685,
+ 30713, 30741, 30769, 30797, 30824,
+ 30851, 30878, 30905, 30932, 30958,
+ 30984, 31010, 31036, 31062, 31087,
+ 31113, 31138, 31163, 31188, 31212,
+ 31236, 31261, 31285, 31308, 31332,
+ 31356, 31379, 31402, 31425, 31447,
+ 31470, 31492, 31514, 31536, 31558,
+ 31580, 31601, 31622, 31643, 31664,
+ 31684, 31705, 31725, 31745, 31765,
+ 31785, 31804, 31823, 31842, 31861,
+ 31880, 31898, 31917, 31935, 31953,
+ 31970, 31988, 32005, 32022, 32039,
+ 32056, 32073, 32089, 32105, 32121,
+ 32137, 32152, 32168, 32183, 32198,
+ 32213, 32228, 32242, 32256, 32270,
+ 32284, 32298, 32311, 32324, 32338,
+ 32350, 32363, 32376, 32388, 32400,
+ 32412, 32424, 32435, 32446, 32457,
+ 32468, 32479, 32490, 32500, 32510,
+ 32520, 32530, 32539, 32549, 32558,
+ 32567, 32576, 32584, 32593, 32601,
+ 32609, 32617, 32624, 32631, 32639,
+ 32646, 32652, 32659, 32665, 32672,
+ 32678, 32684, 32689, 32695, 32700,
+ 32705, 32710, 32714, 32719, 32723,
+ 32727, 32731, 32735, 32738, 32741,
+ 32744, 32747, 32750, 32752, 32755,
+ 32757, 32759, 32760, 32762, 32763,
+ 32764, 32765, 32766, 32766, 32766
+ };
+
+const Word16 sin_scale_tbl_512[512] = /* Q15 */
+ {
+ 0, 100, 201, 301, 402,
+ 502, 603, 703, 804, 904,
+ 1005, 1105, 1206, 1306, 1406,
+ 1507, 1607, 1708, 1808, 1908,
+ 2009, 2109, 2209, 2310, 2410,
+ 2510, 2610, 2711, 2811, 2911,
+ 3011, 3111, 3211, 3311, 3411,
+ 3511, 3611, 3711, 3811, 3911,
+ 4011, 4110, 4210, 4310, 4409,
+ 4509, 4608, 4708, 4807, 4907,
+ 5006, 5106, 5205, 5304, 5403,
+ 5502, 5601, 5700, 5799, 5898,
+ 5997, 6096, 6195, 6293, 6392,
+ 6491, 6589, 6688, 6786, 6884,
+ 6982, 7081, 7179, 7277, 7375,
+ 7473, 7571, 7668, 7766, 7864,
+ 7961, 8059, 8156, 8253, 8351,
+ 8448, 8545, 8642, 8739, 8836,
+ 8932, 9029, 9126, 9222, 9319,
+ 9415, 9511, 9607, 9703, 9799,
+ 9895, 9991, 10087, 10182, 10278,
+ 10373, 10469, 10564, 10659, 10754,
+ 10849, 10944, 11038, 11133, 11227,
+ 11322, 11416, 11510, 11604, 11698,
+ 11792, 11886, 11980, 12073, 12166,
+ 12260, 12353, 12446, 12539, 12632,
+ 12724, 12817, 12909, 13002, 13094,
+ 13186, 13278, 13370, 13462, 13553,
+ 13645, 13736, 13827, 13918, 14009,
+ 14100, 14191, 14281, 14372, 14462,
+ 14552, 14642, 14732, 14822, 14911,
+ 15001, 15090, 15179, 15268, 15357,
+ 15446, 15534, 15623, 15711, 15799,
+ 15887, 15975, 16063, 16150, 16238,
+ 16325, 16412, 16499, 16586, 16672,
+ 16759, 16845, 16931, 17017, 17103,
+ 17189, 17274, 17360, 17445, 17530,
+ 17615, 17699, 17784, 17868, 17952,
+ 18036, 18120, 18204, 18287, 18371,
+ 18454, 18537, 18620, 18702, 18785,
+ 18867, 18949, 19031, 19113, 19194,
+ 19276, 19357, 19438, 19519, 19599,
+ 19680, 19760, 19840, 19920, 20000,
+ 20079, 20159, 20238, 20317, 20396,
+ 20474, 20553, 20631, 20709, 20787,
+ 20864, 20942, 21019, 21096, 21173,
+ 21249, 21326, 21402, 21478, 21554,
+ 21629, 21705, 21780, 21855, 21930,
+ 22004, 22079, 22153, 22227, 22301,
+ 22374, 22448, 22521, 22594, 22666,
+ 22739, 22811, 22883, 22955, 23027,
+ 23098, 23169, 23240, 23311, 23382,
+ 23452, 23522, 23592, 23661, 23731,
+ 23800, 23869, 23938, 24006, 24075,
+ 24143, 24211, 24278, 24346, 24413,
+ 24480, 24546, 24613, 24679, 24745,
+ 24811, 24877, 24942, 25007, 25072,
+ 25136, 25201, 25265, 25329, 25392,
+ 25456, 25519, 25582, 25645, 25707,
+ 25769, 25831, 25893, 25954, 26016,
+ 26077, 26137, 26198, 26258, 26318,
+ 26378, 26437, 26497, 26556, 26615,
+ 26673, 26731, 26789, 26847, 26905,
+ 26962, 27019, 27076, 27132, 27188,
+ 27244, 27300, 27355, 27411, 27466,
+ 27520, 27575, 27629, 27683, 27736,
+ 27790, 27843, 27896, 27948, 28001,
+ 28053, 28105, 28156, 28208, 28259,
+ 28309, 28360, 28410, 28460, 28510,
+ 28559, 28608, 28657, 28706, 28754,
+ 28802, 28850, 28897, 28945, 28992,
+ 29038, 29085, 29131, 29177, 29222,
+ 29268, 29313, 29358, 29402, 29446,
+ 29490, 29534, 29577, 29621, 29663,
+ 29706, 29748, 29790, 29832, 29873,
+ 29915, 29955, 29996, 30036, 30076,
+ 30116, 30156, 30195, 30234, 30272,
+ 30311, 30349, 30386, 30424, 30461,
+ 30498, 30535, 30571, 30607, 30643,
+ 30678, 30713, 30748, 30783, 30817,
+ 30851, 30885, 30918, 30951, 30984,
+ 31017, 31049, 31081, 31113, 31144,
+ 31175, 31206, 31236, 31267, 31297,
+ 31326, 31356, 31385, 31413, 31442,
+ 31470, 31498, 31525, 31553, 31580,
+ 31606, 31633, 31659, 31684, 31710,
+ 31735, 31760, 31785, 31809, 31833,
+ 31856, 31880, 31903, 31926, 31948,
+ 31970, 31992, 32014, 32035, 32056,
+ 32077, 32097, 32117, 32137, 32156,
+ 32176, 32194, 32213, 32231, 32249,
+ 32267, 32284, 32301, 32318, 32334,
+ 32350, 32366, 32382, 32397, 32412,
+ 32426, 32441, 32455, 32468, 32482,
+ 32495, 32508, 32520, 32532, 32544,
+ 32556, 32567, 32578, 32588, 32599,
+ 32609, 32618, 32628, 32637, 32646,
+ 32654, 32662, 32670, 32678, 32685,
+ 32692, 32699, 32705, 32711, 32717,
+ 32722, 32727, 32732, 32736, 32740,
+ 32744, 32748, 32751, 32754, 32757,
+ 32759, 32761, 32763, 32764, 32765,
+ 32766, 32766
+ };
+
+const Word16 cos_scale_tbl_512[512] = /* Q15 */
+ {
+ 32767, 32766, 32766, 32765, 32764,
+ 32763, 32761, 32759, 32757, 32754,
+ 32751, 32748, 32744, 32740, 32736,
+ 32732, 32727, 32722, 32717, 32711,
+ 32705, 32699, 32692, 32685, 32678,
+ 32670, 32662, 32654, 32646, 32637,
+ 32628, 32618, 32609, 32599, 32588,
+ 32578, 32567, 32556, 32544, 32532,
+ 32520, 32508, 32495, 32482, 32468,
+ 32455, 32441, 32426, 32412, 32397,
+ 32382, 32366, 32350, 32334, 32318,
+ 32301, 32284, 32267, 32249, 32231,
+ 32213, 32194, 32176, 32156, 32137,
+ 32117, 32097, 32077, 32056, 32035,
+ 32014, 31992, 31970, 31948, 31926,
+ 31903, 31880, 31856, 31833, 31809,
+ 31785, 31760, 31735, 31710, 31684,
+ 31659, 31633, 31606, 31580, 31553,
+ 31525, 31498, 31470, 31442, 31413,
+ 31385, 31356, 31326, 31297, 31267,
+ 31236, 31206, 31175, 31144, 31113,
+ 31081, 31049, 31017, 30984, 30951,
+ 30918, 30885, 30851, 30817, 30783,
+ 30748, 30713, 30678, 30643, 30607,
+ 30571, 30535, 30498, 30461, 30424,
+ 30386, 30349, 30311, 30272, 30234,
+ 30195, 30156, 30116, 30076, 30036,
+ 29996, 29955, 29915, 29873, 29832,
+ 29790, 29748, 29706, 29663, 29621,
+ 29577, 29534, 29490, 29446, 29402,
+ 29358, 29313, 29268, 29222, 29177,
+ 29131, 29085, 29038, 28992, 28945,
+ 28897, 28850, 28802, 28754, 28706,
+ 28657, 28608, 28559, 28510, 28460,
+ 28410, 28360, 28309, 28259, 28208,
+ 28156, 28105, 28053, 28001, 27948,
+ 27896, 27843, 27790, 27736, 27683,
+ 27629, 27575, 27520, 27466, 27411,
+ 27355, 27300, 27244, 27188, 27132,
+ 27076, 27019, 26962, 26905, 26847,
+ 26789, 26731, 26673, 26615, 26556,
+ 26497, 26437, 26378, 26318, 26258,
+ 26198, 26137, 26077, 26016, 25954,
+ 25893, 25831, 25769, 25707, 25645,
+ 25582, 25519, 25456, 25392, 25329,
+ 25265, 25201, 25136, 25072, 25007,
+ 24942, 24877, 24811, 24745, 24679,
+ 24613, 24546, 24480, 24413, 24346,
+ 24278, 24211, 24143, 24075, 24006,
+ 23938, 23869, 23800, 23731, 23661,
+ 23592, 23522, 23452, 23382, 23311,
+ 23240, 23169, 23098, 23027, 22955,
+ 22883, 22811, 22739, 22666, 22594,
+ 22521, 22448, 22374, 22301, 22227,
+ 22153, 22079, 22004, 21930, 21855,
+ 21780, 21705, 21629, 21554, 21478,
+ 21402, 21326, 21249, 21173, 21096,
+ 21019, 20942, 20864, 20787, 20709,
+ 20631, 20553, 20474, 20396, 20317,
+ 20238, 20159, 20079, 20000, 19920,
+ 19840, 19760, 19680, 19599, 19519,
+ 19438, 19357, 19276, 19194, 19113,
+ 19031, 18949, 18867, 18785, 18702,
+ 18620, 18537, 18454, 18371, 18287,
+ 18204, 18120, 18036, 17952, 17868,
+ 17784, 17699, 17615, 17530, 17445,
+ 17360, 17274, 17189, 17103, 17017,
+ 16931, 16845, 16759, 16672, 16586,
+ 16499, 16412, 16325, 16238, 16150,
+ 16063, 15975, 15887, 15799, 15711,
+ 15623, 15534, 15446, 15357, 15268,
+ 15179, 15090, 15001, 14911, 14822,
+ 14732, 14642, 14552, 14462, 14372,
+ 14281, 14191, 14100, 14009, 13918,
+ 13827, 13736, 13645, 13553, 13462,
+ 13370, 13278, 13186, 13094, 13002,
+ 12909, 12817, 12724, 12632, 12539,
+ 12446, 12353, 12260, 12166, 12073,
+ 11980, 11886, 11792, 11698, 11604,
+ 11510, 11416, 11322, 11227, 11133,
+ 11038, 10944, 10849, 10754, 10659,
+ 10564, 10469, 10373, 10278, 10182,
+ 10087, 9991, 9895, 9799, 9703,
+ 9607, 9511, 9415, 9319, 9222,
+ 9126, 9029, 8932, 8836, 8739,
+ 8642, 8545, 8448, 8351, 8253,
+ 8156, 8059, 7961, 7864, 7766,
+ 7668, 7571, 7473, 7375, 7277,
+ 7179, 7081, 6982, 6884, 6786,
+ 6688, 6589, 6491, 6392, 6293,
+ 6195, 6096, 5997, 5898, 5799,
+ 5700, 5601, 5502, 5403, 5304,
+ 5205, 5106, 5006, 4907, 4807,
+ 4708, 4608, 4509, 4409, 4310,
+ 4210, 4110, 4011, 3911, 3811,
+ 3711, 3611, 3511, 3411, 3311,
+ 3211, 3111, 3011, 2911, 2811,
+ 2711, 2610, 2510, 2410, 2310,
+ 2209, 2109, 2009, 1908, 1808,
+ 1708, 1607, 1507, 1406, 1306,
+ 1206, 1105, 1005, 904, 804,
+ 703, 603, 502, 402, 301,
+ 201, 100
+ };
+
+const Word16 sin_scale_tbl_1200[1200] = { /* Q15 */
+ 0, 42, 85, 128, 171, 214, 257, 300,
+ 343, 386, 428, 471, 514, 557, 600, 643,
+ 686, 729, 771, 814, 857, 900, 943, 986,
+ 1029, 1072, 1114, 1157, 1200, 1243, 1286, 1329,
+ 1372, 1414, 1457, 1500, 1543, 1586, 1629, 1672,
+ 1714, 1757, 1800, 1843, 1886, 1929, 1971, 2014,
+ 2057, 2100, 2143, 2185, 2228, 2271, 2314, 2357,
+ 2399, 2442, 2485, 2528, 2570, 2613, 2656, 2699,
+ 2741, 2784, 2827, 2870, 2912, 2955, 2998, 3040,
+ 3083, 3126, 3169, 3211, 3254, 3297, 3339, 3382,
+ 3425, 3467, 3510, 3553, 3595, 3638, 3680, 3723,
+ 3766, 3808, 3851, 3893, 3936, 3979, 4021, 4064,
+ 4106, 4149, 4191, 4234, 4276, 4319, 4361, 4404,
+ 4446, 4489, 4531, 4574, 4616, 4659, 4701, 4744,
+ 4786, 4829, 4871, 4913, 4956, 4998, 5041, 5083,
+ 5125, 5168, 5210, 5252, 5295, 5337, 5379, 5422,
+ 5464, 5506, 5549, 5591, 5633, 5675, 5718, 5760,
+ 5802, 5844, 5886, 5929, 5971, 6013, 6055, 6097,
+ 6139, 6182, 6224, 6266, 6308, 6350, 6392, 6434,
+ 6476, 6518, 6560, 6602, 6644, 6686, 6728, 6770,
+ 6812, 6854, 6896, 6938, 6980, 7022, 7064, 7106,
+ 7147, 7189, 7231, 7273, 7315, 7357, 7398, 7440,
+ 7482, 7524, 7565, 7607, 7649, 7691, 7732, 7774,
+ 7816, 7857, 7899, 7940, 7982, 8024, 8065, 8107,
+ 8148, 8190, 8231, 8273, 8314, 8356, 8397, 8439,
+ 8480, 8522, 8563, 8604, 8646, 8687, 8729, 8770,
+ 8811, 8853, 8894, 8935, 8976, 9018, 9059, 9100,
+ 9141, 9182, 9224, 9265, 9306, 9347, 9388, 9429,
+ 9470, 9511, 9552, 9593, 9634, 9675, 9716, 9757,
+ 9798, 9839, 9880, 9921, 9962, 10003, 10043, 10084,
+ 10125, 10166, 10207, 10247, 10288, 10329, 10370, 10410,
+ 10451, 10491, 10532, 10573, 10613, 10654, 10694, 10735,
+ 10775, 10816, 10856, 10897, 10937, 10978, 11018, 11059,
+ 11099, 11139, 11180, 11220, 11260, 11300, 11341, 11381,
+ 11421, 11461, 11502, 11542, 11582, 11622, 11662, 11702,
+ 11742, 11782, 11822, 11862, 11902, 11942, 11982, 12022,
+ 12062, 12102, 12142, 12181, 12221, 12261, 12301, 12340,
+ 12380, 12420, 12460, 12499, 12539, 12579, 12618, 12658,
+ 12697, 12737, 12776, 12816, 12855, 12895, 12934, 12973,
+ 13013, 13052, 13092, 13131, 13170, 13209, 13249, 13288,
+ 13327, 13366, 13405, 13444, 13484, 13523, 13562, 13601,
+ 13640, 13679, 13718, 13757, 13796, 13834, 13873, 13912,
+ 13951, 13990, 14029, 14067, 14106, 14145, 14183, 14222,
+ 14261, 14299, 14338, 14376, 14415, 14453, 14492, 14530,
+ 14569, 14607, 14646, 14684, 14722, 14761, 14799, 14837,
+ 14875, 14914, 14952, 14990, 15028, 15066, 15104, 15142,
+ 15180, 15218, 15256, 15294, 15332, 15370, 15408, 15446,
+ 15484, 15521, 15559, 15597, 15635, 15672, 15710, 15748,
+ 15785, 15823, 15860, 15898, 15935, 15973, 16010, 16048,
+ 16085, 16122, 16160, 16197, 16234, 16271, 16309, 16346,
+ 16383, 16420, 16457, 16494, 16531, 16568, 16605, 16642,
+ 16679, 16716, 16753, 16790, 16827, 16863, 16900, 16937,
+ 16974, 17010, 17047, 17084, 17120, 17157, 17193, 17230,
+ 17266, 17303, 17339, 17375, 17412, 17448, 17484, 17521,
+ 17557, 17593, 17629, 17665, 17702, 17738, 17774, 17810,
+ 17846, 17882, 17918, 17953, 17989, 18025, 18061, 18097,
+ 18132, 18168, 18204, 18240, 18275, 18311, 18346, 18382,
+ 18417, 18453, 18488, 18524, 18559, 18594, 18630, 18665,
+ 18700, 18735, 18770, 18806, 18841, 18876, 18911, 18946,
+ 18981, 19016, 19051, 19086, 19120, 19155, 19190, 19225,
+ 19259, 19294, 19329, 19363, 19398, 19433, 19467, 19502,
+ 19536, 19570, 19605, 19639, 19673, 19708, 19742, 19776,
+ 19810, 19845, 19879, 19913, 19947, 19981, 20015, 20049,
+ 20083, 20117, 20150, 20184, 20218, 20252, 20285, 20319,
+ 20353, 20386, 20420, 20453, 20487, 20520, 20554, 20587,
+ 20620, 20654, 20687, 20720, 20753, 20787, 20820, 20853,
+ 20886, 20919, 20952, 20985, 21018, 21051, 21084, 21116,
+ 21149, 21182, 21215, 21247, 21280, 21313, 21345, 21378,
+ 21410, 21443, 21475, 21507, 21540, 21572, 21604, 21637,
+ 21669, 21701, 21733, 21765, 21797, 21829, 21861, 21893,
+ 21925, 21957, 21989, 22020, 22052, 22084, 22115, 22147,
+ 22179, 22210, 22242, 22273, 22305, 22336, 22367, 22399,
+ 22430, 22461, 22493, 22524, 22555, 22586, 22617, 22648,
+ 22679, 22710, 22741, 22772, 22802, 22833, 22864, 22895,
+ 22925, 22956, 22987, 23017, 23048, 23078, 23109, 23139,
+ 23169, 23200, 23230, 23260, 23290, 23320, 23351, 23381,
+ 23411, 23441, 23471, 23500, 23530, 23560, 23590, 23620,
+ 23649, 23679, 23709, 23738, 23768, 23797, 23827, 23856,
+ 23886, 23915, 23944, 23974, 24003, 24032, 24061, 24090,
+ 24119, 24148, 24177, 24206, 24235, 24264, 24293, 24321,
+ 24350, 24379, 24407, 24436, 24465, 24493, 24522, 24550,
+ 24578, 24607, 24635, 24663, 24692, 24720, 24748, 24776,
+ 24804, 24832, 24860, 24888, 24916, 24944, 24971, 24999,
+ 25027, 25054, 25082, 25110, 25137, 25165, 25192, 25220,
+ 25247, 25274, 25302, 25329, 25356, 25383, 25410, 25437,
+ 25464, 25491, 25518, 25545, 25572, 25599, 25625, 25652,
+ 25679, 25705, 25732, 25759, 25785, 25811, 25838, 25864,
+ 25891, 25917, 25943, 25969, 25995, 26021, 26047, 26073,
+ 26099, 26125, 26151, 26177, 26203, 26228, 26254, 26280,
+ 26305, 26331, 26356, 26382, 26407, 26433, 26458, 26483,
+ 26509, 26534, 26559, 26584, 26609, 26634, 26659, 26684,
+ 26709, 26734, 26758, 26783, 26808, 26832, 26857, 26882,
+ 26906, 26931, 26955, 26979, 27004, 27028, 27052, 27076,
+ 27100, 27125, 27149, 27173, 27197, 27220, 27244, 27268,
+ 27292, 27316, 27339, 27363, 27386, 27410, 27433, 27457,
+ 27480, 27504, 27527, 27550, 27573, 27596, 27620, 27643,
+ 27666, 27689, 27711, 27734, 27757, 27780, 27803, 27825,
+ 27848, 27871, 27893, 27916, 27938, 27960, 27983, 28005,
+ 28027, 28049, 28072, 28094, 28116, 28138, 28160, 28182,
+ 28203, 28225, 28247, 28269, 28290, 28312, 28334, 28355,
+ 28377, 28398, 28419, 28441, 28462, 28483, 28504, 28525,
+ 28547, 28568, 28589, 28610, 28630, 28651, 28672, 28693,
+ 28713, 28734, 28755, 28775, 28796, 28816, 28837, 28857,
+ 28877, 28897, 28918, 28938, 28958, 28978, 28998, 29018,
+ 29038, 29058, 29077, 29097, 29117, 29136, 29156, 29176,
+ 29195, 29215, 29234, 29253, 29273, 29292, 29311, 29330,
+ 29349, 29368, 29387, 29406, 29425, 29444, 29463, 29482,
+ 29500, 29519, 29537, 29556, 29575, 29593, 29611, 29630,
+ 29648, 29666, 29684, 29703, 29721, 29739, 29757, 29775,
+ 29792, 29810, 29828, 29846, 29863, 29881, 29899, 29916,
+ 29934, 29951, 29968, 29986, 30003, 30020, 30037, 30055,
+ 30072, 30089, 30106, 30122, 30139, 30156, 30173, 30190,
+ 30206, 30223, 30239, 30256, 30272, 30289, 30305, 30321,
+ 30338, 30354, 30370, 30386, 30402, 30418, 30434, 30450,
+ 30465, 30481, 30497, 30513, 30528, 30544, 30559, 30575,
+ 30590, 30605, 30621, 30636, 30651, 30666, 30681, 30696,
+ 30711, 30726, 30741, 30756, 30771, 30786, 30800, 30815,
+ 30829, 30844, 30858, 30873, 30887, 30901, 30916, 30930,
+ 30944, 30958, 30972, 30986, 31000, 31014, 31028, 31041,
+ 31055, 31069, 31082, 31096, 31109, 31123, 31136, 31149,
+ 31163, 31176, 31189, 31202, 31215, 31228, 31241, 31254,
+ 31267, 31280, 31293, 31305, 31318, 31331, 31343, 31356,
+ 31368, 31380, 31393, 31405, 31417, 31429, 31441, 31453,
+ 31465, 31477, 31489, 31501, 31513, 31525, 31536, 31548,
+ 31559, 31571, 31582, 31594, 31605, 31616, 31628, 31639,
+ 31650, 31661, 31672, 31683, 31694, 31705, 31716, 31726,
+ 31737, 31748, 31758, 31769, 31779, 31790, 31800, 31810,
+ 31821, 31831, 31841, 31851, 31861, 31871, 31881, 31891,
+ 31901, 31911, 31920, 31930, 31940, 31949, 31959, 31968,
+ 31977, 31987, 31996, 32005, 32014, 32023, 32033, 32042,
+ 32050, 32059, 32068, 32077, 32086, 32094, 32103, 32112,
+ 32120, 32128, 32137, 32145, 32154, 32162, 32170, 32178,
+ 32186, 32194, 32202, 32210, 32218, 32226, 32233, 32241,
+ 32249, 32256, 32264, 32271, 32279, 32286, 32293, 32300,
+ 32308, 32315, 32322, 32329, 32336, 32343, 32350, 32356,
+ 32363, 32370, 32376, 32383, 32389, 32396, 32402, 32409,
+ 32415, 32421, 32427, 32434, 32440, 32446, 32452, 32457,
+ 32463, 32469, 32475, 32481, 32486, 32492, 32497, 32503,
+ 32508, 32513, 32519, 32524, 32529, 32534, 32539, 32544,
+ 32549, 32554, 32559, 32564, 32569, 32573, 32578, 32582,
+ 32587, 32591, 32596, 32600, 32604, 32609, 32613, 32617,
+ 32621, 32625, 32629, 32633, 32637, 32641, 32644, 32648,
+ 32652, 32655, 32659, 32662, 32665, 32669, 32672, 32675,
+ 32679, 32682, 32685, 32688, 32691, 32694, 32696, 32699,
+ 32702, 32705, 32707, 32710, 32712, 32715, 32717, 32719,
+ 32722, 32724, 32726, 32728, 32730, 32732, 32734, 32736,
+ 32738, 32740, 32741, 32743, 32744, 32746, 32748, 32749,
+ 32750, 32752, 32753, 32754, 32755, 32756, 32757, 32758,
+ 32759, 32760, 32761, 32762, 32762, 32763, 32764, 32764,
+ 32765, 32765, 32765, 32766, 32766, 32766, 32766, 32766
+};
+
+const Word16 cos_scale_tbl_1200[1200] = { /* Q15 */
+ 0, 42, 85, 128, 171, 214, 257, 300,
+ 343, 386, 428, 471, 514, 557, 600, 643,
+ 686, 729, 771, 814, 857, 900, 943, 986,
+ 1029, 1072, 1114, 1157, 1200, 1243, 1286, 1329,
+ 1372, 1414, 1457, 1500, 1543, 1586, 1629, 1672,
+ 1714, 1757, 1800, 1843, 1886, 1929, 1971, 2014,
+ 2057, 2100, 2143, 2185, 2228, 2271, 2314, 2357,
+ 2399, 2442, 2485, 2528, 2570, 2613, 2656, 2699,
+ 2741, 2784, 2827, 2870, 2912, 2955, 2998, 3040,
+ 3083, 3126, 3169, 3211, 3254, 3297, 3339, 3382,
+ 3425, 3467, 3510, 3553, 3595, 3638, 3680, 3723,
+ 3766, 3808, 3851, 3893, 3936, 3979, 4021, 4064,
+ 4106, 4149, 4191, 4234, 4276, 4319, 4361, 4404,
+ 4446, 4489, 4531, 4574, 4616, 4659, 4701, 4744,
+ 4786, 4829, 4871, 4913, 4956, 4998, 5041, 5083,
+ 5125, 5168, 5210, 5252, 5295, 5337, 5379, 5422,
+ 5464, 5506, 5549, 5591, 5633, 5675, 5718, 5760,
+ 5802, 5844, 5886, 5929, 5971, 6013, 6055, 6097,
+ 6139, 6182, 6224, 6266, 6308, 6350, 6392, 6434,
+ 6476, 6518, 6560, 6602, 6644, 6686, 6728, 6770,
+ 6812, 6854, 6896, 6938, 6980, 7022, 7064, 7106,
+ 7147, 7189, 7231, 7273, 7315, 7357, 7398, 7440,
+ 7482, 7524, 7565, 7607, 7649, 7691, 7732, 7774,
+ 7816, 7857, 7899, 7940, 7982, 8024, 8065, 8107,
+ 8148, 8190, 8231, 8273, 8314, 8356, 8397, 8439,
+ 8480, 8522, 8563, 8604, 8646, 8687, 8729, 8770,
+ 8811, 8853, 8894, 8935, 8976, 9018, 9059, 9100,
+ 9141, 9182, 9224, 9265, 9306, 9347, 9388, 9429,
+ 9470, 9511, 9552, 9593, 9634, 9675, 9716, 9757,
+ 9798, 9839, 9880, 9921, 9962, 10003, 10043, 10084,
+ 10125, 10166, 10207, 10247, 10288, 10329, 10370, 10410,
+ 10451, 10491, 10532, 10573, 10613, 10654, 10694, 10735,
+ 10775, 10816, 10856, 10897, 10937, 10978, 11018, 11059,
+ 11099, 11139, 11180, 11220, 11260, 11300, 11341, 11381,
+ 11421, 11461, 11502, 11542, 11582, 11622, 11662, 11702,
+ 11742, 11782, 11822, 11862, 11902, 11942, 11982, 12022,
+ 12062, 12102, 12142, 12181, 12221, 12261, 12301, 12340,
+ 12380, 12420, 12460, 12499, 12539, 12579, 12618, 12658,
+ 12697, 12737, 12776, 12816, 12855, 12895, 12934, 12973,
+ 13013, 13052, 13092, 13131, 13170, 13209, 13249, 13288,
+ 13327, 13366, 13405, 13444, 13484, 13523, 13562, 13601,
+ 13640, 13679, 13718, 13757, 13796, 13834, 13873, 13912,
+ 13951, 13990, 14029, 14067, 14106, 14145, 14183, 14222,
+ 14261, 14299, 14338, 14376, 14415, 14453, 14492, 14530,
+ 14569, 14607, 14646, 14684, 14722, 14761, 14799, 14837,
+ 14875, 14914, 14952, 14990, 15028, 15066, 15104, 15142,
+ 15180, 15218, 15256, 15294, 15332, 15370, 15408, 15446,
+ 15484, 15521, 15559, 15597, 15635, 15672, 15710, 15748,
+ 15785, 15823, 15860, 15898, 15935, 15973, 16010, 16048,
+ 16085, 16122, 16160, 16197, 16234, 16271, 16309, 16346,
+ 16383, 16420, 16457, 16494, 16531, 16568, 16605, 16642,
+ 16679, 16716, 16753, 16790, 16827, 16863, 16900, 16937,
+ 16974, 17010, 17047, 17084, 17120, 17157, 17193, 17230,
+ 17266, 17303, 17339, 17375, 17412, 17448, 17484, 17521,
+ 17557, 17593, 17629, 17665, 17702, 17738, 17774, 17810,
+ 17846, 17882, 17918, 17953, 17989, 18025, 18061, 18097,
+ 18132, 18168, 18204, 18240, 18275, 18311, 18346, 18382,
+ 18417, 18453, 18488, 18524, 18559, 18594, 18630, 18665,
+ 18700, 18735, 18770, 18806, 18841, 18876, 18911, 18946,
+ 18981, 19016, 19051, 19086, 19120, 19155, 19190, 19225,
+ 19259, 19294, 19329, 19363, 19398, 19433, 19467, 19502,
+ 19536, 19570, 19605, 19639, 19673, 19708, 19742, 19776,
+ 19810, 19845, 19879, 19913, 19947, 19981, 20015, 20049,
+ 20083, 20117, 20150, 20184, 20218, 20252, 20285, 20319,
+ 20353, 20386, 20420, 20453, 20487, 20520, 20554, 20587,
+ 20620, 20654, 20687, 20720, 20753, 20787, 20820, 20853,
+ 20886, 20919, 20952, 20985, 21018, 21051, 21084, 21116,
+ 21149, 21182, 21215, 21247, 21280, 21313, 21345, 21378,
+ 21410, 21443, 21475, 21507, 21540, 21572, 21604, 21637,
+ 21669, 21701, 21733, 21765, 21797, 21829, 21861, 21893,
+ 21925, 21957, 21989, 22020, 22052, 22084, 22115, 22147,
+ 22179, 22210, 22242, 22273, 22305, 22336, 22367, 22399,
+ 22430, 22461, 22493, 22524, 22555, 22586, 22617, 22648,
+ 22679, 22710, 22741, 22772, 22802, 22833, 22864, 22895,
+ 22925, 22956, 22987, 23017, 23048, 23078, 23109, 23139,
+ 23169, 23200, 23230, 23260, 23290, 23320, 23351, 23381,
+ 23411, 23441, 23471, 23500, 23530, 23560, 23590, 23620,
+ 23649, 23679, 23709, 23738, 23768, 23797, 23827, 23856,
+ 23886, 23915, 23944, 23974, 24003, 24032, 24061, 24090,
+ 24119, 24148, 24177, 24206, 24235, 24264, 24293, 24321,
+ 24350, 24379, 24407, 24436, 24465, 24493, 24522, 24550,
+ 24578, 24607, 24635, 24663, 24692, 24720, 24748, 24776,
+ 24804, 24832, 24860, 24888, 24916, 24944, 24971, 24999,
+ 25027, 25054, 25082, 25110, 25137, 25165, 25192, 25220,
+ 25247, 25274, 25302, 25329, 25356, 25383, 25410, 25437,
+ 25464, 25491, 25518, 25545, 25572, 25599, 25625, 25652,
+ 25679, 25705, 25732, 25759, 25785, 25811, 25838, 25864,
+ 25891, 25917, 25943, 25969, 25995, 26021, 26047, 26073,
+ 26099, 26125, 26151, 26177, 26203, 26228, 26254, 26280,
+ 26305, 26331, 26356, 26382, 26407, 26433, 26458, 26483,
+ 26509, 26534, 26559, 26584, 26609, 26634, 26659, 26684,
+ 26709, 26734, 26758, 26783, 26808, 26832, 26857, 26882,
+ 26906, 26931, 26955, 26979, 27004, 27028, 27052, 27076,
+ 27100, 27125, 27149, 27173, 27197, 27220, 27244, 27268,
+ 27292, 27316, 27339, 27363, 27386, 27410, 27433, 27457,
+ 27480, 27504, 27527, 27550, 27573, 27596, 27620, 27643,
+ 27666, 27689, 27711, 27734, 27757, 27780, 27803, 27825,
+ 27848, 27871, 27893, 27916, 27938, 27960, 27983, 28005,
+ 28027, 28049, 28072, 28094, 28116, 28138, 28160, 28182,
+ 28203, 28225, 28247, 28269, 28290, 28312, 28334, 28355,
+ 28377, 28398, 28419, 28441, 28462, 28483, 28504, 28525,
+ 28547, 28568, 28589, 28610, 28630, 28651, 28672, 28693,
+ 28713, 28734, 28755, 28775, 28796, 28816, 28837, 28857,
+ 28877, 28897, 28918, 28938, 28958, 28978, 28998, 29018,
+ 29038, 29058, 29077, 29097, 29117, 29136, 29156, 29176,
+ 29195, 29215, 29234, 29253, 29273, 29292, 29311, 29330,
+ 29349, 29368, 29387, 29406, 29425, 29444, 29463, 29482,
+ 29500, 29519, 29537, 29556, 29575, 29593, 29611, 29630,
+ 29648, 29666, 29684, 29703, 29721, 29739, 29757, 29775,
+ 29792, 29810, 29828, 29846, 29863, 29881, 29899, 29916,
+ 29934, 29951, 29968, 29986, 30003, 30020, 30037, 30055,
+ 30072, 30089, 30106, 30122, 30139, 30156, 30173, 30190,
+ 30206, 30223, 30239, 30256, 30272, 30289, 30305, 30321,
+ 30338, 30354, 30370, 30386, 30402, 30418, 30434, 30450,
+ 30465, 30481, 30497, 30513, 30528, 30544, 30559, 30575,
+ 30590, 30605, 30621, 30636, 30651, 30666, 30681, 30696,
+ 30711, 30726, 30741, 30756, 30771, 30786, 30800, 30815,
+ 30829, 30844, 30858, 30873, 30887, 30901, 30916, 30930,
+ 30944, 30958, 30972, 30986, 31000, 31014, 31028, 31041,
+ 31055, 31069, 31082, 31096, 31109, 31123, 31136, 31149,
+ 31163, 31176, 31189, 31202, 31215, 31228, 31241, 31254,
+ 31267, 31280, 31293, 31305, 31318, 31331, 31343, 31356,
+ 31368, 31380, 31393, 31405, 31417, 31429, 31441, 31453,
+ 31465, 31477, 31489, 31501, 31513, 31525, 31536, 31548,
+ 31559, 31571, 31582, 31594, 31605, 31616, 31628, 31639,
+ 31650, 31661, 31672, 31683, 31694, 31705, 31716, 31726,
+ 31737, 31748, 31758, 31769, 31779, 31790, 31800, 31810,
+ 31821, 31831, 31841, 31851, 31861, 31871, 31881, 31891,
+ 31901, 31911, 31920, 31930, 31940, 31949, 31959, 31968,
+ 31977, 31987, 31996, 32005, 32014, 32023, 32033, 32042,
+ 32050, 32059, 32068, 32077, 32086, 32094, 32103, 32112,
+ 32120, 32128, 32137, 32145, 32154, 32162, 32170, 32178,
+ 32186, 32194, 32202, 32210, 32218, 32226, 32233, 32241,
+ 32249, 32256, 32264, 32271, 32279, 32286, 32293, 32300,
+ 32308, 32315, 32322, 32329, 32336, 32343, 32350, 32356,
+ 32363, 32370, 32376, 32383, 32389, 32396, 32402, 32409,
+ 32415, 32421, 32427, 32434, 32440, 32446, 32452, 32457,
+ 32463, 32469, 32475, 32481, 32486, 32492, 32497, 32503,
+ 32508, 32513, 32519, 32524, 32529, 32534, 32539, 32544,
+ 32549, 32554, 32559, 32564, 32569, 32573, 32578, 32582,
+ 32587, 32591, 32596, 32600, 32604, 32609, 32613, 32617,
+ 32621, 32625, 32629, 32633, 32637, 32641, 32644, 32648,
+ 32652, 32655, 32659, 32662, 32665, 32669, 32672, 32675,
+ 32679, 32682, 32685, 32688, 32691, 32694, 32696, 32699,
+ 32702, 32705, 32707, 32710, 32712, 32715, 32717, 32719,
+ 32722, 32724, 32726, 32728, 32730, 32732, 32734, 32736,
+ 32738, 32740, 32741, 32743, 32744, 32746, 32748, 32749,
+ 32750, 32752, 32753, 32754, 32755, 32756, 32757, 32758,
+ 32759, 32760, 32761, 32762, 32762, 32763, 32764, 32764,
+ 32765, 32765, 32765, 32766, 32766, 32766, 32766, 32766
+};
+
+const Word16 sin_scale_tbl_800[800] = { /* Q15 */
+ 0, 64, 128, 193, 257, 321, 386, 450,
+ 514, 579, 643, 707, 771, 836, 900, 964,
+ 1029, 1093, 1157, 1222, 1286, 1350, 1414, 1479,
+ 1543, 1607, 1672, 1736, 1800, 1864, 1929, 1993,
+ 2057, 2121, 2185, 2250, 2314, 2378, 2442, 2506,
+ 2570, 2635, 2699, 2763, 2827, 2891, 2955, 3019,
+ 3083, 3147, 3211, 3275, 3339, 3403, 3467, 3531,
+ 3595, 3659, 3723, 3787, 3851, 3915, 3979, 4042,
+ 4106, 4170, 4234, 4298, 4361, 4425, 4489, 4553,
+ 4616, 4680, 4744, 4807, 4871, 4935, 4998, 5062,
+ 5125, 5189, 5252, 5316, 5379, 5443, 5506, 5570,
+ 5633, 5696, 5760, 5823, 5886, 5950, 6013, 6076,
+ 6139, 6203, 6266, 6329, 6392, 6455, 6518, 6581,
+ 6644, 6707, 6770, 6833, 6896, 6959, 7022, 7085,
+ 7147, 7210, 7273, 7336, 7398, 7461, 7524, 7586,
+ 7649, 7711, 7774, 7836, 7899, 7961, 8024, 8086,
+ 8148, 8211, 8273, 8335, 8397, 8460, 8522, 8584,
+ 8646, 8708, 8770, 8832, 8894, 8956, 9018, 9079,
+ 9141, 9203, 9265, 9326, 9388, 9450, 9511, 9573,
+ 9634, 9696, 9757, 9819, 9880, 9941, 10003, 10064,
+ 10125, 10186, 10247, 10308, 10370, 10431, 10491, 10552,
+ 10613, 10674, 10735, 10796, 10856, 10917, 10978, 11038,
+ 11099, 11159, 11220, 11280, 11341, 11401, 11461, 11522,
+ 11582, 11642, 11702, 11762, 11822, 11882, 11942, 12002,
+ 12062, 12122, 12181, 12241, 12301, 12360, 12420, 12479,
+ 12539, 12598, 12658, 12717, 12776, 12835, 12895, 12954,
+ 13013, 13072, 13131, 13190, 13249, 13307, 13366, 13425,
+ 13484, 13542, 13601, 13659, 13718, 13776, 13834, 13893,
+ 13951, 14009, 14067, 14125, 14183, 14241, 14299, 14357,
+ 14415, 14473, 14530, 14588, 14646, 14703, 14761, 14818,
+ 14875, 14933, 14990, 15047, 15104, 15161, 15218, 15275,
+ 15332, 15389, 15446, 15502, 15559, 15616, 15672, 15729,
+ 15785, 15841, 15898, 15954, 16010, 16066, 16122, 16178,
+ 16234, 16290, 16346, 16402, 16457, 16513, 16568, 16624,
+ 16679, 16735, 16790, 16845, 16900, 16955, 17010, 17065,
+ 17120, 17175, 17230, 17284, 17339, 17394, 17448, 17503,
+ 17557, 17611, 17665, 17720, 17774, 17828, 17882, 17936,
+ 17989, 18043, 18097, 18150, 18204, 18257, 18311, 18364,
+ 18417, 18470, 18524, 18577, 18630, 18682, 18735, 18788,
+ 18841, 18893, 18946, 18998, 19051, 19103, 19155, 19207,
+ 19259, 19311, 19363, 19415, 19467, 19519, 19570, 19622,
+ 19673, 19725, 19776, 19827, 19879, 19930, 19981, 20032,
+ 20083, 20133, 20184, 20235, 20285, 20336, 20386, 20437,
+ 20487, 20537, 20587, 20637, 20687, 20737, 20787, 20836,
+ 20886, 20936, 20985, 21034, 21084, 21133, 21182, 21231,
+ 21280, 21329, 21378, 21426, 21475, 21524, 21572, 21620,
+ 21669, 21717, 21765, 21813, 21861, 21909, 21957, 22004,
+ 22052, 22100, 22147, 22194, 22242, 22289, 22336, 22383,
+ 22430, 22477, 22524, 22570, 22617, 22663, 22710, 22756,
+ 22802, 22849, 22895, 22941, 22987, 23032, 23078, 23124,
+ 23169, 23215, 23260, 23305, 23351, 23396, 23441, 23486,
+ 23530, 23575, 23620, 23664, 23709, 23753, 23797, 23842,
+ 23886, 23930, 23974, 24017, 24061, 24105, 24148, 24192,
+ 24235, 24278, 24321, 24364, 24407, 24450, 24493, 24536,
+ 24578, 24621, 24663, 24706, 24748, 24790, 24832, 24874,
+ 24916, 24957, 24999, 25041, 25082, 25123, 25165, 25206,
+ 25247, 25288, 25329, 25370, 25410, 25451, 25491, 25532,
+ 25572, 25612, 25652, 25692, 25732, 25772, 25811, 25851,
+ 25891, 25930, 25969, 26008, 26047, 26086, 26125, 26164,
+ 26203, 26241, 26280, 26318, 26356, 26395, 26433, 26471,
+ 26509, 26546, 26584, 26622, 26659, 26696, 26734, 26771,
+ 26808, 26845, 26882, 26918, 26955, 26991, 27028, 27064,
+ 27100, 27137, 27173, 27208, 27244, 27280, 27316, 27351,
+ 27386, 27422, 27457, 27492, 27527, 27562, 27596, 27631,
+ 27666, 27700, 27734, 27769, 27803, 27837, 27871, 27904,
+ 27938, 27972, 28005, 28038, 28072, 28105, 28138, 28171,
+ 28203, 28236, 28269, 28301, 28334, 28366, 28398, 28430,
+ 28462, 28494, 28525, 28557, 28589, 28620, 28651, 28682,
+ 28713, 28744, 28775, 28806, 28837, 28867, 28897, 28928,
+ 28958, 28988, 29018, 29048, 29077, 29107, 29136, 29166,
+ 29195, 29224, 29253, 29282, 29311, 29340, 29368, 29397,
+ 29425, 29453, 29482, 29510, 29537, 29565, 29593, 29621,
+ 29648, 29675, 29703, 29730, 29757, 29784, 29810, 29837,
+ 29863, 29890, 29916, 29942, 29968, 29994, 30020, 30046,
+ 30072, 30097, 30122, 30148, 30173, 30198, 30223, 30248,
+ 30272, 30297, 30321, 30346, 30370, 30394, 30418, 30442,
+ 30465, 30489, 30513, 30536, 30559, 30582, 30605, 30628,
+ 30651, 30674, 30696, 30719, 30741, 30763, 30786, 30807,
+ 30829, 30851, 30873, 30894, 30916, 30937, 30958, 30979,
+ 31000, 31021, 31041, 31062, 31082, 31103, 31123, 31143,
+ 31163, 31183, 31202, 31222, 31241, 31261, 31280, 31299,
+ 31318, 31337, 31356, 31374, 31393, 31411, 31429, 31447,
+ 31465, 31483, 31501, 31519, 31536, 31554, 31571, 31588,
+ 31605, 31622, 31639, 31656, 31672, 31689, 31705, 31721,
+ 31737, 31753, 31769, 31785, 31800, 31816, 31831, 31846,
+ 31861, 31876, 31891, 31906, 31920, 31935, 31949, 31963,
+ 31977, 31991, 32005, 32019, 32033, 32046, 32059, 32073,
+ 32086, 32099, 32112, 32124, 32137, 32149, 32162, 32174,
+ 32186, 32198, 32210, 32222, 32233, 32245, 32256, 32267,
+ 32279, 32290, 32300, 32311, 32322, 32332, 32343, 32353,
+ 32363, 32373, 32383, 32393, 32402, 32412, 32421, 32430,
+ 32440, 32449, 32457, 32466, 32475, 32483, 32492, 32500,
+ 32508, 32516, 32524, 32532, 32539, 32547, 32554, 32561,
+ 32569, 32576, 32582, 32589, 32596, 32602, 32609, 32615,
+ 32621, 32627, 32633, 32639, 32644, 32650, 32655, 32660,
+ 32665, 32670, 32675, 32680, 32685, 32689, 32694, 32698,
+ 32702, 32706, 32710, 32713, 32717, 32720, 32724, 32727,
+ 32730, 32733, 32736, 32739, 32741, 32744, 32746, 32748,
+ 32750, 32752, 32754, 32756, 32757, 32759, 32760, 32761,
+ 32762, 32763, 32764, 32765, 32765, 32766, 32766, 32766
+};
+
+const Word16 cos_scale_tbl_800[800] = { /* Q15 */
+ 0, 64, 128, 193, 257, 321, 386, 450,
+ 514, 579, 643, 707, 771, 836, 900, 964,
+ 1029, 1093, 1157, 1222, 1286, 1350, 1414, 1479,
+ 1543, 1607, 1672, 1736, 1800, 1864, 1929, 1993,
+ 2057, 2121, 2185, 2250, 2314, 2378, 2442, 2506,
+ 2570, 2635, 2699, 2763, 2827, 2891, 2955, 3019,
+ 3083, 3147, 3211, 3275, 3339, 3403, 3467, 3531,
+ 3595, 3659, 3723, 3787, 3851, 3915, 3979, 4042,
+ 4106, 4170, 4234, 4298, 4361, 4425, 4489, 4553,
+ 4616, 4680, 4744, 4807, 4871, 4935, 4998, 5062,
+ 5125, 5189, 5252, 5316, 5379, 5443, 5506, 5570,
+ 5633, 5696, 5760, 5823, 5886, 5950, 6013, 6076,
+ 6139, 6203, 6266, 6329, 6392, 6455, 6518, 6581,
+ 6644, 6707, 6770, 6833, 6896, 6959, 7022, 7085,
+ 7147, 7210, 7273, 7336, 7398, 7461, 7524, 7586,
+ 7649, 7711, 7774, 7836, 7899, 7961, 8024, 8086,
+ 8148, 8211, 8273, 8335, 8397, 8460, 8522, 8584,
+ 8646, 8708, 8770, 8832, 8894, 8956, 9018, 9079,
+ 9141, 9203, 9265, 9326, 9388, 9450, 9511, 9573,
+ 9634, 9696, 9757, 9819, 9880, 9941, 10003, 10064,
+ 10125, 10186, 10247, 10308, 10370, 10431, 10491, 10552,
+ 10613, 10674, 10735, 10796, 10856, 10917, 10978, 11038,
+ 11099, 11159, 11220, 11280, 11341, 11401, 11461, 11522,
+ 11582, 11642, 11702, 11762, 11822, 11882, 11942, 12002,
+ 12062, 12122, 12181, 12241, 12301, 12360, 12420, 12479,
+ 12539, 12598, 12658, 12717, 12776, 12835, 12895, 12954,
+ 13013, 13072, 13131, 13190, 13249, 13307, 13366, 13425,
+ 13484, 13542, 13601, 13659, 13718, 13776, 13834, 13893,
+ 13951, 14009, 14067, 14125, 14183, 14241, 14299, 14357,
+ 14415, 14473, 14530, 14588, 14646, 14703, 14761, 14818,
+ 14875, 14933, 14990, 15047, 15104, 15161, 15218, 15275,
+ 15332, 15389, 15446, 15502, 15559, 15616, 15672, 15729,
+ 15785, 15841, 15898, 15954, 16010, 16066, 16122, 16178,
+ 16234, 16290, 16346, 16402, 16457, 16513, 16568, 16624,
+ 16679, 16735, 16790, 16845, 16900, 16955, 17010, 17065,
+ 17120, 17175, 17230, 17284, 17339, 17394, 17448, 17503,
+ 17557, 17611, 17665, 17720, 17774, 17828, 17882, 17936,
+ 17989, 18043, 18097, 18150, 18204, 18257, 18311, 18364,
+ 18417, 18470, 18524, 18577, 18630, 18682, 18735, 18788,
+ 18841, 18893, 18946, 18998, 19051, 19103, 19155, 19207,
+ 19259, 19311, 19363, 19415, 19467, 19519, 19570, 19622,
+ 19673, 19725, 19776, 19827, 19879, 19930, 19981, 20032,
+ 20083, 20133, 20184, 20235, 20285, 20336, 20386, 20437,
+ 20487, 20537, 20587, 20637, 20687, 20737, 20787, 20836,
+ 20886, 20936, 20985, 21034, 21084, 21133, 21182, 21231,
+ 21280, 21329, 21378, 21426, 21475, 21524, 21572, 21620,
+ 21669, 21717, 21765, 21813, 21861, 21909, 21957, 22004,
+ 22052, 22100, 22147, 22194, 22242, 22289, 22336, 22383,
+ 22430, 22477, 22524, 22570, 22617, 22663, 22710, 22756,
+ 22802, 22849, 22895, 22941, 22987, 23032, 23078, 23124,
+ 23169, 23215, 23260, 23305, 23351, 23396, 23441, 23486,
+ 23530, 23575, 23620, 23664, 23709, 23753, 23797, 23842,
+ 23886, 23930, 23974, 24017, 24061, 24105, 24148, 24192,
+ 24235, 24278, 24321, 24364, 24407, 24450, 24493, 24536,
+ 24578, 24621, 24663, 24706, 24748, 24790, 24832, 24874,
+ 24916, 24957, 24999, 25041, 25082, 25123, 25165, 25206,
+ 25247, 25288, 25329, 25370, 25410, 25451, 25491, 25532,
+ 25572, 25612, 25652, 25692, 25732, 25772, 25811, 25851,
+ 25891, 25930, 25969, 26008, 26047, 26086, 26125, 26164,
+ 26203, 26241, 26280, 26318, 26356, 26395, 26433, 26471,
+ 26509, 26546, 26584, 26622, 26659, 26696, 26734, 26771,
+ 26808, 26845, 26882, 26918, 26955, 26991, 27028, 27064,
+ 27100, 27137, 27173, 27208, 27244, 27280, 27316, 27351,
+ 27386, 27422, 27457, 27492, 27527, 27562, 27596, 27631,
+ 27666, 27700, 27734, 27769, 27803, 27837, 27871, 27904,
+ 27938, 27972, 28005, 28038, 28072, 28105, 28138, 28171,
+ 28203, 28236, 28269, 28301, 28334, 28366, 28398, 28430,
+ 28462, 28494, 28525, 28557, 28589, 28620, 28651, 28682,
+ 28713, 28744, 28775, 28806, 28837, 28867, 28897, 28928,
+ 28958, 28988, 29018, 29048, 29077, 29107, 29136, 29166,
+ 29195, 29224, 29253, 29282, 29311, 29340, 29368, 29397,
+ 29425, 29453, 29482, 29510, 29537, 29565, 29593, 29621,
+ 29648, 29675, 29703, 29730, 29757, 29784, 29810, 29837,
+ 29863, 29890, 29916, 29942, 29968, 29994, 30020, 30046,
+ 30072, 30097, 30122, 30148, 30173, 30198, 30223, 30248,
+ 30272, 30297, 30321, 30346, 30370, 30394, 30418, 30442,
+ 30465, 30489, 30513, 30536, 30559, 30582, 30605, 30628,
+ 30651, 30674, 30696, 30719, 30741, 30763, 30786, 30807,
+ 30829, 30851, 30873, 30894, 30916, 30937, 30958, 30979,
+ 31000, 31021, 31041, 31062, 31082, 31103, 31123, 31143,
+ 31163, 31183, 31202, 31222, 31241, 31261, 31280, 31299,
+ 31318, 31337, 31356, 31374, 31393, 31411, 31429, 31447,
+ 31465, 31483, 31501, 31519, 31536, 31554, 31571, 31588,
+ 31605, 31622, 31639, 31656, 31672, 31689, 31705, 31721,
+ 31737, 31753, 31769, 31785, 31800, 31816, 31831, 31846,
+ 31861, 31876, 31891, 31906, 31920, 31935, 31949, 31963,
+ 31977, 31991, 32005, 32019, 32033, 32046, 32059, 32073,
+ 32086, 32099, 32112, 32124, 32137, 32149, 32162, 32174,
+ 32186, 32198, 32210, 32222, 32233, 32245, 32256, 32267,
+ 32279, 32290, 32300, 32311, 32322, 32332, 32343, 32353,
+ 32363, 32373, 32383, 32393, 32402, 32412, 32421, 32430,
+ 32440, 32449, 32457, 32466, 32475, 32483, 32492, 32500,
+ 32508, 32516, 32524, 32532, 32539, 32547, 32554, 32561,
+ 32569, 32576, 32582, 32589, 32596, 32602, 32609, 32615,
+ 32621, 32627, 32633, 32639, 32644, 32650, 32655, 32660,
+ 32665, 32670, 32675, 32680, 32685, 32689, 32694, 32698,
+ 32702, 32706, 32710, 32713, 32717, 32720, 32724, 32727,
+ 32730, 32733, 32736, 32739, 32741, 32744, 32746, 32748,
+ 32750, 32752, 32754, 32756, 32757, 32759, 32760, 32761,
+ 32762, 32763, 32764, 32765, 32765, 32766, 32766, 32766
+};
+
+const Word16 scales_ivas_fx[][MAX_NO_SCALES * 2] = /* 2 subvectors Q11*/
+ {
+ {
+ 3129,
+ 0,
+ 0,
+ 3137,
+ 0,
+ 0,
+ },
+ {
+ 3287,
+ 0,
+ 0,
+ 3137,
+ 0,
+ 0,
+ },
+ {
+ 2611,
+ 5033,
+ 0,
+ 3137,
+ 0,
+ 0,
+ },
+ {
+ 2611,
+ 5033,
+ 0,
+ 3340,
+ 0,
+ 0,
+ },
+ {
+ 2164,
+ 3674,
+ 5931,
+ 2363,
+ 3809,
+ 6281,
+ },
+ {
+ 1898,
+ 2985,
+ 4745,
+ 2115,
+ 3667,
+ 7045,
+ },
+ {
+ 2629,
+ 5480,
+ 0,
+ 2971,
+ 0,
+ 0,
+ },
+ {
+ 2801,
+ 0,
+ 0,
+ 2869,
+ 5072,
+ 0,
+ },
+ {
+ 1763,
+ 2545,
+ 3723,
+ 2514,
+ 4558,
+ 21108,
+ },
+ {
+ 2195,
+ 3960,
+ 7440,
+ 2500,
+ 6017,
+ 21960,
+ },
+ {
+ 1841,
+ 2902,
+ 1386,
+ 2115,
+ 3762,
+ 22308,
+ },
+ {
+ 1699,
+ 2709,
+ 1288,
+ 1865,
+ 3246,
+ 20660,
+ },
+ {
+ 3221,
+ 0,
+ 0,
+ 3391,
+ 0,
+ 0,
+ },
+ {
+ 2537,
+ 4923,
+ 0,
+ 3186,
+ 0,
+ 0,
+ },
+ {
+ 2816,
+ 4229,
+ 6397,
+ 3676,
+ 0,
+ 0,
+ },
+ {
+ 2816,
+ 4229,
+ 6397,
+ 3893,
+ 0,
+ 0,
+ },
+ {
+ 2160,
+ 3481,
+ 9091,
+ 3391,
+ 0,
+ 0,
+ },
+ {
+ 2560,
+ 4923,
+ 8462,
+ 2775,
+ 4835,
+ 0,
+ },
+ {
+ 2551,
+ 3803,
+ 5619,
+ 3072,
+ 5537,
+ 0,
+ },
+ {
+ 2545,
+ 4206,
+ 7450,
+ 3229,
+ 0,
+ 0,
+ },
+ {
+ 2162,
+ 3655,
+ 9263,
+ 2699,
+ 5296,
+ 0,
+ },
+ {
+ 2039,
+ 3082,
+ 6871,
+ 2426,
+ 3637,
+ 5586,
+ },
+ {
+ 1902,
+ 2840,
+ 6875,
+ 2211,
+ 3483,
+ 5908,
+ },
+ {
+ 1888,
+ 3057,
+ 6899,
+ 2211,
+ 3483,
+ 5908,
+ },
+ {
+ 1888,
+ 3057,
+ 6899,
+ 2183,
+ 3469,
+ 6420,
+ },
+ {
+ 1888,
+ 3057,
+ 6899,
+ 1970,
+ 3174,
+ 8081,
+ },
+ {
+ 2633,
+ 1855,
+ 4960,
+ 2301,
+ 3477,
+ 5083,
+ },
+ {
+ 1527,
+ 2269,
+ 5875,
+ 1964,
+ 3033,
+ 8001,
+ },
+ {
+ 1576,
+ 2445,
+ 5781,
+ 1857,
+ 2871,
+ 4333,
+ },
+ {
+ 1531,
+ 2258,
+ 5869,
+ 2420,
+ 1660,
+ 6823,
+ },
+ {
+ 1566,
+ 2318,
+ 3776,
+ 2543,
+ 3876,
+ 1888,
+ },
+ {
+ 1568,
+ 2320,
+ 3780,
+ 2183,
+ 3360,
+ 1665,
+ },
+ {
+ 1386,
+ 1972,
+ 4356,
+ 1486,
+ 2215,
+ 4513,
+ },
+ {
+ 3356,
+ 0,
+ 0,
+ 2494,
+ 4425,
+ 0,
+ },
+ {
+ 2633,
+ 5009,
+ 0,
+ 2887,
+ 0,
+ 0,
+ },
+ {
+ 2224,
+ 3538,
+ 7696,
+ 2494,
+ 4425,
+ 0,
+ },
+ {
+ 2119,
+ 3225,
+ 9861,
+ 2494,
+ 4425,
+ 0,
+ },
+ {
+ 1974,
+ 3139,
+ 10121,
+ 2494,
+ 4425,
+ 0,
+ },
+ {
+ 1722,
+ 2453,
+ 4059,
+ 2494,
+ 4425,
+ 0,
+ },
+ {
+ 1839,
+ 2658,
+ 4472,
+ 2490,
+ 5455,
+ 0,
+ },
+ {
+ 1722,
+ 2533,
+ 4581,
+ 2037,
+ 3393,
+ 5808,
+ },
+ {
+ 1427,
+ 2009,
+ 4184,
+ 1914,
+ 3082,
+ 1349,
+ },
+ {
+ 1370,
+ 1861,
+ 2719,
+ 2017,
+ 1339,
+ 3913,
+ },
+ {
+ 2482,
+ 3885,
+ 0,
+ 0,
+ 0,
+ 0,
+ },
+ {
+ 2375,
+ 3827,
+ 6975,
+ 0,
+ 0,
+ 0,
+ },
+ {
+ 3395,
+ 0,
+ 0,
+ 3883,
+ 0,
+ 0,
+ },
+ {
+ 3563,
+ 0,
+ 0,
+ 3883,
+ 0,
+ 0,
+ },
+ {
+ 3346,
+ 0,
+ 0,
+ 3418,
+ 0,
+ 0,
+ },
+ {
+ 3563,
+ 0,
+ 0,
+ 4128,
+ 0,
+ 0,
+ },
+ {
+ 2820,
+ 5218,
+ 0,
+ 3883,
+ 0,
+ 0,
+ },
+ {
+ 2637,
+ 4962,
+ 0,
+ 3418,
+ 0,
+ 0,
+ },
+ {
+ 2482,
+ 3885,
+ 0,
+ 3418,
+ 0,
+ 0,
+ },
+ {
+ 2217,
+ 3616,
+ 6502,
+ 3418,
+ 0,
+ 0,
+ },
+ {
+ 2123,
+ 3295,
+ 8658,
+ 3418,
+ 0,
+ 0,
+ },
+ {
+ 2242,
+ 3397,
+ 5562,
+ 2693,
+ 5132,
+ 0,
+ },
+ {
+ 2387,
+ 4024,
+ 7483,
+ 3452,
+ 0,
+ 0,
+ },
+ {
+ 1927,
+ 2838,
+ 4548,
+ 2693,
+ 5132,
+ 0,
+ },
+ {
+ 1859,
+ 2674,
+ 3893,
+ 2703,
+ 5371,
+ 0,
+ },
+ {
+ 2201,
+ 3618,
+ 1617,
+ 2703,
+ 5371,
+ 0,
+ },
+ {
+ 2093,
+ 3135,
+ 1554,
+ 2273,
+ 3594,
+ 5312,
+ },
+ {
+ 2201,
+ 3618,
+ 1617,
+ 2238,
+ 3895,
+ 6172,
+ },
+ {
+ 1828,
+ 3014,
+ 1382,
+ 2258,
+ 3624,
+ 5820,
+ },
+ {
+ 1863,
+ 3170,
+ 1402,
+ 2113,
+ 3381,
+ 5146,
+ },
+ {
+ 1691,
+ 2572,
+ 1294,
+ 2009,
+ 3158,
+ 4540,
+ },
+ {
+ 2424,
+ 3706,
+ 5654,
+ 0,
+ 0,
+ 0,
+ },
+ {
+ 3299,
+ 0,
+ 0,
+ 3313,
+ 0,
+ 0,
+ },
+ {
+ 2424,
+ 3706,
+ 5654,
+ 3174,
+ 0,
+ 0,
+ },
+ {
+ 2424,
+ 3706,
+ 5654,
+ 3313,
+ 0,
+ 0,
+ },
+ {
+ 2177,
+ 3557,
+ 6113,
+ 3313,
+ 0,
+ 0,
+ },
+ {
+ 2207,
+ 3737,
+ 6475,
+ 3008,
+ 4605,
+ 0,
+ },
+ {
+ 2816,
+ 1873,
+ 4263,
+ 3008,
+ 4605,
+ 0,
+ },
+ {
+ 1966,
+ 2914,
+ 1433,
+ 2682,
+ 4366,
+ 0,
+ },
+ {
+ 2301,
+ 1626,
+ 3895,
+ 2627,
+ 4714,
+ 0,
+ },
+ {
+ 2205,
+ 3536,
+ 1570,
+ 2560,
+ 3995,
+ 6105,
+ },
+ {
+ 1910,
+ 3012,
+ 1402,
+ 2560,
+ 3995,
+ 6105,
+ },
+ {
+ 1898,
+ 3276,
+ 1380,
+ 2363,
+ 3637,
+ 5844,
+ },
+ {
+ 2144,
+ 1478,
+ 3655,
+ 2162,
+ 3362,
+ 5531,
+ },
+ {
+ 1988,
+ 1409,
+ 3090,
+ 2136,
+ 3543,
+ 6002,
+ },
+ {
+ 1882,
+ 1355,
+ 2799,
+ 2164,
+ 3702,
+ 6285,
+ },
+ {
+ 3311,
+ 0,
+ 0,
+ 3393,
+ 0,
+ 0,
+ },
+ {
+ 2611,
+ 4706,
+ 0,
+ 3201,
+ 0,
+ 0,
+ },
+ {
+ 2820,
+ 5218,
+ 0,
+ 4128,
+ 0,
+ 0,
+ },
+ {
+ 2660,
+ 4134,
+ 0,
+ 4128,
+ 0,
+ 0,
+ },
+ {
+ 2678,
+ 4820,
+ 0,
+ 2840,
+ 0,
+ 0,
+ },
+ {
+ 2643,
+ 4952,
+ 0,
+ 2775,
+ 5003,
+ 0,
+ },
+ {
+ 2402,
+ 3618,
+ 5726,
+ 3252,
+ 6201,
+ 0,
+ },
+ {
+ 2209,
+ 3622,
+ 6168,
+ 2840,
+ 0,
+ 0,
+ },
+ {
+ 2209,
+ 3622,
+ 6168,
+ 2713,
+ 5232,
+ 0,
+ },
+ {
+ 1992,
+ 2850,
+ 4124,
+ 3262,
+ 6518,
+ 0,
+ },
+ {
+ 2353,
+ 3835,
+ 1736,
+ 3262,
+ 6518,
+ 0,
+ },
+ {
+ 1837,
+ 2744,
+ 5332,
+ 2191,
+ 3459,
+ 5175,
+ },
+ {
+ 2353,
+ 3835,
+ 1736,
+ 2701,
+ 4685,
+ 7550,
+ },
+ {
+ 1837,
+ 2744,
+ 5332,
+ 1923,
+ 2977,
+ 4265,
+ },
+ {
+ 1853,
+ 2717,
+ 5322,
+ 2271,
+ 1591,
+ 3491,
+ },
+ {
+ 1560,
+ 2254,
+ 4831,
+ 1923,
+ 2977,
+ 4265,
+ },
+ {
+ 1626,
+ 2510,
+ 6512,
+ 2271,
+ 1591,
+ 3491,
+ },
+ {
+ 3336,
+ 0,
+ 0,
+ 2439,
+ 4528,
+ 0,
+ },
+ {
+ 2615,
+ 5236,
+ 0,
+ 2799,
+ 0,
+ 0,
+ },
+ {
+ 2215,
+ 3606,
+ 8046,
+ 2439,
+ 4528,
+ 0,
+ },
+ {
+ 2084,
+ 3143,
+ 5750,
+ 2439,
+ 4528,
+ 0,
+ },
+ {
+ 1933,
+ 3024,
+ 5658,
+ 2439,
+ 4528,
+ 0,
+ },
+ {
+ 1863,
+ 3571,
+ 6793,
+ 2439,
+ 4528,
+ 0,
+ },
+ {
+ 1884,
+ 3375,
+ 6283,
+ 1984,
+ 3446,
+ 8095,
+ },
+ {
+ 1513,
+ 2275,
+ 5517,
+ 1800,
+ 2889,
+ 4720,
+ },
+ {
+ 1452,
+ 2113,
+ 5564,
+ 1658,
+ 2549,
+ 3735,
+ },
+ {
+ 1552,
+ 2285,
+ 4022,
+ 4139,
+ 1634,
+ 2496,
+ },
+ {
+ 1431,
+ 2117,
+ 4050,
+ 4139,
+ 1634,
+ 2496,
+ },
+ {
+ 1486,
+ 2150,
+ 3778,
+ 2775,
+ 1761,
+ 4515,
+ },
+ {
+ 1386,
+ 2041,
+ 3418,
+ 2775,
+ 1761,
+ 4515,
+ },
+ {
+ 3371,
+ 0,
+ 0,
+ 2568,
+ 5036,
+ 0,
+ },
+ {
+ 3031,
+ 6023,
+ 0,
+ 3733,
+ 0,
+ 0,
+ },
+ {
+ 2801,
+ 4704,
+ 0,
+ 3733,
+ 0,
+ 0,
+ },
+ {
+ 2801,
+ 4704,
+ 0,
+ 4065,
+ 0,
+ 0,
+ },
+ {
+ 2197,
+ 3815,
+ 6617,
+ 3436,
+ 0,
+ 0,
+ },
+ {
+ 2197,
+ 3815,
+ 6617,
+ 2568,
+ 5036,
+ 0,
+ },
+ {
+ 2162,
+ 3229,
+ 5052,
+ 3698,
+ 6123,
+ 0,
+ },
+ {
+ 2314,
+ 3723,
+ 1712,
+ 4065,
+ 0,
+ 0,
+ },
+ {
+ 1947,
+ 3055,
+ 5111,
+ 2570,
+ 6084,
+ 0,
+ },
+ {
+ 2351,
+ 3770,
+ 1665,
+ 2570,
+ 6084,
+ 0,
+ },
+ {
+ 2351,
+ 1656,
+ 3932,
+ 3133,
+ 5603,
+ 0,
+ },
+ {
+ 2469,
+ 1742,
+ 4464,
+ 3098,
+ 6504,
+ 0,
+ },
+ {
+ 1646,
+ 2457,
+ 4046,
+ 3080,
+ 6574,
+ 0,
+ },
+ {
+ 2336,
+ 1650,
+ 3921,
+ 4040,
+ 2387,
+ 7604,
+ },
+ {
+ 2289,
+ 1593,
+ 4149,
+ 2537,
+ 4380,
+ 7731,
+ },
+ {
+ 1576,
+ 2322,
+ 3921,
+ 2521,
+ 4706,
+ 7946,
+ },
+ {
+ 2099,
+ 1452,
+ 3545,
+ 2521,
+ 4706,
+ 7946,
+ },
+ {
+ 1980,
+ 1460,
+ 3385,
+ 3768,
+ 2252,
+ 5793,
+ },
+ {
+ 2025,
+ 1429,
+ 3278,
+ 2224,
+ 4022,
+ 5902,
+ },
+ {
+ 1232,
+ 1779,
+ 2904,
+ 2588,
+ 1564,
+ 4542,
+ },
+ {
+ 1746,
+ 3622,
+ 9062,
+ 2048,
+ 2048,
+ 2048,
+ },
+ {
+ 2070,
+ 3405,
+ 9017,
+ 3231,
+ 0,
+ 0,
+ },
+ {
+ 2070,
+ 3405,
+ 9017,
+ 2461,
+ 4964,
+ 0,
+ },
+ {
+ 1804,
+ 3313,
+ 8470,
+ 2461,
+ 4964,
+ 0,
+ },
+ {
+ 1734,
+ 3667,
+ 9146,
+ 2461,
+ 4964,
+ 0,
+ },
+ {
+ 1372,
+ 2277,
+ 4892,
+ 2461,
+ 4964,
+ 0,
+ },
+ {
+ 2316,
+ 3717,
+ 1630,
+ 2590,
+ 5722,
+ 0,
+ },
+ {
+ 1167,
+ 1646,
+ 2451,
+ 2379,
+ 3991,
+ 1490,
+ },
+ {
+ 2140,
+ 3248,
+ 7688,
+ 3418,
+ 0,
+ 0,
+ },
+ {
+ 2252,
+ 3284,
+ 4700,
+ 2732,
+ 4962,
+ 0,
+ },
+ {
+ 2234,
+ 3588,
+ 6479,
+ 2881,
+ 0,
+ 0,
+ },
+ {
+ 2234,
+ 3588,
+ 6479,
+ 2756,
+ 5171,
+ 0,
+ },
+ {
+ 2234,
+ 3588,
+ 6479,
+ 2230,
+ 3448,
+ 5167,
+ },
+ {
+ 1925,
+ 2762,
+ 3897,
+ 2455,
+ 3665,
+ 5251,
+ },
+ {
+ 1802,
+ 2621,
+ 5783,
+ 2250,
+ 3553,
+ 0,
+ },
+ {
+ 1701,
+ 2488,
+ 5994,
+ 2230,
+ 3497,
+ 5076,
+ },
+ {
+ 1781,
+ 2717,
+ 5951,
+ 2183,
+ 3520,
+ 5480,
+ },
+ {
+ 1566,
+ 6379,
+ 3723,
+ 2299,
+ 4728,
+ 9779,
+ },
+ {
+ 1581,
+ 2297,
+ 4814,
+ 2961,
+ 1933,
+ 4243,
+ },
+ {
+ 1435,
+ 2000,
+ 3559,
+ 1939,
+ 2975,
+ 4263,
+ },
+ {
+ 1472,
+ 2091,
+ 3483,
+ 2291,
+ 1626,
+ 3473,
+ },
+ {
+ 1718,
+ 1310,
+ 3117,
+ 2289,
+ 3475,
+ 1630,
+ },
+ {
+ 1718,
+ 1310,
+ 3117,
+ 1968,
+ 3008,
+ 1447,
+ },
+ {
+ 1310,
+ 1810,
+ 3547,
+ 1546,
+ 2232,
+ 3170,
+ },
+ {
+ 2494,
+ 1630,
+ 4675,
+ 2641,
+ 6809,
+ 0,
+ },
+ {
+ 3256,
+ 1710,
+ 9084,
+ 2246,
+ 6287,
+ 0,
+ },
+ {
+ 2035,
+ 5359,
+ 0,
+ 2234,
+ 4573,
+ 7079,
+ },
+ {
+ 1816,
+ 3221,
+ 7256,
+ 2228,
+ 3741,
+ 6281,
+ },
+ {
+ 1714,
+ 2535,
+ 3897,
+ 2658,
+ 5728,
+ 0,
+ },
+ {
+ 2330,
+ 5787,
+ 0,
+ 2265,
+ 5726,
+ 8992,
+ },
+ {
+ 1927,
+ 3954,
+ 9160,
+ 1394,
+ 2592,
+ 4767,
+ },
+ {
+ 2768,
+ 8871,
+ 0,
+ 1679,
+ 3164,
+ 8550,
+ },
+ {
+ 2750,
+ 7387,
+ 0,
+ 1759,
+ 2975,
+ 5304,
+ },
+ {
+ 2473,
+ 5611,
+ 0,
+ 1554,
+ 2539,
+ 4468,
+ },
+ {
+ 2299,
+ 5603,
+ 0,
+ 1789,
+ 3067,
+ 5296,
+ },
+ {
+ 1882,
+ 5060,
+ 0,
+ 1259,
+ 2195,
+ 4292,
+ },
+ {
+ 3170,
+ 9232,
+ 0,
+ 1689,
+ 4460,
+ 8816,
+ },
+ {
+ 2492,
+ 5935,
+ 0,
+ 1509,
+ 2492,
+ 3952,
+ },
+ {
+ 1998,
+ 4485,
+ 11706,
+ 3084,
+ 1314,
+ 8624,
+ },
+ {
+ 2267,
+ 5314,
+ 0,
+ 2666,
+ 1236,
+ 1802,
+ }
+ };
+const Word16 scales_p_ivas_fx[][MAX_NO_SCALES * 2] = /* 2 subvectors 20 modes Q11 */
+ {
+ {
+ 2998,
+ 4861,
+ 0,
+ 0,
+ 0,
+ 0,
+ },
+ {
+ 2629,
+ 4421,
+ 0,
+ 0,
+ 0,
+ 0,
+ },
+ {
+ 2549,
+ 5304,
+ 0,
+ 0,
+ 0,
+ 0,
+ },
+ {
+ 2338,
+ 3805,
+ 5994,
+ 0,
+ 0,
+ 0,
+ },
+ {
+ 2125,
+ 3762,
+ 6162,
+ 0,
+ 0,
+ 0,
+ },
+ {
+ 3102,
+ 0,
+ 0,
+ 3153,
+ 0,
+ 0,
+ },
+ {
+ 3244,
+ 0,
+ 0,
+ 3153,
+ 0,
+ 0,
+ },
+ {
+ 3244,
+ 0,
+ 0,
+ 3317,
+ 0,
+ 0,
+ },
+ {
+ 2629,
+ 4421,
+ 0,
+ 3317,
+ 0,
+ 0,
+ },
+ {
+ 2549,
+ 5304,
+ 0,
+ 3153,
+ 0,
+ 0,
+ },
+ {
+ 2590,
+ 5251,
+ 0,
+ 3354,
+ 0,
+ 0,
+ },
+ {
+ 2338,
+ 3805,
+ 5994,
+ 3317,
+ 0,
+ 0,
+ },
+ {
+ 2125,
+ 3762,
+ 6162,
+ 3317,
+ 0,
+ 0,
+ },
+ {
+ 2023,
+ 3401,
+ 5199,
+ 3317,
+ 0,
+ 0,
+ },
+ {
+ 2177,
+ 3487,
+ 5744,
+ 2650,
+ 4818,
+ 0,
+ },
+ {
+ 2177,
+ 3926,
+ 6273,
+ 2795,
+ 0,
+ 0,
+ },
+ {
+ 1871,
+ 2891,
+ 4552,
+ 2650,
+ 4818,
+ 0,
+ },
+ {
+ 1843,
+ 2887,
+ 4616,
+ 2658,
+ 4941,
+ 0,
+ },
+ {
+ 1806,
+ 2869,
+ 4919,
+ 2689,
+ 4999,
+ 0,
+ },
+ {
+ 2777,
+ 1775,
+ 4868,
+ 2191,
+ 3452,
+ 5214,
+ },
+ {
+ 1732,
+ 2760,
+ 5214,
+ 2203,
+ 3567,
+ 5443,
+ },
+ {
+ 1730,
+ 2824,
+ 5255,
+ 2086,
+ 3229,
+ 5003,
+ },
+ {
+ 1548,
+ 2435,
+ 5732,
+ 2220,
+ 3694,
+ 5648,
+ },
+ {
+ 1546,
+ 2494,
+ 5777,
+ 1933,
+ 2934,
+ 4040,
+ },
+ {
+ 1525,
+ 2451,
+ 5935,
+ 2543,
+ 1726,
+ 3997,
+ },
+ {
+ 1482,
+ 2529,
+ 6025,
+ 2570,
+ 1736,
+ 4096,
+ },
+ {
+ 1406,
+ 2279,
+ 4788,
+ 1746,
+ 2719,
+ 3981,
+ },
+ {
+ 1327,
+ 2107,
+ 3760,
+ 1748,
+ 2777,
+ 4016,
+ },
+ {
+ 1243,
+ 1912,
+ 3106,
+ 1603,
+ 2484,
+ 3141,
+ },
+ {
+ 1226,
+ 1853,
+ 3131,
+ 1497,
+ 2275,
+ 3072,
+ },
+ {
+ 1327,
+ 2107,
+ 3760,
+ 1406,
+ 2166,
+ 3891,
+ },
+ {
+ 3303,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ },
+ {
+ 2594,
+ 5068,
+ 0,
+ 3315,
+ 0,
+ 0,
+ },
+ {
+ 2076,
+ 3338,
+ 5046,
+ 2631,
+ 4405,
+ 0,
+ },
+ {
+ 1828,
+ 2846,
+ 4739,
+ 3000,
+ 4708,
+ 0,
+ },
+ {
+ 1904,
+ 2869,
+ 4403,
+ 2621,
+ 4616,
+ 0,
+ },
+ {
+ 1828,
+ 2846,
+ 4739,
+ 2613,
+ 4517,
+ 6111,
+ },
+ {
+ 1828,
+ 2846,
+ 4739,
+ 2121,
+ 3371,
+ 5060,
+ },
+ {
+ 1755,
+ 2738,
+ 5046,
+ 2136,
+ 3543,
+ 5376,
+ },
+ {
+ 1566,
+ 2496,
+ 3180,
+ 2121,
+ 3371,
+ 5060,
+ },
+ {
+ 1615,
+ 2719,
+ 3383,
+ 2154,
+ 3653,
+ 5541,
+ },
+ {
+ 1564,
+ 2506,
+ 3184,
+ 1884,
+ 2955,
+ 4167,
+ },
+ {
+ 1357,
+ 2172,
+ 2535,
+ 2824,
+ 1839,
+ 3995,
+ },
+ {
+ 1378,
+ 2260,
+ 2674,
+ 2578,
+ 1695,
+ 4001,
+ },
+ {
+ 1363,
+ 2193,
+ 2557,
+ 1644,
+ 2541,
+ 3540,
+ },
+ {
+ 1347,
+ 2127,
+ 2486,
+ 1945,
+ 1333,
+ 2926,
+ },
+ {
+ 3276,
+ 0,
+ 0,
+ 3180,
+ 0,
+ 0,
+ },
+ {
+ 2674,
+ 4970,
+ 0,
+ 3235,
+ 0,
+ 0,
+ },
+ {
+ 2674,
+ 4970,
+ 0,
+ 3432,
+ 0,
+ 0,
+ },
+ {
+ 2560,
+ 5926,
+ 0,
+ 3235,
+ 0,
+ 0,
+ },
+ {
+ 2322,
+ 4067,
+ 6748,
+ 3180,
+ 0,
+ 0,
+ },
+ {
+ 2340,
+ 4202,
+ 6850,
+ 3432,
+ 0,
+ 0,
+ },
+ {
+ 2138,
+ 4159,
+ 7141,
+ 3432,
+ 0,
+ 0,
+ },
+ {
+ 2021,
+ 3661,
+ 5445,
+ 3373,
+ 0,
+ 0,
+ },
+ {
+ 1841,
+ 3280,
+ 5281,
+ 3373,
+ 0,
+ 0,
+ },
+ {
+ 1632,
+ 2650,
+ 4382,
+ 3373,
+ 0,
+ 0,
+ },
+ {
+ 1632,
+ 2650,
+ 4382,
+ 2734,
+ 4556,
+ 0,
+ },
+ {
+ 1517,
+ 2357,
+ 3719,
+ 2734,
+ 4556,
+ 0,
+ },
+ {
+ 2007,
+ 3485,
+ 1445,
+ 2697,
+ 5382,
+ 0,
+ },
+ {
+ 1632,
+ 2650,
+ 4382,
+ 2428,
+ 3956,
+ 0,
+ },
+ {
+ 1517,
+ 2357,
+ 3719,
+ 2383,
+ 3733,
+ 5670,
+ },
+ {
+ 1449,
+ 2306,
+ 3999,
+ 2203,
+ 3543,
+ 5687,
+ },
+ {
+ 1351,
+ 2148,
+ 3217,
+ 2203,
+ 3543,
+ 5687,
+ },
+ {
+ 1355,
+ 2101,
+ 3182,
+ 2199,
+ 3917,
+ 6189,
+ },
+ {
+ 1351,
+ 2148,
+ 3217,
+ 2947,
+ 1896,
+ 4364,
+ },
+ {
+ 1290,
+ 1978,
+ 3117,
+ 2686,
+ 1804,
+ 4519,
+ },
+ {
+ 1263,
+ 1886,
+ 2963,
+ 2113,
+ 3172,
+ 1548,
+ },
+ {
+ 3266,
+ 0,
+ 0,
+ 3076,
+ 0,
+ 0,
+ },
+ {
+ 2299,
+ 3985,
+ 7643,
+ 3076,
+ 0,
+ 0,
+ },
+ {
+ 2115,
+ 4249,
+ 8886,
+ 2906,
+ 5009,
+ 0,
+ },
+ {
+ 2017,
+ 3672,
+ 12216,
+ 2623,
+ 4759,
+ 0,
+ },
+ {
+ 1804,
+ 3289,
+ 14325,
+ 2906,
+ 5009,
+ 0,
+ },
+ {
+ 1728,
+ 3239,
+ 14376,
+ 2623,
+ 4759,
+ 0,
+ },
+ {
+ 1615,
+ 3112,
+ 14751,
+ 2623,
+ 4759,
+ 0,
+ },
+ {
+ 1779,
+ 3168,
+ 14325,
+ 2109,
+ 3592,
+ 6352,
+ },
+ {
+ 1673,
+ 3055,
+ 14581,
+ 2109,
+ 3592,
+ 6352,
+ },
+ {
+ 1546,
+ 2830,
+ 14608,
+ 2109,
+ 3592,
+ 6352,
+ },
+ {
+ 1445,
+ 2693,
+ 14796,
+ 2109,
+ 3592,
+ 6352,
+ },
+ {
+ 1411,
+ 2654,
+ 14929,
+ 2080,
+ 3840,
+ 6633,
+ },
+ {
+ 1429,
+ 2611,
+ 14764,
+ 1871,
+ 3170,
+ 4982,
+ },
+ {
+ 1390,
+ 2693,
+ 14929,
+ 2516,
+ 3778,
+ 1665,
+ },
+ {
+ 1390,
+ 2693,
+ 14929,
+ 2433,
+ 1581,
+ 4003,
+ },
+ {
+ 2070,
+ 3639,
+ 5652,
+ 3305,
+ 0,
+ 0,
+ },
+ {
+ 1974,
+ 3235,
+ 8183,
+ 3540,
+ 0,
+ 0,
+ },
+ {
+ 1798,
+ 2949,
+ 4687,
+ 3540,
+ 0,
+ 0,
+ },
+ {
+ 1744,
+ 3364,
+ 4974,
+ 3540,
+ 0,
+ 0,
+ },
+ {
+ 1746,
+ 2830,
+ 4231,
+ 2549,
+ 5486,
+ 0,
+ },
+ {
+ 2471,
+ 1593,
+ 4521,
+ 2549,
+ 5486,
+ 0,
+ },
+ {
+ 1646,
+ 2772,
+ 5421,
+ 2883,
+ 5355,
+ 0,
+ },
+ {
+ 1601,
+ 2568,
+ 5732,
+ 2822,
+ 5545,
+ 0,
+ },
+ {
+ 2471,
+ 1593,
+ 4521,
+ 2074,
+ 3751,
+ 6252,
+ },
+ {
+ 2471,
+ 1593,
+ 4521,
+ 2908,
+ 1785,
+ 4771,
+ },
+ {
+ 1398,
+ 2080,
+ 3661,
+ 2306,
+ 3862,
+ 5988,
+ },
+ {
+ 1284,
+ 1878,
+ 2965,
+ 2306,
+ 3862,
+ 5988,
+ },
+ {
+ 1347,
+ 2105,
+ 3188,
+ 3035,
+ 1996,
+ 4397,
+ },
+ {
+ 1626,
+ 1187,
+ 2725,
+ 3035,
+ 1996,
+ 4397,
+ },
+ {
+ 1685,
+ 1212,
+ 2709,
+ 2756,
+ 1832,
+ 4726,
+ },
+ {
+ 2248,
+ 1511,
+ 1136,
+ 1779,
+ 2641,
+ 3813,
+ },
+ {
+ 1552,
+ 2275,
+ 1126,
+ 1783,
+ 2799,
+ 3903,
+ },
+ {
+ 1128,
+ 1568,
+ 2285,
+ 1619,
+ 2459,
+ 3405,
+ },
+ {
+ 1128,
+ 1568,
+ 2285,
+ 1972,
+ 1427,
+ 2709,
+ },
+ {
+ 1075,
+ 1576,
+ 2197,
+ 1669,
+ 2533,
+ 1161,
+ },
+ {
+ 2191,
+ 3667,
+ 7993,
+ 3274,
+ 0,
+ 0,
+ },
+ {
+ 1679,
+ 2492,
+ 4278,
+ 2570,
+ 4689,
+ 0,
+ },
+ {
+ 1597,
+ 2394,
+ 5109,
+ 2570,
+ 4689,
+ 0,
+ },
+ {
+ 2201,
+ 1480,
+ 4835,
+ 2273,
+ 4016,
+ 7149,
+ },
+ {
+ 1415,
+ 2107,
+ 4786,
+ 2117,
+ 3667,
+ 8200,
+ },
+ {
+ 1374,
+ 2203,
+ 5337,
+ 1955,
+ 3168,
+ 5148,
+ },
+ {
+ 2424,
+ 1589,
+ 4335,
+ 2164,
+ 3420,
+ 1380,
+ },
+ {
+ 1937,
+ 2965,
+ 5576,
+ 2854,
+ 5416,
+ 9381,
+ },
+ {
+ 1941,
+ 2977,
+ 5576,
+ 4034,
+ 2404,
+ 7135,
+ },
+ {
+ 1812,
+ 2879,
+ 5658,
+ 4034,
+ 2404,
+ 7135,
+ },
+ {
+ 2549,
+ 1724,
+ 4870,
+ 4093,
+ 2392,
+ 7540,
+ },
+ {
+ 1781,
+ 2756,
+ 5763,
+ 3571,
+ 2166,
+ 5933,
+ },
+ {
+ 1693,
+ 2496,
+ 4456,
+ 3252,
+ 5324,
+ 2037,
+ },
+ {
+ 1673,
+ 2428,
+ 4079,
+ 3262,
+ 1994,
+ 5363,
+ },
+ {
+ 1683,
+ 2467,
+ 4298,
+ 2998,
+ 1851,
+ 4911,
+ },
+ {
+ 1683,
+ 2467,
+ 4298,
+ 4204,
+ 1714,
+ 2783,
+ },
+ {
+ 1067,
+ 1529,
+ 2115,
+ 1630,
+ 2729,
+ 1110,
+ },
+ {
+ 3438,
+ 0,
+ 0,
+ 2625,
+ 5060,
+ 0,
+ },
+ {
+ 2228,
+ 3786,
+ 6543,
+ 3454,
+ 0,
+ 0,
+ },
+ {
+ 2228,
+ 3786,
+ 6543,
+ 2625,
+ 5060,
+ 0,
+ },
+ {
+ 2306,
+ 3459,
+ 1617,
+ 2625,
+ 5060,
+ 0,
+ },
+ {
+ 1904,
+ 2830,
+ 1396,
+ 2625,
+ 5060,
+ 0,
+ },
+ {
+ 2283,
+ 1626,
+ 3792,
+ 2623,
+ 6211,
+ 0,
+ },
+ {
+ 1720,
+ 2818,
+ 1275,
+ 1638,
+ 2899,
+ 8724,
+ },
+ {
+ 1640,
+ 2351,
+ 3690,
+ 0,
+ 0,
+ 0,
+ },
+ {
+ 2752,
+ 5380,
+ 0,
+ 3223,
+ 0,
+ 0,
+ },
+ {
+ 2580,
+ 4188,
+ 0,
+ 3223,
+ 0,
+ 0,
+ },
+ {
+ 2580,
+ 4188,
+ 0,
+ 3430,
+ 0,
+ 0,
+ },
+ {
+ 2230,
+ 3710,
+ 6496,
+ 3434,
+ 0,
+ 0,
+ },
+ {
+ 2230,
+ 3899,
+ 6596,
+ 3115,
+ 5396,
+ 0,
+ },
+ {
+ 1972,
+ 2949,
+ 4335,
+ 3430,
+ 0,
+ 0,
+ },
+ {
+ 1972,
+ 2949,
+ 4335,
+ 2666,
+ 4935,
+ 0,
+ },
+ {
+ 1730,
+ 2482,
+ 3960,
+ 2689,
+ 4954,
+ 0,
+ },
+ {
+ 1595,
+ 2242,
+ 3481,
+ 2689,
+ 4954,
+ 0,
+ },
+ {
+ 1480,
+ 2078,
+ 3407,
+ 2689,
+ 4954,
+ 0,
+ },
+ {
+ 2066,
+ 3414,
+ 1540,
+ 2676,
+ 6187,
+ 0,
+ },
+ {
+ 2058,
+ 3373,
+ 1533,
+ 2179,
+ 3831,
+ 6856,
+ },
+ {
+ 1832,
+ 3051,
+ 1396,
+ 2179,
+ 3831,
+ 6856,
+ },
+ {
+ 1611,
+ 2605,
+ 1245,
+ 2179,
+ 3831,
+ 6856,
+ },
+ {
+ 1763,
+ 1327,
+ 2988,
+ 2179,
+ 3831,
+ 6856,
+ },
+ {
+ 1697,
+ 1292,
+ 2738,
+ 2168,
+ 4161,
+ 7020,
+ },
+ {
+ 1763,
+ 1327,
+ 2988,
+ 3155,
+ 1884,
+ 5142,
+ },
+ {
+ 1736,
+ 1296,
+ 2781,
+ 2883,
+ 1800,
+ 5552,
+ },
+ {
+ 1828,
+ 1335,
+ 2945,
+ 2203,
+ 1474,
+ 3674,
+ },
+ {
+ 2783,
+ 4722,
+ 0,
+ 3418,
+ 0,
+ 0,
+ },
+ {
+ 2205,
+ 3946,
+ 7262,
+ 3418,
+ 0,
+ 0,
+ },
+ {
+ 2205,
+ 4161,
+ 7327,
+ 2926,
+ 5552,
+ 0,
+ },
+ {
+ 1705,
+ 2566,
+ 4311,
+ 2627,
+ 5234,
+ 0,
+ },
+ {
+ 1589,
+ 2359,
+ 3805,
+ 2627,
+ 5234,
+ 0,
+ },
+ {
+ 1472,
+ 2183,
+ 3547,
+ 2627,
+ 5234,
+ 0,
+ },
+ {
+ 1927,
+ 1333,
+ 3205,
+ 1478,
+ 2437,
+ 3973,
+ },
+ {
+ 2646,
+ 5076,
+ 0,
+ 3155,
+ 0,
+ 0,
+ },
+ {
+ 2461,
+ 3897,
+ 0,
+ 3155,
+ 0,
+ 0,
+ },
+ {
+ 2105,
+ 3360,
+ 5027,
+ 3375,
+ 0,
+ 0,
+ },
+ {
+ 2553,
+ 1798,
+ 4769,
+ 3375,
+ 0,
+ 0,
+ },
+ {
+ 1767,
+ 2781,
+ 5165,
+ 3375,
+ 0,
+ 0,
+ },
+ {
+ 1673,
+ 2502,
+ 4116,
+ 2199,
+ 3655,
+ 5597,
+ },
+ {
+ 1669,
+ 1253,
+ 2623,
+ 2160,
+ 3530,
+ 6045,
+ },
+ {
+ 3164,
+ 0,
+ 0,
+ 3170,
+ 0,
+ 0,
+ },
+ {
+ 3358,
+ 0,
+ 0,
+ 3170,
+ 0,
+ 0,
+ },
+ {
+ 2723,
+ 0,
+ 0,
+ 3270,
+ 0,
+ 0,
+ },
+ {
+ 2529,
+ 4743,
+ 0,
+ 3270,
+ 0,
+ 0,
+ },
+ {
+ 2635,
+ 5629,
+ 0,
+ 3170,
+ 0,
+ 0,
+ },
+ {
+ 2635,
+ 5629,
+ 0,
+ 3387,
+ 0,
+ 0,
+ },
+ {
+ 2437,
+ 4149,
+ 0,
+ 3387,
+ 0,
+ 0,
+ },
+ {
+ 1949,
+ 3428,
+ 5656,
+ 3270,
+ 0,
+ 0,
+ },
+ {
+ 1880,
+ 3217,
+ 6574,
+ 3270,
+ 0,
+ 0,
+ },
+ {
+ 2572,
+ 1622,
+ 4255,
+ 3270,
+ 0,
+ 0,
+ },
+ {
+ 1550,
+ 2463,
+ 3837,
+ 3270,
+ 0,
+ 0,
+ },
+ {
+ 1906,
+ 2985,
+ 5017,
+ 2650,
+ 5615,
+ 0,
+ },
+ {
+ 2287,
+ 1507,
+ 3840,
+ 2562,
+ 5257,
+ 0,
+ },
+ {
+ 1581,
+ 2531,
+ 3934,
+ 2562,
+ 5257,
+ 0,
+ },
+ {
+ 1796,
+ 2859,
+ 5605,
+ 2213,
+ 3719,
+ 6881,
+ },
+ {
+ 2316,
+ 3350,
+ 0,
+ 2807,
+ 0,
+ 0,
+ },
+ {
+ 1826,
+ 3260,
+ 7012,
+ 2658,
+ 6565,
+ 0,
+ },
+ {
+ 1792,
+ 3168,
+ 7084,
+ 2631,
+ 5937,
+ 8499,
+ },
+ {
+ 1732,
+ 3379,
+ 6772,
+ 2611,
+ 5009,
+ 8202,
+ },
+ {
+ 1654,
+ 6285,
+ 3514,
+ 2611,
+ 5009,
+ 8202,
+ },
+ {
+ 1566,
+ 6406,
+ 3733,
+ 2611,
+ 5009,
+ 8202,
+ },
+ {
+ 1912,
+ 2615,
+ 1490,
+ 2369,
+ 3475,
+ 0,
+ },
+ {
+ 1705,
+ 2379,
+ 1347,
+ 2357,
+ 3454,
+ 0,
+ },
+ {
+ 1538,
+ 2113,
+ 1224,
+ 2357,
+ 3454,
+ 0,
+ },
+ {
+ 1554,
+ 6426,
+ 3778,
+ 1888,
+ 3088,
+ 6369,
+ },
+ {
+ 1452,
+ 2058,
+ 1167,
+ 2170,
+ 3629,
+ 5568,
+ },
+ {
+ 1527,
+ 2050,
+ 1230,
+ 2056,
+ 3692,
+ 5922,
+ },
+ {
+ 1521,
+ 2048,
+ 1226,
+ 1916,
+ 3811,
+ 5885,
+ },
+ {
+ 1536,
+ 6492,
+ 3942,
+ 1509,
+ 2914,
+ 5502,
+ },
+ {
+ 1536,
+ 6492,
+ 3942,
+ 1349,
+ 2168,
+ 4044,
+ },
+ {
+ 1587,
+ 1257,
+ 2123,
+ 1630,
+ 2670,
+ 3901,
+ },
+ {
+ 1830,
+ 2742,
+ 5220,
+ 2678,
+ 5326,
+ 0,
+ },
+ {
+ 1703,
+ 2568,
+ 3966,
+ 2676,
+ 5353,
+ 0,
+ },
+ {
+ 1703,
+ 2523,
+ 3923,
+ 2371,
+ 4048,
+ 0,
+ },
+ {
+ 1689,
+ 2580,
+ 4081,
+ 2095,
+ 3561,
+ 5726,
+ },
+ {
+ 1536,
+ 2281,
+ 3201,
+ 2140,
+ 3690,
+ 5490,
+ },
+ {
+ 1417,
+ 2048,
+ 2930,
+ 2095,
+ 3561,
+ 5726,
+ },
+ {
+ 1474,
+ 2072,
+ 3272,
+ 3096,
+ 1896,
+ 4376,
+ },
+ {
+ 1394,
+ 1992,
+ 3377,
+ 2828,
+ 1794,
+ 4360,
+ },
+ {
+ 1400,
+ 1974,
+ 3358,
+ 2392,
+ 3637,
+ 1611,
+ },
+ {
+ 1368,
+ 1914,
+ 3176,
+ 2080,
+ 3108,
+ 1458,
+ },
+ {
+ 1349,
+ 1865,
+ 2918,
+ 2738,
+ 1820,
+ 1314,
+ },
+ {
+ 1349,
+ 1865,
+ 2918,
+ 1718,
+ 2635,
+ 1243,
+ },
+ {
+ 3344,
+ 0,
+ 0,
+ 3454,
+ 0,
+ 0,
+ },
+ {
+ 3463,
+ 0,
+ 0,
+ 3428,
+ 0,
+ 0,
+ },
+ {
+ 2719,
+ 5251,
+ 0,
+ 3180,
+ 0,
+ 0,
+ },
+ {
+ 2560,
+ 4079,
+ 0,
+ 3180,
+ 0,
+ 0,
+ },
+ {
+ 2560,
+ 4079,
+ 0,
+ 3428,
+ 0,
+ 0,
+ },
+ {
+ 2203,
+ 3665,
+ 6025,
+ 3454,
+ 0,
+ 0,
+ },
+ {
+ 2183,
+ 3446,
+ 8349,
+ 3428,
+ 0,
+ 0,
+ },
+ {
+ 2621,
+ 1865,
+ 5072,
+ 3428,
+ 0,
+ 0,
+ },
+ {
+ 1708,
+ 2516,
+ 3870,
+ 3454,
+ 0,
+ 0,
+ },
+ {
+ 1921,
+ 2875,
+ 4409,
+ 2674,
+ 5386,
+ 0,
+ },
+ {
+ 2744,
+ 1814,
+ 4751,
+ 2674,
+ 5386,
+ 0,
+ },
+ {
+ 1705,
+ 2560,
+ 3907,
+ 2674,
+ 5386,
+ 0,
+ },
+ {
+ 1705,
+ 2484,
+ 3835,
+ 2304,
+ 3766,
+ 5773,
+ },
+ {
+ 1748,
+ 2594,
+ 3743,
+ 2138,
+ 3604,
+ 5902,
+ },
+ {
+ 1566,
+ 2379,
+ 3461,
+ 2097,
+ 3559,
+ 5812,
+ },
+ {
+ 1484,
+ 2150,
+ 3667,
+ 3031,
+ 1888,
+ 6356,
+ },
+ {
+ 1458,
+ 2072,
+ 3172,
+ 3059,
+ 1849,
+ 6889,
+ },
+ {
+ 1349,
+ 1898,
+ 2779,
+ 3059,
+ 1849,
+ 6889,
+ },
+ {
+ 1683,
+ 1257,
+ 2637,
+ 1863,
+ 3090,
+ 4618,
+ },
+ {
+ 1722,
+ 1277,
+ 2617,
+ 2377,
+ 1560,
+ 3702,
+ },
+ {
+ 1716,
+ 1273,
+ 2592,
+ 2211,
+ 1456,
+ 3502,
+ },
+ {
+ 1703,
+ 1267,
+ 2611,
+ 1921,
+ 2928,
+ 1318,
+ },
+ {
+ 1810,
+ 2762,
+ 5263,
+ 2691,
+ 5343,
+ 0,
+ },
+ {
+ 2009,
+ 3016,
+ 5701,
+ 3461,
+ 6844,
+ 0,
+ },
+ {
+ 1976,
+ 3100,
+ 5500,
+ 2885,
+ 5089,
+ 8081,
+ },
+ {
+ 1998,
+ 2983,
+ 5453,
+ 4405,
+ 2603,
+ 8552,
+ },
+ {
+ 2029,
+ 3080,
+ 6320,
+ 5091,
+ 2693,
+ 9277,
+ },
+ {
+ 1937,
+ 2965,
+ 5576,
+ 2854,
+ 5416,
+ 9381,
+ },
+ {
+ 1456,
+ 2084,
+ 3307,
+ 3035,
+ 1886,
+ 7026,
+ },
+ {
+ 1390,
+ 1994,
+ 3397,
+ 1941,
+ 3172,
+ 7061,
+ },
+ {
+ 1701,
+ 1265,
+ 3033,
+ 1910,
+ 3100,
+ 4730,
+ },
+ {
+ 1671,
+ 1249,
+ 2871,
+ 2920,
+ 1796,
+ 4638,
+ },
+ {
+ 1611,
+ 2574,
+ 1220,
+ 1759,
+ 2963,
+ 4978,
+ },
+ {
+ 1611,
+ 2574,
+ 1220,
+ 2265,
+ 1505,
+ 3397,
+ }
+ };
+
+
+/*-----------------------------------------------------------------*
+ * FFT transform tables
+ *-----------------------------------------------------------------*/
const Word16 w_fft4_fx[2] = {
// Q15
@@ -6130,6 +37260,7 @@ const Word16 cos_twiddle_table_25_5_5[25] = {
SHC( 0x8103 ),
SHC( 0xae69 ),
};
+
const Word16 sin_twiddle_table_25_5_5[25] = {
// Q15
SHC( 0x0000 ),
@@ -6666,7 +37797,9 @@ const Word16 lsf_q_cb_3b_fx[8] = {
1739, 2011, 2365, 2953
};
-const Word16 *const lsf_q_cb_fx[NUM_Q_LSF] = { lsf_q_cb_4b_fx, lsf_q_cb_4b_fx, lsf_q_cb_3b_fx, lsf_q_cb_3b_fx, lsf_q_cb_3b_fx }; // Q15
+const Word16 *const lsf_q_cb_fx[NUM_Q_LSF] = {
+ lsf_q_cb_4b_fx, lsf_q_cb_4b_fx, lsf_q_cb_3b_fx, lsf_q_cb_3b_fx, lsf_q_cb_3b_fx
+}; // Q15
/*Q15*/
const Word16 lsf_grid_fx[4][5] = {
@@ -6701,4 +37834,6 @@ const Word16 lsf_grid_fx[4][5] = {
};
/*Q15*/
-const Word16 grid_smoothing_fx[5] = { 6554, 11469, 16384, 24576, 26214 };
+const Word16 grid_smoothing_fx[5] = {
+ 6554, 11469, 16384, 24576, 26214
+};
diff --git a/lib_com/rom_com_fx.h b/lib_com/rom_com_fx.h
deleted file mode 100644
index 3f35abb9f4b07fc42bf68150b49f2e0f14abe09d..0000000000000000000000000000000000000000
--- a/lib_com/rom_com_fx.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/******************************************************************************************************
-
- (C) 2022-2025 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
- Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
- Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
- Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
- contributors to this repository. All Rights Reserved.
-
- This software is protected by copyright law and by international treaties.
- The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB,
- Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
- Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
- Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
- contributors to this repository retain full ownership rights in their respective contributions in
- the software. This notice grants no license of any kind, including but not limited to patent
- license, nor is any license granted by implication, estoppel or otherwise.
-
- Contributors are required to enter into the IVAS codec Public Collaboration agreement before making
- contributions.
-
- This software is provided "AS IS", without any express or implied warranties. The software is in the
- development stage. It is intended exclusively for experts who have experience with such software and
- solely for the purpose of inspection. All implied warranties of non-infringement, merchantability
- and fitness for a particular purpose are hereby disclaimed and excluded.
-
- Any dispute, controversy or claim arising under or in relation to providing this software shall be
- submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in
- accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
- the United Nations Convention on Contracts on the International Sales of Goods.
-
-*******************************************************************************************************/
-
-/*====================================================================================
- 3GPP TS26.258 Aug 24, 2023. IVAS Codec Version IVAS-FL-1.0
- ====================================================================================*/
-
-/*====================================================================================
- EVS Codec 3GPP TS26.443 Nov 04, 2021. Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0
- ====================================================================================*/
-
-#ifndef ROM_COM_FX_H
-#define ROM_COM_FX_H
-
-#include "typedef.h"
-
-/*------------------------------------------------------------------------------*
- * FFT transform
- *------------------------------------------------------------------------------*/
-
-extern const Word16 w_fft64_fx[32]; // Q15
-extern const Word16 w_fft32_fx[16]; // Q15
-extern const Word16 w_fft16_fx[8]; // Q15
-extern const Word16 w_fft8_fx[8]; // Q15
-extern const Word16 w_fft128_fx[64]; // Q15
-extern const Word16 w_fft256_fx[128]; // Q15
-extern const Word16 w_fft512_fx[256]; // Q15
-extern const Word16 w_fft4_fx[2]; // Q15
-
-extern const Word16 FFT_RotVector_960_fx[1860]; // Q15
-extern const Word16 FFT_RotVector_640_fx[1240]; // Q15
-extern const Word16 FFT_RotVector_600_fx[1140]; // Q15
-extern const Word16 FFT_RotVector_400_fx[760]; // Q15
-extern const Word16 FFT_RotVector_256_fx[448]; // Q15
-extern const Word16 FFT_RotVector_32_fx[40]; // Q15
-
-extern const Word16 sincos_t_rad3_fx[T_SIN_PI_2 + 1]; // Q15
-
-extern const Word16 cos_twiddle_table_25_5_5[25]; // Q15
-extern const Word16 sin_twiddle_table_25_5_5[25]; // Q15
-extern const Word16 cos_twiddle_table_16_8_2[16]; // Q15
-extern const Word16 sin_twiddle_table_16_8_2[16]; // Q15
-
-
-extern const Word32 CLDFB80_10_fx[100]; // Q30
-extern const Word32 CLDFB80_16_fx[160]; // Q30
-extern const Word32 CLDFB80_20_fx[200]; // Q30
-extern const Word32 CLDFB80_30_fx[300]; // Q30
-extern const Word32 CLDFB80_32_fx[320]; // Q30
-extern const Word32 CLDFB80_40_fx[400]; // Q30
-extern const Word32 CLDFB80_60_fx[600]; // Q30
-
-/*5ms delay*/
-extern const Word32 LDQMF_10_fx[100]; // Q30
-extern const Word32 LDQMF_16_fx[160]; // Q30
-extern const Word32 LDQMF_20_fx[200]; // Q30
-extern const Word32 LDQMF_30_fx[300]; // Q30
-extern const Word32 LDQMF_32_fx[320]; // Q30
-extern const Word32 LDQMF_40_fx[400]; // Q30
-extern const Word32 LDQMF_60_fx[600]; // Q30
-/* Not used anywhere
-extern const Word16 LDQMF_10_enc_fx[100];
-extern const Word16 LDQMF_16_enc_fx[160];
-extern const Word16 LDQMF_20_enc_fx[200];
-extern const Word16 LDQMF_30_enc_fx[300];
-extern const Word16 LDQMF_32_enc_fx[320];
-extern const Word16 LDQMF_40_enc_fx[400];
-extern const Word16 LDQMF_60_enc_fx[600];
-*/
-extern const Word32 rot_vec_delay_re_LDQMF_fx[60]; // Q31
-extern const Word32 rot_vec_delay_im_LDQMF_fx[60]; // Q31
-
-extern const Word32 rot_vec_ana_re_L10_fx[5]; // Q29
-extern const Word32 rot_vec_ana_im_L10_fx[5]; // Q29
-extern const Word32 rot_vec_ana_re_L16_fx[8]; // Q29
-extern const Word32 rot_vec_ana_im_L16_fx[8]; // Q29
-extern const Word32 rot_vec_ana_re_L20_fx[10]; // Q29
-extern const Word32 rot_vec_ana_im_L20_fx[10]; // Q29
-extern const Word32 rot_vec_ana_re_L30_fx[15]; // Q29
-extern const Word32 rot_vec_ana_im_L30_fx[15]; // Q29
-extern const Word32 rot_vec_ana_re_L32_fx[16]; // Q29
-extern const Word32 rot_vec_ana_im_L32_fx[16]; // Q29
-extern const Word32 rot_vec_ana_re_L40_fx[20]; // Q29
-extern const Word32 rot_vec_ana_im_L40_fx[20]; // Q29
-extern const Word32 rot_vec_ana_re_L60_fx[30]; // Q29
-extern const Word32 rot_vec_ana_im_L60_fx[30]; // Q29
-
-extern const Word16 LP_assym_window_fx[]; /* Assymetric window for LP analysis @12.8kHz (Q15) */
-extern const Word16 LP_assym_window_16k_fx[]; /* Assymetric window for LP analysis @16kHz (Q15) */
-
-#endif
diff --git a/lib_com/swb_tbe_com_fx.c b/lib_com/swb_tbe_com_fx.c
index 48322cb71fa7bbdef4dc248a5aa2704512825660..4aaca2c857438ec577d40d7f2ea50cd1116e446f 100755
--- a/lib_com/swb_tbe_com_fx.c
+++ b/lib_com/swb_tbe_com_fx.c
@@ -2,7 +2,6 @@
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
-
#include
#include "options.h"
#include "cnst.h" /* Common constants */
@@ -10,7 +9,11 @@
#include "prot_fx.h"
#include "basop_util.h"
#include "ivas_prot_fx.h"
-#include "options_warnings.h"
+
+
+/*-----------------------------------------------------------------*
+ * Local constants
+ *-----------------------------------------------------------------*/
#define POW_EXC16k_WHTND 1.14e11f /* power of random excitation, length 320 samples, uniform distribution */
#define POW_EXC16k_WHTND_FX_INV_SQRT 6360 // Q31
diff --git a/lib_com/tools.c b/lib_com/tools.c
deleted file mode 100644
index 909460c5df897f7d7e08987070d98a10ce91401a..0000000000000000000000000000000000000000
--- a/lib_com/tools.c
+++ /dev/null
@@ -1,901 +0,0 @@
-/******************************************************************************************************
-
- (C) 2022-2025 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
- Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
- Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
- Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
- contributors to this repository. All Rights Reserved.
-
- This software is protected by copyright law and by international treaties.
- The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB,
- Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
- Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
- Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
- contributors to this repository retain full ownership rights in their respective contributions in
- the software. This notice grants no license of any kind, including but not limited to patent
- license, nor is any license granted by implication, estoppel or otherwise.
-
- Contributors are required to enter into the IVAS codec Public Collaboration agreement before making
- contributions.
-
- This software is provided "AS IS", without any express or implied warranties. The software is in the
- development stage. It is intended exclusively for experts who have experience with such software and
- solely for the purpose of inspection. All implied warranties of non-infringement, merchantability
- and fitness for a particular purpose are hereby disclaimed and excluded.
-
- Any dispute, controversy or claim arising under or in relation to providing this software shall be
- submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in
- accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
- the United Nations Convention on Contracts on the International Sales of Goods.
-
-*******************************************************************************************************/
-
-/*====================================================================================
- EVS Codec 3GPP TS26.443 Nov 04, 2021. Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0
- ====================================================================================*/
-
-#include
-#include "options.h"
-#include
-#include "prot_fx.h"
-#include "wmc_auto.h"
-
-/*------------------------------------------------------------------*
- * own_random()
- *
- * Random generator
- *------------------------------------------------------------------*/
-
-/*! r: output random value */
-Word16 own_random(
- Word16 *seed /* i/o: random seed */
-)
-{
- *seed = (Word16) ( *seed * 31821L + 13849L );
-
- return ( *seed );
-}
-
-/*---------------------------------------------------------------------
- * norm_ul_float()
- *
- *---------------------------------------------------------------------*/
-
-Word16 norm_ul_float( UWord32 UL_var1 )
-{
- Word16 var_out;
-
- if ( UL_var1 == 0 )
- {
- var_out = 0;
- }
- else
- {
- for ( var_out = 0; UL_var1 < (UWord32) 0x80000000U; var_out++ )
- {
- UL_var1 <<= 1;
- }
- }
- BASOP_CHECK();
-
- return ( var_out );
-}
-
-
-/*---------------------------------------------------------------------
- * sum_s()
- * sum_l()
- *
- *---------------------------------------------------------------------*/
-
-/*! r: sum of all vector elements */
-Word16 sum_s(
- const Word16 *vec, /* i : input vector */
- const Word16 lvec /* i : length of input vector */
-)
-{
- Word16 i;
- Word16 tmp;
-
- tmp = 0;
- for ( i = 0; i < lvec; i++ )
- {
- tmp += vec[i];
- }
-
- return tmp;
-}
-
-/*! r: sum of all vector elements */
-Word32 sum_l_fx(
- const Word32 *vec, /* i : input vector */
- const Word16 lvec /* i : length of input vector */
-)
-{
- Word16 i;
- Word32 tmpL;
-
- tmpL = 0;
- move32();
- FOR( i = 0; i < lvec; i++ )
- {
- tmpL = L_add( tmpL, vec[i] );
- }
-
- return tmpL;
-}
-
-/*----------------------------------------------------------------------
- * sum2_f()
- *
- *---------------------------------------------------------------------*/
-
-/*! r: sum of all squared vector elements */
-Word32 sum2_f_16_fx(
- const Word16 *vec, /* i : input vector */
- const Word16 lvec /* i : length of input vector */
-)
-{
- Word16 i;
- Word32 tmp;
-
- tmp = 0;
- move32();
- FOR( i = 0; i < lvec; i++ )
- {
- tmp = L_add( tmp, L_mult0( vec[i], vec[i] ) );
- }
-
- return tmp;
-}
-Word32 sum2_f_16_gb_fx(
- const Word16 *vec, /* i : input vector */
- const Word16 lvec, /* i : length of input vector */
- Word16 gb )
-{
- Word16 i;
- Word32 tmp;
-
- tmp = 0;
- FOR( i = 0; i < lvec; i++ )
- {
- tmp = L_add( tmp, L_shr( L_mult0( vec[i], vec[i] ), gb ) );
- }
-
- return tmp;
-}
-
-Word32 sum2_16_exp_fx(
- const Word16 *vec, /* i : input vector Q(15 - exp) */
- const Word16 lvec, /* i : length of input vector */
- Word16 *exp, /* i/o: exponent of vector */
- Word16 gb /* i : guard bits */
-)
-{
- Word16 i, s;
- Word32 L_tmp, var_a;
-
- L_tmp = 0;
- move32();
- var_a = 0;
- move32();
- FOR( i = 0; i < lvec; i++ )
- {
- var_a = L_mult0( vec[i], vec[i] ); /* 2 * Q(15 - exp) */
- L_tmp = L_add( L_tmp, L_shr( var_a, gb ) ); /* 2 * Q(15 - exp) - gb */
- }
-
- s = norm_l( L_tmp );
- L_tmp = L_shl( L_tmp, s ); /* 2 * Q(15 - exp) - gb + s */
-
- *exp = add( sub( add( shl( *exp, 1 ), gb ), s ), 1 );
- move16();
-
- return L_tmp;
-}
-
-Word32 sum2_32_exp_fx(
- const Word32 *vec, /* i : input vector, Qx */
- const Word16 lvec, /* i : length of input vector */
- Word16 *exp, /* i/o: exponent of vector */
- Word16 gb /* i : guard bits */
-)
-{
- Word16 i, s, norm;
- Word64 W_tmp;
-
- W_tmp = 0;
- Word64 var_a = 0;
- move64();
- move64();
-
- norm = L_norm_arr( vec, lvec );
-
- gb = sub( gb, norm );
-
- FOR( i = 0; i < lvec; i++ )
- {
- var_a = W_mult0_32_32( vec[i], vec[i] ); // 2x
- W_tmp = W_add( W_tmp, W_shr( var_a, gb ) ); // 2x-gb
- }
-
- s = W_norm( W_tmp );
- W_tmp = W_shl( W_tmp, s ); // 2x - gb + s
-
- //*exp = 31 - (2*(31 - *exp) - gb + s) + 32;
- *exp = add( sub( add( shl( *exp, 1 ), gb ), s ), 1 );
- move16();
-
- return W_extract_h( W_tmp );
-}
-
-Word32 sum2_f_32_fx( /* o : Q(2x - 31 - gb) */
- const Word32 *vec, /* i : input vector, Qx */
- const Word16 lvec, /* i : length of input vector */
- Word16 gb /* i : guard bits */
-)
-{
- Word16 i;
- Word32 tmp;
-
- tmp = 0;
- Word32 var_a = 0;
- move32();
- move32();
- FOR( i = 0; i < lvec; i++ )
- {
- var_a = Mpy_32_32( vec[i], vec[i] ); // 2x-31
- tmp = L_add( tmp, L_shr( var_a, gb ) ); // 2x-31-gb
- }
-
- return tmp;
-}
-
-Word32 sum2_32_fx(
- const Word32 *vec, /* i : input vector */
- const Word16 lvec, /* i : length of input vector */
- Word16 *e )
-{
- Word16 i;
- Word32 tmp;
-
- tmp = 0;
- Word32 var_a = 0;
- Word16 exp = 0, exp_tmp;
- move32();
- move32();
- move16();
- FOR( i = 0; i < lvec; i++ )
- {
- exp_tmp = norm_l( vec[i] );
- var_a = L_shl( vec[i], exp_tmp );
- var_a = Mpy_32_32( var_a, var_a );
- exp_tmp = shl( sub( *e, exp_tmp ), 1 );
- tmp = BASOP_Util_Add_Mant32Exp( tmp, exp, var_a, exp_tmp, &exp );
- }
- *e = exp;
- move16();
-
- return tmp;
-}
-
-/*-------------------------------------------------------------------*
- * set_c()
- * set_s()
- * set_l()
- * set_d()
- *
- * Set the vector elements to a value
- *-------------------------------------------------------------------*/
-
-void set_c(
- Word8 y[], /* i/o: Vector to set */
- const Word8 a, /* i : Value to set the vector to */
- const Word32 N /* i : Length of the vector */
-)
-{
- Word16 i;
-
- for ( i = 0; i < N; i++ )
- {
- y[i] = a;
- }
-
- return;
-}
-
-
-void set_s(
- Word16 y[], /* i/o: Vector to set */
- const Word16 a, /* i : Value to set the vector to */
- const Word16 N /* i : Length of the vector */
-)
-{
- Word16 i;
-
- for ( i = 0; i < N; i++ )
- {
- y[i] = a;
- }
-
- return;
-}
-
-
-void set_l(
- Word32 y[], /* i/o: Vector to set */
- const Word32 a, /* i : Value to set the vector to */
- const Word16 N /* i : Length of the vector */
-)
-{
- Word16 i;
-
- for ( i = 0; i < N; i++ )
- {
- y[i] = a;
- }
-
- return;
-}
-
-/*---------------------------------------------------------------------*
- * set_zero()
- *
- * Set a vector vec[] of dimension lvec to zero
- *---------------------------------------------------------------------*/
-
-void set_zero(
- float *vec, /* o : input vector */
- const Word16 lvec /* i : length of the vector */
-)
-{
- Word16 i;
-
- for ( i = 0; i < lvec; i++ )
- {
- *vec++ = 0.0f;
- }
-
- return;
-}
-
-
-/*---------------------------------------------------------------------*
- * mvr2r()
- * mvs2s()
- * mvr2d()
- * mvd2r()
- *
- * Transfer the contents of vector x[] to vector y[]
- *---------------------------------------------------------------------*/
-
-void mvr2r(
- const float x[], /* i : input vector */
- float y[], /* o : output vector */
- const Word16 n /* i : vector size */
-)
-{
- Word16 i;
-
- if ( n <= 0 )
- {
- /* cannot transfer vectors with size 0 */
- return;
- }
-
- if ( y < x )
- {
- for ( i = 0; i < n; i++ )
- {
- y[i] = x[i];
- }
- }
- else
- {
- for ( i = n - 1; i >= 0; i-- )
- {
- y[i] = x[i];
- }
- }
-
- return;
-}
-
-void mvs2s(
- const Word16 x[], /* i : input vector */
- Word16 y[], /* o : output vector */
- const Word16 n /* i : vector size */
-)
-{
- Word16 i;
-
- if ( n <= 0 )
- {
- /* cannot transfer vectors with size 0 */
- return;
- }
-
- if ( y < x )
- {
- for ( i = 0; i < n; i++ )
- {
- y[i] = x[i];
- }
- }
- else
- {
- for ( i = n - 1; i >= 0; i-- )
- {
- y[i] = x[i];
- }
- }
-
- return;
-}
-
-void mvl2l(
- const Word32 x[], /* i : input vector */
- Word32 y[], /* o : output vector */
- const Word16 n /* i : vector size */
-)
-{
- Word16 i;
-
- if ( n <= 0 )
- {
- /* no need to transfer vectors with size 0 */
- return;
- }
-
- if ( y < x )
- {
- for ( i = 0; i < n; i++ )
- {
- y[i] = x[i];
- }
- }
- else
- {
- for ( i = n - 1; i >= 0; i-- )
- {
- y[i] = x[i];
- }
- }
-
- return;
-}
-
-/*! r: index of the maximum value in the input vector */
-Word16 maximum_s(
- const Word16 *vec, /* i : input vector */
- const Word16 lvec, /* i : length of input vector */
- Word16 *max /* o : maximum value in the input vector */
-)
-{
- Word16 i, ind;
- Word16 tmp;
-
- ind = 0;
- move16();
- tmp = vec[0];
- move16();
-
- FOR( i = 1; i < lvec; i++ )
- {
- IF( GT_16( vec[i], tmp ) )
- {
- ind = i;
- move16();
- tmp = vec[i];
- move16();
- }
- }
-
- if ( max != NULL )
- {
- *max = tmp;
- move16();
- }
-
- return ind;
-}
-
-/*! r: index of the maximum value in the input vector */
-Word16 maximum_l(
- const Word32 *vec, /* i : input vector */
- const Word16 lvec, /* i : length of input vector */
- Word32 *max_val /* o : maximum value in the input vector */
-)
-{
- Word16 i, ind;
- Word32 tmp;
-
- ind = 0;
- tmp = vec[0];
- move16();
- move32();
- FOR( i = 1; i < lvec; i++ )
- {
- IF( GT_32( vec[i], tmp ) )
- {
- ind = i;
- tmp = vec[i];
- move16();
- move32();
- }
- }
-
- if ( max_val != NULL )
- {
- *max_val = tmp;
- move32();
- }
-
- return ind;
-}
-
-/*! r: index of the maximum value in the input vector */
-Word16 maximumAbs_l(
- const Word32 *vec, /* i : input vector */
- const Word16 lvec, /* i : length of input vector */
- Word32 *max_val /* o : maximum value in the input vector */
-)
-{
- Word16 j, ind;
- Word32 tmp;
-
- ind = 0;
- move16();
- tmp = L_abs( vec[0] );
-
- FOR( j = 1; j < lvec; j++ )
- {
- IF( GT_32( L_abs( vec[j] ), tmp ) )
- {
- ind = j;
- move16();
- tmp = L_abs( vec[j] );
- }
- }
-
- IF( max_val != NULL )
- {
- *max_val = tmp;
- move32();
- }
-
- return ind;
-}
-
-/*-------------------------------------------------------------------*
- * minimum_s()
- *
- * Finds minimum 16-bit signed integer value in the array and returns it.
- *-------------------------------------------------------------------*/
-
-/*! r: index of the minimum value in the input vector */
-Word16 minimum_s(
- const Word16 *vec, /* i : Input vector */
- const Word16 lvec, /* i : Vector length */
- Word16 *min_val /* o : minimum value in the input vector */
-)
-{
- Word16 i, ind;
-
- ind = 0;
- move16();
-
- FOR( i = 1; i < lvec; i++ )
- {
- if ( LT_16( vec[i], vec[ind] ) )
- {
- ind = i;
- move16();
- }
- }
-
- if ( min_val != NULL )
- {
- *min_val = vec[ind];
- move16();
- }
-
- return ind;
-}
-
-/*-------------------------------------------------------------------*
- * minimum_l()
- *
- * Finds minimum 16-bit signed integer value in the array and returns it.
- *-------------------------------------------------------------------*/
-
-/*! r: index of the minimum value in the input vector */
-Word16 minimum_l(
- const Word32 *vec, /* i : Input vector */
- const Word16 lvec, /* i : Vector length */
- Word32 *min_val /* o : minimum value in the input vector */
-)
-{
- Word16 i, ind;
-
- ind = 0;
- move16();
-
- FOR( i = 1; i < lvec; i++ )
- {
- if ( LT_32( vec[i], vec[ind] ) )
- {
- ind = i;
- move16();
- }
- }
-
- if ( min_val != NULL )
- {
- *min_val = vec[ind];
- move32();
- }
-
- return ind;
-}
-
-/*---------------------------------------------------------------------*
- * dotp()
- *
- * Dot product of vector x[] and vector y[]
- *---------------------------------------------------------------------*/
-
-/*! r: dot product of x[] and y[] */
-Word32 dotp_fixed(
- const Word32 x[], /* i : vector x[] Qx */
- const Word32 y[], /* i : vector y[] Qy */
- const Word16 n /* i : vector length */
-)
-{
- Word16 i;
- Word32 suma;
-
- suma = Mpy_32_32( x[0], y[0] );
-
- FOR( i = 1; i < n; i++ )
- {
- suma = L_add( suma, Mpy_32_32( x[i], y[i] ) );
- }
-
- return suma;
-}
-
-/*To calculate dot product of two 32 bit arrays in case of overflow*/
-Word32 dotp_fixed_o(
- const Word32 x[], /* i : vector x[] */
- const Word32 y[], /* i : vector y[] */
- const Word16 n, /* i : vector length */
- const Word16 log_len, /* i : max factor added to result q after dot product (equal to log2(n)) */
- Word16 *res_q /*stores resultant Q*/
-)
-{
- Word16 i;
- Word64 suma; /*resultant q= q(x)+q(y)-9-x such that q<=31*/
-
- suma = W_shr( W_mult_32_32( x[0], y[0] ), log_len );
-
- FOR( i = 1; i < n; i++ )
- {
- suma = W_add( suma, W_shr( W_mult_32_32( x[i], y[i] ), log_len ) );
- }
- *res_q = add( sub( *res_q, log_len ), 1 );
- move16();
- test();
- test();
- FOR( ; ( suma > MAX_32 ) || ( suma < MIN_32 ) || ( *res_q > 31 ); )
- {
- suma = W_shr( suma, 1 );
- *res_q = sub( *res_q, 1 );
- move16();
- }
- return W_extract_l( suma );
-}
-
-Word32 dotp_fixed_32(
- const Word32 x[], /* i : vector x[] */
- const Word32 y[], /* i : vector y[] */
- const Word16 n, /* i : vector length */
- const Word16 log_len, /* i : max factor added to result q after dot product (equal to log2(n)) */
- Word16 *res_q /*stores resultant Q*/
-)
-{
- Word16 i;
- Word64 suma; /*resultant q= q(x)+q(y)-9-x such that q<=31*/
-
- suma = W_shr( W_mult_32_32( x[0], y[0] ), log_len );
-
- FOR( i = 1; i < n; i++ )
- {
- suma = W_add( suma, W_shr( W_mult_32_32( x[i], y[i] ), log_len ) );
- }
- *res_q = add( *res_q, add( sub( *res_q, log_len ), 1 ) );
- move16();
- test();
- test();
- FOR( ; ( suma > MAX_32 ) || ( suma < MIN_32 ) || ( *res_q > 31 ); )
- {
- suma = W_shr( suma, 1 );
- *res_q = sub( *res_q, 1 );
- move16();
- }
- return W_extract_l( suma );
-}
-
-/*-------------------------------------------------------------------*
- * v_add_w64()
- *
- * Subtraction of two vectors sample by sample
- *-------------------------------------------------------------------*/
-
-void v_add_w64(
- const Word64 x1[], /* i : Input vector 1 */
- const Word64 x2[], /* i : Input vector 2 */
- Word64 y[], /* o : Output vector that contains vector 1 - vector 2 */
- const Word16 N, /* i : Vector length */
- const Word16 hdrm /* i : headroom for when subtraction result > 1 or < -1 */
-)
-{
- Word16 i;
-
- FOR( i = 0; i < N; i++ )
- {
- y[i] = W_add( W_shr( x1[i], hdrm ), W_shr( x2[i], hdrm ) );
- move64();
- }
-
- return;
-}
-
-/*-------------------------------------------------------------------*
- * v_sub_fixed()
- *
- * Subtraction of two vectors sample by sample
- *-------------------------------------------------------------------*/
-
-void v_sub_fixed(
- const Word32 x1[], /* i : Input vector 1 */
- const Word32 x2[], /* i : Input vector 2 */
- Word32 y[], /* o : Output vector that contains vector 1 - vector 2 */
- const Word16 N, /* i : Vector length */
- const Word16 hdrm /* i : headroom for when subtraction result > 1 or < -1 */
-)
-{
- Word16 i;
-
- FOR( i = 0; i < N; i++ )
- {
- y[i] = L_sub( L_shr( x1[i], hdrm ), L_shr( x2[i], hdrm ) );
- move32();
- }
-
- return;
-}
-
-void v_sub_fixed_no_hdrm(
- const Word32 x1[], /* i : Input vector 1 */
- const Word32 x2[], /* i : Input vector 2 */
- Word32 y[], /* o : Output vector that contains vector 1 - vector 2 */
- const Word16 N /* i : Vector length */
-)
-{
- Word16 i;
-
- FOR( i = 0; i < N; i++ )
- {
- y[i] = L_sub( x1[i], x2[i] );
- move32();
- }
-
- return;
-}
-
-/*-------------------------------------------------------------------*
- * v_multc_fixed()
- *
- * Multiplication of vector by constant
- *-------------------------------------------------------------------*/
-
-void v_multc_fixed(
- const Word32 x[], /* i : Input vector */
- const Word32 c, /* i : Constant */
- Word32 y[], /* o : Output vector that contains c*x */
- const Word16 N /* i : Vector length */
-)
-{
- Word16 i;
-
- FOR( i = 0; i < N; i++ )
- {
- y[i] = Mpy_32_32( c, x[i] );
- move32();
- }
-
- return;
-}
-
-void v_multc_fixed_16(
- const Word32 x[], /* i : Input vector */
- const Word16 c, /* i : Constant */
- Word32 y[], /* o : Output vector that contains c*x */
- const Word16 N /* i : Vector length */
-)
-{
- Word16 i;
-
- FOR( i = 0; i < N; i++ )
- {
- y[i] = Mpy_32_16_1( x[i], c );
- move32();
- }
-
- return;
-}
-
-void v_multc_fixed_16_16(
- const Word16 x[], /* i : Input vector */
- const Word16 c, /* i : Constant */
- Word16 y[], /* o : Output vector that contains c*x */
- const Word16 N /* i : Vector length */
-)
-{
- Word16 i;
-
- FOR( i = 0; i < N; i++ )
- {
- y[i] = mult_r( x[i], c );
- move16();
- }
-
- return;
-}
-
-/*-------------------------------------------------------------------*
- * usdequant()
- *
- * Uniform scalar de-quantizer routine
- *
- * Applies de-quantization based on scale and round operations.
- *-------------------------------------------------------------------*/
-
-float usdequant(
- const Word16 idx, /* i : quantizer index */
- const float qlow, /* i : lowest codebook entry (index 0) */
- const float delta /* i : quantization step */
-)
-{
- float g;
-
- g = idx * delta + qlow;
-
- return ( g );
-}
-
-void sort(
- UWord16 *x, /* i/o: Vector to be sorted */
- UWord16 len /* i/o: vector length */
-)
-{
- Word16 i;
- UWord16 j, tempr;
-
- FOR( i = len - 2; i >= 0; i-- )
- {
- tempr = x[i];
- move16();
- FOR( j = i + 1; ( j < len ) && ( tempr > x[j] ); j++ )
- {
- test();
- x[j - 1] = x[j];
- move16();
- }
- x[j - 1] = tempr;
- move16();
- }
-
- return;
-}
diff --git a/lib_com/tools_fx.c b/lib_com/tools_fx.c
index 0cfca3883ee90d9a9e3dff10e129b146493af0ba..a1d35062bfc0f6f939deb59bf315c8d0d9f8cf20 100644
--- a/lib_com/tools_fx.c
+++ b/lib_com/tools_fx.c
@@ -52,12 +52,882 @@
#include "prot_fx_enc.h"
#include "ivas_prot_fx.h"
-#define INV_BANDS10 3277 /* 1/10 in Q15 */
-#define INV_BANDS9 3641 /* 1/9 in Q15 */
-#define INV_BANDS3 10923 /* 1/9 in Q15 */
-const Word16 b_hp400_fx[3] = { 3660, -7320, 3660 }; /* Q12 (/4) */
-const Word16 a_hp400_fx[3] = { 16384, 29280, -14160 };
-const Word16 a_hp400_ivas_fx[3] = { 4096, 7320, -3540 }; /*Q12*/
+
+#define INV_BANDS10 3277 /* 1/10 in Q15 */
+#define INV_BANDS9 3641 /* 1/9 in Q15 */
+#define INV_BANDS3 10923 /* 1/9 in Q15 */
+static const Word16 b_hp400_fx[3] = { 3660, -7320, 3660 }; /* Q12 (/4) */
+static const Word16 a_hp400_fx[3] = { 16384, 29280, -14160 };
+static const Word16 a_hp400_ivas_fx[3] = { 4096, 7320, -3540 }; /*Q12*/
+
+/*------------------------------------------------------------------*
+ * own_random()
+ *
+ * Random generator
+ *------------------------------------------------------------------*/
+
+/*! r: output random value */
+Word16 own_random(
+ Word16 *seed /* i/o: random seed */
+)
+{
+ *seed = (Word16) ( *seed * 31821L + 13849L );
+
+ return ( *seed );
+}
+
+/*---------------------------------------------------------------------
+ * norm_ul_float()
+ *
+ *---------------------------------------------------------------------*/
+
+Word16 norm_ul_float( UWord32 UL_var1 )
+{
+ Word16 var_out;
+
+ if ( UL_var1 == 0 )
+ {
+ var_out = 0;
+ }
+ else
+ {
+ for ( var_out = 0; UL_var1 < (UWord32) 0x80000000U; var_out++ )
+ {
+ UL_var1 <<= 1;
+ }
+ }
+ BASOP_CHECK();
+
+ return ( var_out );
+}
+
+
+/*---------------------------------------------------------------------
+ * sum_s()
+ * sum_l()
+ *
+ *---------------------------------------------------------------------*/
+
+/*! r: sum of all vector elements */
+Word16 sum_s(
+ const Word16 *vec, /* i : input vector */
+ const Word16 lvec /* i : length of input vector */
+)
+{
+ Word16 i;
+ Word16 tmp;
+
+ tmp = 0;
+ for ( i = 0; i < lvec; i++ )
+ {
+ tmp += vec[i];
+ }
+
+ return tmp;
+}
+
+/*! r: sum of all vector elements */
+Word32 sum_l_fx(
+ const Word32 *vec, /* i : input vector */
+ const Word16 lvec /* i : length of input vector */
+)
+{
+ Word16 i;
+ Word32 tmpL;
+
+ tmpL = 0;
+ move32();
+ FOR( i = 0; i < lvec; i++ )
+ {
+ tmpL = L_add( tmpL, vec[i] );
+ }
+
+ return tmpL;
+}
+
+/*----------------------------------------------------------------------
+ * sum2_f()
+ *
+ *---------------------------------------------------------------------*/
+
+/*! r: sum of all squared vector elements */
+Word32 sum2_f_16_fx(
+ const Word16 *vec, /* i : input vector */
+ const Word16 lvec /* i : length of input vector */
+)
+{
+ Word16 i;
+ Word32 tmp;
+
+ tmp = 0;
+ move32();
+ FOR( i = 0; i < lvec; i++ )
+ {
+ tmp = L_add( tmp, L_mult0( vec[i], vec[i] ) );
+ }
+
+ return tmp;
+}
+Word32 sum2_f_16_gb_fx(
+ const Word16 *vec, /* i : input vector */
+ const Word16 lvec, /* i : length of input vector */
+ Word16 gb )
+{
+ Word16 i;
+ Word32 tmp;
+
+ tmp = 0;
+ FOR( i = 0; i < lvec; i++ )
+ {
+ tmp = L_add( tmp, L_shr( L_mult0( vec[i], vec[i] ), gb ) );
+ }
+
+ return tmp;
+}
+
+
+Word32 sum2_16_exp_fx(
+ const Word16 *vec, /* i : input vector Q(15 - exp) */
+ const Word16 lvec, /* i : length of input vector */
+ Word16 *exp, /* i/o: exponent of vector */
+ Word16 gb /* i : guard bits */
+)
+{
+ Word16 i, s;
+ Word32 L_tmp, var_a;
+
+ L_tmp = 0;
+ move32();
+ var_a = 0;
+ move32();
+ FOR( i = 0; i < lvec; i++ )
+ {
+ var_a = L_mult0( vec[i], vec[i] ); /* 2 * Q(15 - exp) */
+ L_tmp = L_add( L_tmp, L_shr( var_a, gb ) ); /* 2 * Q(15 - exp) - gb */
+ }
+
+ s = norm_l( L_tmp );
+ L_tmp = L_shl( L_tmp, s ); /* 2 * Q(15 - exp) - gb + s */
+
+ *exp = add( sub( add( shl( *exp, 1 ), gb ), s ), 1 );
+ move16();
+
+ return L_tmp;
+}
+
+
+Word32 sum2_32_exp_fx(
+ const Word32 *vec, /* i : input vector, Qx */
+ const Word16 lvec, /* i : length of input vector */
+ Word16 *exp, /* i/o: exponent of vector */
+ Word16 gb /* i : guard bits */
+)
+{
+ Word16 i, s, norm;
+ Word64 W_tmp;
+
+ W_tmp = 0;
+ Word64 var_a = 0;
+ move64();
+ move64();
+
+ norm = L_norm_arr( vec, lvec );
+
+ gb = sub( gb, norm );
+
+ FOR( i = 0; i < lvec; i++ )
+ {
+ var_a = W_mult0_32_32( vec[i], vec[i] ); // 2x
+ W_tmp = W_add( W_tmp, W_shr( var_a, gb ) ); // 2x-gb
+ }
+
+ s = W_norm( W_tmp );
+ W_tmp = W_shl( W_tmp, s ); // 2x - gb + s
+
+ //*exp = 31 - (2*(31 - *exp) - gb + s) + 32;
+ *exp = add( sub( add( shl( *exp, 1 ), gb ), s ), 1 );
+ move16();
+
+ return W_extract_h( W_tmp );
+}
+
+
+/* o : Q(2x - 31 - gb) */
+Word32 sum2_f_32_fx(
+ const Word32 *vec, /* i : input vector, Qx */
+ const Word16 lvec, /* i : length of input vector */
+ Word16 gb /* i : guard bits */
+)
+{
+ Word16 i;
+ Word32 tmp;
+
+ tmp = 0;
+ Word32 var_a = 0;
+ move32();
+ move32();
+ FOR( i = 0; i < lvec; i++ )
+ {
+ var_a = Mpy_32_32( vec[i], vec[i] ); // 2x-31
+ tmp = L_add( tmp, L_shr( var_a, gb ) ); // 2x-31-gb
+ }
+
+ return tmp;
+}
+
+Word32 sum2_32_fx(
+ const Word32 *vec, /* i : input vector */
+ const Word16 lvec, /* i : length of input vector */
+ Word16 *e )
+{
+ Word16 i;
+ Word32 tmp;
+
+ tmp = 0;
+ Word32 var_a = 0;
+ Word16 exp = 0, exp_tmp;
+ move32();
+ move32();
+ move16();
+ FOR( i = 0; i < lvec; i++ )
+ {
+ exp_tmp = norm_l( vec[i] );
+ var_a = L_shl( vec[i], exp_tmp );
+ var_a = Mpy_32_32( var_a, var_a );
+ exp_tmp = shl( sub( *e, exp_tmp ), 1 );
+ tmp = BASOP_Util_Add_Mant32Exp( tmp, exp, var_a, exp_tmp, &exp );
+ }
+ *e = exp;
+ move16();
+
+ return tmp;
+}
+
+
+/*-------------------------------------------------------------------*
+ * set_c()
+ * set_s()
+ * set_l()
+ * set_d()
+ *
+ * Set the vector elements to a value
+ *-------------------------------------------------------------------*/
+
+void set_c(
+ Word8 y[], /* i/o: Vector to set */
+ const Word8 a, /* i : Value to set the vector to */
+ const Word32 N /* i : Length of the vector */
+)
+{
+ Word16 i;
+
+ for ( i = 0; i < N; i++ )
+ {
+ y[i] = a;
+ }
+
+ return;
+}
+
+
+void set_s(
+ Word16 y[], /* i/o: Vector to set */
+ const Word16 a, /* i : Value to set the vector to */
+ const Word16 N /* i : Length of the vector */
+)
+{
+ Word16 i;
+
+ for ( i = 0; i < N; i++ )
+ {
+ y[i] = a;
+ }
+
+ return;
+}
+
+
+void set_l(
+ Word32 y[], /* i/o: Vector to set */
+ const Word32 a, /* i : Value to set the vector to */
+ const Word16 N /* i : Length of the vector */
+)
+{
+ Word16 i;
+
+ for ( i = 0; i < N; i++ )
+ {
+ y[i] = a;
+ }
+
+ return;
+}
+
+/*---------------------------------------------------------------------*
+ * set_zero()
+ *
+ * Set a vector vec[] of dimension lvec to zero
+ *---------------------------------------------------------------------*/
+
+void set_zero(
+ float *vec, /* o : input vector */
+ const Word16 lvec /* i : length of the vector */
+)
+{
+ Word16 i;
+
+ for ( i = 0; i < lvec; i++ )
+ {
+ *vec++ = 0.0f;
+ }
+
+ return;
+}
+
+
+/*---------------------------------------------------------------------*
+ * mvr2r()
+ * mvs2s()
+ * mvr2d()
+ * mvd2r()
+ *
+ * Transfer the contents of vector x[] to vector y[]
+ *---------------------------------------------------------------------*/
+
+void mvr2r(
+ const float x[], /* i : input vector */
+ float y[], /* o : output vector */
+ const Word16 n /* i : vector size */
+)
+{
+ Word16 i;
+
+ if ( n <= 0 )
+ {
+ /* cannot transfer vectors with size 0 */
+ return;
+ }
+
+ if ( y < x )
+ {
+ for ( i = 0; i < n; i++ )
+ {
+ y[i] = x[i];
+ }
+ }
+ else
+ {
+ for ( i = n - 1; i >= 0; i-- )
+ {
+ y[i] = x[i];
+ }
+ }
+
+ return;
+}
+
+void mvs2s(
+ const Word16 x[], /* i : input vector */
+ Word16 y[], /* o : output vector */
+ const Word16 n /* i : vector size */
+)
+{
+ Word16 i;
+
+ if ( n <= 0 )
+ {
+ /* cannot transfer vectors with size 0 */
+ return;
+ }
+
+ if ( y < x )
+ {
+ for ( i = 0; i < n; i++ )
+ {
+ y[i] = x[i];
+ }
+ }
+ else
+ {
+ for ( i = n - 1; i >= 0; i-- )
+ {
+ y[i] = x[i];
+ }
+ }
+
+ return;
+}
+
+void mvl2l(
+ const Word32 x[], /* i : input vector */
+ Word32 y[], /* o : output vector */
+ const Word16 n /* i : vector size */
+)
+{
+ Word16 i;
+
+ if ( n <= 0 )
+ {
+ /* no need to transfer vectors with size 0 */
+ return;
+ }
+
+ if ( y < x )
+ {
+ for ( i = 0; i < n; i++ )
+ {
+ y[i] = x[i];
+ }
+ }
+ else
+ {
+ for ( i = n - 1; i >= 0; i-- )
+ {
+ y[i] = x[i];
+ }
+ }
+
+ return;
+}
+
+/*! r: index of the maximum value in the input vector */
+Word16 maximum_s(
+ const Word16 *vec, /* i : input vector */
+ const Word16 lvec, /* i : length of input vector */
+ Word16 *max /* o : maximum value in the input vector */
+)
+{
+ Word16 i, ind;
+ Word16 tmp;
+
+ ind = 0;
+ move16();
+ tmp = vec[0];
+ move16();
+
+ FOR( i = 1; i < lvec; i++ )
+ {
+ IF( GT_16( vec[i], tmp ) )
+ {
+ ind = i;
+ move16();
+ tmp = vec[i];
+ move16();
+ }
+ }
+
+ if ( max != NULL )
+ {
+ *max = tmp;
+ move16();
+ }
+
+ return ind;
+}
+
+/*! r: index of the maximum value in the input vector */
+Word16 maximum_l(
+ const Word32 *vec, /* i : input vector */
+ const Word16 lvec, /* i : length of input vector */
+ Word32 *max_val /* o : maximum value in the input vector */
+)
+{
+ Word16 i, ind;
+ Word32 tmp;
+
+ ind = 0;
+ tmp = vec[0];
+ move16();
+ move32();
+ FOR( i = 1; i < lvec; i++ )
+ {
+ IF( GT_32( vec[i], tmp ) )
+ {
+ ind = i;
+ tmp = vec[i];
+ move16();
+ move32();
+ }
+ }
+
+ if ( max_val != NULL )
+ {
+ *max_val = tmp;
+ move32();
+ }
+
+ return ind;
+}
+
+/*! r: index of the maximum value in the input vector */
+Word16 maximumAbs_l(
+ const Word32 *vec, /* i : input vector */
+ const Word16 lvec, /* i : length of input vector */
+ Word32 *max_val /* o : maximum value in the input vector */
+)
+{
+ Word16 j, ind;
+ Word32 tmp;
+
+ ind = 0;
+ move16();
+ tmp = L_abs( vec[0] );
+
+ FOR( j = 1; j < lvec; j++ )
+ {
+ IF( GT_32( L_abs( vec[j] ), tmp ) )
+ {
+ ind = j;
+ move16();
+ tmp = L_abs( vec[j] );
+ }
+ }
+
+ IF( max_val != NULL )
+ {
+ *max_val = tmp;
+ move32();
+ }
+
+ return ind;
+}
+
+/*-------------------------------------------------------------------*
+ * minimum_s()
+ *
+ * Finds minimum 16-bit signed integer value in the array and returns it.
+ *-------------------------------------------------------------------*/
+
+/*! r: index of the minimum value in the input vector */
+Word16 minimum_s(
+ const Word16 *vec, /* i : Input vector */
+ const Word16 lvec, /* i : Vector length */
+ Word16 *min_val /* o : minimum value in the input vector */
+)
+{
+ Word16 i, ind;
+
+ ind = 0;
+ move16();
+
+ FOR( i = 1; i < lvec; i++ )
+ {
+ if ( LT_16( vec[i], vec[ind] ) )
+ {
+ ind = i;
+ move16();
+ }
+ }
+
+ if ( min_val != NULL )
+ {
+ *min_val = vec[ind];
+ move16();
+ }
+
+ return ind;
+}
+
+/*-------------------------------------------------------------------*
+ * minimum_l()
+ *
+ * Finds minimum 16-bit signed integer value in the array and returns it.
+ *-------------------------------------------------------------------*/
+
+/*! r: index of the minimum value in the input vector */
+Word16 minimum_l(
+ const Word32 *vec, /* i : Input vector */
+ const Word16 lvec, /* i : Vector length */
+ Word32 *min_val /* o : minimum value in the input vector */
+)
+{
+ Word16 i, ind;
+
+ ind = 0;
+ move16();
+
+ FOR( i = 1; i < lvec; i++ )
+ {
+ if ( LT_32( vec[i], vec[ind] ) )
+ {
+ ind = i;
+ move16();
+ }
+ }
+
+ if ( min_val != NULL )
+ {
+ *min_val = vec[ind];
+ move32();
+ }
+
+ return ind;
+}
+
+/*---------------------------------------------------------------------*
+ * dotp()
+ *
+ * Dot product of vector x[] and vector y[]
+ *---------------------------------------------------------------------*/
+
+/*! r: dot product of x[] and y[] */
+Word32 dotp_fixed(
+ const Word32 x[], /* i : vector x[] Qx */
+ const Word32 y[], /* i : vector y[] Qy */
+ const Word16 n /* i : vector length */
+)
+{
+ Word16 i;
+ Word32 suma;
+
+ suma = Mpy_32_32( x[0], y[0] );
+
+ FOR( i = 1; i < n; i++ )
+ {
+ suma = L_add( suma, Mpy_32_32( x[i], y[i] ) );
+ }
+
+ return suma;
+}
+
+/*To calculate dot product of two 32 bit arrays in case of overflow*/
+Word32 dotp_fixed_o(
+ const Word32 x[], /* i : vector x[] */
+ const Word32 y[], /* i : vector y[] */
+ const Word16 n, /* i : vector length */
+ const Word16 log_len, /* i : max factor added to result q after dot product (equal to log2(n)) */
+ Word16 *res_q /*stores resultant Q*/
+)
+{
+ Word16 i;
+ Word64 suma; /*resultant q= q(x)+q(y)-9-x such that q<=31*/
+
+ suma = W_shr( W_mult_32_32( x[0], y[0] ), log_len );
+
+ FOR( i = 1; i < n; i++ )
+ {
+ suma = W_add( suma, W_shr( W_mult_32_32( x[i], y[i] ), log_len ) );
+ }
+ *res_q = add( sub( *res_q, log_len ), 1 );
+ move16();
+ test();
+ test();
+ FOR( ; ( suma > MAX_32 ) || ( suma < MIN_32 ) || ( *res_q > 31 ); )
+ {
+ suma = W_shr( suma, 1 );
+ *res_q = sub( *res_q, 1 );
+ move16();
+ }
+
+ return W_extract_l( suma );
+}
+
+
+Word32 dotp_fixed_32(
+ const Word32 x[], /* i : vector x[] */
+ const Word32 y[], /* i : vector y[] */
+ const Word16 n, /* i : vector length */
+ const Word16 log_len, /* i : max factor added to result q after dot product (equal to log2(n)) */
+ Word16 *res_q /*stores resultant Q*/
+)
+{
+ Word16 i;
+ Word64 suma; /*resultant q= q(x)+q(y)-9-x such that q<=31*/
+
+ suma = W_shr( W_mult_32_32( x[0], y[0] ), log_len );
+
+ FOR( i = 1; i < n; i++ )
+ {
+ suma = W_add( suma, W_shr( W_mult_32_32( x[i], y[i] ), log_len ) );
+ }
+ *res_q = add( *res_q, add( sub( *res_q, log_len ), 1 ) );
+ move16();
+ test();
+ test();
+ FOR( ; ( suma > MAX_32 ) || ( suma < MIN_32 ) || ( *res_q > 31 ); )
+ {
+ suma = W_shr( suma, 1 );
+ *res_q = sub( *res_q, 1 );
+ move16();
+ }
+ return W_extract_l( suma );
+}
+
+
+/*-------------------------------------------------------------------*
+ * v_add_w64()
+ *
+ * Subtraction of two vectors sample by sample
+ *-------------------------------------------------------------------*/
+
+void v_add_w64(
+ const Word64 x1[], /* i : Input vector 1 */
+ const Word64 x2[], /* i : Input vector 2 */
+ Word64 y[], /* o : Output vector that contains vector 1 - vector 2 */
+ const Word16 N, /* i : Vector length */
+ const Word16 hdrm /* i : headroom for when subtraction result > 1 or < -1 */
+)
+{
+ Word16 i;
+
+ FOR( i = 0; i < N; i++ )
+ {
+ y[i] = W_add( W_shr( x1[i], hdrm ), W_shr( x2[i], hdrm ) );
+ move64();
+ }
+
+ return;
+}
+
+
+/*-------------------------------------------------------------------*
+ * v_sub_fixed()
+ *
+ * Subtraction of two vectors sample by sample
+ *-------------------------------------------------------------------*/
+
+void v_sub_fixed(
+ const Word32 x1[], /* i : Input vector 1 */
+ const Word32 x2[], /* i : Input vector 2 */
+ Word32 y[], /* o : Output vector that contains vector 1 - vector 2 */
+ const Word16 N, /* i : Vector length */
+ const Word16 hdrm /* i : headroom for when subtraction result > 1 or < -1 */
+)
+{
+ Word16 i;
+
+ FOR( i = 0; i < N; i++ )
+ {
+ y[i] = L_sub( L_shr( x1[i], hdrm ), L_shr( x2[i], hdrm ) );
+ move32();
+ }
+
+ return;
+}
+
+void v_sub_fixed_no_hdrm(
+ const Word32 x1[], /* i : Input vector 1 */
+ const Word32 x2[], /* i : Input vector 2 */
+ Word32 y[], /* o : Output vector that contains vector 1 - vector 2 */
+ const Word16 N /* i : Vector length */
+)
+{
+ Word16 i;
+
+ FOR( i = 0; i < N; i++ )
+ {
+ y[i] = L_sub( x1[i], x2[i] );
+ move32();
+ }
+
+ return;
+}
+
+/*-------------------------------------------------------------------*
+ * v_multc_fixed()
+ *
+ * Multiplication of vector by constant
+ *-------------------------------------------------------------------*/
+
+void v_multc_fixed(
+ const Word32 x[], /* i : Input vector */
+ const Word32 c, /* i : Constant */
+ Word32 y[], /* o : Output vector that contains c*x */
+ const Word16 N /* i : Vector length */
+)
+{
+ Word16 i;
+
+ FOR( i = 0; i < N; i++ )
+ {
+ y[i] = Mpy_32_32( c, x[i] );
+ move32();
+ }
+
+ return;
+}
+
+void v_multc_fixed_16(
+ const Word32 x[], /* i : Input vector */
+ const Word16 c, /* i : Constant */
+ Word32 y[], /* o : Output vector that contains c*x */
+ const Word16 N /* i : Vector length */
+)
+{
+ Word16 i;
+
+ FOR( i = 0; i < N; i++ )
+ {
+ y[i] = Mpy_32_16_1( x[i], c );
+ move32();
+ }
+
+ return;
+}
+
+void v_multc_fixed_16_16(
+ const Word16 x[], /* i : Input vector */
+ const Word16 c, /* i : Constant */
+ Word16 y[], /* o : Output vector that contains c*x */
+ const Word16 N /* i : Vector length */
+)
+{
+ Word16 i;
+
+ FOR( i = 0; i < N; i++ )
+ {
+ y[i] = mult_r( x[i], c );
+ move16();
+ }
+
+ return;
+}
+
+/*-------------------------------------------------------------------*
+ * usdequant()
+ *
+ * Uniform scalar de-quantizer routine
+ *
+ * Applies de-quantization based on scale and round operations.
+ *-------------------------------------------------------------------*/
+
+float usdequant(
+ const Word16 idx, /* i : quantizer index */
+ const float qlow, /* i : lowest codebook entry (index 0) */
+ const float delta /* i : quantization step */
+)
+{
+ float g;
+
+ g = idx * delta + qlow;
+
+ return ( g );
+}
+
+void sort(
+ UWord16 *x, /* i/o: Vector to be sorted */
+ UWord16 len /* i/o: vector length */
+)
+{
+ Word16 i;
+ UWord16 j, tempr;
+
+ FOR( i = len - 2; i >= 0; i-- )
+ {
+ tempr = x[i];
+ move16();
+ FOR( j = i + 1; ( j < len ) && ( tempr > x[j] ); j++ )
+ {
+ test();
+ x[j - 1] = x[j];
+ move16();
+ }
+ x[j - 1] = tempr;
+ move16();
+ }
+
+ return;
+}
#define WMC_TOOL_SKIP
@@ -78,14 +948,18 @@ Word32 float_to_fix( float number, Word32 Q )
return ret;
}
-float fix_to_float( Word32 number, Word32 Q )
+float fix_to_float(
+ Word32 number,
+ Word32 Q )
{
assert( Q >= 0 );
float ret = (float) number / ( (UWord32) 1 << Q );
return ret;
}
-Word16 float_to_fix16( float number, Word16 Q )
+Word16 float_to_fix16(
+ float number,
+ Word16 Q )
{
assert( Q >= 0 );
IF( isnan( number ) )
@@ -241,6 +1115,7 @@ void fix2f_16( Word16 *var_fix, float *var_flt, Word32 expo )
#undef WMC_TOOL_SKIP
+
/*-------------------------------------------------------------------*
* usdequant_fx()
*
@@ -248,10 +1123,12 @@ void fix2f_16( Word16 *var_fix, float *var_flt, Word32 expo )
*
* Applies de-quantization based on scale and round operations.
*-------------------------------------------------------------------*/
-Word16 usdequant_fx( /* Qx*/
- const Word16 idx, /* i: quantizer index Q0*/
- const Word16 qlow, /* i: lowest codebook entry (index 0) Qx*/
- const Word16 delta /* i: quantization step Qx-1*/
+
+/* Qx*/
+Word16 usdequant_fx(
+ const Word16 idx, /* i: quantizer index Q0*/
+ const Word16 qlow, /* i: lowest codebook entry (index 0) Qx*/
+ const Word16 delta /* i: quantization step Qx-1*/
)
{
Word16 g;
@@ -264,10 +1141,11 @@ Word16 usdequant_fx( /* Qx*/
return ( g );
}
-Word32 usdequant32_fx( /* Qx*/
- const Word16 idx, /* i: quantizer index Q0*/
- const Word32 qlow, /* i: lowest codebook entry (index 0) Qx*/
- const Word32 delta /* i: quantization step Qx-1*/
+/* Qx*/
+Word32 usdequant32_fx(
+ const Word16 idx, /* i: quantizer index Q0*/
+ const Word32 qlow, /* i: lowest codebook entry (index 0) Qx*/
+ const Word32 delta /* i: quantization step Qx-1*/
)
{
Word32 g;
@@ -288,6 +1166,7 @@ Word32 usdequant32_fx( /* Qx*/
return ( g );
}
+
/*-------------------------------------------------------------------*
* usquant()
*
@@ -297,12 +1176,14 @@ Word32 usdequant32_fx( /* Qx*/
* Applies quantization based on scale and round operations.
* Index of the winning codeword and the winning codeword itself are returned.
*-------------------------------------------------------------------*/
-Word16 usquant_fx( /* o: index of the winning codeword */
- const Word16 x, /* i: scalar value to quantize Qx*/
- Word16 *xq, /* o: quantized value Qx*/
- const Word16 qlow, /* i: lowest codebook entry (index 0) Qx*/
- const Word16 delta, /* i: quantization step Qx-1*/
- const Word16 cbsize /* i: codebook size */
+
+/* o: index of the winning codeword */
+Word16 usquant_fx(
+ const Word16 x, /* i: scalar value to quantize Qx*/
+ Word16 *xq, /* o: quantized value Qx*/
+ const Word16 qlow, /* i: lowest codebook entry (index 0) Qx*/
+ const Word16 delta, /* i: quantization step Qx-1*/
+ const Word16 cbsize /* i: codebook size */
)
{
Word16 idx;
@@ -339,16 +1220,19 @@ Word16 usquant_fx( /* o: index of the winning codeword */
#endif
return idx;
}
+
+
/*-------------------------------------------------------------------*
* Dot_product:
*
* Compute scalar product of using accumulator.
* Performs no normalization, as opposed to Dot_product12()
*-------------------------------------------------------------------*/
-Word32 Dot_product( /* o : Sum */
- const Word16 x[], /* i : 12bits: x vector */
- const Word16 y[], /* i : 12bits: y vector */
- const Word16 lg /* i : vector length */
+/* o : Sum */
+Word32 Dot_product(
+ const Word16 x[], /* i : 12bits: x vector */
+ const Word16 y[], /* i : 12bits: y vector */
+ const Word16 lg /* i : vector length */
)
{
Word16 i;
@@ -362,19 +1246,23 @@ Word32 Dot_product( /* o : Sum */
L64_sum = W_mac_16_16( L64_sum, x[i], y[i] );
}
L_sum = W_sat_l( L64_sum );
+
return L_sum;
}
+
+
/*---------------------------------------------------------------------*
* dotp_fx()
*
* Dot product of vector x[] and vector y[]
*---------------------------------------------------------------------*/
-Word32 dotp_fx( /* o : dot product of x[] and y[] */
- const Word16 x[], /* i : vector x[] */
- const Word16 y[], /* i : vector y[] */
- const Word16 n, /* i : vector length */
- Word16 *exp /* (o) : exponent of result (0..+30) */
+/* o : dot product of x[] and y[] */
+Word32 dotp_fx(
+ const Word16 x[], /* i : vector x[] */
+ const Word16 y[], /* i : vector y[] */
+ const Word16 n, /* i : vector length */
+ Word16 *exp /* o : exponent of result (0..+30) */
)
{
Word16 sft;
@@ -395,9 +1283,10 @@ Word32 dotp_fx( /* o : dot product of x[] and y[] */
return L_sum;
}
-Word32 sum2_fx( /* o : sum of all squared vector elements Q(2x+1)*/
- const Word16 *vec, /* i : input vector Qx*/
- const Word16 lvec /* i : length of input vector */
+/* o : sum of all squared vector elements Q(2x+1)*/
+Word32 sum2_fx(
+ const Word16 *vec, /* i : input vector Qx*/
+ const Word16 lvec /* i : length of input vector */
)
{
Word16 i;
@@ -421,9 +1310,11 @@ Word32 sum2_fx( /* o : sum of all squared vector elements
return L_tmp;
}
-Word64 sum2_fx_no_sat( /* o : sum of all squared vector elements Q(2*Qx)*/
- const Word16 *vec, /* i : input vector Qx*/
- const Word16 lvec /* i : length of input vector */
+
+/* o : sum of all squared vector elements Q(2*Qx)*/
+Word64 sum2_fx_no_sat(
+ const Word16 *vec, /* i : input vector Qx*/
+ const Word16 lvec /* i : length of input vector */
)
{
Word16 i;
@@ -462,9 +1353,10 @@ Word32 sum_32_fx(
return ans;
}
-Word32 sum2_fx_mod( /* o : sum of all squared vector elements Q(2x+1 -5)*/
- const Word16 *vec, /* i : input vector Qx*/
- const Word16 lvec /* i : length of input vector */
+/* o : sum of all squared vector elements Q(2x+1 -5)*/
+Word32 sum2_fx_mod(
+ const Word16 *vec, /* i : input vector Qx*/
+ const Word16 lvec /* i : length of input vector */
)
{
Word16 i;
@@ -488,12 +1380,15 @@ Word32 sum2_fx_mod( /* o : sum of all squared vector element
return L_tmp;
}
+
+
/*-------------------------------------------------------------------*
* Copy:
*
* Copy vector x[] to y[]
*
*-------------------------------------------------------------------*/
+
void Copy(
const Word16 x[], /* i : input vector */
Word16 y[], /* o : output vector */
@@ -522,11 +1417,14 @@ void Copy(
return;
}
+
+
/*-------------------------------------------------------------------*
* Copy64:
*
* Copy vector x[] to y[] (64 bits)
*-------------------------------------------------------------------*/
+
void Copy64(
const Word64 x[], /* i : input vector */
Word64 y[], /* o : output vector */
@@ -650,12 +1548,14 @@ void set8_fx(
return;
}
+
/*-------------------------------------------------------------------*
* set16_fx()
* set32_fx()
*
* Set the vector elements to a value
*-------------------------------------------------------------------*/
+
void set16_fx(
Word16 y[], /* i/o: Vector to set */
const Word16 a, /* i : Value to set the vector to */
@@ -689,11 +1589,14 @@ void set32_fx(
return;
}
+
+
/*-------------------------------------------------------------------*
* Copy_Scale_sig
*
* Up/down scale a 16 bits vector x and move it into y
*-------------------------------------------------------------------*/
+
void Copy_Scale_sig(
const Word16 x[], /* i : signal to scale input Qx */
Word16 y[], /* o : scaled signal output Qx */
@@ -737,12 +1640,17 @@ void Copy_Scale_sig(
#endif
move16(); /* saturation can occur here */
}
+
+ return;
}
+
+
/*-------------------------------------------------------------------*
* Copy_Scale_sig
*
* Up/down scale a 16 bits vector x and move it into y
*-------------------------------------------------------------------*/
+
void Copy_Scale_sig_16_32_DEPREC(
const Word16 x[], /* i : signal to scale input Qx */
Word32 y[], /* o : scaled signal output Qx */
@@ -801,8 +1709,11 @@ void Copy_Scale_sig_16_32_DEPREC(
y[i] = L_mult0( x[i], tmp );
move32(); /* saturation can occur here */
}
+
+ return;
}
+
void Copy_Scale_sig_16_32_no_sat(
const Word16 x[], /* i : signal to scale input Qx */
Word32 y[], /* o : scaled signal output Qx */
@@ -868,8 +1779,11 @@ void Copy_Scale_sig_16_32_no_sat(
move32();
}
}
+
+ return;
}
+
void Copy_Scale_sig_32_16(
const Word32 x[], /* i : signal to scale input Qx */
Word16 y[], /* o : scaled signal output Qx */
@@ -911,13 +1825,17 @@ void Copy_Scale_sig_32_16(
move16();
}
}
+
+ return;
}
+
/*-------------------------------------------------------------------*
* Scale_sig32
*
* Up/down scale a 32 bits vector
*-------------------------------------------------------------------*/
+
void Scale_sig32(
Word32 x[], /* i/o: signal to scale Qx */
const Word16 lg, /* i : size of x[] Q0 */
@@ -945,8 +1863,11 @@ void Scale_sig32(
#endif
move32(); /* saturation can occur here */
}
+
+ return;
}
+
/*------------------------------------------------------------------*
* function Random_Fill
*
@@ -954,6 +1875,7 @@ void Scale_sig32(
* (Avoids Store of Seed to Memory for 'n' Random Values and
* Combines Scaling Operation.)
*------------------------------------------------------------------*/
+
void Random_Fill(
Word16 *seed, /* i/o: random seed */
Word16 n, /* i : number of values */
@@ -974,11 +1896,16 @@ void Random_Fill(
}
*seed = local_seed;
move16();
+
+ return;
}
+
+
/*-------------------------------------------------------------------*
* Scale_sig
* Up/down scale a 16 bits vector
*-------------------------------------------------------------------*/
+
void Scale_sig(
Word16 x[], /* i/o: signal to scale Qx */
const Word16 lg, /* i : size of x[] Q0 */
@@ -1009,10 +1936,12 @@ void Scale_sig(
}
}
+
/*-------------------------------------------------------------------*
* scale_sig
* Up/down scale a 16 bits vector
*-------------------------------------------------------------------*/
+
void scale_sig(
Word16 x[], /* i/o: signal to scale Qx */
const Word16 lg, /* i : size of x[] Q0 */
@@ -1035,9 +1964,11 @@ void scale_sig(
* mean_fx()
*
*---------------------------------------------------------------------*/
-Word16 mean_fx( /* o : mean of vector */
- const Word16 *vec_fx, /* i : input vector */
- const Word16 lvec_fx /* i : length of input vector */
+
+/* o : mean of vector */
+Word16 mean_fx(
+ const Word16 *vec_fx, /* i : input vector */
+ const Word16 lvec_fx /* i : length of input vector */
)
{
Word16 tmp;
@@ -1048,9 +1979,10 @@ Word16 mean_fx( /* o : mean of vector
return tmp;
}
-Word16 mean_no_sat_fx( /* o : mean of vector Qx */
- const Word16 *vec_fx, /* i : input vector Qx */
- const Word16 lvec_fx /* i : length of input vector */
+/* o : mean of vector Qx */
+Word16 mean_no_sat_fx(
+ const Word16 *vec_fx, /* i : input vector Qx */
+ const Word16 lvec_fx /* i : length of input vector */
)
{
Word16 i;
@@ -1064,10 +1996,12 @@ Word16 mean_no_sat_fx( /* o : mean of vector Qx *
return extract_l( L_tmp );
}
-Word32 mean_no_sat_Word32_fx( /* o : mean of vector Qx */
- const Word32 *vec_fx, /* i : input vector Qx */
- const Word16 lvec_fx, /* i : length of input vector */
- const Word16 gb )
+
+/* o : mean of vector Qx */
+Word32 mean_no_sat_Word32_fx(
+ const Word32 *vec_fx, /* i : input vector Qx */
+ const Word16 lvec_fx, /* i : length of input vector */
+ const Word16 gb )
{
Word16 i;
Word32 L_tmp = 0;
@@ -1080,11 +2014,14 @@ Word32 mean_no_sat_Word32_fx( /* o : mean of vector
return L_tmp;
}
+
+
/*-------------------------------------------------------------------*
* Vr_add
*
* Add two Word16 vectors together integer by integer
*-------------------------------------------------------------------*/
+
void Vr_add(
const Word16 *in1, /* i : Input vector 1 */
const Word16 *in2, /* i : Input vector 2 */
@@ -1129,6 +2066,8 @@ void sort_fx(
r[j - 1] = tempr;
move16();
}
+
+ return;
}
void sort_32_fx(
@@ -1160,10 +2099,11 @@ void sort_32_fx(
return;
}
-Word16 minimum_fx( /* o : index of the minimum value in the input vector */
- const Word16 *vec_fx, /* i : input vector */
- const Word16 lvec_fx, /* i : length of input vector */
- Word16 *min_fx /* o : minimum value in the input vector */
+/* o : index of the minimum value in the input vector */
+Word16 minimum_fx(
+ const Word16 *vec_fx, /* i : input vector */
+ const Word16 lvec_fx, /* i : length of input vector */
+ Word16 *min_fx /* o : minimum value in the input vector */
)
{
Word16 j, ind;
@@ -1190,10 +2130,11 @@ Word16 minimum_fx( /* o : index of the minimum value in t
return ind;
}
-Word16 maximum_fx( /* o : index of the maximum value in the input vector */
- const Word16 *vec_fx, /* i : input vector */
- const Word16 lvec_fx, /* i : length of input vector */
- Word16 *max_fx /* o : maximum value in the input vector */
+/* o : index of the maximum value in the input vector */
+Word16 maximum_fx(
+ const Word16 *vec_fx, /* i : input vector */
+ const Word16 lvec_fx, /* i : length of input vector */
+ Word16 *max_fx /* o : maximum value in the input vector */
)
{
Word16 j, ind;
@@ -1218,10 +2159,11 @@ Word16 maximum_fx( /* o : index of the maximum value in t
return ind;
}
-Word16 maximum_exp_fx( /* o : index of the maximum value in the input vector */
- const Word16 *vec_fx, /* i : input vector */
- const Word16 *exp_vec, /* i : exponents of input vector */
- const Word16 lvec_fx /* i : length of input vector */
+/* o : index of the maximum value in the input vector */
+Word16 maximum_exp_fx(
+ const Word16 *vec_fx, /* i : input vector */
+ const Word16 *exp_vec, /* i : exponents of input vector */
+ const Word16 lvec_fx /* i : length of input vector */
)
{
Word16 j, ind;
@@ -1249,16 +2191,18 @@ Word16 maximum_exp_fx( /* o : index of the maximum value
return ind;
}
+
/*---------------------------------------------------------------------*
* maximum_abs_16_fx()
*
* Find index and value of the absolute maximum in a vector
*---------------------------------------------------------------------*/
-Word16 maximum_abs_16_fx( /* o : index of the maximum abs value in the input vector */
- const Word16 *vec, /* i : input vector */
- const Word16 lvec, /* i : length of input vector */
- Word16 *max_val /* o : maximum value in the input vector */
+/* o : index of the maximum abs value in the input vector */
+Word16 maximum_abs_16_fx(
+ const Word16 *vec, /* i : input vector */
+ const Word16 lvec, /* i : length of input vector */
+ Word16 *max_val /* o : maximum value in the input vector */
)
{
Word16 j, ind;
@@ -1287,10 +2231,12 @@ Word16 maximum_abs_16_fx( /* o : index of the maximum abs va
*
* Find index and value of the absolute minimum in a vector
*---------------------------------------------------------------------*/
-Word16 minimum_abs32_fx( /* o : index of the minimum value in the input vector */
- const Word32 *vec_fx, /* i : input vector */
- const Word16 lvec_fx, /* i : length of input vector */
- Word32 *min_fx /* o : minimum value in the input vector */
+
+/* o : index of the minimum value in the input vector */
+Word16 minimum_abs32_fx(
+ const Word32 *vec_fx, /* i : input vector */
+ const Word16 lvec_fx, /* i : length of input vector */
+ Word32 *min_fx /* o : minimum value in the input vector */
)
{
Word16 j, ind;
@@ -1317,16 +2263,18 @@ Word16 minimum_abs32_fx( /* o : index of the minimum valu
return ind;
}
+
/*---------------------------------------------------------------------*
* minimum_32_fx()
*
* Find index and value of the minimum in a vector
*---------------------------------------------------------------------*/
-Word16 minimum_32_fx( /* o : index of the minimum value in the input vector */
- const Word32 *vec_fx, /* i : input vector */
- const Word16 lvec_fx, /* i : length of input vector */
- Word32 *min_fx /* o : minimum value in the input vector */
+/* o : index of the minimum value in the input vector */
+Word16 minimum_32_fx(
+ const Word32 *vec_fx, /* i : input vector */
+ const Word16 lvec_fx, /* i : length of input vector */
+ Word32 *min_fx /* o : minimum value in the input vector */
)
{
Word16 j, ind;
@@ -1355,16 +2303,18 @@ Word16 minimum_32_fx( /* o : index of the minimum value i
return ind;
}
+
/*---------------------------------------------------------------------*
* maximum_32_fx()
*
* Find index and value of the maximum in a vector
*---------------------------------------------------------------------*/
-Word16 maximum_32_fx( /* o : index of the maximum value in the input vector */
- const Word32 *vec, /* i : input vector */
- const Word16 lvec, /* i : length of input vector */
- Word32 *max_val /* o : maximum value in the input vector */
+/* o : index of the maximum value in the input vector */
+Word16 maximum_32_fx(
+ const Word32 *vec, /* i : input vector */
+ const Word16 lvec, /* i : length of input vector */
+ Word32 *max_val /* o : maximum value in the input vector */
)
{
Word16 j, ind;
@@ -1392,10 +2342,11 @@ Word16 maximum_32_fx( /* o : index of the maximum value in t
return ind;
}
-Word16 maximum_abs_32_fx( /* o : index of the maximum abs value in the input vector */
- const Word32 *vec, /* i : input vector */
- const Word16 lvec, /* i : length of input vector */
- Word32 *max_val /* o : maximum value in the input vector */
+/* o : index of the maximum abs value in the input vector */
+Word16 maximum_abs_32_fx(
+ const Word32 *vec, /* i : input vector */
+ const Word16 lvec, /* i : length of input vector */
+ Word32 *max_val /* o : maximum value in the input vector */
)
{
Word16 j, ind;
@@ -1426,6 +2377,7 @@ Word16 maximum_abs_32_fx( /* o : index of the maximum abs va
*Return value
*Number of shifts
*----------------------------------------------------------------*/
+
Word16 Exp16Array(
const Word16 n, /* (i): Array size */
const Word16 *sx /* (i): Data array */
@@ -1475,9 +2427,10 @@ Word16 Exp32Array(
return exp;
}
-Word32 sum16_32_fx( /* o : sum of all vector elements Qx*/
- const Word16 *vec, /* i : input vector Qx*/
- const Word16 lvec /* i : length of input vector */
+/* o : index of the maximum abs value in the input vector */
+Word32 sum16_32_fx(
+ const Word16 *vec, /* i : input vector Qx*/
+ const Word16 lvec /* i : length of input vector */
)
{
Word16 i;
@@ -1493,9 +2446,11 @@ Word32 sum16_32_fx( /* o : sum of all vector elements
return tmp;
}
-Word32 sum32_sat( /* o : sum of all vector elements Qx*/
- const Word32 *vec, /* i : input vector Qx*/
- const Word16 lvec /* i : length of input vector */
+
+/* o : sum of all vector elements Qx*/
+Word32 sum32_sat(
+ const Word32 *vec, /* i : input vector Qx*/
+ const Word16 lvec /* i : length of input vector */
)
{
Word16 i;
@@ -1510,10 +2465,11 @@ Word32 sum32_sat( /* o : sum of all vector elements
return tmp;
}
-Word32 var_fx_32( /* o: variance of vector Qx+16*/
- const Word16 *x, /* i: input vector Qx*/
- const Word16 Qx,
- const Word16 len /* i: length of inputvector */
+/* o: variance of vector Qx+16*/
+Word32 var_fx_32(
+ const Word16 *x, /* i: input vector Qx*/
+ const Word16 Qx,
+ const Word16 len /* i: length of inputvector */
)
{
Word16 m;
@@ -1522,7 +2478,6 @@ Word32 var_fx_32( /* o: variance of vector Q
Word16 tmp, exp, inv_len;
Word32 L_tmp;
-
L_tmp = L_add( x[0], 0 );
FOR( i = 1; i < len; i++ )
{
@@ -1545,11 +2500,12 @@ Word32 var_fx_32( /* o: variance of vector Q
return v;
}
-Word32 var_fx_32in_32out( /* o: variance of vector Qx*/
- const Word32 *x, /* i: input vector Qx*/
- Word16 *Qx, /*i/o:Q for input/output */
- const Word16 len, /* i: length of inputvector */
- const Word16 gb )
+/* o: variance of vector Qx*/
+Word32 var_fx_32in_32out(
+ const Word32 *x, /* i: input vector Qx*/
+ Word16 *Qx, /*i/o:Q for input/output */
+ const Word16 len, /* i: length of inputvector */
+ const Word16 gb )
{
Word16 i;
Word16 shift;
@@ -1568,8 +2524,11 @@ Word32 var_fx_32in_32out( /* o: variance of vector
*Qx = sub( add( shl( sub( *Qx, gb ), 1 ), shift ), 32 );
move16();
+
return L_tmp;
}
+
+
/*-------------------------------------------------------------------*
* conv()
*
@@ -1604,9 +2563,11 @@ Flag conv_fx(
y[n] = mac_ro( L_sum, x[i], h[0], &Overflow );
move16();
}
+
return Overflow;
}
+
/*-------------------------------------------------------------------*
* conv_fx_32()
*
@@ -1614,6 +2575,7 @@ Flag conv_fx(
* All vectors are of length L. Only the first L samples of the
* convolution are considered.
*-------------------------------------------------------------------*/
+
Flag conv_fx_32(
const Word16 x[], /* i : input vector Q_new*/
const Word16 h[], /* i : impulse response (or second input vector) Q(15)*/
@@ -1621,7 +2583,6 @@ Flag conv_fx_32(
const Word16 L /* i : vector size */
)
{
-
Word16 i, n;
Word32 L_sum;
Flag Overflow = 0;
@@ -1637,12 +2598,15 @@ Flag conv_fx_32(
y[n] = L_mac_o( L_sum, x[i], h[0], &Overflow );
move32();
}
+
return Overflow;
}
-Word16 var_fx( /* o: variance of vector Qx*/
- const Word16 *x, /* i: input vector Qx*/
- const Word16 Qx,
- const Word16 len /* i: length of inputvector */
+
+/* o: variance of vector Qx*/
+Word16 var_fx(
+ const Word16 *x, /* i: input vector Qx*/
+ const Word16 Qx,
+ const Word16 len /* i: length of inputvector */
)
{
Word16 m;
@@ -1675,15 +2639,17 @@ Word16 var_fx( /* o: variance of vector Qx*/
return v_16;
}
+
/*---------------------------------------------------------------------*
* std_fx()
*
* Calculate the standard deviation of a vector
*---------------------------------------------------------------------*/
-Word16 std_fx( /* o: standard deviation */
- const Word16 x[], /* i: input vector */
- const Word16 len /* i: length of the input vector */
+/* o: standard deviation */
+Word16 std_fx(
+ const Word16 x[], /* i: input vector */
+ const Word16 len /* i: length of the input vector */
)
{
Word16 i;
@@ -1710,14 +2676,14 @@ Word16 std_fx( /* o: standard deviation */
stdev = L_shl( stdev, sub( exp1, 1 ) ); /*30 */
}
-
return extract_h( stdev );
}
-Word32 dot_product_mat_fx( /* o : the dot product x'*A*x */
- const Word16 *x, /* i : vector x Q15 */
- const Word32 *A, /* i : matrix A Q0*/
- const Word16 m /* i : vector & matrix size */
+/* o : the dot product x'*A*x */
+Word32 dot_product_mat_fx(
+ const Word16 *x, /* i : vector x Q15 */
+ const Word32 *A, /* i : matrix A Q0*/
+ const Word16 m /* i : vector & matrix size */
)
{
@@ -1744,13 +2710,17 @@ Word32 dot_product_mat_fx( /* o : the dot product x'*A*x
tmp_sum = W_sat_m( tmp_sum_64 );
suma = Madd_32_16( suma, tmp_sum, x[i] ); /*Q0 */
}
+
return suma;
}
+
+
/*-------------------------------------------------------------------*
* Vr_subt
*
* Subtract two Word16 vectors integer by integer
*-------------------------------------------------------------------*/
+
void Vr_subt(
const Word16 x1[], /* i : Input vector 1 */
const Word16 x2[], /* i : Input vector 2 */
@@ -1765,7 +2735,11 @@ void Vr_subt(
y[i] = sub_sat( x1[i], x2[i] );
move16();
}
+
+ return;
}
+
+
/*-------------------------------------------------------------------*
* vquant()
*
@@ -1774,13 +2748,15 @@ void Vr_subt(
* Searches a given codebook to find the nearest neighbour in Euclidean space.
* Index of the winning codevector and the winning vector itself are returned.
*-------------------------------------------------------------------*/
-Word16 vquant_ivas_fx( /* o: index of the winning codevector */
- Word32 x[], /* i: vector to quantize Q25 */
- const Word32 x_mean[], /* i: vector mean to subtract (0 if none) Q25 */
- Word32 xq[], /* o: quantized vector Q25 */
- const Word32 cb[], /* i: codebook Q25 */
- const Word16 dim, /* i: dimension of codebook vectors */
- const Word16 cbsize /* i: codebook size */
+
+/* o: index of the winning codevector */
+Word16 vquant_ivas_fx(
+ Word32 x[], /* i: vector to quantize Q25 */
+ const Word32 x_mean[], /* i: vector mean to subtract (0 if none) Q25 */
+ Word32 xq[], /* o: quantized vector Q25 */
+ const Word32 cb[], /* i: codebook Q25 */
+ const Word16 dim, /* i: dimension of codebook vectors */
+ const Word16 cbsize /* i: codebook size */
)
{
Word16 c, d, idx, j;
@@ -1844,13 +2820,14 @@ Word16 vquant_ivas_fx( /* o: index of the winning codevec
return idx;
}
-Word16 vquant_fx( /* o: index of the winning codevector */
- Word16 x[], /* i: vector to quantize Q13 */
- const Word16 x_mean[], /* i: vector mean to subtract (0 if none) Q13 */
- Word16 xq[], /* o: quantized vector Q13 */
- const Word16 cb[], /* i: codebook Q13 */
- const Word16 dim, /* i: dimension of codebook vectors */
- const Word16 cbsize /* i: codebook size */
+/* o: index of the winning codevector */
+Word16 vquant_fx(
+ Word16 x[], /* i: vector to quantize Q13 */
+ const Word16 x_mean[], /* i: vector mean to subtract (0 if none) Q13 */
+ Word16 xq[], /* o: quantized vector Q13 */
+ const Word16 cb[], /* i: codebook Q13 */
+ const Word16 dim, /* i: dimension of codebook vectors */
+ const Word16 cbsize /* i: codebook size */
)
{
Word16 tmp;
@@ -1915,6 +2892,7 @@ Word16 vquant_fx( /* o: index of the winning codevector
return idx;
}
+
/*-------------------------------------------------------------------*
* w_vquant_fx()
*
@@ -1924,6 +2902,7 @@ Word16 vquant_fx( /* o: index of the winning codevector
* Weights are put on the error for each vector element.
* Index of the winning codevector and the winning vector itself are returned.
*-------------------------------------------------------------------*/
+
Word16 w_vquant_fx(
Word16 x[], /* i: vector to quantize in Q10 */
Word16 Qx,
@@ -2100,16 +3079,20 @@ Word16 w_vquant_fx(
return idx;
}
+
+
/*-------------------------------------------------------------------*
* Emaximum:
*
* Find index of a maximum energy in a vector
*-------------------------------------------------------------------*/
-Word16 emaximum_fx( /* o : return index with max energy value in vector Q0 */
- const Word16 Qvec, /* i : Q of input vector Q0 */
- const Word16 *vec, /* i : input vector Qx */
- const Word16 lvec, /* i : length of input vector Q0 */
- Word32 *ener_max /* o : maximum energy value Q0 */
+
+/* o : return index with max energy value in vector Q0 */
+Word16 emaximum_fx(
+ const Word16 Qvec, /* i : Q of input vector Q0 */
+ const Word16 *vec, /* i : input vector Qx */
+ const Word16 lvec, /* i : length of input vector Q0 */
+ Word32 *ener_max /* o : maximum energy value Q0 */
)
{
Word16 j, ind;
@@ -2138,11 +3121,12 @@ Word16 emaximum_fx( /* o : return index with max energy valu
return ind;
}
-Word16 emaximum_32fx( /* o : return index with max energy value in vector Q0 */
- const Word16 Qvec, /* i : Q of input vector Q0 */
- const Word32 *vec, /* i : input vector Qx */
- const Word16 lvec, /* i : length of input vector Q0 */
- Word32 *ener_max /* o : maximum energy value Q0 */
+/* o : return index with max energy value in vector Q0 */
+Word16 emaximum_32fx(
+ const Word16 Qvec, /* i : Q of input vector Q0 */
+ const Word32 *vec, /* i : input vector Qx */
+ const Word16 lvec, /* i : length of input vector Q0 */
+ Word32 *ener_max /* o : maximum energy value Q0 */
)
{
Word16 j, ind;
@@ -2175,14 +3159,16 @@ Word16 emaximum_32fx( /* o : return index with max energy va
return ind;
}
+
/*-------------------------------------------------------------------*
* mean32:
*
* Find the mean of a 32 bits vector
*-------------------------------------------------------------------*/
-Word32 Mean32( /* o : mean of the elements of the vector */
- const Word32 in[], /* i : input vector */
- const Word16 L /* i : length of input vector */
+/* o : mean of the elements of the vector */
+Word32 Mean32(
+ const Word32 in[], /* i : input vector */
+ const Word16 L /* i : length of input vector */
)
{
Word32 Ltmp;
@@ -2202,9 +3188,11 @@ Word32 Mean32( /* o : mean of the elements of the vector */
return Ltmp;
}
-Word32 sum32_fx( /* o : sum of all vector elements Qx*/
- const Word32 *vec, /* i : input vector Qx*/
- const Word16 lvec /* i : length of input vector */
+
+/* o : sum of all vector elements Qx*/
+Word32 sum32_fx(
+ const Word32 *vec, /* i : input vector Qx*/
+ const Word16 lvec /* i : length of input vector */
)
{
Word16 i;
@@ -2218,9 +3206,11 @@ Word32 sum32_fx( /* o : sum of all vector elements
return tmp;
}
-Word16 sum16_fx( /* o : sum of all vector elements Qx*/
- const Word16 *vec, /* i : input vector Qx*/
- const Word16 lvec /* i : length of input vector */
+
+/* o : sum of all vector elements Qx*/
+Word16 sum16_fx(
+ const Word16 *vec, /* i : input vector Qx*/
+ const Word16 lvec /* i : length of input vector */
)
{
Word16 i;
@@ -2234,25 +3224,32 @@ Word16 sum16_fx( /* o : sum of all vector elements
return tmp;
}
+
+
/*------------------------------------------------------------------*
* function Random
*
* Signed 16 bits random generator.
*------------------------------------------------------------------*/
-Word16 Random( /* o : output random value */
- Word16 *seed /* i/o: random seed */
+
+/* o : output random value */
+Word16 Random(
+ Word16 *seed /* i/o: random seed */
)
{
*seed = extract_l( L_mac0( 13849L, *seed, 31821 ) );
move16();
+
return *seed;
}
-Word16 own_random2_fx( Word16 seed )
+Word16 own_random2_fx(
+ Word16 seed )
{
return extract_l( L_mac0( 13849, seed, 31821 ) );
}
+
/*---------------------------------------------------------------------
* sign_fx()
*
@@ -2287,12 +3284,16 @@ Word16 sign16_fx(
}
}
+
/*------------------------------------------------------------------*
* function Div_32_optmz
*
* Performs 32 bits interger division
*------------------------------------------------------------------*/
-static Word32 Div_32_optmz( Word32 L_num, Word16 denom_hi )
+
+static Word32 Div_32_optmz(
+ Word32 L_num,
+ Word16 denom_hi )
{
Word16 approx, hi, lo, n_hi, n_lo;
Word32 L_32;
@@ -2316,12 +3317,15 @@ static Word32 Div_32_optmz( Word32 L_num, Word16 denom_hi )
return ( L_32 );
}
+
+
/*------------------------------------------------------------------*
* function iDiv_and_mod_32
*
* return the quotient and the modulo 32 bits numerator divided by a 16 bit denominator
* The denominator might be right shifted by 1
*------------------------------------------------------------------*/
+
void iDiv_and_mod_32(
const Word32 Numer, /* i : 32 bits numerator */
const Word16 Denom, /* i : 16 bits denominator */
@@ -2498,6 +3502,8 @@ void pz_filter_sp_fx(
y[i] = extract_h( Ltemp1 ); /* y[i] in Qn */
move16();
}
+
+ return;
}
@@ -2590,6 +3596,7 @@ Word32 root_a_over_b_fx(
return L_tmp;
}
+
Word32 root_a_over_b_ivas_fx(
Word32 a, /* Q(Q_a) */
Word16 Q_a,
@@ -2693,6 +3700,7 @@ Word32 root_a_over_b_ivas_fx(
return approx;
}
+
/*===================================================================*/
/* FUNCTION : fir_fx () */
/*-------------------------------------------------------------------*/
@@ -2716,15 +3724,16 @@ Word32 root_a_over_b_ivas_fx(
/*-------------------------------------------------------------------*/
/* RETURN ARGUMENTS : _ None. */
/*===================================================================*/
-void fir_fx( const Word16 x[], /* i : input vector Qx*/
- const Word16 h[], /* i : impulse response of the FIR filter Q12*/
- Word16 y[], /* o : output vector (result of filtering) Qx*/
- Word16 mem[], /* i/o: memory of the input signal (L samples) Qx*/
- const Word16 L, /* i : input vector size */
- const Word16 K, /* i : order of the FIR filter (K+1 coefs.) */
- const Word16 upd /* i : 1 = update the memory, 0 = not */
- ,
- Word16 shift /* i : difference between Q15 and scaling of h[] */
+
+void fir_fx(
+ const Word16 x[], /* i : input vector Qx*/
+ const Word16 h[], /* i : impulse response of the FIR filter Q12*/
+ Word16 y[], /* o : output vector (result of filtering) Qx*/
+ Word16 mem[], /* i/o: memory of the input signal (L samples) Qx*/
+ const Word16 L, /* i : input vector size */
+ const Word16 K, /* i : order of the FIR filter (K+1 coefs.) */
+ const Word16 upd, /* i : 1 = update the memory, 0 = not */
+ Word16 shift /* i : difference between Q15 and scaling of h[] */
)
{
@@ -2771,8 +3780,11 @@ void fir_fx( const Word16 x[], /* i : input vector
#endif
move16();
}
+
+ return;
}
+
/*-------------------------------------------------------------------*
* v_add_32()
*
@@ -2894,11 +3906,13 @@ void v_sub_16(
/*--------------------------------------------------------------------------------*/
/* squant_fx() */
/*--------------------------------------------------------------------------------*/
-Word16 squant_fx( /* o: index of the winning codeword */
- const Word16 x, /* i: scalar value to quantize */
- Word16 *xq, /* o: quantized value */
- const Word16 cb[], /* i: codebook */
- const Word16 cbsize /* i: codebook size */
+
+/* o: index of the winning codeword */
+Word16 squant_fx(
+ const Word16 x, /* i: scalar value to quantize */
+ Word16 *xq, /* o: quantized value */
+ const Word16 cb[], /* i: codebook */
+ const Word16 cbsize /* i: codebook size */
)
{
Word16 tmp;
@@ -2998,7 +4012,7 @@ Word16 squant_int_fx(
/*-------------------------------------------------------------------*/
/* INPUT/OUTPUT ARGUMENTS : */
/* */
-/* _ (Word32 []) buf : filter memory (Qx+Qc) */
+/* _ (Word32 []) buf : filter memory (Qx+Qc) */
/*-------------------------------------------------------------------*/
/* RETURN ARGUMENTS : _ None. */
/*===================================================================*/
@@ -3050,18 +4064,22 @@ void pz_filter_dp_fx(
y[i] = extract_h( Ltemp1 ); /* y[i] in Qn */
move16();
}
+
+ return;
}
+
/*-------------------------------------------------------------------*
* Copy_Scale_sig
*
* Up/down scale a 16 bits vector x and move it into y
*-------------------------------------------------------------------*/
+
void Copy_Scale_sig32(
const Word32 x[], /* i : signal to scale input Qx */
Word32 y[], /* o : scaled signal output Qx */
const Word16 lg, /* i : size of x[] Q0 */
- const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */
+ const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */
)
{
Word16 i;
@@ -3105,6 +4123,8 @@ void Copy_Scale_sig32(
y[i] = W_extract_l( W_mult_32_32( L_tmp, x[i] ) );
move32(); /* saturation can occur here */
}
+
+ return;
}
@@ -3139,6 +4159,8 @@ void Copy_Scale_sig32_16(
*dst++ = round_fx_sat( L_temp );
move16();
}
+
+ return;
}
/*-------------------------------------------------------------------*
@@ -3163,11 +4185,16 @@ void v_multc_att(
move16();
}
}
-} /*-------------------------------------------------------------------*
- * v_multc_att32()
- *
- * Attenuation of a vector,, attenuation factor in Q15
- *-------------------------------------------------------------------*/
+
+ return;
+}
+
+
+/*-------------------------------------------------------------------*
+ * v_multc_att32()
+ *
+ * Attenuation of a vector,, attenuation factor in Q15
+ *-------------------------------------------------------------------*/
void v_multc_att32(
const Word32 x[], /* i : Input vector Qx */
@@ -3185,6 +4212,8 @@ void v_multc_att32(
move32();
}
}
+
+ return;
}
/*-------------------------------------------------------------------*
@@ -3209,6 +4238,8 @@ void v_multc_att3232(
move32();
}
}
+
+ return;
}
/*-------------------------------------------------------------------*
@@ -3308,20 +4339,24 @@ void add_vec_fx(
move16();
}
}
+
return;
}
+
/*-------------------------------------------------------------------*
* Add_flt32_flt32
*
* Add two Pseudo Float Value that are 32 Bits Mantisa and 16 Bits Exp
*-------------------------------------------------------------------*/
-Word32 Add_flt32_flt32( /* o: Result (Normalized) */
- Word32 a, /* i: 1st Value */
- Word16 exp_a, /* i: Exponent of 1st Value (Q of Value) */
- Word32 b, /* i: 2nd Value */
- Word16 exp_b, /* i: Exponent of 2nd Value (Q of Value) */
- Word16 *exp_out /* o: Exponent of Result */
+
+/* o: Result (Normalized) */
+Word32 Add_flt32_flt32(
+ Word32 a, /* i: 1st Value */
+ Word16 exp_a, /* i: Exponent of 1st Value (Q of Value) */
+ Word32 b, /* i: 2nd Value */
+ Word16 exp_b, /* i: Exponent of 2nd Value (Q of Value) */
+ Word16 *exp_out /* o: Exponent of Result */
)
{
Word16 temp, temp2;
@@ -3346,16 +4381,19 @@ Word32 Add_flt32_flt32( /* o: Result (Normalized)
return L_shl( L_temp, temp2 );
}
+
/*-------------------------------------------------------------------*
* Mul_flt32_Q15
*
* Multiply one Pseudo Float Value (32 Bits Mantisa and 16 Bits Exp)
* with a Q15 value
*-------------------------------------------------------------------*/
-Word32 Mul_flt32_Q15( /* o: Result (Normalized) */
- Word32 value, /* i: Pseudo_float Value */
- Word16 *exp_v, /*i/o: Exponent of Value (Q of Value) */
- Word16 frac /* i: Q15 value */
+
+/* o: Result (Normalized) */
+Word32 Mul_flt32_Q15(
+ Word32 value, /* i: Pseudo_float Value */
+ Word16 *exp_v, /*i/o: Exponent of Value (Q of Value) */
+ Word16 frac /* i: Q15 value */
)
{
Word16 temp;
@@ -3370,18 +4408,21 @@ Word32 Mul_flt32_Q15( /* o: Result (Normalized) */
return L_shl( L_temp, temp );
}
+
/*-------------------------------------------------------------------*
* Div_flt32_flt32
*
* Divide one Pseudo Float Value (32 Bits Mantisa and 16 Bits Exp)
* by another one
*-------------------------------------------------------------------*/
-Word32 Div_flt32_flt32( /* o: Result (Normalized) */
- Word32 a, /* i: 1st Value */
- Word16 exp_a, /* i: Exponent of 1st Value (Q of Value) */
- Word32 b, /* i: 2nd Value */
- Word16 exp_b, /* i: Exponent of 2nd Value (Q of Value) */
- Word16 *exp_out /* o: Exponent of Result */
+
+/* o: Result (Normalized) */
+Word32 Div_flt32_flt32(
+ Word32 a, /* i: 1st Value */
+ Word16 exp_a, /* i: Exponent of 1st Value (Q of Value) */
+ Word32 b, /* i: 2nd Value */
+ Word16 exp_b, /* i: Exponent of 2nd Value (Q of Value) */
+ Word16 *exp_out /* o: Exponent of Result */
)
{
Word16 temp, temp2;
@@ -3406,11 +4447,13 @@ Word32 Div_flt32_flt32( /* o: Result (Normalized)
*
* Calculate Energy with overflow protection
*-------------------------------------------------------------------*/
-Word32 Calc_Energy_Autoscaled( /* o: Result (Energy) */
- const Word16 *signal, /* i: Signal */
- Word16 signal_exp, /* i: Exponent of Signal (Q of Signal) */
- Word16 len, /* i: Frame Length */
- Word16 *energy_exp /* o: Exponent of Energy (Q of Energy) */
+
+/* o: Result (Energy) */
+Word32 Calc_Energy_Autoscaled(
+ const Word16 *signal, /* i: Signal */
+ Word16 signal_exp, /* i: Exponent of Signal (Q of Signal) */
+ Word16 len, /* i: Frame Length */
+ Word16 *energy_exp /* o: Exponent of Energy (Q of Energy) */
)
{
Word16 temp, temp2;
@@ -3481,7 +4524,9 @@ Word32 Calc_Energy_Autoscaled( /* o: Result (Energy)
return L_Energy;
}
-Word16 Find_Max_Norm16( const Word16 *src, Word16 len )
+Word16 Find_Max_Norm16(
+ const Word16 *src,
+ Word16 len )
{
Word16 i;
Word16 max16;
@@ -3499,7 +4544,9 @@ Word16 Find_Max_Norm16( const Word16 *src, Word16 len )
return norm_s( max16 );
}
-Word16 Find_Max_Norm32( const Word32 *src, Word16 len )
+Word16 Find_Max_Norm32(
+ const Word32 *src,
+ Word16 len )
{
Word16 i;
Word32 max32;
@@ -3514,17 +4561,20 @@ Word16 Find_Max_Norm32( const Word32 *src, Word16 len )
return norm_l( max32 );
}
+
/*-------------------------------------------------------------------*
* Sqrt_Ratio32
*
* Calculate Sqrt of Val1/Val2
*-------------------------------------------------------------------*/
-Word32 Sqrt_Ratio32( /* o: Result in Q31 */
- Word32 L_val1, /* i: Mantisa of Val1 */
- Word16 exp1, /* i: Exp of Val1 (>0: Val was Left Shifted, <0:Right Shifted) */
- Word32 L_val2, /* i: Mantisa of Val2 */
- Word16 exp2, /* i: Exp of Val2 (same as exp1) */
- Word16 *exp /* o: Exp of Result (# of 'L_shl' Req to get to Final Value) */
+
+/* o: Result in Q31 */
+Word32 Sqrt_Ratio32(
+ Word32 L_val1, /* i: Mantisa of Val1 */
+ Word16 exp1, /* i: Exp of Val1 (>0: Val was Left Shifted, <0:Right Shifted) */
+ Word32 L_val2, /* i: Mantisa of Val2 */
+ Word16 exp2, /* i: Exp of Val2 (same as exp1) */
+ Word16 *exp /* o: Exp of Result (# of 'L_shl' Req to get to Final Value) */
)
{
Word16 temp;
@@ -3565,9 +4615,10 @@ Word32 Sqrt_Ratio32( /* o: Result in Q31
return L_val1;
}
-Word16 Invert16( /* result in Q'15 + 'exp' */
- Word16 val,
- Word16 *exp )
+/* result in Q'15 + 'exp' */
+Word16 Invert16(
+ Word16 val,
+ Word16 *exp )
{
Word16 temp;
@@ -3585,7 +4636,10 @@ Word16 Invert16( /* result in Q'15 + 'exp' */
return temp;
}
-Word16 find_rem( Word16 n, Word16 m, Word16 *r )
+Word16 find_rem(
+ Word16 n,
+ Word16 m,
+ Word16 *r )
{
Word16 i, q1, q2, qd;
Word32 Ltemp2;
@@ -3627,11 +4681,15 @@ Word16 find_rem( Word16 n, Word16 m, Word16 *r )
Ltemp2 = L_shr( Lacc, q2 );
*r = extract_h( Ltemp2 );
move16();
+
return ( q1 );
}
-Word32 find_remd( Word32 n, Word32 m, Word32 *r )
+Word32 find_remd(
+ Word32 n,
+ Word32 m,
+ Word32 *r )
{
Word16 i, q1, q2, qd;
Word32 Ltemp2, qo;
@@ -3675,9 +4733,11 @@ Word32 find_remd( Word32 n, Word32 m, Word32 *r )
}
*r = L_shr( Lacc, q2 );
move16();
+
return ( qo );
}
+
Word16 rint_new_fx(
Word32 x /*Q16 */
)
@@ -3740,7 +4800,15 @@ Word16 rint_new_fx(
/* CALLED FROM : TX */
/*===================================================================*/
-Word16 erb_diff_search_fx( Word16 *prev_erb, const Word16 *curr_erb, Word16 *dif_erb, Word16 *pow_spec, const Word16 *cb_fx, Word16 cb_size, Word16 cb_dim, Word16 offset )
+Word16 erb_diff_search_fx(
+ Word16 *prev_erb,
+ const Word16 *curr_erb,
+ Word16 *dif_erb,
+ Word16 *pow_spec,
+ const Word16 *cb_fx,
+ Word16 cb_size,
+ Word16 cb_dim,
+ Word16 offset )
{
Word16 i, j, mmseindex;
Word16 dh, dl;
@@ -3825,6 +4893,8 @@ Word16 erb_diff_search_fx( Word16 *prev_erb, const Word16 *curr_erb, Word16 *dif
return ( mmseindex );
}
+
+
void Acelp_dec_total_exc(
Word16 *exc_fx, /* i/o: adapt. excitation exc */
Word16 *exc2_fx, /* i/o: adapt. excitation/total exc */
@@ -3847,14 +4917,20 @@ void Acelp_dec_total_exc(
move16();
move16();
}
+
+ return;
}
+
/*-------------------------------------------------------------------*
* UL_inverse
*
* Calculate inverse of UL_val. Output in Q_exp.
*-------------------------------------------------------------------*/
-UWord32 UL_inverse( const UWord32 UL_val, Word16 *exp )
+
+UWord32 UL_inverse(
+ const UWord32 UL_val,
+ Word16 *exp )
{
UWord32 UL_tmp;
@@ -3874,7 +4950,10 @@ UWord32 UL_inverse( const UWord32 UL_val, Word16 *exp )
* Calculate UL_num/UL_den. UL_num assumed to be Q31, UL_den assumed
* to be Q32, then result is in Q32.
*-------------------------------------------------------------------*/
-UWord32 UL_div( const UWord32 UL_num, const UWord32 UL_den )
+
+UWord32 UL_div(
+ const UWord32 UL_num,
+ const UWord32 UL_den )
{
UWord32 UL_e, UL_Q;
UWord32 UL_msb, UL_lsb;
@@ -3914,9 +4993,11 @@ Word16 ratio( const Word32 numer, const Word32 denom, Word16 *expo )
*expo = sub( expNumer, expDenom );
move16();
+
return quotient; /* Q14 */
}
+
/*-----------------------------------------------------------------------*
* Function hp400_12k8() *
* *
@@ -3937,6 +5018,7 @@ Word16 ratio( const Word32 numer, const Word32 denom, Word16 *expo )
* float --> b[3] = {0.893554687, -1.787109375, 0.893554687}; *
* a[3] = {1.000000000, 1.787109375, -0.864257812}; *
*-----------------------------------------------------------------------*/
+
void hp400_12k8_fx(
Word16 signal[], /* i/o: input signal / output is divided by 16 */
const Word16 lg, /* i : lenght of signal */
@@ -4014,6 +5096,7 @@ void hp400_12k8_fx(
return;
}
+
void hp400_12k8_ivas_fx(
Word16 signal[], /* i/o: input signal / output is divided by 16 */
const Word16 lg, /* i : lenght of signal */
@@ -4063,10 +5146,18 @@ void hp400_12k8_ivas_fx(
mem[5] = x1; /* Q_syn */
move16();
move16();
+
return;
}
-Word16 dot_prod_satcontr( const Word16 *x, const Word16 *y, Word16 qx, Word16 qy, Word16 *qo, Word16 len )
+
+Word16 dot_prod_satcontr(
+ const Word16 *x,
+ const Word16 *y,
+ Word16 qx,
+ Word16 qy,
+ Word16 *qo,
+ Word16 len )
{
Word16 tmp_tab_x[L_FRAME16k];
Word16 tmp_tab_y[L_FRAME16k];
@@ -4078,7 +5169,6 @@ Word16 dot_prod_satcontr( const Word16 *x, const Word16 *y, Word16 qx, Word16 qy
move32();
#endif
-
Copy( x, tmp_tab_x, len ); /* OPTIMIZE !!!!! the copy into local table is not necessary */
Copy( y, tmp_tab_y, len ); /* could be reworked to do a 1st iteration with the original x[] and y[] */
/* then check if there is an overflow and do a more complex 2nd, 3rd, ... processing */
@@ -4113,6 +5203,7 @@ Word16 dot_prod_satcontr( const Word16 *x, const Word16 *y, Word16 qx, Word16 qy
q = add( q, add( qx, qy ) );
*qo = sub( q, add( shift, 16 ) );
move16();
+
return ener;
}
@@ -4134,7 +5225,11 @@ Word16 dot_prod_satcontr( const Word16 *x, const Word16 *y, Word16 qx, Word16 qy
* Returns:
* void
*/
-void E_UTIL_f_convolve( const Word16 x[], const Word16 h[], Word16 y[], const Word16 size )
+void E_UTIL_f_convolve(
+ const Word16 x[],
+ const Word16 h[],
+ Word16 y[],
+ const Word16 size )
{
Word16 i, n;
Word32 L_sum;
@@ -4152,14 +5247,17 @@ void E_UTIL_f_convolve( const Word16 x[], const Word16 h[], Word16 y[], const Wo
y[n] = mac_r( L_sum, x[i], h[0] );
move16();
}
+
return;
}
+
/*-----------------------------------------------------------------------------
* floating_point_add:
*
* Add two floating point numbers: x <- x + y.
*----------------------------------------------------------------------------*/
+
void floating_point_add(
Word32 *mx, /* io: mantissa of the addend Q31 */
Word16 *ex, /* io: exponent of the addend Q0 */
@@ -4193,9 +5291,11 @@ void floating_point_add(
*ex = sub( add( *ex, expo ), 1 ); /* Subtract 1 due to 1-bit down-shift above ensuring 1 bit headroom before addition. */
move32();
move16();
+
return;
}
+
/*-------------------------------------------------------------------*
* delay_signal_fx()
*
@@ -4281,6 +5381,7 @@ void v_add_fx(
return;
}
+
Word16 floor_log_2( Word32 num )
{
@@ -4328,6 +5429,7 @@ void v_shr_16(
return;
}
+
/*---------------------------------------------------------------------*
* lin_interp_fx()
*
@@ -4408,6 +5510,7 @@ Word16 lin_interp_ivas_fx(
return add_sat( y1, round_fx( L_shl( L_mult( sub( x, x1 ), div_res ), div_res_e ) ) );
}
+
/*---------------------------------------------------------------------
* sign_l()
*
@@ -4467,6 +5570,7 @@ void set_zero_fx(
return;
}
+
void set_zero2_fx(
Word32 *vec, /* o : input vector */
const Word32 lvec /* i : length of the vector */
@@ -4638,6 +5742,7 @@ Word32 dotp_fixed_ivas_fx(
return suma;
}
+
/*-------------------------------------------------------------------*
* v_mult()
*
@@ -4663,11 +5768,13 @@ void v_mult_fixed(
return;
}
+
/*-------------------------------------------------------------------*
* anint_fixed()
*
* Round to the nearest integer.
*-------------------------------------------------------------------*/
+
Word32 anint_fixed( Word32 x, Word16 exp )
{
IF( x == 0 )
@@ -4684,20 +5791,26 @@ Word32 anint_fixed( Word32 x, Word16 exp )
}
}
+
/*-------------------------------------------------------------------*
* ceil_fixed()
*
* Ceil to the next multiple of (1 << exp).
*-------------------------------------------------------------------*/
-Word32 ceil_fixed( Word32 x, Word16 exp )
+
+Word32 ceil_fixed(
+ Word32 x,
+ Word16 exp )
{
Word32 step;
+
// step = x / L_shl( 1, exp );
step = L_shr( x, exp );
IF( ( x % L_shl( 1, exp ) ) > 0 )
{
step = L_add( step, 1 );
}
+
return L_shl( step, exp );
}
@@ -4725,6 +5838,7 @@ void sort_l(
return;
}
+
/*-------------------------------------------------------------------*
* v_add_fixed()
*
@@ -4795,7 +5909,8 @@ void v_add_fixed_me(
return;
}
-Word16 find_guarded_bits_fx( Word32 n )
+Word16 find_guarded_bits_fx(
+ Word32 n )
{
// return n <= 1 ? 0 : n <= 2 ? 1
// : n <= 4 ? 2
@@ -4830,10 +5945,14 @@ Word16 find_guarded_bits_fx( Word32 n )
}
}
-Word16 L_norm_arr( const Word32 *arr, Word16 size )
+
+Word16 L_norm_arr(
+ const Word32 *arr,
+ Word16 size )
{
Word16 q = 31;
move16();
+
FOR( Word16 i = 0; i < size; i++ )
{
Word16 q_tst;
@@ -4848,12 +5967,15 @@ Word16 L_norm_arr( const Word32 *arr, Word16 size )
return q;
}
-Word16 norm_arr( Word16 *arr, Word16 size )
+Word16 norm_arr(
+ Word16 *arr,
+ Word16 size )
{
Word16 q = 15;
Word16 exp = 0;
move16();
move16();
+
FOR( Word16 i = 0; i < size; i++ )
{
if ( arr[i] != 0 )
@@ -4865,15 +5987,19 @@ Word16 norm_arr( Word16 *arr, Word16 size )
q = s_min( q, exp );
}
}
+
return q;
}
-Word16 W_norm_arr( Word64 *arr, Word16 size )
+Word16 W_norm_arr(
+ Word64 *arr,
+ Word16 size )
{
Word16 q = 63;
Word16 exp = 0;
move16();
move16();
+
FOR( Word16 i = 0; i < size; i++ )
{
if ( arr[i] != 0 )
@@ -4885,10 +6011,13 @@ Word16 W_norm_arr( Word64 *arr, Word16 size )
q = s_min( q, exp );
}
}
+
return q;
}
-Word16 get_min_scalefactor( Word32 x, Word32 y )
+Word16 get_min_scalefactor(
+ Word32 x,
+ Word32 y )
{
Word16 scf_y;
Word16 scf = Q31;
@@ -4916,18 +6045,24 @@ Word16 get_min_scalefactor( Word32 x, Word32 y )
}
-Flag is_zero_arr( Word32 *arr, Word16 size )
+Flag is_zero_arr(
+ Word32 *arr,
+ Word16 size )
{
FOR( Word16 i = 0; i < size; i++ )
- IF( arr[i] != 0 )
{
- return 0;
+ IF( arr[i] != 0 )
+ {
+ return 0;
+ }
}
return 1;
}
-Flag is_zero_arr16( Word16 *arr, Word16 size )
+Flag is_zero_arr16(
+ Word16 *arr,
+ Word16 size )
{
FOR( Word16 i = 0; i < size; i++ )
IF( arr[i] != 0 )
@@ -4938,7 +6073,9 @@ Flag is_zero_arr16( Word16 *arr, Word16 size )
return 1;
}
-Flag is_zero_arr64( Word64 *arr, Word16 size )
+Flag is_zero_arr64(
+ Word64 *arr,
+ Word16 size )
{
FOR( Word16 i = 0; i < size; i++ )
{
@@ -4957,7 +6094,9 @@ void Scale_sig64(
)
{
Word16 i;
+
assert( exp <= 63 && exp >= -63 );
+
IF( exp == 0 )
{
return;
@@ -4969,4 +6108,6 @@ void Scale_sig64(
x[i] = W_shl( x[i], exp );
move64();
}
+
+ return;
}
diff --git a/lib_dec/dec_tcx_fx.c b/lib_dec/dec_tcx_fx.c
index b861b8aba6aab2e3edb0477935a0ad0f700b757e..68f7f02f39a92bc42b8f642461d8a87661dcf817 100644
--- a/lib_dec/dec_tcx_fx.c
+++ b/lib_dec/dec_tcx_fx.c
@@ -13,14 +13,16 @@
#include "ivas_prot_fx.h"
#include "rom_com.h"
#include "ivas_rom_com.h"
-#include "ivas_rom_com_fx.h"
+
+
extern const Word16 T_DIV_L_Frame[]; /*0Q15 * 2^-7 */
-static Word32 CalculateAbsEnergy_fx( /* o : normalized result Q31 */
- const Word32 L_off, /* i : initial sum value Qn */
- const Word16 x[], /* i : x vector Qn */
- const Word16 lg, /* i : vector length, range [0..7FFF] Q0 */
- Word16 *exp /* o : exponent of result in [-32,31] Q0 */
+/* o : normalized result Q31 */
+static Word32 CalculateAbsEnergy_fx(
+ const Word32 L_off, /* i : initial sum value Qn */
+ const Word16 x[], /* i : x vector Qn */
+ const Word16 lg, /* i : vector length, range [0..7FFF] Q0 */
+ Word16 *exp /* o : exponent of result in [-32,31] Q0 */
);
void decoder_tcx_fx(
diff --git a/lib_dec/ivas_binRenderer_internal_fx.c b/lib_dec/ivas_binRenderer_internal_fx.c
index a3620942398625cf956b67eae6389686d0821250..7e62a8c120949cc51c51c4e0ae9033bdd96aba3e 100644
--- a/lib_dec/ivas_binRenderer_internal_fx.c
+++ b/lib_dec/ivas_binRenderer_internal_fx.c
@@ -43,17 +43,18 @@
#include "ivas_rom_binauralRenderer.h"
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
#include "debug.h"
-#define NUM_TAPS_F0_6 ( Word16 )( 58 ) // (Word16) ceil( 0.6f * hBinRenConvModule->numTaps )
-#define NUM_TAPS_F0_5 ( Word16 )( 48 ) // (Word16) ceil( 0.5f * hBinRenConvModule->numTaps )
-#define NUM_TAPS_F0_4 ( Word16 )( 39 ) // (Word16) ceil( 0.4f * hBinRenConvModule->numTaps )
-#define NUM_TAPS_F0_3 ( Word16 )( 29 ) // (Word16) ceil( 0.3f * hBinRenConvModule->numTaps )
+
/*----------------------------------------------------------------------------------*
* Local constants
*----------------------------------------------------------------------------------*/
+#define NUM_TAPS_F0_6 ( Word16 )( 58 ) // (Word16) ceil( 0.6f * hBinRenConvModule->numTaps )
+#define NUM_TAPS_F0_5 ( Word16 )( 48 ) // (Word16) ceil( 0.5f * hBinRenConvModule->numTaps )
+#define NUM_TAPS_F0_4 ( Word16 )( 39 ) // (Word16) ceil( 0.4f * hBinRenConvModule->numTaps )
+#define NUM_TAPS_F0_3 ( Word16 )( 29 ) // (Word16) ceil( 0.3f * hBinRenConvModule->numTaps )
+
#define REVERB_INPUT_DOWNMIX_CHANNELS ( 11 )
/* Downmix table for sparse frequency domain reverberator*/
const Word32 dmxmtx_table_fx[BINAURAL_CHANNELS][REVERB_INPUT_DOWNMIX_CHANNELS] = {
@@ -62,6 +63,7 @@ const Word32 dmxmtx_table_fx[BINAURAL_CHANNELS][REVERB_INPUT_DOWNMIX_CHANNELS] =
{ 0, 0x7fffffff, 1518485623, 0, 0x7fffffff, 0, 0x7fffffff, 0, 0x7fffffff, 0, 0x7fffffff },
};
+
/*-------------------------------------------------------------------------
* ivas_binRenderer_filterModule_fx()
*
diff --git a/lib_dec/ivas_dirac_dec_fx.c b/lib_dec/ivas_dirac_dec_fx.c
index 211b004b8bfacbf577d29d8980617174810ad7a9..41dd09b553dd81e22449fd1e0d38fd4437fe464b 100644
--- a/lib_dec/ivas_dirac_dec_fx.c
+++ b/lib_dec/ivas_dirac_dec_fx.c
@@ -42,12 +42,13 @@
#include "ivas_rom_dec.h"
#include "ivas_rom_rend.h"
#include "wmc_auto.h"
-#include "ivas_rom_com_fx.h"
#include "ivas_prot_fx.h"
+
/*-----------------------------------------------------------------------*
* Local function prototypes
*-----------------------------------------------------------------------*/
+
static ivas_error ivas_dirac_dec_config_internal_fx(
Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */
const DIRAC_CONFIG_FLAG flag_config_inp /* i/ : Flag determining if we open or reconfigure the DirAC decoder */
diff --git a/lib_dec/ivas_ism_metadata_dec_fx.c b/lib_dec/ivas_ism_metadata_dec_fx.c
index 17bc36346f7f6efd58cdafdbbf5095f71e52c5cd..e6f07dfc4a220295b80b94bc1df4df7a40d2d3a0 100644
--- a/lib_dec/ivas_ism_metadata_dec_fx.c
+++ b/lib_dec/ivas_ism_metadata_dec_fx.c
@@ -35,7 +35,6 @@
#include "ivas_cnst.h"
#include "ivas_prot_fx.h"
#include "ivas_rom_com.h"
-#include "ivas_rom_com_fx.h"
#include "prot_fx.h"
#include "ivas_stat_enc.h"
#include
@@ -46,6 +45,7 @@
/*-----------------------------------------------------------------------*
* Local functions
*-----------------------------------------------------------------------*/
+
static void decode_angle_indices_fx( DEC_CORE_HANDLE st0, ISM_METADATA_ANGLE_HANDLE angle, const Word16 non_diegetic_flag, Word16 *flag_abs_azimuth );
static Word16 decode_radius_fx( DEC_CORE_HANDLE st0, Word16 *last_radius_idx, Word16 *flag_abs_radius );
diff --git a/lib_dec/ivas_ism_param_dec_fx.c b/lib_dec/ivas_ism_param_dec_fx.c
index 1b7435305f4817f52f9976367c91b48e40d2b329..5d311d6aa55f2a14d698f97073f032311ac6134e 100644
--- a/lib_dec/ivas_ism_param_dec_fx.c
+++ b/lib_dec/ivas_ism_param_dec_fx.c
@@ -42,14 +42,14 @@
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
#include "debug.h"
-#include "ivas_rom_com_fx.h"
+
/*-----------------------------------------------------------------------*
* Local function definitions
*-----------------------------------------------------------------------*/
static void ivas_param_ism_dec_dequant_DOA_fx(
- PARAM_ISM_DEC_HANDLE hParamIsmDec, /* i/o: decoder ParamISM handle */
+ PARAM_ISM_DEC_HANDLE hParamIsmDec, /* i/o: decoder ParamISM handle */
const Word16 nchan_ism /* i : number of ISM channels */
)
{
diff --git a/lib_dec/ivas_lfe_plc_fx.c b/lib_dec/ivas_lfe_plc_fx.c
index 03037af421d871b771333e532d52b0f441f84ded..ac6da67598a31774ff7531ede0ba5a9052886a02 100755
--- a/lib_dec/ivas_lfe_plc_fx.c
+++ b/lib_dec/ivas_lfe_plc_fx.c
@@ -37,7 +37,6 @@
#include
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
/*------------------------------------------------------------------------------------------*
* Local constants
diff --git a/lib_dec/ivas_masa_dec_fx.c b/lib_dec/ivas_masa_dec_fx.c
index 087ff9ae6e6382f87505c30e51398b76597c79bb..a403bf1ba79bcd877095363fb2ae5881ab0f8599 100644
--- a/lib_dec/ivas_masa_dec_fx.c
+++ b/lib_dec/ivas_masa_dec_fx.c
@@ -42,7 +42,6 @@
#include "prot_fx.h"
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
/*-----------------------------------------------------------------------*
diff --git a/lib_dec/ivas_mc_paramupmix_dec_fx.c b/lib_dec/ivas_mc_paramupmix_dec_fx.c
index 48b6b8c7533153af1428d4a03beea9a25b78dcd2..fa36c4f34adb85aa4c40ac21d3ca6ea4caaf176c 100644
--- a/lib_dec/ivas_mc_paramupmix_dec_fx.c
+++ b/lib_dec/ivas_mc_paramupmix_dec_fx.c
@@ -44,16 +44,18 @@
#include "math.h"
#include "wmc_auto.h"
#include "rom_dec.h"
-#include "ivas_rom_com_fx.h"
+
/*-----------------------------------------------------------------------*
* Local arrays
*-----------------------------------------------------------------------*/
/* boxes = { 0 1 2 3 [4 6] [5 7] [8 10] [9 11] }; */
-const Word16 MC_PARAMUPMIX_CHIDX1[MC_PARAMUPMIX_COMBINATIONS] = { 0, 1, 4, 5 };
-const Word16 MC_PARAMUPMIX_CHIDX2[MC_PARAMUPMIX_COMBINATIONS] = { 2, 3, 6, 7 };
-const Word16 qmf_to_par_band[] = {
+static const Word16 MC_PARAMUPMIX_CHIDX1[MC_PARAMUPMIX_COMBINATIONS] = { 0, 1, 4, 5 };
+
+static const Word16 MC_PARAMUPMIX_CHIDX2[MC_PARAMUPMIX_COMBINATIONS] = { 2, 3, 6, 7 };
+
+static const Word16 qmf_to_par_band[] = {
0, 1, 2, 3, 4, 5, 5, 6, 6, 7,
7, 7, 8, 8, 8, 8, 9, 9, 9, 9,
9, 9, 10, 10, 10, 10, 10, 10, 10, 10,
@@ -62,6 +64,7 @@ const Word16 qmf_to_par_band[] = {
11, 11, 11, 11, 11, 11, 11, 11, 11, 11
};
+
/*-----------------------------------------------------------------------*
* Local function prototypes
*-----------------------------------------------------------------------*/
diff --git a/lib_dec/ivas_qmetadata_dec_fx.c b/lib_dec/ivas_qmetadata_dec_fx.c
index 40da176d81720fd6514a49e70bbb575001f16c5c..f71a40e1cd353b67a81860dd8d88457a6a77b458 100644
--- a/lib_dec/ivas_qmetadata_dec_fx.c
+++ b/lib_dec/ivas_qmetadata_dec_fx.c
@@ -39,13 +39,13 @@
#include "ivas_rom_dec.h"
#include "wmc_auto.h"
#include "prot_fx.h"
-
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
+
/*-----------------------------------------------------------------------*
* Local function prototypes
*-----------------------------------------------------------------------*/
+
static Word16 ivas_qmetadata_entropy_decode_diffuseness( UWord16 *bitstream, Word16 *index, IVAS_QDIRECTION *q_direction, UWord16 *diffuseness_index_max_ec_frame );
static Word16 ivas_qmetadata_entropy_decode_df_ratio( UWord16 *bitstream, Word16 *index, IVAS_QDIRECTION *q_direction, Word16 *dfRatio_bits );
static Word16 ivas_qmetadata_raw_decode_dir_fx( IVAS_QDIRECTION *q_direction, UWord16 *bitstream, Word16 *index, const Word16 nbands, const Word16 start_band, const Word16 hrmasa_flag );
diff --git a/lib_dec/ivas_qspherical_dec_fx.c b/lib_dec/ivas_qspherical_dec_fx.c
index f6ac39a99f081d7fc2a3d63802bb9983abe5bc7c..f443cc81de370ba99f5e6d3f4d018a40ff96322a 100644
--- a/lib_dec/ivas_qspherical_dec_fx.c
+++ b/lib_dec/ivas_qspherical_dec_fx.c
@@ -37,7 +37,6 @@
#include "ivas_stat_dec.h"
#include "wmc_auto.h"
#include "prot_fx.h"
-#include "ivas_rom_com_fx.h"
#include "ivas_prot_fx.h"
diff --git a/lib_dec/ivas_rom_dec.h b/lib_dec/ivas_rom_dec.h
index 7f471e695e10a02f5845149b4303a0536e713b0d..0b29588b2207de3cbb2cb1d3d2f7dd9839a940f6 100644
--- a/lib_dec/ivas_rom_dec.h
+++ b/lib_dec/ivas_rom_dec.h
@@ -64,7 +64,6 @@ extern const Word16 dft_win_8k_fx[70];
extern const Word16 cna_init_bands[CNA_INIT_NBANDS + 1];
-
extern const Word16 min_smooth_gains1_fx[SBA_DIRAC_STEREO_NUM_BANDS];
extern const Word16 max_smooth_gains1_fx[SBA_DIRAC_STEREO_NUM_BANDS];
extern const Word16 min_smooth_gains2_fx[SBA_DIRAC_STEREO_NUM_BANDS];
diff --git a/lib_dec/ivas_sba_dirac_stereo_dec_fx.c b/lib_dec/ivas_sba_dirac_stereo_dec_fx.c
index 377543f601cb079e604083caacc72476c56ac8d4..cf22a4048ff6a45d7ca201e8b362a9de48d1181c 100644
--- a/lib_dec/ivas_sba_dirac_stereo_dec_fx.c
+++ b/lib_dec/ivas_sba_dirac_stereo_dec_fx.c
@@ -38,10 +38,10 @@
#include "ivas_prot_fx.h"
#include "rom_com.h"
#include "ivas_rom_com.h"
-#include "ivas_rom_com_fx.h"
#include "ivas_rom_dec.h"
#include "wmc_auto.h"
+
#define SIN_NEG_30_DEGREES_Q15 ( (Word16) 0xC000 )
#define SIN_30_DEGREES_Q15 ( (Word16) 0x4000 )
diff --git a/lib_dec/ivas_sns_dec_fx.c b/lib_dec/ivas_sns_dec_fx.c
index 3bc6d337e9d57924af5fffa7957ceac12ecb2d4d..05bf47cb98fcd38164633d75a1c62cb1beb5c214 100644
--- a/lib_dec/ivas_sns_dec_fx.c
+++ b/lib_dec/ivas_sns_dec_fx.c
@@ -38,7 +38,6 @@
#include "ivas_cnst.h"
#include
#include "wmc_auto.h"
-#include "ivas_rom_com_fx.h"
#include "ivas_prot_fx.h"
/*-------------------------------------------------------------------
diff --git a/lib_dec/ivas_spar_md_dec_fx.c b/lib_dec/ivas_spar_md_dec_fx.c
index 25749e5efb62fb3892079b21f4d25f71e323c028..248518134d1350dcc9022a80e7571d11a9c2033e 100644
--- a/lib_dec/ivas_spar_md_dec_fx.c
+++ b/lib_dec/ivas_spar_md_dec_fx.c
@@ -39,7 +39,7 @@
#include "wmc_auto.h"
#include "ivas_stat_dec.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
+
/*------------------------------------------------------------------------------------------*
* Local constants
diff --git a/lib_dec/ivas_stereo_cng_dec_fx.c b/lib_dec/ivas_stereo_cng_dec_fx.c
index a481d9ccbbc3d621f84dc9bbfa4b66a9990f24bb..b8336c928b752dbbae8c6745e4a550fd62825ba8 100644
--- a/lib_dec/ivas_stereo_cng_dec_fx.c
+++ b/lib_dec/ivas_stereo_cng_dec_fx.c
@@ -39,7 +39,7 @@
#include "ivas_rom_com.h"
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
+
/*-------------------------------------------------------------------
* Local constants
diff --git a/lib_dec/ivas_stereo_dft_dec_fx.c b/lib_dec/ivas_stereo_dft_dec_fx.c
index 7d3bec07d2135d922a19fc6527c9cc8f8fe0b92f..a97c32c9d0c689008e0b030ea627713d0490f8d5 100644
--- a/lib_dec/ivas_stereo_dft_dec_fx.c
+++ b/lib_dec/ivas_stereo_dft_dec_fx.c
@@ -41,7 +41,6 @@
#include "ivas_prot_fx.h"
#include "ivas_cnst.h"
#include "ivas_rom_com.h"
-#include "ivas_rom_com_fx.h"
#include "ivas_rom_dec.h"
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
diff --git a/lib_dec/ivas_stereo_icbwe_dec_fx.c b/lib_dec/ivas_stereo_icbwe_dec_fx.c
index af31aea40ce19df09cd9d9dfba2162c9f9a1a301..8ef404ede324f9b8dab878f5eb378d42e56fd88f 100644
--- a/lib_dec/ivas_stereo_icbwe_dec_fx.c
+++ b/lib_dec/ivas_stereo_icbwe_dec_fx.c
@@ -41,7 +41,6 @@
#include "wmc_auto.h"
#include "rom_com.h"
#include "ivas_rom_com.h"
-#include "ivas_rom_com_fx.h"
#define Q_icBWE 16
diff --git a/lib_dec/ivas_stereo_switching_dec_fx.c b/lib_dec/ivas_stereo_switching_dec_fx.c
index ef4cd013a6cf7d855333fb4069c6e12564597e2f..2cd075478f6dc237099144841f8496d8ad00b639 100644
--- a/lib_dec/ivas_stereo_switching_dec_fx.c
+++ b/lib_dec/ivas_stereo_switching_dec_fx.c
@@ -41,7 +41,6 @@
#include "wmc_auto.h"
#include
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
/*-------------------------------------------------------------------*
diff --git a/lib_dec/ivas_stereo_td_dec_fx.c b/lib_dec/ivas_stereo_td_dec_fx.c
index 6209d5684e8b991ae9ca45da1530efe632099225..7169e31e2042379f1a720f2460ea0189a92441c5 100644
--- a/lib_dec/ivas_stereo_td_dec_fx.c
+++ b/lib_dec/ivas_stereo_td_dec_fx.c
@@ -39,9 +39,13 @@
#include "ivas_rom_com.h"
#include "ivas_cnst.h"
#include "wmc_auto.h"
-#include "ivas_rom_com_fx.h"
#include "ivas_prot_fx.h"
+/*-------------------------------------------------------------------*
+ * stereo_td_init_dec()
+ *
+ * Initialize TD stereo decoder
+ *-------------------------------------------------------------------*/
void stereo_td_init_dec_fx(
STEREO_TD_DEC_DATA_HANDLE hStereoTD, /* i/o: TD stereo decoder handle */
@@ -89,13 +93,15 @@ void stereo_td_init_dec_fx(
*
* Configure TD stereo decoder
*-------------------------------------------------------------------*/
-Word32 power_table[32 + 1] = {
+
+static Word32 power_table[32 + 1] = {
53687092, 60237908, 67588048, 75835024, 85088304, 95470648, 107119832, 120190432,
134855872, 151310800, 169773488, 190488992, 213732176, 239811440, 269072832, 301904704,
338742656, 380075520, 426451744, 478486688, 536870912, 602379200, 675880448, 758350272,
850883136, 954706496, 1071198464, 1201904384, 1348558720, 1513107968, 1697734912, 1904890240,
2137321728
}; // Q29
+
void tdm_configure_dec_fx(
const Word16 ivas_format, /* i : IVAS format Q0*/
const Word16 ism_mode, /* i : ISM mode in combined format Q0*/
diff --git a/lib_enc/FEC_enc_fx.c b/lib_enc/FEC_enc_fx.c
index 69b14eb9b65dcbc5422bd658464249a3967b882b..1a813b46205712a942ef65958c6e2c14d19e5e4f 100644
--- a/lib_enc/FEC_enc_fx.c
+++ b/lib_enc/FEC_enc_fx.c
@@ -1,11 +1,10 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
-#include "options.h" /* Compilation switches */
-#include "cnst.h" /* Common constants */
-//#include "prot_fx.h" /* Function prototypes */
-#include "rom_com_fx.h" /* Static table prototypes */
+#include "options.h" /* Compilation switches */
+#include "cnst.h" /* Common constants */
#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
@@ -30,13 +29,14 @@
/*----------------------------------------------------------------------------*/
/* INPUT/OUTPUT ARGUMENTS : */
/* Word16 *last_pulse_pos i/o: Position of the last pulse */
-/* Encoder_State *st_fx i/o: state structure */
+/* Encoder_State *st_fx i/o: state structure */
/*----------------------------------------------------------------------------*/
/* RETURN ARGUMENTS : */
/* _ None */
/*----------------------------------------------------------------------------*/
/* */
/*============================================================================*/
+
void FEC_encode_fx(
BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
const ACELP_config acelp_cfg, /* i/o: configuration of the ACELP */
diff --git a/lib_enc/acelp_core_enc_fx.c b/lib_enc/acelp_core_enc_fx.c
index eec55c1c720af4b43788900120db86bf6680bd00..75df71db44e1a1b2517708c65c1a57f0e92bc2ea 100644
--- a/lib_enc/acelp_core_enc_fx.c
+++ b/lib_enc/acelp_core_enc_fx.c
@@ -10,7 +10,6 @@
#include "stat_enc.h"
#include "rom_com.h"
#include "rom_enc.h" /* Encoder static table prototypes */
-#include "rom_com_fx.h" /* Static table prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
#include "ivas_cnst.h"
#include "ivas_prot_fx.h"
diff --git a/lib_enc/acelp_core_switch_enc_fx.c b/lib_enc/acelp_core_switch_enc_fx.c
index 7ab5492f728a3182109eb3806060f42e75ccaed8..f6aa6444a24057c25335bb907a628fa3d39f13ef 100644
--- a/lib_enc/acelp_core_switch_enc_fx.c
+++ b/lib_enc/acelp_core_switch_enc_fx.c
@@ -5,12 +5,12 @@
#include
#include "options.h"
#include "cnst.h"
-#include "rom_com_fx.h"
#include "rom_com.h" /* Common constants */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
#include "basop_util.h" /* Function prototypes */
+
/*---------------------------------------------------------------------*
* Local function prototypes
*---------------------------------------------------------------------*/
diff --git a/lib_enc/acelp_enc_util_fx.c b/lib_enc/acelp_enc_util_fx.c
index 7f57b55da9f685b3d5800308105bf66c623742fe..8d97657851842b7d4820a43b5816b8e7d2eae781 100644
--- a/lib_enc/acelp_enc_util_fx.c
+++ b/lib_enc/acelp_enc_util_fx.c
@@ -13,7 +13,6 @@
#include "prot_fx_enc.h" /* Function prototypes */
#include "stat_enc.h"
#include "rom_com.h"
-#include "rom_com_fx.h"
#include "rom_enc.h"
diff --git a/lib_enc/amr_wb_enc_fx.c b/lib_enc/amr_wb_enc_fx.c
index 1580a78186f071f46a99e4bdb4e5154f1d1f9fa3..76c9930b68d67bb4fe9b5130ed14fee450a07a22 100644
--- a/lib_enc/amr_wb_enc_fx.c
+++ b/lib_enc/amr_wb_enc_fx.c
@@ -3,11 +3,9 @@
====================================================================================*/
#include
-#include "options.h" /* Compilation switches */
-#include "cnst.h" /* Common constants */
-#include "rom_enc.h" /* Encoder static table prototypes */
-#include "rom_com_fx.h" /* Static table prototypes */
-//#include "prot_fx.h" /* Function prototypes */
+#include "options.h" /* Compilation switches */
+#include "cnst.h" /* Common constants */
+#include "rom_enc.h" /* Encoder static table prototypes */
#include "basop_util.h"
#include "rom_com.h" /* Common constants */
#include "prot_fx.h" /* Function prototypes */
diff --git a/lib_enc/analy_lp_fx.c b/lib_enc/analy_lp_fx.c
index 9b6ff2108359dcb6242fd83232ab5972e2236e01..def862b8487fc0a4113e962ec36c919bb9299a1a 100644
--- a/lib_enc/analy_lp_fx.c
+++ b/lib_enc/analy_lp_fx.c
@@ -5,12 +5,12 @@
#include
#include "options.h" /* Compilation switches */
#include "cnst.h" /* Common constants */
-#include "rom_com_fx.h" /* Static table prototypes */
#include "rom_com.h" /* Static table prototypes */
#include "rom_enc.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
/*-------------------------------------------------------------------*
* analy_lp_fx()
*
diff --git a/lib_enc/cod4t64_fx.c b/lib_enc/cod4t64_fx.c
index 8c480b77986ad00eb2ed561214f5affcaa0dcca5..d0bb15cc7a8d07740b8bec88d1ab73d30bfe15be 100644
--- a/lib_enc/cod4t64_fx.c
+++ b/lib_enc/cod4t64_fx.c
@@ -1,12 +1,12 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
#include "options.h" /* VMR-WB compilation switches */
#include "cnst.h" /* Common constants */
#include "rom_enc.h" /* Encoder static table prototypes */
#include "prot_fx.h" /* Function prototypes */
-#include "rom_com_fx.h" /* Static table prototypes */
#include "rom_com.h" /* Static table prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
@@ -22,6 +22,7 @@
/*-------------------------------------------------------------------*
* Local function prototypes
*-------------------------------------------------------------------*/
+
static Word16 quant_1p_N1_fx( const Word16 pos, const Word16 N );
static Word16 quant_3p_3N1_fx( const Word16 pos1, const Word16 pos2, const Word16 pos3, const Word16 N );
static Word32 quant_4p_4N_fx( const Word16 pos[], const Word16 N );
diff --git a/lib_enc/cod_tcx_fx.c b/lib_enc/cod_tcx_fx.c
index 3ab224a62b2eabae46f3c8227943db9ee044cf69..599e5455360e02e42410eab5dcbc022309fa73b1 100644
--- a/lib_enc/cod_tcx_fx.c
+++ b/lib_enc/cod_tcx_fx.c
@@ -8,19 +8,18 @@
#include
#include "rom_com.h"
#include "stat_com.h"
-// #include "prot_fx.h"
#include "prot_fx.h"
#include "basop_util.h"
#include "stl.h"
-// #include "basop_mpy.h"
#include "prot_fx_enc.h"
#include
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
+#include "ivas_rom_com.h"
#ifdef DEBUGGING
#include "debug.h"
#endif
+
#define SIMILAR_TNS_THRESHOLD_FX_IN_Q15 ( 1311 )
#define TNS_GAIN_THRESHOLD_FOR_WHITE_FX_IN_Q7 ( 384 )
#define TNS_GAIN_THRESHOLD_FOR_WHITE_FX_IN_Q23 ( 25165824 )
diff --git a/lib_enc/core_enc_init_fx.c b/lib_enc/core_enc_init_fx.c
index b46e4cb71c2b47747dded35adb81931d514926ff..7bf836a6d4b0b6162333554e6deb4c8ddb0a28fd 100644
--- a/lib_enc/core_enc_init_fx.c
+++ b/lib_enc/core_enc_init_fx.c
@@ -3,13 +3,10 @@
====================================================================================*/
#include
-// #include "prot_fx.h"
-// #include "basop_mpy.h"
#include "options.h"
#include "cnst.h"
#include "stl.h"
#include "basop_util.h"
-#include "rom_com_fx.h"
#include "ivas_cnst.h"
#include
#include "rom_com.h" /* Common constants */
diff --git a/lib_enc/core_enc_ol_fx.c b/lib_enc/core_enc_ol_fx.c
index bd9d5375f1d74b5f8e1a142a3dbc997ac1ade924..654a2a603c48674e3c79c628fab125ef0de63917 100644
--- a/lib_enc/core_enc_ol_fx.c
+++ b/lib_enc/core_enc_ol_fx.c
@@ -6,9 +6,7 @@
#include
#include "options.h"
#include "cnst.h" /* Common constants */
-//#include "prot_fx.h"
#include "basop_util.h"
-#include "rom_com_fx.h"
#include "rom_com.h" /* Common constants */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
diff --git a/lib_enc/core_enc_reconf_fx.c b/lib_enc/core_enc_reconf_fx.c
index 9e7380aaa8329662fb6ef5546e90a51b6a0f2c7b..5f01935c73450ea01243bd17fdec3e4114958e80 100644
--- a/lib_enc/core_enc_reconf_fx.c
+++ b/lib_enc/core_enc_reconf_fx.c
@@ -4,20 +4,20 @@
#include
#include "options.h"
-//#include "prot_fx.h"
-#include "cnst.h" /* Common constants */
-#include "rom_com_fx.h"
+#include "cnst.h" /* Common constants */
#include "rom_enc.h" /* Encoder static table prototypes */
#include "rom_com.h" /* Common constants */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
#include "basop_util.h" /* Function prototypes */
+
/*-----------------------------------------------------------------*
- * Funtion core_coder_reconfig_fx *
+ * Funtion core_coder_reconfig_fx *
* ~~~~~~~~~~~~~~~~~~~ *
* - reconfig core coder when switching to another frame type *
*-----------------------------------------------------------------*/
+
void core_coder_reconfig_fx(
Encoder_State *st,
const Word32 last_total_brate )
diff --git a/lib_enc/core_enc_switch_fx.c b/lib_enc/core_enc_switch_fx.c
index fb5fd037a51694a3422381d0784d3368ed1f37e3..52f79944221e3c1c248e6be35da879c8e2bbcf6d 100644
--- a/lib_enc/core_enc_switch_fx.c
+++ b/lib_enc/core_enc_switch_fx.c
@@ -1,13 +1,13 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
#include
#include "options.h"
#include "prot_fx.h"
#include "cnst.h" /* Common constants */
#include "ivas_cnst.h"
-#include "rom_com_fx.h"
#include "rom_com.h" /* Common constants */
#include "prot_fx_enc.h" /* Function prototypes */
#include "basop_util.h" /* Function prototypes */
diff --git a/lib_enc/core_switching_enc_fx.c b/lib_enc/core_switching_enc_fx.c
index 5b657e9c538f9ba6fe2391015d5d914e83cec162..337e1200bc2e89648068ff2c00f556bfd7378c2a 100644
--- a/lib_enc/core_switching_enc_fx.c
+++ b/lib_enc/core_switching_enc_fx.c
@@ -1,13 +1,12 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
-#include "options.h" /* Compilation switches */
-#include "cnst.h" /* Common constants */
-#include "rom_enc.h" /* Encoder static table prototypes */
-#include "rom_com_fx.h" /* Static table prototypes */
-#include "rom_com.h" /* Static table prototypes */
-//#include "prot_fx.h" /* Function prototypes */
+#include "options.h" /* Compilation switches */
+#include "cnst.h" /* Common constants */
+#include "rom_enc.h" /* Encoder static table prototypes */
+#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "ivas_prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
diff --git a/lib_enc/decision_matrix_enc_fx.c b/lib_enc/decision_matrix_enc_fx.c
index bc5feeb6be1d1e6855a7758070709130ae0d6f7b..6f20edc4f8ba93b90f9e37e9000b58298c404af8 100644
--- a/lib_enc/decision_matrix_enc_fx.c
+++ b/lib_enc/decision_matrix_enc_fx.c
@@ -6,9 +6,7 @@
#include
#include "options.h"
#include "cnst.h" /* Common constants */
-//#include "prot_fx.h"
#include "stat_enc.h"
-#include "rom_com_fx.h"
#include "rom_com.h" /* Common constants */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
diff --git a/lib_enc/diffcod_fx.c b/lib_enc/diffcod_fx.c
index 51a31fa8ae82ba811147417ac2efaec44079eaa6..6a14a27eec3ade5551c7eebb02b38d1c8185dea9 100644
--- a/lib_enc/diffcod_fx.c
+++ b/lib_enc/diffcod_fx.c
@@ -1,14 +1,15 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
-#include "options.h" /* Compilation switches */
-#include "cnst.h" /* Compilation switches */
-#include "rom_com_fx.h" /* Static table prototypes */
-//#include "prot_fx.h" /* Function Prototypes */
+#include "options.h" /* Compilation switches */
+#include "cnst.h" /* Compilation switches */
+#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
/*--------------------------------------------------------------------------*/
/* Function diffcod */
/* ~~~~~~~~~~~~~~~~~ */
diff --git a/lib_enc/dtx_fx.c b/lib_enc/dtx_fx.c
index 442c548e9152804088fd2bdfcbed2ace7c3f6afc..7d2a8395e79950f4ba56202f40c63373aefe8561 100644
--- a/lib_enc/dtx_fx.c
+++ b/lib_enc/dtx_fx.c
@@ -1,19 +1,20 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
#include "options.h" /* Compilation switches */
#include "cnst.h" /* Common constants */
-#include "rom_com_fx.h"
#include "rom_com.h"
-// #include "basop_mpy.h"
#include
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
/*-------------------------------------------------------------------*
* Local constants
*-------------------------------------------------------------------*/
+
#define ALPHA_ENER_FAST_FX 29491 /* Fast adaptation (noise down, speech up) */
#define ALPHA_ENER_SLOW_FX 32440 /* Fast adaptation (noise down, speech up) */
@@ -33,11 +34,14 @@
#define MAX_BRATE_DTX_EVS ACELP_24k40 /* maximum bitrate to which the default DTX is applied in EVS; otherwise DTX is applied only in silence */
#define MAX_BRATE_DTX_IVAS IVAS_80k /* maximum bitrate to which the default DTX is applied in IVAS; otherwise DTX is applied only in silence */
+
/*-------------------------------------------------------------------*
* Local function prototypes
*-------------------------------------------------------------------*/
static void update_SID_cnt_fx( DTX_ENC_HANDLE hDtxEnc, const Word32 core_brate, const Word16 Opt_AMR_WB );
+
+
/*==================================================================================*/
/* FUNCTION : dtx_ivas_fx() */
/*----------------------------------------------------------------------------------*/
diff --git a/lib_enc/enc_acelp_fx.c b/lib_enc/enc_acelp_fx.c
index f1c87722b113848d62d60c2551f3e0d09be515a9..3121ccc3189e4e1d774f544df9538290718703ee 100644
--- a/lib_enc/enc_acelp_fx.c
+++ b/lib_enc/enc_acelp_fx.c
@@ -1,15 +1,14 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
#include "typedef.h"
#include
#include
#include "options.h"
#include "cnst.h"
-//#include "prot_fx.h"
#include "basop_util.h"
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "rom_enc.h"
#include "prot_fx.h" /* Function prototypes */
@@ -51,7 +50,15 @@ void E_ACELP_corrmatrix_fx( Word16 h[] /*Q12*/, Word16 sign[] /*Q0*/, Word16 vec
* Returns:
* void
*/
-void E_ACELP_h_vec_corr1_fx( Word16 h[] /*Qx*/, Word16 vec[] /*Qx*/, UWord8 track /*Q0*/, Word16 sign[] /*Q15*/, Word16 ( *rrixix )[16] /*Q9*/, Word16 cor[] /*Q9*/, Word16 dn2_pos[] /*Q0*/, Word16 nb_pulse /*Q0*/ )
+void E_ACELP_h_vec_corr1_fx(
+ Word16 h[] /*Qx*/,
+ Word16 vec[] /*Qx*/,
+ UWord8 track /*Q0*/,
+ Word16 sign[] /*Q15*/,
+ Word16 ( *rrixix )[16] /*Q9*/,
+ Word16 cor[] /*Q9*/,
+ Word16 dn2_pos[] /*Q0*/,
+ Word16 nb_pulse /*Q0*/ )
{
Word16 i, j;
Word16 dn, corr;
@@ -97,7 +104,14 @@ void E_ACELP_h_vec_corr1_fx( Word16 h[] /*Qx*/, Word16 vec[] /*Qx*/, UWord8 trac
return;
}
-void E_ACELP_h_vec_corr2_fx( Word16 h[] /*Qx*/, Word16 vec[] /*Qx*/, UWord8 track /*Q0*/, Word16 sign[] /*Q15*/, Word16 ( *rrixix )[16] /*Q9*/, Word16 cor[] /*Q9*/ )
+
+void E_ACELP_h_vec_corr2_fx(
+ Word16 h[] /*Qx*/,
+ Word16 vec[] /*Qx*/,
+ UWord8 track /*Q0*/,
+ Word16 sign[] /*Q15*/,
+ Word16 ( *rrixix )[16] /*Q9*/,
+ Word16 cor[] /*Q9*/ )
{
Word16 i, j, pos, corr;
Word16 *p0, *p1, *p2;
@@ -164,7 +178,19 @@ void E_ACELP_h_vec_corr2_fx( Word16 h[] /*Qx*/, Word16 vec[] /*Qx*/, UWord8 trac
* Returns:
* void
*/
-static void E_ACELP_2pulse_search( Word16 nb_pos_ix /*Q0*/, UWord8 track_x /*Q0*/, UWord8 track_y /*Q0*/, Word16 *ps /*Qdn*/, Word16 *alp /*Qx*/, Word16 *ix /*Q0*/, Word16 *iy /*Q0*/, Word16 dn[] /*Qdn*/, Word16 *dn2 /*Q0*/, Word16 cor_x[] /*Qx*/, Word16 cor_y[] /*Qx*/, Word16 ( *rrixiy )[256] /*Q9*/ )
+static void E_ACELP_2pulse_search(
+ Word16 nb_pos_ix /*Q0*/,
+ UWord8 track_x /*Q0*/,
+ UWord8 track_y /*Q0*/,
+ Word16 *ps /*Qdn*/,
+ Word16 *alp /*Qx*/,
+ Word16 *ix /*Q0*/,
+ Word16 *iy /*Q0*/,
+ Word16 dn[] /*Qdn*/,
+ Word16 *dn2 /*Q0*/,
+ Word16 cor_x[] /*Qx*/,
+ Word16 cor_y[] /*Qx*/,
+ Word16 ( *rrixiy )[256] /*Q9*/ )
{
Word16 x, x2, y, i, *pos_x;
Word16 ps0, ps1, alp2_16, ps2, sq;
@@ -291,13 +317,14 @@ static void E_ACELP_2pulse_search( Word16 nb_pos_ix /*Q0*/, UWord8 track_x /*Q0*
* Returns:
* void
*/
-static void E_ACELP_1pulse_search( UWord8 tracks[2],
- Word16 *ps, /*Qdn*/
- Word16 *alp, /*Qx*/
- Word16 *ix, /*Q0*/
- Word16 dn[], /*Qdn*/
- Word16 cor_x[], /*Q6*/
- Word16 cor_y[] /*Q6*/ )
+static void E_ACELP_1pulse_search(
+ UWord8 tracks[2],
+ Word16 *ps, /*Qdn*/
+ Word16 *alp, /*Qx*/
+ Word16 *ix, /*Q0*/
+ Word16 dn[], /*Qdn*/
+ Word16 cor_x[], /*Q6*/
+ Word16 cor_y[] /*Q6*/ )
{
Word16 x, x_save = 0;
Word16 ps0;
@@ -400,7 +427,11 @@ static void E_ACELP_1pulse_search( UWord8 tracks[2],
* Returns:
* void
*/
-static void E_ACELP_xh_corr( Word16 *x /*Qx*/, Word16 *y /*Qy*/, Word16 *h /*Q12*/, Word16 L_subfr /*Q0*/ )
+static void E_ACELP_xh_corr(
+ Word16 *x /*Qx*/,
+ Word16 *y /*Qy*/,
+ Word16 *h /*Q12*/,
+ Word16 L_subfr /*Q0*/ )
{
Word16 i, j, k;
Word32 L_tmp, y32[L_SUBFR16k], L_maxloc, L_tot;
@@ -452,7 +483,11 @@ static void E_ACELP_xh_corr( Word16 *x /*Qx*/, Word16 *y /*Qy*/, Word16 *h /*Q12
* \param bits amount of target headroom bits for y
* \return exponent of y
*/
-Word16 E_ACELP_hh_corr( Word16 *x /*Q11*/, Word16 *y /*Qy*/, Word16 L_subfr /*Q0*/, Word16 bits /*Q0*/ )
+Word16 E_ACELP_hh_corr(
+ Word16 *x /*Q11*/,
+ Word16 *y /*Qy*/,
+ Word16 L_subfr /*Q0*/,
+ Word16 bits /*Q0*/ )
{
Word16 i, j, k = 0; /* initialize just to avoid compiler warning */
Word32 L_tmp, L_sum;
@@ -518,7 +553,13 @@ Word16 E_ACELP_hh_corr( Word16 *x /*Q11*/, Word16 *y /*Qy*/, Word16 L_subfr /*Q0
* Returns:
* pitch gain (0 ... 1.2F) (Q14)
*/
-Word16 E_ACELP_xy1_corr_fx( Word16 xn[] /*Q15-exp_xn*/, Word16 y1[] /*Q15-exp_xn*/, ACELP_CbkCorr *g_corr, Word16 norm_flag /*Q0*/, Word16 L_subfr /*Q0*/, Word16 exp_xn )
+Word16 E_ACELP_xy1_corr_fx(
+ Word16 xn[] /*Q15-exp_xn*/,
+ Word16 y1[] /*Q15-exp_xn*/,
+ ACELP_CbkCorr *g_corr,
+ Word16 norm_flag /*Q0*/,
+ Word16 L_subfr /*Q0*/,
+ Word16 exp_xn )
{
Word16 i, Q_xn;
Word16 xy, yy, exp_xy, exp_yy, gain;
@@ -618,7 +659,13 @@ bail:
* Returns:
* pitch gain (0 ... 1.2F)
*/
-void E_ACELP_xy2_corr( Word16 xn[] /*Q_xn*/, Word16 y1[] /*Q_xn*/, Word16 y2[] /*Q9*/, ACELP_CbkCorr *g_corr, Word16 L_subfr /*Q0*/, Word16 exp_xn )
+void E_ACELP_xy2_corr(
+ Word16 xn[] /*Q_xn*/,
+ Word16 y1[] /*Q_xn*/,
+ Word16 y2[] /*Q9*/,
+ ACELP_CbkCorr *g_corr,
+ Word16 L_subfr /*Q0*/,
+ Word16 exp_xn )
{
Word16 xny2, y2y2, y1y2, xx, exp_xny2, exp_y2y2, exp_y1y2, exp_xx;
Word32 L_off;
@@ -680,7 +727,12 @@ void E_ACELP_xy2_corr( Word16 xn[] /*Q_xn*/, Word16 y1[] /*Q_xn*/, Word16 y2[] /
* Returns:
* void
*/
-void E_ACELP_codebook_target_update_fx( Word16 *x /*Q_xn*/, Word16 *x2 /*Q_xn*/, Word16 *y /*Q_xn*/, Word16 gain /*Q14*/, Word16 L_subfr /*Q0*/ )
+void E_ACELP_codebook_target_update_fx(
+ Word16 *x /*Q_xn*/,
+ Word16 *x2 /*Q_xn*/,
+ Word16 *y /*Q_xn*/,
+ Word16 gain /*Q14*/,
+ Word16 L_subfr /*Q0*/ )
{
Word16 i, Q15_flag;
Word32 L_tmp;
@@ -732,7 +784,15 @@ void E_ACELP_codebook_target_update_fx( Word16 *x /*Q_xn*/, Word16 *x2 /*Q_xn*/,
* Returns:
* void
*/
-void E_ACELP_pulsesign( const Word16 cn[] /*Q_xn*/, Word16 dn[] /*Qdn*/, Word16 dn2[] /*Qdn2*/, Word16 sign[] /*Q13*/, Word16 vec[] /*Q15*/, const Word16 alp /*Q13*/, const Word16 sign_val /*Q15*/, const Word16 L_subfr /*Q0*/ )
+void E_ACELP_pulsesign(
+ const Word16 cn[] /*Q_xn*/,
+ Word16 dn[] /*Qdn*/,
+ Word16 dn2[] /*Qdn2*/,
+ Word16 sign[] /*Q13*/,
+ Word16 vec[] /*Q15*/,
+ const Word16 alp /*Q13*/,
+ const Word16 sign_val /*Q15*/,
+ const Word16 L_subfr /*Q0*/ )
{
Word16 i;
Word32 Lval, Lcor;
@@ -809,7 +869,10 @@ void E_ACELP_pulsesign( const Word16 cn[] /*Q_xn*/, Word16 dn[] /*Qdn*/, Word16
}
-void E_ACELP_findcandidates( Word16 dn2[] /*Qx*/, Word16 dn2_pos[] /*Q0*/, Word16 pos_max[] /*Q0*/ )
+void E_ACELP_findcandidates(
+ Word16 dn2[] /*Qx*/,
+ Word16 dn2_pos[] /*Q0*/,
+ Word16 pos_max[] /*Q0*/ )
{
Word16 i, k, j, i8;
Word16 *ps_ptr;
@@ -841,7 +904,9 @@ void E_ACELP_findcandidates( Word16 dn2[] /*Qx*/, Word16 dn2_pos[] /*Q0*/, Word1
}
-static void E_ACELP_apply_sign( Word16 *p0 /*Qx*/, Word16 *psign0 /*Q15*/ )
+static void E_ACELP_apply_sign(
+ Word16 *p0 /*Qx*/,
+ Word16 *psign0 /*Q15*/ )
{
p0[0] = mult_r( p0[0], psign0[0] ); /*Qx*/
move16();
@@ -875,9 +940,14 @@ static void E_ACELP_apply_sign( Word16 *p0 /*Qx*/, Word16 *psign0 /*Q15*/ )
move16();
p0[15] = mult_r( p0[15], psign0[60] );
move16();
+
+ return;
}
-void E_ACELP_vec_neg_fx( Word16 h[] /*Qx*/, Word16 h_inv[] /*Qx*/, Word16 L_subfr /*Q0*/ )
+void E_ACELP_vec_neg_fx(
+ Word16 h[] /*Qx*/,
+ Word16 h_inv[] /*Qx*/,
+ Word16 L_subfr /*Q0*/ )
{
Word16 i;
@@ -886,10 +956,17 @@ void E_ACELP_vec_neg_fx( Word16 h[] /*Qx*/, Word16 h_inv[] /*Qx*/, Word16 L_subf
h_inv[i] = negate( h[i] );
move16();
}
+
+ return;
}
-void E_ACELP_corrmatrix_fx( Word16 h[] /*Q12*/, Word16 sign[] /*Q0*/, Word16 vec[] /*Q15*/, Word16 rrixix[4][16] /*Q9*/, Word16 rrixiy[4][256] /*Q9*/ )
+void E_ACELP_corrmatrix_fx(
+ Word16 h[] /*Q12*/,
+ Word16 sign[] /*Q0*/,
+ Word16 vec[] /*Q15*/,
+ Word16 rrixix[4][16] /*Q9*/,
+ Word16 rrixiy[4][256] /*Q9*/ )
{
Word16 *p0, *p1, *p2, *p3, *psign0, *psign1, *psign2, *psign3;
@@ -927,7 +1004,6 @@ void E_ACELP_corrmatrix_fx( Word16 h[] /*Q12*/, Word16 sign[] /*Q0*/, Word16 vec
*p0-- = round_fx( L_shr( cor, 1 ) ); /* Q9 */
}
-
/*
* Compute rrixiy[][] needed for the codebook search.
*/
@@ -1064,10 +1140,19 @@ void E_ACELP_corrmatrix_fx( Word16 h[] /*Q12*/, Word16 sign[] /*Q0*/, Word16 vec
E_ACELP_apply_sign( p3, psign3 );
p3 += 16;
}
+
return;
}
-void E_ACELP_4tsearch_fx( Word16 dn[] /*Qdn*/, const Word16 cn[] /*Q_xn*/, const Word16 H[] /*Q12*/, Word16 code[] /*Q9*/, const PulseConfig *config, Word16 ind[] /*Q0*/, Word16 y[] /*Qy*/, const Word16 element_mode )
+void E_ACELP_4tsearch_fx(
+ Word16 dn[] /*Qdn*/,
+ const Word16 cn[] /*Q_xn*/,
+ const Word16 H[] /*Q12*/,
+ Word16 code[] /*Q9*/,
+ const PulseConfig *config,
+ Word16 ind[] /*Q0*/,
+ Word16 y[] /*Qy*/,
+ const Word16 element_mode )
{
Word16 sign[L_SUBFR], vec[L_SUBFR];
Word16 cor_x[16], cor_y[16], h_buf[4 * L_SUBFR];
@@ -1091,7 +1176,6 @@ void E_ACELP_4tsearch_fx( Word16 dn[] /*Qdn*/, const Word16 cn[] /*Q_xn*/, const
move32();
#endif
-
alp = config->alp; /* Q13 */ /* initial value for energy of all fixed pulses */
move16();
nb_pulse = config->nb_pulse;
@@ -1153,13 +1237,11 @@ void E_ACELP_4tsearch_fx( Word16 dn[] /*Qdn*/, const Word16 cn[] /*Q_xn*/, const
E_ACELP_vec_neg_fx( h, h_inv, L_SUBFR );
-
/*
* Compute correlation matrices needed for the codebook search.
*/
E_ACELP_corrmatrix_fx( h, sign, vec, rrixix, rrixiy );
-
/*
* Deep first search:
* ------------------
@@ -1465,7 +1547,6 @@ void E_ACELP_4t_fx(
move16();
memcpy( &config, &PulseConfTable[cdk_index], sizeof( PulseConfTable[cdk_index] ) );
-
if ( cmpl_flag > 0 )
{
config.nbiter = cmpl_flag;
@@ -1488,8 +1569,11 @@ void E_ACELP_4t_fx(
E_ACELP_4tsearch_fx( dn, cn, H, code, &config, ind, y, element_mode );
}
E_ACELP_indexing_fx( code, &config, NB_TRACK_FCB_4T, _index );
+
return;
}
+
+
static void E_ACELP_indexing_shift(
Word16 wordcnt, /* i: 16-bit word count including the newly shifted-in bits Q0*/
Word16 shift_bits, /* i: number of bits to shift in from the lsb Q0*/
@@ -1638,11 +1722,13 @@ Word16 E_ACELP_indexing_fx(
return saved_bits;
}
+
/*--------------------------------------------------------------------------*
* E_ACELP_adaptive_codebook
*
* Find adaptive codebook.
*--------------------------------------------------------------------------*/
+
void E_ACELP_adaptive_codebook(
Word16 *exc, /* i/o: pointer to the excitation frame Q_new */
Word16 T0, /* i : integer pitch lag Q0 */
@@ -1841,6 +1927,7 @@ void E_ACELP_adaptive_codebook(
*
* Find innovative codebook.
*--------------------------------------------------------------------------*/
+
void E_ACELP_innovative_codebook_fx(
Word16 *exc, /* i : pointer to the excitation frame Q_new */
Word16 T0, /* i : integer pitch lag Q0 */
@@ -1869,7 +1956,6 @@ void E_ACELP_innovative_codebook_fx(
Word16 Rw2[L_SUBFR];
Word16 pitch, idx;
-
pitch = T0;
move16();
idx = shr( i_subfr, 6 );
@@ -1939,7 +2025,12 @@ void E_ACELP_innovative_codebook_fx(
* n - (output) range of possible states (0...n-1)
* p - (output) number of pulses found
*--------------------------------------------------------------------------*/
-static void E_ACELP_codearithp_fx( const Word16 v[] /*Q9*/, UWord32 *n /*Q0*/, UWord32 *ps /*Q0*/, Word16 *p /*Q0*/ )
+
+static void E_ACELP_codearithp_fx(
+ const Word16 v[] /*Q9*/,
+ UWord32 *n /*Q0*/,
+ UWord32 *ps /*Q0*/,
+ Word16 *p /*Q0*/ )
{
Word16 k, nb_pulse, i, t, pos[NPMAXPT], posno;
Word16 sign, m;
@@ -2024,10 +2115,17 @@ static void E_ACELP_codearithp_fx( const Word16 v[] /*Q9*/, UWord32 *n /*Q0*/, U
*p = nb_pulse; /*Q0*/
move16();
+
return;
}
-void fcb_pulse_track_joint_fx( UWord16 *idxs /*Q0*/, Word16 wordcnt /*Q0*/, UWord32 *index_n /*Q0*/, Word16 *pulse_num /*Q0*/, Word16 track_num /*Q0*/ )
+
+void fcb_pulse_track_joint_fx(
+ UWord16 *idxs /*Q0*/,
+ Word16 wordcnt /*Q0*/,
+ UWord32 *index_n /*Q0*/,
+ Word16 *pulse_num /*Q0*/,
+ Word16 track_num /*Q0*/ )
{
Word16 hi_to_low[10];
UWord32 index, index_mask;
@@ -2142,5 +2240,6 @@ void fcb_pulse_track_joint_fx( UWord16 *idxs /*Q0*/, Word16 wordcnt /*Q0*/, UWor
idxs[track] = extract_l( index );
index = L_lshr( index, 16 );
}
+
return;
}
diff --git a/lib_enc/enc_amr_wb_fx.c b/lib_enc/enc_amr_wb_fx.c
index 395d95bdf224d9e5fe5453b8d0bad7c05dae61a4..ada6f763cdd646d05da031eb7c569ee17efc8f69 100644
--- a/lib_enc/enc_amr_wb_fx.c
+++ b/lib_enc/enc_amr_wb_fx.c
@@ -1,21 +1,22 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
-#include "options.h" /* Compilation switches */
-#include "cnst.h" /* Common constants */
-//#include "prot_fx.h" /* Function prototypes */
-#include "rom_com_fx.h" /* Static table prototypes */
+#include "options.h" /* Compilation switches */
+#include "cnst.h" /* Common constants */
#include "rom_com.h" /* Common constants */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
#include "basop_util.h" /* Function prototypes */
+
/*-------------------------------------------------------------------*
* encod_amr_wb()
*
* Encode excitation signal in AMR-WB IO mode
*-------------------------------------------------------------------*/
+
void encod_amr_wb_fx(
Encoder_State *st, /* i/o: state structure */
const Word16 speech[], /* i : input speech Q_new-1*/
diff --git a/lib_enc/enc_gain_fx.c b/lib_enc/enc_gain_fx.c
index 7c9606cfc24bcf592bfd1a0390ea625645414b50..1789813cc38fc8e085b44e88adef94e27333524d 100644
--- a/lib_enc/enc_gain_fx.c
+++ b/lib_enc/enc_gain_fx.c
@@ -6,15 +6,12 @@
#include
#include "options.h"
#include "cnst.h"
-//#include "prot_fx.h"
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "rom_enc.h"
#include "basop_util.h"
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
-void E_GAIN_norm_corr_fx( Word16 exc[] /*Q_new*/, Word16 xn[] /*(Q_new+shift-1)*/, Word16 h[] /*(Q14+shift)*/, Word16 t_min, Word16 t_max, Word16 corr_norm[] /*(Q15+(Q_new+shift-1)+scale)*/, Word16 L_subfr );
/*
* E_GAIN_norm_corr
@@ -36,14 +33,21 @@ void E_GAIN_norm_corr_fx( Word16 exc[] /*Q_new*/, Word16 xn[] /*(Q_new+shift-1)*
* Returns:
* void
*/
-void E_GAIN_norm_corr_fx( Word16 exc[] /*Q_new*/, Word16 xn[] /*(Q_new+shift-1)*/, Word16 h[] /*(Q14+shift)*/, Word16 t_min, Word16 t_max, Word16 corr_norm[] /*(Q15+(Q_new+shift-1)+scale)*/, Word16 L_subfr )
+
+static void E_GAIN_norm_corr_fx(
+ Word16 exc[] /*Q_new*/,
+ Word16 xn[] /*(Q_new+shift-1)*/,
+ Word16 h[] /*(Q14+shift)*/,
+ Word16 t_min,
+ Word16 t_max,
+ Word16 corr_norm[] /*(Q15+(Q_new+shift-1)+scale)*/,
+ Word16 L_subfr )
{
Word16 excf[L_SUBFR]; /* filtered past excitation (Q_new+shift-1) */
Word16 ps, norm, exp_alp, exp_ps, scale, L_subfr2;
Word16 t, j, k;
Word32 L_tmp, L_tmp2;
-
k = negate( t_min );
L_subfr2 = shr( L_subfr, 1 );
diff --git a/lib_enc/enc_gen_voic_fx.c b/lib_enc/enc_gen_voic_fx.c
index dba7113308f6b02b8b7d4515e0f029f631cdac2d..bcb09461380313f84c2bbe34d43db687e627b698 100644
--- a/lib_enc/enc_gen_voic_fx.c
+++ b/lib_enc/enc_gen_voic_fx.c
@@ -1,11 +1,11 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
#include "options.h" /* Compilation switches */
#include "cnst.h" /* Common constants */
#include "prot_fx.h" /* Function prototypes */
-#include "rom_com_fx.h" /* Static table prototypes */
#include "rom_com.h" /* Static table prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
diff --git a/lib_enc/enc_gen_voic_rf_fx.c b/lib_enc/enc_gen_voic_rf_fx.c
index 0e79baa5f9e95e0db27ac770b18f5b93fcd35c09..821ccbbc3b45e8dabe515f97f751fef45c355b0d 100644
--- a/lib_enc/enc_gen_voic_rf_fx.c
+++ b/lib_enc/enc_gen_voic_rf_fx.c
@@ -5,7 +5,6 @@
#include
#include "options.h"
#include "cnst.h"
-#include "rom_com_fx.h"
#include "stl.h"
#include "rom_basop_util.h"
#include "rom_com.h" /* Common constants */
diff --git a/lib_enc/enc_higher_acelp_fx.c b/lib_enc/enc_higher_acelp_fx.c
index 2a0b0e7b10437d8209305578dde2e02c7d176fab..474896f0e9c33d023e496097fd8df98cea752111 100644
--- a/lib_enc/enc_higher_acelp_fx.c
+++ b/lib_enc/enc_higher_acelp_fx.c
@@ -1,22 +1,26 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
-#include "options.h" /* Compilation switches */
-#include "cnst.h" /* Common constants */
-#include "prot_fx.h" /* Function prototypes */
-#include "rom_com_fx.h" /* Static table prototypes */
-#include "rom_com.h" /* Static table prototypes */
+#include "options.h" /* Compilation switches */
+#include "cnst.h" /* Common constants */
+#include "prot_fx.h" /* Function prototypes */
+#include "rom_com.h" /* Static table prototypes */
#include "prot_fx_enc.h"
+
/*---------------------------------------------------------------------*
* Local function prototype
*---------------------------------------------------------------------*/
+
static void find_cn_fx( const Word16 xn[], const Word16 Ap[], const Word16 *p_Aq, Word16 cn[] );
+
/*-----------------------------------------------------------------*
* Transform domain contribution encoding
*-----------------------------------------------------------------*/
+
#define Q_MINUS 4
void transf_cdbk_enc_fx(
Encoder_State *st_fx, /* i/o: encoder state structure */
diff --git a/lib_enc/enc_pit_exc_fx.c b/lib_enc/enc_pit_exc_fx.c
index b44592307d0088c6b5391a2a2818b3941f1fc5fd..cdfb7510c18d40cd1dc82ed1d83daf8db8ccb2d8 100644
--- a/lib_enc/enc_pit_exc_fx.c
+++ b/lib_enc/enc_pit_exc_fx.c
@@ -1,14 +1,15 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
#include "options.h" /* Compilation switches */
#include "cnst.h" /* Common constants */
-#include "rom_com_fx.h" /* Static table prototypes */
#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
/*======================================================================*/
/* FUNCTION : enc_pit_exc_fx() */
/*----------------------------------------------------------------------*/
diff --git a/lib_enc/enc_prm_fx.c b/lib_enc/enc_prm_fx.c
index 6d6a2d575ac9f262d0817f60ef4cfa4232a5b9d4..94d869a01c66a9b43a2edbb493330da64dccb8da 100644
--- a/lib_enc/enc_prm_fx.c
+++ b/lib_enc/enc_prm_fx.c
@@ -8,7 +8,6 @@
#include
#include "options.h"
#include "cnst.h"
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "stl.h"
#include "prot_fx.h"
diff --git a/lib_enc/enc_tran_fx.c b/lib_enc/enc_tran_fx.c
index 3e15713702a394a6542a14cc302b582dada09086..e0b5f5ee7280c537a99ae05a124f66f720b9d6d9 100644
--- a/lib_enc/enc_tran_fx.c
+++ b/lib_enc/enc_tran_fx.c
@@ -1,15 +1,15 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
-#include "options.h" /* Compilation switches */
-#include "cnst.h" /* Compilation switches */
-// #include "prot_fx.h" /* Function prototypes */
-#include "rom_com_fx.h" /* Static table prototypes */
+#include "options.h" /* Compilation switches */
+#include "cnst.h" /* Compilation switches */
#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
/*=================================================================================*/
/* FUNCTION : void encod_tran_fx () */
/*---------------------------------------------------------------------------------*/
diff --git a/lib_enc/eval_pit_contr_fx.c b/lib_enc/eval_pit_contr_fx.c
index ce7f05968128c6c31b9f24f99af344dc9f15c235..eafe13f5301876636a605a3c5b5f428abf2df51f 100644
--- a/lib_enc/eval_pit_contr_fx.c
+++ b/lib_enc/eval_pit_contr_fx.c
@@ -1,17 +1,19 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
#include "options.h" /* Compilation switches */
#include "cnst.h" /* Common constants */
-#include "rom_com_fx.h" /* Static table prototypes */
#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
/*-------------------------------------------------------------------*
* Local constantes
*-------------------------------------------------------------------*/
+
#define NB_VOIC_FX 13
#define DIV_NB_VOIC_FX 2521
@@ -23,6 +25,7 @@
#define HANGOVER_DELAY 2
+
/*======================================================================*/
/* FUNCTION : Pit_exc_contribution_len_fx() */
/*----------------------------------------------------------------------*/
@@ -41,23 +44,21 @@
/* _ (Word16[]) dct_res : DCT of residual Qnew */
/* _ (Word16[]) dct_pitex : DCT of pitch contribution Qnew */
/*-----------------------------------------------------------------------*/
-
-
/*-----------------------------------------------------------------------*/
/* RETURN ARGUMENTS : */
/* _ None */
/*=======================================================================*/
-Word16 Pit_exc_contribution_len_fx( /* o : bin where pitch contribution is significant */
- Encoder_State *st_fx, /* i/o: state structure */
- const Word16 *dct_res, /* i : DCT of residual Qnew*/
- Word16 *dct_pitex, /* i/o: DCT of pitch contribution Qnew*/
- Word16 *pitch_buf, /* i/o: Pitch per subframe Q6*/
- const Word16 nb_subfr, /* i : Number of subframe considered Q0*/
- Word16 *hangover, /* i : hangover for the time contribution switching Q0*/
- Word16 Qnew )
+/* o : bin where pitch contribution is significant */
+Word16 Pit_exc_contribution_len_fx(
+ Encoder_State *st_fx, /* i/o: state structure */
+ const Word16 *dct_res, /* i : DCT of residual Qnew*/
+ Word16 *dct_pitex, /* i/o: DCT of pitch contribution Qnew*/
+ Word16 *pitch_buf, /* i/o: Pitch per subframe Q6*/
+ const Word16 nb_subfr, /* i : Number of subframe considered Q0*/
+ Word16 *hangover, /* i : hangover for the time contribution switching Q0*/
+ Word16 Qnew )
{
-
Word16 corr_dct_pit[MBANDS_LOC];
Word32 corr_tmp, L_tmp;
Word16 av_corr, min_corr, ftmp, tmp_ex, tmp_res;
diff --git a/lib_enc/fd_cng_enc_fx.c b/lib_enc/fd_cng_enc_fx.c
index 9298c863481ba068e9933d1d90336774fe3d47c6..e5011b577b96eca7d5c43d6b1c3812e41d23ee07 100644
--- a/lib_enc/fd_cng_enc_fx.c
+++ b/lib_enc/fd_cng_enc_fx.c
@@ -2,13 +2,11 @@
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
-
#include
#include "stl.h"
#include "options.h"
#include "cnst.h"
#include "stl.h"
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "rom_enc.h"
#include "prot_fx.h"
diff --git a/lib_enc/gain_enc_fx.c b/lib_enc/gain_enc_fx.c
index 9468fff6017c9c9c08aacb8f5cb33fc62d763bcf..a486135843d784f4ad044985bf060d7f681938b0 100644
--- a/lib_enc/gain_enc_fx.c
+++ b/lib_enc/gain_enc_fx.c
@@ -1,15 +1,15 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
-#include "options.h" /* Compilation switches */
-#include "cnst.h" /* Common constants */
-#include "rom_com_fx.h" /* Static table prototypes */
-#include "rom_com.h" /* Static table prototypes */
-//#include "prot_fx.h" /* Function prototypes */
+#include "options.h" /* Compilation switches */
+#include "cnst.h" /* Common constants */
+#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
/*-------------------------------------------------------------------*
* Local constants
*-------------------------------------------------------------------*/
@@ -17,12 +17,14 @@
#define RANGE 64
#define NB_QUA_GAIN7B 128 /* Number of quantization levels */
+
/*-------------------------------------------------------------------*
* Local function prototype
*-------------------------------------------------------------------*/
static Word16 Find_Opt_gainQ_fx( Word16 *coeff, Word16 *exp_coeff, Word16 *gain_pit, Word32 *gain_code, Word16 gcode0, Word16 exp_gcode0, const Word16 *cdbk, const Word16 size );
+
/*==========================================================================*/
/* FUNCTION : Es_pred_enc_fx() */
/*--------------------------------------------------------------------------*/
diff --git a/lib_enc/gaus_enc_fx.c b/lib_enc/gaus_enc_fx.c
index a19bc4439bf877cb28ca6658806929d5b7221d12..b4aa79390cc4b751e3150bd29e5e2619507fff00 100644
--- a/lib_enc/gaus_enc_fx.c
+++ b/lib_enc/gaus_enc_fx.c
@@ -1,15 +1,15 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
#include "options.h" /* Compilation switches */
#include "cnst.h" /* Common constants */
-#include "rom_com_fx.h" /* Static table prototypes */
#include "rom_com.h" /* Static table prototypes */
#include "rom_enc.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
-//#include "basop_mpy.h"
+
/*-------------------------------------------------------------------*
* Local constants
@@ -19,6 +19,7 @@
/* #define FAC_DELTA 16.0f */
#define SFAC_DELTA 11
+
/*-------------------------------------------------------------------*
* Local functions
*-------------------------------------------------------------------*/
@@ -26,6 +27,8 @@
static Word16 cod_2pos_fx( const Word16 ind1, const Word16 ind2, const Word16 sign1, const Word16 sign2, const Word16 n );
static void gauss2v_fx( BSTR_ENC_HANDLE hBstr, const Word16 h[], const Word16 xn[], const Word16 dn[], Word16 code[], Word16 y1[], Word32 *gain, const Word16 lg, const Word16 shift, const Word16 Q_new, const Word16 nb_bits );
+
+
/*-------------------------------------------------------------------*
* Gaus_encode
*
diff --git a/lib_enc/gs_enc_fx.c b/lib_enc/gs_enc_fx.c
index 7bf52970d7ff5f02edcaa6417a2b8b3d89cdf2c4..488a32ab4638e62fd4dd2ce1a5b3da40ba814279 100644
--- a/lib_enc/gs_enc_fx.c
+++ b/lib_enc/gs_enc_fx.c
@@ -1,25 +1,28 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
#include "options.h"
#include "cnst.h"
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
/*-------------------------------------------------------------------*
* Local function prototypes
*-------------------------------------------------------------------*/
static Word16 edyn_fx( const Word16 *vec, const Word16 lvec, Word16 Qnew );
+
/*-------------------------------------------------------------------*
* encod_audio()
*
* Encode audio (AC) frames
*-------------------------------------------------------------------*/
+
void encod_audio_fx(
Encoder_State *st_fx, /* i/o: State structure */
const Word16 speech[], /* i : input speech Q_new */
diff --git a/lib_enc/hf_cod_amrwb_fx.c b/lib_enc/hf_cod_amrwb_fx.c
index e21a8bd677e665f1e9d36c61d1311074ee56c165..cf390b2db34b3c37232f2295fb7625cedb0c18ce 100644
--- a/lib_enc/hf_cod_amrwb_fx.c
+++ b/lib_enc/hf_cod_amrwb_fx.c
@@ -1,22 +1,23 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
#include "options.h" /* Compilation switches */
#include "cnst.h" /* Common constants */
-//#include "prot_fx.h"
-#include "rom_com_fx.h"
#include "cnst.h"
#include "rom_com.h" /* Common constants */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
#include "basop_util.h" /* Function prototypes */
+
/*---------------------------------------------------------------------*
* hf_cod_init()
*
*
*---------------------------------------------------------------------*/
+
void hf_cod_init_fx(
Word16 *mem_hp400_enc, /* o: memory of hp 400 Hz filter */
Word16 *mem_hf1_enc, /* o: HF band-pass filter memory */
diff --git a/lib_enc/hq_classifier_enc_fx.c b/lib_enc/hq_classifier_enc_fx.c
index aa2c319f1e9a936c00473a70f6caae499410ee37..9abeb2d58ab75f22bbebc09d423fd8a8afc6f41c 100644
--- a/lib_enc/hq_classifier_enc_fx.c
+++ b/lib_enc/hq_classifier_enc_fx.c
@@ -1,15 +1,15 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
-#include "options.h" /* Compilation switches */
-#include "cnst.h" /* Common constants */
-//#include "prot_fx.h" /* Function prototypes */
-#include "rom_com_fx.h" /* Static table prototypes */
+#include "options.h" /* Compilation switches */
+#include "cnst.h" /* Common constants */
#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
/*-----------------------------------------------------------------*
* Local constants
*-----------------------------------------------------------------*/
@@ -28,20 +28,20 @@
*-----------------------------------------------------------------*/
void hvq_classifier_fx( const Word32 *input /*Q12*/, Word16 *prev_Npeaks, Word16 *prev_peaks, Word16 *hqswb_clas, Word16 *Npeaks, Word16 *peaks, const Word32 L_core_brate, const Word16 last_core, Word32 *L_nf_gains /*Q12*/, Word16 *hvq_hangover, Word32 *L_pe_gains /*Q12*/ );
-static Word16 hf_spectrum_sparseness_fx(
- Encoder_State *st, /* i/o: encoder state structure */
- const Word32 *coefs_fx /* i : MDCT spectrum Q12*/
-);
+static Word16 hf_spectrum_sparseness_fx( Encoder_State *st, const Word32 *coefs_fx );
+
+
/*--------------------------------------------------------------------------*
* hf_spectrum_sparseness()
*
* Detection of sparse spectrum in high band for activation of harmonic
* modes HQ_HARMONIC and HQ_HVQ
*--------------------------------------------------------------------------*/
+
/*! r: Harmonic decision for high band */
static Word16 hf_spectrum_sparseness_fx(
Encoder_State *st, /* i/o: encoder state structure */
- const Word32 *coefs_fx /* i : MDCT spectrum (Q12) */
+ const Word32 *coefs_fx /* i : MDCT spectrum (Q12) */
)
{
Word16 i;
diff --git a/lib_enc/hq_core_enc_fx.c b/lib_enc/hq_core_enc_fx.c
index b5e1abbca2d5383df9a9a9538635b2e2cad57058..edf20eeba262f2c8d94b72169b4298948a0ba1a2 100644
--- a/lib_enc/hq_core_enc_fx.c
+++ b/lib_enc/hq_core_enc_fx.c
@@ -1,14 +1,15 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
#include "options.h" /* Compilation switches */
#include "cnst.h" /* Common constants */
-#include "rom_com_fx.h" /* Static table prototypes */
#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
/*--------------------------------------------------------------------------
* hq_core_enc()
*
@@ -17,11 +18,11 @@
void hq_core_enc_fx(
Encoder_State *st_fx,
- const Word16 *audio, /* i : input audio signal Q0 */
- const Word16 input_frame_orig, /* i : frame length Q0*/
- const Word16 hq_core_type, /* i : HQ core type Q0*/
- const Word16 Voicing_flag, /* i : Voicing flag for FER method selection Q0*/
- const Word16 vad_hover_flag /* i : VAD hangover flag Q0*/
+ const Word16 *audio, /* i : input audio signal Q0*/
+ const Word16 input_frame_orig, /* i : frame length Q0*/
+ const Word16 hq_core_type, /* i : HQ core type Q0*/
+ const Word16 Voicing_flag, /* i : Voicing flag for FER method selection Q0*/
+ const Word16 vad_hover_flag /* i : VAD hangover flag Q0*/
)
{
Word16 i, is_transient, num_bits, extra_unused;
diff --git a/lib_enc/hq_hr_enc_fx.c b/lib_enc/hq_hr_enc_fx.c
index 05654e775965c7471130beb49e398018b3df01ef..f462ca4dca7662c29fcb215e318cfe98e4c86013 100644
--- a/lib_enc/hq_hr_enc_fx.c
+++ b/lib_enc/hq_hr_enc_fx.c
@@ -1,20 +1,22 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
#include "options.h" /* Compilation switches */
#include "cnst.h" /* Common constants */
-//#include "prot_fx.h" /* Function prototypes */
-#include "rom_com_fx.h" /* Static table prototypes */
-#include "rom_com.h" /* Static table prototypes */
-#include "prot_fx.h" /* Function prototypes */
+#include "rom_com.h" /* Static table prototypes */
+#include "prot_fx.h" /* Function prototypes */
#include "ivas_prot_fx.h"
#include "prot_fx_enc.h" /* Function prototypes */
+
+
/*--------------------------------------------------------------------------*
* hq_hr_enc_fx()
*
* HQ High rate encoding routine
*--------------------------------------------------------------------------*/
+
void hq_hr_enc_fx(
Encoder_State *st_fx, /* i/o: encoder state structure fx */
Word32 *t_audio, /* i/o: transform-domain coefficients Q12 */
diff --git a/lib_enc/hq_lr_enc_fx.c b/lib_enc/hq_lr_enc_fx.c
index af27806820f6ba1cf295ffb130523b8cbaa3a377..5364a43d581d866dad96f4a3025b57dba549f5bc 100644
--- a/lib_enc/hq_lr_enc_fx.c
+++ b/lib_enc/hq_lr_enc_fx.c
@@ -1,18 +1,17 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
#include "options.h"
#include "cnst.h"
-// #include "prot_fx.h"
-#include "rom_com_fx.h"
#include "rom_enc.h"
-// #include "basop_mpy.h"
#include "rom_com.h" /* Common constants */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
#include "basop_util.h" /* Function prototypes */
+
/*--------------------------------------------------------------------------*
* Local function prototypes
*--------------------------------------------------------------------------*/
diff --git a/lib_enc/igf_enc.c b/lib_enc/igf_enc.c
deleted file mode 100644
index a639317be383e0779b156b804c911411098083cd..0000000000000000000000000000000000000000
--- a/lib_enc/igf_enc.c
+++ /dev/null
@@ -1,2688 +0,0 @@
-/******************************************************************************************************
-
- (C) 2022-2025 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
- Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
- Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
- Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
- contributors to this repository. All Rights Reserved.
-
- This software is protected by copyright law and by international treaties.
- The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB,
- Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
- Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
- Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
- contributors to this repository retain full ownership rights in their respective contributions in
- the software. This notice grants no license of any kind, including but not limited to patent
- license, nor is any license granted by implication, estoppel or otherwise.
-
- Contributors are required to enter into the IVAS codec Public Collaboration agreement before making
- contributions.
-
- This software is provided "AS IS", without any express or implied warranties. The software is in the
- development stage. It is intended exclusively for experts who have experience with such software and
- solely for the purpose of inspection. All implied warranties of non-infringement, merchantability
- and fitness for a particular purpose are hereby disclaimed and excluded.
-
- Any dispute, controversy or claim arising under or in relation to providing this software shall be
- submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in
- accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
- the United Nations Convention on Contracts on the International Sales of Goods.
-
-*******************************************************************************************************/
-
-/*====================================================================================
- EVS Codec 3GPP TS26.443 Nov 04, 2021. Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0
- ====================================================================================*/
-
-#include
-#include
-#include "options.h"
-#include
-#include "prot_fx.h"
-#include "cnst.h"
-#include "stat_enc.h"
-#include "wmc_auto.h"
-#include "prot_fx_enc.h"
-
-
-#define INV_Log2_10_Q15 9864 /*1/log2(10) in Q15*/
-#define INV_Log2_10_Q12 1233 /*1/log2(10) in Q12*/
-#define INV_Log2_e_Q15 22713 /*1/log2(e) in Q15*/
-/*-------------------------------------------------------------------*
- * IGF_write_bit_fx()
- *
- * write single bit to stream
- *-------------------------------------------------------------------*/
-static void IGF_write_bit_fx(
- BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
- Word16 *bitCount, /* i/o: bit counter */
- const Word16 value /* i : value */
-)
-{
- IF( hBstr )
- {
- push_next_indice( hBstr, value, 1 );
- }
-
- ( *bitCount ) = add( ( *bitCount ), 1 );
- move16();
-
- return;
-}
-
-/*-------------------------------------------------------------------*
- * IGF_write_bits()
- *
- * write bits to stream
- *-------------------------------------------------------------------*/
-static void IGF_write_bits(
- BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
- Word16 *bitCount, /* i/o: bit counter */
- const Word16 value, /* i/o: value */
- Word16 bits /* i : number of bits */
-)
-{
- WHILE( bits-- )
- {
- IF( s_and( value, shl( 1, bits ) ) == 0 )
- {
- IGF_write_bit_fx( hBstr, bitCount, 0 );
- }
- ELSE
- {
- IGF_write_bit_fx( hBstr, bitCount, 1 );
- }
- }
-
- return;
-}
-
-
-/*-------------------------------------------------------------------*
- * IGF_getCrest_new()
- *
- * crest factor calculation
- *-------------------------------------------------------------------*/
-
-/*! r: crest factor */
-static Word16 IGF_getCrest_new_fx(
- const Word16 *logSpec, /* i : power spectrum */
- const Word16 start, /* i : start subband index */
- const Word16 stop, /* i : stop subband index */
- Word16 *crest_exp /*Stores the exponent of the result(return value)*/
-)
-{
- Word16 i;
- Word16 x;
- Word32 x_eff;
- Word16 x_max;
- Word16 exp;
- Word16 temp;
- Word16 temp_e;
- Word16 crest; /*1.0f in Q15*/
- x_eff = 0;
- x_max = 0;
- exp = 0;
- temp = 0;
- crest = 32767; /*1.0f in Q15*/
- move32();
- move16();
- move16();
- move16();
- move16();
-
- FOR( i = start; i < stop; i++ )
- {
- x = logSpec[i];
- move16();
- x_eff = L_mac0( x_eff, x, x );
-
- if ( GT_16( x, x_max ) )
- {
- x_max = x;
- move16();
- }
- }
-
- x_eff = BASOP_Util_Divide3216_Scale( x_eff, sub( stop, start ), &temp_e );
- temp_e = add( temp_e, 16 ); /*exp += 31 - 15 + 16(because x_eff is word32)*/
- x_eff = L_shr( x_eff, sub( 15, temp_e ) );
- temp_e = 15;
- move16();
- temp = Sqrt16( extract_l( x_eff ), &temp_e );
-
- test();
- IF( x_eff > 0 && x_max > 0 )
- {
- temp = BASOP_Util_Divide1616_Scale( x_max, temp, &exp );
- exp = add( exp, sub( 15, temp_e ) );
- IF( exp < 0 )
- {
- temp = shl( temp, exp );
- exp = 0;
- move16();
- }
- crest = s_max( shl_sat( 1, sub( 15, exp ) ), temp );
- }
- *crest_exp = exp;
- move16();
- return crest;
-}
-
-
-/*-------------------------------------------------------------------*
- * IGF_getSFM_new()
- *
- * calculates spectral flatness measurement
- *-------------------------------------------------------------------*/
-
-/*! r: SFM value */
-static Word16 IGF_getSFM_new_fx(
- const Word32 *powerSpectrum, /* i : power spectrum */
- const Word16 *logSpec, /* i : log of power spectrum */
- const Word16 start, /* i : start subband index */
- const Word16 stop, /* i : stop subband index */
- Word16 *e_ps /*Stores exp related to power spectrum*/
-)
-{
- Word16 n;
- Word16 i;
- Word16 num;
- Word32 denom;
- Word16 numf;
- Word32 tmp;
- Word16 sfm;
- Word16 sfm_e;
- Word16 denom_e;
- Word16 numf_e; /*stores exponent for numf*/
- Word16 tmp_e;
-
- num = 0;
- denom = ONE_IN_Q30;
- denom_e = 1;
- sfm = MAX16B; // Q15
- move16();
- move32();
- move16();
- move16();
-
- FOR( i = start; i < stop; i++ )
- {
- tmp = powerSpectrum[i];
- n = logSpec[i /*-start*/];
- move32();
- move16();
- num = add( num, n );
- denom = BASOP_Util_Add_Mant32Exp( tmp, e_ps[i], denom, denom_e, &denom_e );
- }
-
- numf = BASOP_Util_Divide1616_Scale( num, sub( stop, start ), &numf_e );
- denom = BASOP_Util_Divide3216_Scale( denom, sub( stop, start ), &tmp_e );
- denom_e = add( add( denom_e, tmp_e ), 1 ); /*denom_e+tmp_e-15 +16(because type of denom is word32)*/
-
- IF( denom != 0 )
- {
- tmp = BASOP_util_Pow2( L_add( numf, shl_sat( 1, sub( 14, numf_e ) ) ), add( 16, numf_e ), &tmp_e );
- sfm = BASOP_Util_Divide3232_Scale( tmp, denom, &sfm_e );
- sfm_e = add( sfm_e, sub( tmp_e, denom_e ) );
- sfm = shl_sat( extract_l( L_min( sfm, L_shl_sat( 1, sub( 15, sfm_e ) ) ) ), sfm_e );
- }
-
- return sfm;
-}
-/*-------------------------------------------------------------------*
- * IGF_getTilt()
- *
- * calculates spectral tilt
- *-------------------------------------------------------------------*/
-
-/*! r: spectral tilt value */
-
-/*-------------------------------------------------------------------*
- * IGF_getTNR()
- *
- * calculates tonal-to-noise ratio
- *-------------------------------------------------------------------*/
-
-/*! r: spectral tilt value */
-/* Returns value with exponent as 9 and Q as 22*/
-
-static Word32 IGF_getTNR_ivas_fx(
- const Word32 *powerSpectrum, /* i : energies */
- const Word16 start, /* i : start subband index */
- const Word16 stop, /* i : stop subband index */
- const Word16 adap, /* i : SFB width adaptation */
- Word16 *e_ps, /*Stores exponent for powerSpectrum*/
- Word16 e_adap /*Stores exponent for adap*/
-)
-{
- Word16 i;
- Word16 width;
- Word32 avg;
- Word32 tonal;
- Word16 tonal_e; /* holds exp for tonal*/
- Word32 noise;
- Word16 noise_e; /* holds exp for noise*/
- Word32 tonalToNoise;
- Word32 rootSpec[300];
- Word16 rootSpec_e[300]; /*rootSpec_e[i] holds exp for rootSpec[i]*/
- Word16 avg_e; /* holds exp for avg*/
- Word16 tmp_e;
- avg = 0;
- tonal = 0;
- noise = EPSILON_FX;
- tonal_e = 0;
- noise_e = 0;
- avg_e = 0;
- tmp_e = 0;
- move32();
- move32();
- move32();
- move16();
- move16();
- move16();
- move16();
-
- set32_fx( rootSpec, 0, 300 );
- set16_fx( rootSpec_e, 0, 300 );
-
- width = sub( stop, start );
- FOR( i = start; i < stop; i++ )
- {
- rootSpec_e[( i - start )] = e_ps[i];
- move16();
- rootSpec[( i - start )] = Sqrt32( powerSpectrum[i], &rootSpec_e[( i - start )] ); /*rootSpec[i - start] = sqrtf( powerSpectrum[i] );*/
- move32();
- avg = BASOP_Util_Add_Mant32Exp( avg, avg_e, rootSpec[( i - start )], rootSpec_e[( i - start )], &avg_e ); /*avg += rootSpec[i - start];resultant exponent is avg_e*/
- }
- avg = BASOP_Util_Divide3216_Scale( avg, width, &tmp_e ); /*avg /= width;*/
- avg_e = add( 16, sub( add( avg_e, tmp_e ), 15 ) );
-
- FOR( i = start; i < stop; i++ )
- {
- Word16 normSpec_e; /*stores resultant exponent for normSpec*/
- Word16 normSpec = BASOP_Util_Divide3232_Scale( rootSpec[i - start], avg, &normSpec_e ); /*rootSpec[i - start] / avg;*/
- normSpec_e = add( normSpec_e, sub( rootSpec_e[i - start], avg_e ) );
- IF( GT_32( normSpec, L_add_sat( L_shl_sat( 1, sub( 15, normSpec_e ) ), L_shl_sat( adap, sub( e_adap, normSpec_e ) ) ) ) )
- {
- tonal = BASOP_Util_Add_Mant32Exp( tonal, tonal_e, rootSpec[( i - start )], rootSpec_e[( i - start )], &tonal_e ); /*tonal += rootSpec[i - start];*/
- }
- ELSE IF( LT_32( normSpec, L_shl_sat( 1, sub( 15, normSpec_e ) ) ) )
- {
- noise = BASOP_Util_Add_Mant32Exp( noise, noise_e, rootSpec[( i - start )], rootSpec_e[( i - start )], &noise_e ); /*noise += rootSpec[i - start];*/
- }
- }
-
- /*tonalToNoise = 20.f * log10f( max( 1e-018f, tonal / noise ) )*/
- IF( noise == 0 ) // To handle condition if denom = 0
- {
- tonalToNoise = imult3216( L_shr( L_add( L_shl( 18 /* log10f(1e-018f) */, Q25 ), Mpy_32_16_1( L_add( BASOP_Util_Log2( tonal ), L_shl( tonal_e, Q25 ) ) /*Q25*/, INV_Log2_10_Q15 ) /*25+15-15*/ ), 3 ) /*Q22*/, 20 );
- }
- ELSE
- {
- Word16 temp = BASOP_Util_Divide3232_Scale( tonal, noise, &tmp_e ); /*tonal / noise*/
- tmp_e = add( tmp_e, sub( tonal_e, noise_e ) );
- IF( GE_16( temp, 1 ) )
- {
- tonalToNoise = imult3216( Mult_32_16( L_add( BASOP_Util_Log2( temp ), L_shl( add( 16, tmp_e ), Q25 ) ) /*Q25*/, INV_Log2_10_Q12 ) /*25+12-15*/, 20 ); /*Q22*/
- }
- ELSE
- {
- tonalToNoise = -1509949440; /*-360.f Q22*/
- move32();
- }
- }
-
- return tonalToNoise;
-}
-
-/*-------------------------------------------------------------------*
- * IGF_CalculateEnvelope()
- *
- * envelope estimation
- *-------------------------------------------------------------------*/
-
-static void IGF_CalculateEnvelope_ivas_fx(
- const IGF_ENC_INSTANCE_HANDLE hIGFEnc, /* i : instance handle of IGF Encoder */
- Word32 *pMDCTSpectrum_fx, /* i : MDCT spectrum */
- Word16 e_mdct, /* i : exp of MDCT spectrum */
- Word32 *pPowerSpectrum_fx, /* i : MDCT^2 + MDST^2 spectrum, or estimate */
- Word16 *e_ps, /* i : exp of power spectrum */
- const Word16 igfGridIdx, /* i : IGF grid index */
- const Word16 isTransient, /* i : flag indicating if transient is detected */
- const Word16 last_core_acelp, /* i : indicator if last frame was ACELP core */
- const Word16 element_mode, /* i : IVAS element_mode */
- const Word16 att /* i : attenuation */
-)
-{
- IGF_ENC_PRIVATE_DATA_HANDLE hPrivateData;
- H_IGF_GRID hGrid;
- Word16 *swb_offset;
- Word16 sfb; /* this is the actual scalefactor band */
- Word16 width; /* this is width in subbands of the actual scalefactor band */
- Word16 tile_idx;
- Word16 strt_cpy;
- Word32 gain; /* the gain which has to be applied to the source tile to get the destination energy */
- Word16 sb;
- Word32 sfbEnergyR;
- Word32 sfbEnergyC; /* the energy of the destination region of the tile */
- Word32 sfbEnergyTileR;
- Word32 sfbEnergyTileC; /* the energy of the destination region of the tile */
- Word16 tmp, x, y;
- Word16 mean_x_fx, mean_y_fx;
- Word32 mean_xy_fx, mean_x2_fx;
- Word16 tmp_tb;
- Word16 tmp_sb;
- Word16 sfbCnt;
- Word16 sfm;
- Word16 crest;
- Word16 temp;
- Word16 mean_x_e, mean_y_e; /*Stores exponent for mean_x and mean_y respectively*/
- Word16 mean_xy_e, mean_x2_e; /*stores exponent for mean_xy and mean_x2 respectively*/
- Word16 sfbEnergyTileR_e; /*Exponent for sfbEnergyTileR*/
- Word16 sfbEnergyTileC_e; /*Exponent for sfbEnergyTileC*/
- Word16 sfbEnergyC_e; /*Exponent for sfbEnergyC*/
- Word16 sfbEnergyR_e;
- Word16 gain_e; /*exponent for gain*/
- Word16 tmp_tb_e; /*Stores exponent for tmp_tb*/
- Word16 tmp_sb_e; /*stores exponent for tmp_sb*/
- Word16 crest_exp; /*Stores the exponent of the result(return value)*/
- Word16 sfm_exp; /*stores exponent for ouput from sfm*/
- Word16 tmp_e;
-
- hPrivateData = &hIGFEnc->igfData;
- hGrid = &hPrivateData->igfInfo.grid[(Word16) igfGridIdx];
- swb_offset = hGrid->swb_offset;
-
- IF( element_mode > EVS_MONO )
- {
- IF( igfGridIdx != IGF_GRID_LB_NORM )
- {
- FOR( sfbCnt = 0; sfbCnt < sub( hGrid->sfbWrap[hGrid->nTiles], hGrid->sfbWrap[0] ); sfbCnt++ )
- {
- /* reset filter */
- hPrivateData->prevSFM_FIR_SFB_TB_fx[sfbCnt] = 0; // exponent : hPrivateData->prevSFB_FIR_TB_e[sfbCnt]
- hPrivateData->prevSFB_FIR_TB_e[sfbCnt] = 0;
- hPrivateData->prevSFM_IIR_SFB_TB_fx[sfbCnt] = 0; // exponent : hPrivateData->prevSFB_IIR_TB_e[sfbCnt]
- hPrivateData->prevSFB_IIR_TB_e[sfbCnt] = 0;
- hPrivateData->prevSFM_FIR_SFB_SB_fx[sfbCnt] = 0; // exponent : hPrivateData->prevSFB_FIR_SB_e[sfbCnt]
- hPrivateData->prevSFB_FIR_SB_e[sfbCnt] = 0;
- hPrivateData->prevSFM_IIR_SFB_SB_fx[sfbCnt] = 0; // exponent : hPrivateData->prevSFB_IIR_SB_e[sfbCnt]
- hPrivateData->prevSFB_IIR_SB_e[sfbCnt] = 0;
- hPrivateData->prevDampingFactor_IIR_fx[sfbCnt] = MIN16B; /* -1.f in Q15*/
- hPrivateData->prevDampingFactor_IIR_e[sfbCnt] = 0;
- hPrivateData->dampingFactorSmoothing[sfbCnt] = 2;
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- }
- }
- }
-
- IF( pPowerSpectrum_fx )
- {
- FOR( sb = hGrid->sbWrap[0]; sb < swb_offset[hGrid->sfbWrap[hGrid->nTiles]]; sb++ )
- {
- IF( LT_32( 1, pPowerSpectrum_fx[sb] ) )
- {
- hPrivateData->logSpec[sb] = s_max( 0, extract_l( W_extract_l( W_shr( W_add( BASOP_Util_Log2( pPowerSpectrum_fx[sb] ), W_shl( e_ps[sb], Q25 ) ), Q25 ) ) ) );
- move16();
- }
- ELSE
- {
- hPrivateData->logSpec[sb] = 0;
- move16();
- }
- }
- }
-
- FOR( tile_idx = 0; tile_idx < hGrid->nTiles; tile_idx++ )
- {
- strt_cpy = hGrid->sbWrap[tile_idx];
- move16();
-
- FOR( sfb = hGrid->sfbWrap[tile_idx]; sfb < hGrid->sfbWrap[tile_idx + 1]; sfb++ )
- {
- width = sub( swb_offset[sfb + 1], swb_offset[sfb] );
- sfbEnergyTileR = EPSILON_FIX;
- sfbEnergyTileC = EPSILON_FIX;
- sfbEnergyC = EPSILON_FX;
- sfbEnergyTileR_e = 0;
- sfbEnergyTileC_e = 0;
- sfbEnergyC_e = 0;
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
-
- IF( pPowerSpectrum_fx != NULL )
- {
- tmp = strt_cpy;
- move16();
- FOR( sb = swb_offset[sfb]; sb < swb_offset[sfb + 1]; sb++ )
- {
- Word16 shift = norm_l( pPowerSpectrum_fx[sb] );
- sfbEnergyC = BASOP_Util_Add_Mant32Exp( sfbEnergyC, sfbEnergyC_e, L_shl( pPowerSpectrum_fx[sb], shift ), sub( e_ps[sb], shift ), &sfbEnergyC_e );
- // sfbEnergyTileR = BASOP_Util_Add_Mant32Exp( sfbEnergyTileR, sfbEnergyTileR_e, Mult_32_32( pMDCTSpectrum_fx[strt_cpy], pMDCTSpectrum_fx[strt_cpy] ), shl( e_mdct, 1 ), &sfbEnergyTileR_e );
- Word64 tmp64 = W_mult_32_32( pMDCTSpectrum_fx[strt_cpy], pMDCTSpectrum_fx[strt_cpy] );
- Word16 tmp64_e = W_norm( tmp64 );
- tmp64 = W_shl( tmp64, tmp64_e );
-
- sfbEnergyTileR = BASOP_Util_Add_Mant32Exp( sfbEnergyTileR, sfbEnergyTileR_e, W_extract_h( tmp64 ), shl( e_mdct, 1 ) - tmp64_e, &sfbEnergyTileR_e );
- shift = norm_l( pPowerSpectrum_fx[strt_cpy] );
- sfbEnergyTileC = BASOP_Util_Add_Mant32Exp( sfbEnergyTileC, sfbEnergyTileC_e, L_shl( pPowerSpectrum_fx[strt_cpy], shift ), sub( e_ps[strt_cpy], shift ), &sfbEnergyTileC_e );
-
- strt_cpy = add( strt_cpy, 1 );
- }
-
- sfbEnergyTileR = L_deposit_h( BASOP_Util_Divide3232_Scale( sfbEnergyTileR, width, &tmp_e ) );
- sfbEnergyTileR_e = add( sub( sfbEnergyTileR_e, Q31 ), tmp_e );
-
- IF( sfbEnergyTileR == 0 )
- {
- sfbEnergyTileR = EPSILON_FX;
- sfbEnergyTileR_e = 0;
- move32();
- move16();
- }
- IF( sfbEnergyC == 0 )
- {
- sfbEnergyC = EPSILON_FX;
- sfbEnergyC_e = 0;
- move32();
- move16();
- }
- IF( sfbEnergyTileC == 0 )
- {
- sfbEnergyTileC = EPSILON_FX;
- sfbEnergyTileC_e = 0;
- temp = BASOP_Util_Divide3232_Scale( sfbEnergyC, sfbEnergyTileC, &tmp_e );
- tmp_e = add( tmp_e, sub( sfbEnergyC_e, sfbEnergyTileC_e ) );
- move32();
- move16();
- }
- ELSE
- {
- /*gain = (float) ( sfbEnergyTileR * ( sfbEnergyC / sfbEnergyTileC ) );*/
- temp = BASOP_Util_Divide3232_Scale( sfbEnergyC, sfbEnergyTileC, &tmp_e );
- tmp_e = add( tmp_e, sub( sfbEnergyC_e, sfbEnergyTileC_e ) );
- }
-
- gain = Mult_32_16( sfbEnergyTileR, temp ); // gain_e
- gain_e = add( tmp_e, sfbEnergyTileR_e );
-
- IF( element_mode > EVS_MONO )
- {
- test();
- IF( !isTransient )
- {
- Word16 diffSFM;
- Word16 shiftedSFM = 0;
- Word16 shiftedSFM_e = 0;
- move16();
- move16();
-
- // tmp_tb = IGF_getSFM_new( pPowerSpectrum, hPrivateData->logSpec, swb_offset[sfb], swb_offset[sfb + 1] ) / IGF_getCrest_new( hPrivateData->logSpec, swb_offset[sfb], swb_offset[sfb + 1] );
- sfm = IGF_getSFM_new_fx( pPowerSpectrum_fx, hPrivateData->logSpec, swb_offset[sfb], swb_offset[sfb + 1], e_ps );
- sfm_exp = 0;
- move16();
- crest = IGF_getCrest_new_fx( hPrivateData->logSpec, swb_offset[sfb], swb_offset[sfb + 1], &crest_exp );
- tmp_tb = BASOP_Util_Divide1616_Scale( sfm, crest, &tmp_e ); // tmp_tb_e
- tmp_tb_e = add( tmp_e, sub( sfm_exp, crest_exp ) );
-
- // tmp_sb = IGF_getSFM_new( pPowerSpectrum, hPrivateData->logSpec, tmp, strt_cpy ) / IGF_getCrest_new( hPrivateData->logSpec, tmp, strt_cpy );
- sfm = IGF_getSFM_new_fx( pPowerSpectrum_fx, hPrivateData->logSpec, tmp, strt_cpy, e_ps );
- crest = IGF_getCrest_new_fx( hPrivateData->logSpec, tmp, strt_cpy, &crest_exp );
- tmp_sb = BASOP_Util_Divide1616_Scale( sfm, crest, &tmp_e ); // tmp_sb_e
- tmp_sb_e = add( tmp_e, sub( sfm_exp, crest_exp ) );
-
- test();
- IF( last_core_acelp || hPrivateData->wasTransient )
- {
- hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] = hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] = tmp_tb; /*Exponent for hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] : hPrivateData->prevSFB_FIR_TB_e[sfb] and hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] : hPrivateData->prevSFB_IIR_TB_e[sfb] */
- hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] = hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] = tmp_sb; /*Exponent for hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] : hPrivateData->prevSFB_FIR_SB_e[sfb] and hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] : hPrivateData->prevSFB_IIR_SB_e[sfb] */
- hPrivateData->prevSFB_FIR_TB_e[sfb] = hPrivateData->prevSFB_IIR_TB_e[sfb] = tmp_tb_e;
- hPrivateData->prevSFB_FIR_SB_e[sfb] = hPrivateData->prevSFB_IIR_SB_e[sfb] = tmp_sb_e;
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- }
-
- tmp_tb = shr( tmp_tb, 2 ); /*taking 2 guard bits so it's exponent tmp_sb_e=+2*/
- tmp_sb = shr( tmp_sb, 2 ); /*taking 2 guard bits so it's exponent tmp_tb_e=+2 */
- tmp_sb_e = add( tmp_sb_e, 2 );
- tmp_tb_e = add( tmp_tb_e, 2 );
-
- Word16 tmp0, tmp2, tmp3, tmp4;
- Word16 tmp0_e, tmp2_e, tmp3_e, tmp4_e;
- tmp0 = shr( hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb], 2 );
- tmp0_e = add( hPrivateData->prevSFB_FIR_TB_e[sfb], 2 );
- move16();
- tmp2 = shr( hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb], 2 );
- tmp2_e = add( hPrivateData->prevSFB_IIR_TB_e[sfb], 2 );
- move16();
- tmp3 = shr( hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb], 2 );
- tmp3_e = add( hPrivateData->prevSFB_FIR_SB_e[sfb], 2 );
- move16();
- tmp4 = shr( hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb], 2 );
- tmp4_e = add( hPrivateData->prevSFB_IIR_SB_e[sfb], 2 );
- move16();
- Word16 x1, x2;
-
- Word16 x1_e = BASOP_Util_Add_MantExp( tmp0, tmp0_e, tmp2, tmp2_e - 1, &x1 );
- Word16 x2_e = BASOP_Util_Add_MantExp( tmp3, tmp3_e, tmp4, tmp4_e - 1, &x2 );
- hPrivateData->sfb_tb_e[sfb] = BASOP_Util_Add_MantExp( tmp_tb, tmp_tb_e, x1, x1_e, &hPrivateData->SFM_tb_fx[sfb] ); // hPrivateData->sfb_sb_e[sfb]
- move16();
- BASOP_Util_Add_MantExp( 22118, 2, negate( hPrivateData->SFM_tb_fx[sfb] ), hPrivateData->sfb_tb_e[sfb], &tmp );
-
- IF( tmp < 0 )
- {
- hPrivateData->sfb_tb_e[sfb] = 2;
- hPrivateData->SFM_tb_fx[sfb] = 22118;
- move16();
- move16();
- }
-
- hPrivateData->sfb_sb_e[sfb] = BASOP_Util_Add_MantExp( tmp_sb, tmp_sb_e, x2, x2_e, &hPrivateData->SFM_sb_fx[sfb] ); // hPrivateData->sfb_tb_e[sfb]
- move16();
- BASOP_Util_Add_MantExp( 22118, 2, negate( hPrivateData->SFM_sb_fx[sfb] ), hPrivateData->sfb_sb_e[sfb], &tmp );
-
- IF( tmp < 0 )
- {
- hPrivateData->sfb_sb_e[sfb] = 2;
- hPrivateData->SFM_sb_fx[sfb] = 22118;
- move16();
- move16();
- }
-
- BASOP_Util_Add_MantExp( hPrivateData->SFM_sb_fx[sfb], hPrivateData->sfb_sb_e[sfb], negate( hPrivateData->SFM_tb_fx[sfb] ), hPrivateData->sfb_tb_e[sfb], &diffSFM );
-
- test();
- IF( diffSFM > 0 && LT_32( hPrivateData->SFM_tb_fx[sfb], L_shr( 3277 /*0.1 Q15*/, hPrivateData->sfb_tb_e[sfb] ) ) ) /* check whether target SFB is more tonal than source SFB */
- {
- Word16 currDampingFactor, dampingFactor;
- Word16 slope, threshold;
- Word16 alpha;
- Word16 slope_e, threshold_e, currDampingFactor_e, dampingFactor_e, alpha_e;
-
- /* calculate spectral tilt to detect sudden drops (or increases) in energy in the current SFB */
- // slope = IGF_getTilt_fx( pPowerSpectrum, swb_offset[sfb], swb_offset[sfb + 1], e_ps, &slope_e );
-
- x = 1;
- mean_x_fx = mean_y_fx = 0;
- Word32 mean_y_fx_tmp = 0;
- move32();
- mean_xy_fx = mean_x2_fx = 0;
- mean_x_e = 15;
- mean_xy_e = mean_y_e = mean_x2_e = 31;
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
-
- FOR( sb = swb_offset[sfb]; sb < swb_offset[sfb + 1]; sb++ )
- {
- mean_x_fx = add( mean_x_fx, x ); /*Q0*/
- mean_x2_fx = L_add( mean_x2_fx, L_mult0( x, x ) ); /*Q0*/
-
- /*y = 20.f * log10f( max( 1.f, powerSpectrum[i] ) );*/
- IF( LE_64( W_deposit32_l( pPowerSpectrum_fx[sb] ), W_shl( 1, ( sub( 31, e_ps[sb] ) ) ) ) )
- {
- y = 0;
- move16();
- }
- ELSE
- {
- y = imult1616( 20, extract_l( L_shr( Mult_32_16( ( L_add( BASOP_Util_Log2( pPowerSpectrum_fx[sb] ), L_shl( e_ps[sb], Q25 ) ) ), INV_Log2_10_Q15 ), Q25 ) ) ); /*Q0*/
- }
- mean_y_fx_tmp = L_mac0( mean_y_fx_tmp, y, 1 ); /*Q0*/
- mean_xy_fx = L_add( mean_xy_fx, L_mult0( y, x ) ); /*Q0*/
-
- x = add( x, 1 );
- }
- mean_y_fx = BASOP_Util_Divide3216_Scale( mean_y_fx_tmp, width, &tmp_e ); /* mean_y_e*/
-
- mean_y_e = add( mean_y_e, sub( tmp_e, 15 ) );
- mean_x_fx = BASOP_Util_Divide1616_Scale( mean_x_fx, width, &tmp_e ); /* mean_x_e*/
- mean_x_e = add( mean_x_e, sub( tmp_e, 15 ) );
- mean_xy_fx = BASOP_Util_Divide3216_Scale( mean_xy_fx, width, &tmp_e ); /* mean_xy_e*/
- mean_xy_e = add( mean_xy_e, sub( tmp_e, 15 ) );
- mean_x2_fx = BASOP_Util_Divide3216_Scale( mean_x2_fx, width, &tmp_e ); /* mean_x2_e*/
- mean_x2_e = add( mean_x2_e, sub( tmp_e, 15 ) );
-
- /*slope = ( mean_xy - mean_x * mean_y ) / ( mean_x2 - mean_x * mean_x );*/
- slope = BASOP_Util_Divide3232_Scale( ( L_sub( mean_xy_fx, L_shl( mult( mean_x_fx, mean_y_fx ), sub( add( mean_x_e, mean_y_e ), mean_xy_e ) ) ) ), ( L_sub( mean_x2_fx, L_shl( mult( mean_x_fx, mean_x_fx ), sub( add( mean_x_e, mean_x_e ), mean_x2_e ) ) ) ), &slope_e );
- slope_e = add( slope_e, sub( mean_xy_e, mean_x2_e ) );
-
- /* determine whether strong tilt is due to a step in the spectrum (e.g. band limitation, no damping)
- or a tonal component close the band border (apply damping) by calculating SFM for a shift of 1/2 SFB width*/
- threshold = BASOP_Util_Divide1616_Scale( 60, width, &threshold_e );
-
- test();
- IF( EQ_16( BASOP_Util_Cmp_Mant32Exp( slope, add( slope_e, 16 ), negate( threshold ), add( threshold_e, 16 ) ), -1 ) )
- {
- Word16 shift = shr( width, 1 );
- sfm = IGF_getSFM_new_fx( pPowerSpectrum_fx, hPrivateData->logSpec, swb_offset[sfb] - shift, swb_offset[sfb + 1] - shift, e_ps );
- crest = IGF_getCrest_new_fx( hPrivateData->logSpec, swb_offset[sfb] - shift, swb_offset[sfb + 1] - shift, &crest_exp );
- shiftedSFM = BASOP_Util_Divide1616_Scale( sfm, crest, &shiftedSFM_e );
- }
- ELSE IF( EQ_16( BASOP_Util_Cmp_Mant32Exp( slope, add( slope_e, 16 ), threshold, add( threshold_e, 16 ) ), 1 ) && ( NE_16( sfb, sub( hGrid->sfbWrap[hGrid->nTiles], 1 ) ) ) )
- {
- Word16 shift = shr( width, 1 );
- shiftedSFM = BASOP_Util_Divide1616_Scale( IGF_getSFM_new_fx( pPowerSpectrum_fx, hPrivateData->logSpec, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift, e_ps ), IGF_getCrest_new_fx( hPrivateData->logSpec, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift, &crest_exp ), &tmp_e );
- sfm = IGF_getSFM_new_fx( pPowerSpectrum_fx, hPrivateData->logSpec, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift, e_ps );
- crest = IGF_getCrest_new_fx( hPrivateData->logSpec, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift, &crest_exp );
- shiftedSFM = BASOP_Util_Divide1616_Scale( sfm, crest, &shiftedSFM_e );
- }
- shiftedSFM_e = add( shiftedSFM_e, sub( sfm_exp, crest_exp ) );
-
- IF( GT_32( shiftedSFM, L_shl( 1311 /*0.04f Q15*/, negate( shiftedSFM_e ) ) ) )
- {
- currDampingFactor = 32767; /*1.f Q15*/
- currDampingFactor_e = 0;
- move16();
- move16();
- }
- ELSE
- {
- // alpha = min( 320.f / (float) swb_offset[sfb + 1], 1.25f );
- temp = BASOP_Util_Divide1616_Scale( 320, swb_offset[sfb + 1], &alpha_e );
- alpha = extract_l( L_min( temp, L_shl( 20480 /*1.25 Q14*/, sub( 1, alpha_e ) ) ) ); // alpha_e
-
- // currDampingFactor = expf( 1.25f * alpha * logf( hPrivateData->SFM_tb[sfb] / hPrivateData->SFM_sb[sfb] ) );
- temp = BASOP_Util_Divide1616_Scale( hPrivateData->SFM_tb_fx[sfb], hPrivateData->SFM_sb_fx[sfb], &tmp_e ); // tmp_e
- tmp_e = add( tmp_e, sub( hPrivateData->sfb_tb_e[sfb], hPrivateData->sfb_sb_e[sfb] ) );
- Word16 temp1 = mult( 20480 /* 1.25f in Q14 */, alpha );
- Word16 tmp1_e = add( 1, alpha_e );
- currDampingFactor = round_fx( BASOP_util_Pow2( Mpy_32_16_1( L_add( BASOP_Util_Log2( temp ), L_shl_sat( add( 16, tmp_e ), 25 ) ), temp1 ), add( tmp1_e, 6 ), &currDampingFactor_e ) ); // currDampingFactor_e
-
- /* calculate tonal-to-noise ratio and reduce damping for low values*/
-
- Word32 tonalToNoise;
- Word16 adap;
- Word16 adap_e; /*stores exp for adap*/
- Word16 tonalToNoise_e; /*stores exponent for tonalToNoise*/
- tonalToNoise_e = 9;
- move16();
- adap = BASOP_Util_Divide1616_Scale( width, 40, &adap_e );
- tonalToNoise = IGF_getTNR_ivas_fx( pPowerSpectrum_fx, swb_offset[sfb], swb_offset[sfb + 1], adap, e_ps, adap_e ); /*Q22*/
-
- IF( EQ_16( BASOP_Util_Cmp_Mant32Exp( tonalToNoise, tonalToNoise_e, L_add( L_shl( 10, sub( 15, adap_e ) ), adap ), add( 16, adap_e ) ), -1 ) )
- {
- // currDampingFactor += 0.03f * ( ( 10 + adap ) - tonalToNoise );
- Word32 temp2 = BASOP_Util_Add_Mant32Exp( L_add( L_shl( 10, sub( 15, adap_e ) ) /*exp:adap_e*/, adap ), add( adap_e, 16 ), L_negate( tonalToNoise ), tonalToNoise_e, &tmp_e ); // tmp_e
- currDampingFactor_e = BASOP_Util_Add_MantExp( currDampingFactor, currDampingFactor_e, extract_l( Mult_32_32( 983 /*0.03f Q15*/, temp2 ) ), tmp_e, &currDampingFactor ); // currDampingFactor_e
- }
- }
-
- Word32 L_tmp = hPrivateData->prevDampingFactor_IIR_fx[sfb];
- move32();
- L_tmp = L_shl( L_tmp, hPrivateData->prevDampingFactor_IIR_e[sfb] );
- test();
- test();
- IF( last_core_acelp || hPrivateData->wasTransient || EQ_32( L_tmp, MIN16B ) )
- {
- tmp = BASOP_Util_Cmp_Mant32Exp( currDampingFactor, currDampingFactor_e, 3277 /* 0.1f in Q15 */, 0 );
- IF( tmp >= 0 )
- {
- hPrivateData->prevDampingFactor_IIR_fx[sfb] = currDampingFactor;
- hPrivateData->prevDampingFactor_IIR_e[sfb] = currDampingFactor_e;
- move16();
- move16();
- }
- ELSE
- {
- hPrivateData->prevDampingFactor_IIR_fx[sfb] = 3277; /* 0.1 in Q15 */
- hPrivateData->prevDampingFactor_IIR_e[sfb] = 0;
- move16();
- move16();
- }
- }
- IF( last_core_acelp )
- {
- hPrivateData->dampingFactorSmoothing[sfb] = 2;
- move16();
- }
-
- dampingFactor_e = BASOP_Util_Add_MantExp( currDampingFactor, currDampingFactor_e, hPrivateData->prevDampingFactor_IIR_fx[sfb], hPrivateData->prevDampingFactor_IIR_e[sfb], &dampingFactor ); // dampingFactor_e
- dampingFactor = shr( dampingFactor, 1 );
-
- gain = Mult_32_16( gain, shl_sat( extract_l( L_min( L_add( dampingFactor, Mult_32_16( L_shl( hPrivateData->dampingFactorSmoothing[sfb], sub( 15, dampingFactor_e ) ) /*Q:15-dampingFactor_e*/, 3277 /*0.1f Q15*/ ) /*Q:15-dampingFactor_e*/ ), shl_sat( 1, sub( 15, dampingFactor_e ) ) ) ), dampingFactor_e ) /*Q15*/ );
-
- hPrivateData->prevDampingFactor_IIR_fx[sfb] = dampingFactor;
- move16();
- hPrivateData->prevDampingFactor_IIR_e[sfb] = dampingFactor_e;
- move16();
- if ( hPrivateData->dampingFactorSmoothing[sfb] > 0 )
- {
- hPrivateData->dampingFactorSmoothing[sfb] = sub( hPrivateData->dampingFactorSmoothing[sfb], 1 );
- move16();
- }
- }
- ELSE
- {
- hPrivateData->prevDampingFactor_IIR_fx[sfb] = MIN16B; // exponent : hPrivateData->prevDampingFactor_IIR_e[sfb]
- hPrivateData->prevDampingFactor_IIR_e[sfb] = 0;
- hPrivateData->dampingFactorSmoothing[sfb] = 1;
- move16();
- move16();
- move16();
- }
-
- hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] = tmp_tb; // hPrivateData->prevSFB_FIR_TB_e[sfb]
- hPrivateData->prevSFB_FIR_TB_e[sfb] = tmp_tb_e;
- hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] = hPrivateData->SFM_tb_fx[sfb]; // hPrivateData->prevSFB_IIR_TB_e[sfb]
- hPrivateData->prevSFB_IIR_TB_e[sfb] = hPrivateData->sfb_tb_e[sfb];
- hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] = tmp_sb; // hPrivateData->prevSFB_FIR_SB_e[sfb]
- hPrivateData->prevSFB_FIR_SB_e[sfb] = tmp_sb_e;
- hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] = hPrivateData->SFM_sb_fx[sfb]; // hPrivateData->prevSFB_IIR_SB_e[sfb]
- hPrivateData->prevSFB_IIR_SB_e[sfb] = hPrivateData->sfb_sb_e[sfb];
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- }
- ELSE
- {
- hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] = 0; // hPrivateData->prevSFB_FIR_TB_e[sfb]
- hPrivateData->prevSFB_FIR_TB_e[sfb] = 0;
- hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] = 0; // hPrivateData->prevSFB_IIR_TB_e[sfb]
- hPrivateData->prevSFB_IIR_TB_e[sfb] = 0;
- hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] = 0; // hPrivateData->prevSFB_IIR_TB_e[sfb]
- hPrivateData->prevSFB_FIR_SB_e[sfb] = 0;
- hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] = 0; // hPrivateData->prevSFB_IIR_SB_e[sfb]
- hPrivateData->prevSFB_IIR_SB_e[sfb] = 0;
- hPrivateData->prevDampingFactor_IIR_fx[sfb] = MIN16B; /* hPrivateData->prevDampingFactor_IIR_e[sfb]*/
- hPrivateData->prevDampingFactor_IIR_e[sfb] = 0;
- hPrivateData->dampingFactorSmoothing[sfb] = 2;
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- }
- }
- }
- ELSE
- {
- tmp_e = e_mdct;
- move16();
- sfbEnergyR = add_sat( EPSILON_FX, BASOP_Util_Divide3216_Scale( sum2_32_fx( pMDCTSpectrum_fx + swb_offset[sfb], width, &tmp_e ) /*exp: tmp_e*/, width, &sfbEnergyR_e ) ); // sfbEnergyR_e
- sfbEnergyR_e = add( sfbEnergyR_e, add( tmp_e, -15 ) );
- gain = L_shl( sfbEnergyR, 16 ); // gain_e
- move32();
- gain_e = sfbEnergyR_e;
-
- IF( element_mode > EVS_MONO )
- {
- hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] = 0; // hPrivateData->prevSFB_FIR_TB_e[sfb]
- hPrivateData->prevSFB_FIR_TB_e[sfb] = 0;
- hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] = 0; // hPrivateData->prevSFB_IIR_TB_e[sfb]
- hPrivateData->prevSFB_IIR_TB_e[sfb] = 0;
- hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] = 0; // hPrivateData->prevSFB_IIR_TB_e[sfb]
- hPrivateData->prevSFB_FIR_SB_e[sfb] = 0;
- hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] = 0; // hPrivateData->prevSFB_IIR_SB_e[sfb]
- hPrivateData->prevSFB_IIR_SB_e[sfb] = 0;
- hPrivateData->prevDampingFactor_IIR_fx[sfb] = MIN16B; /* hPrivateData->prevDampingFactor_IIR_e[sfb]*/
- hPrivateData->prevDampingFactor_IIR_e[sfb] = 0;
- hPrivateData->dampingFactorSmoothing[sfb] = 2;
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- }
- }
-
- gain = Mult_32_16( gain, att ); // gain_e
- gain_e = add( gain_e, 0 );
-
- /*gain=0.5f+log2f(gain)*2+16 becuase 2.885390081777927f=2*1/loge(2) so 2*1/loge(2)*loge(x) can be written as 2*log2(x)*/
- gain = L_add( ONE_IN_Q22, L_add( L_add( L_shr( BASOP_Util_Log2( gain ), 1 ), L_shl( gain_e, Q24 ) ), L_shl( 16, Q23 ) ) ); /*Q23*/
- test();
- test();
- IF( !isTransient && ( EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_SWB_48000_CPE ) || EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_FB_48000_CPE ) ) )
- {
- gain = L_add( gain, ONE_IN_Q21 ); /* better preservation of original HF band energy */
- }
- test();
- test();
- IF( !isTransient && ( EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_SWB_64000_CPE ) || EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_FB_64000_CPE ) ) )
- {
- gain = L_add( gain, ONE_IN_Q20 );
- }
- gain = L_min( gain, 91 << Q23 ); /* 13+15+63, see arithcode encode residual */
- gain = L_max( gain, 0 );
- gain_e = 8; /* stores exponent for gain_fx*/
- move16();
- hPrivateData->igfScfQuantized[sfb] = extract_l( L_shr( gain, Q23 ) ); /*Q0*/
- move16();
- }
- }
-
- return;
-}
-
-/*-------------------------------------------------------------------*
- * IGF_CalculateStereoEnvelope_fx()
- *
- * envelope estimation
-
- *-------------------------------------------------------------------*/
-static void IGF_CalculateStereoEnvelope_fx(
- const IGF_ENC_INSTANCE_HANDLE hIGFEnc, /* i : instance handle of IGF Encoder */
- const Word32 *pMDCTSpectrum_fx, /* i : MDCT spectrum */
- Word16 pMDCTSpectrum_e, /* i : exponent for pMDCTSpectrum_fx */
- const Word32 *pMDCTSpectrumMsInv_fx, /* i : MDCT spectrum */
- Word16 pMDCTSpectrumMsInv_e, /* i : expontent for pMDCTSpectrumMsInv_fx */
- const Word32 *pPowerSpectrum_fx, /* i : MDCT^2 + MDST^2 spectrum, or estimate */
- Word16 *pPowerSpectrum_e, /* i : exponent for pPowerSpectrum_fx */
- const Word32 *pPowerSpectrumMsInv_fx, /* i : inverse power spectrum */
- Word16 *q_pPowerSpectrumMsInv, /* i : Q for pPowerSpectrumMsInv_fx */
- const Word16 igfGridIdx, /* i : IGF grid index */
- const Word16 coreMsMask[N_MAX], /* i : line wise ms Mask */
- const Word16 isTransient, /* i : flag indicating if transient is detected */
- const Word16 last_core_acelp, /* i : indicator if last frame was ACELP core */
- const Word16 mct_on )
-{
- IGF_ENC_PRIVATE_DATA_HANDLE hPrivateData;
- H_IGF_GRID hGrid;
- Word16 *swb_offset;
- Word16 sfb; /* this is the actual scalefactor band */
- Word16 width; /* this is width in subbands of the actual scalefactor band */
- Word16 tile_idx;
- Word16 strt_cpy;
- Word32 gain_fx; /* the gain which has to be applied to the source tile to get the destination energy */
- Word16 sb;
- Word16 sfbEnergyR_fx;
- Word32 sfbEnergyC_fx; /* the energy of the destination region of the tile */
- Word32 sfbEnergyTileR_fx;
- Word32 sfbEnergyTileC_fx; /* the energy of the destination region of the tile */
- Word16 tmp, x, y;
- Word16 mean_x_fx, mean_y_fx;
- Word32 mean_xy_fx, mean_x2_fx;
- Word16 slope_fx;
- Word16 tmp_tb_fx;
- Word16 tmp_sb_fx;
- Word16 sfbCnt;
- Word32 tileSrcSpec_fx[MAX_IGF_SFB_LEN];
- Word16 sfm;
- Word16 crest;
- Word16 temp;
- Word16 mean_x_e, mean_y_e; /*Stores exponent for mean_x and mean_y respectively*/
- Word16 mean_xy_e, mean_x2_e; /*stores exponent for mean_xy and mean_x2 respectively*/
- Word16 tileSrcSpec_e[MAX_IGF_SFB_LEN]; /*Exponent for tileSrcSpec_fx*/
- Word16 sfbEnergyTileR_e; /*Exponent for sfbEnergyTileR_fx*/
- Word16 sfbEnergyTileC_e; /*Exponent for sfbEnergyTileC_fx*/
- Word16 sfbEnergyC_e; /*Exponent for sfbEnergyC_fx*/
- Word16 gain_e; /*exponent for gain_fx*/
- Word16 crest_exp; /*stores exponent for output from crest*/
- Word16 sfm_exp; /*stores exponent for ouput from sfm*/
- Word16 tmp_tb_e; /*Stores exponent for tmp_tb_fx*/
- Word16 tmp_sb_e; /*stores exponent for tmp_sb_fx*/
- Word16 slope_e; /*stores exponent for slope_fx*/
- Word16 sfbEnergyR_e; /*stores exponent for sfbEnergyR*/
- Word16 tmp_e;
- Word32 temp_pPowerSpectrumMsInv[N_MAX], length;
- Word16 q_temp_pPowerSpectrumMsInv = Q31, i;
- move16();
-
- IF( pPowerSpectrumMsInv_fx != NULL )
- {
- length = N_MAX;
- move16();
- if ( mct_on )
- {
- length = L_FRAME48k;
- move16();
- }
- FOR( i = 0; i < length; i++ )
- {
- IF( pPowerSpectrumMsInv_fx[i] != 0 )
- {
- q_temp_pPowerSpectrumMsInv = s_min( q_temp_pPowerSpectrumMsInv, add( q_pPowerSpectrumMsInv[i], norm_l( pPowerSpectrumMsInv_fx[i] ) ) );
- }
- }
- FOR( i = 0; i < length; i++ )
- {
- temp_pPowerSpectrumMsInv[i] = L_shl( pPowerSpectrumMsInv_fx[i], sub( q_temp_pPowerSpectrumMsInv, q_pPowerSpectrumMsInv[i] ) );
- move32();
- }
- }
-
- hPrivateData = &hIGFEnc->igfData;
- hGrid = &hPrivateData->igfInfo.grid[(Word16) igfGridIdx];
- swb_offset = hGrid->swb_offset;
- move16();
-
- IF( igfGridIdx != IGF_GRID_LB_NORM )
- {
- FOR( sfbCnt = 0; sfbCnt < sub( hGrid->sfbWrap[hGrid->nTiles], hGrid->sfbWrap[0] ); sfbCnt++ )
- {
- /* reset filter */
- hPrivateData->prevSFM_FIR_SFB_TB_fx[sfbCnt] = 0; // exponent : hPrivateData->prevSFB_FIR_TB_e[sfbCnt]
- hPrivateData->prevSFM_IIR_SFB_TB_fx[sfbCnt] = 0; // exponent : hPrivateData->prevSFB_IIR_TB_e[sfbCnt]
- hPrivateData->prevSFM_FIR_SFB_SB_fx[sfbCnt] = 0; // exponent : hPrivateData->prevSFB_FIR_SB_e[sfbCnt]
- hPrivateData->prevSFM_IIR_SFB_SB_fx[sfbCnt] = 0; // exponent : hPrivateData->prevSFB_IIR_SB_e[sfbCnt]
- hPrivateData->prevSFB_FIR_TB_e[sfbCnt] = 0;
- hPrivateData->prevSFB_IIR_TB_e[sfbCnt] = 0;
- hPrivateData->prevSFB_FIR_SB_e[sfbCnt] = 0;
- hPrivateData->prevSFB_IIR_SB_e[sfbCnt] = 0;
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- }
- }
-
- IF( pPowerSpectrum_fx )
- {
- FOR( sb = hGrid->sbWrap[0]; sb < swb_offset[hGrid->sfbWrap[hGrid->nTiles]]; sb++ )
- {
- /*hPrivateData->logSpec[sb] = max( 0, (Word16) ( logf( max( FLT_MIN, pPowerSpectrum[sb] ) ) * INV_LOG_2 ) );*/
- IF( LE_32( 1, pPowerSpectrum_fx[sb] ) )
- {
- hPrivateData->logSpec[sb] = s_max( 0, (Word16) L_shr( L_add( BASOP_Util_Log2( pPowerSpectrum_fx[sb] ), L_shl( pPowerSpectrum_e[sb], Q25 ) ), 25 ) );
- }
- ELSE
- {
- hPrivateData->logSpec[sb] = 0; /*max(0,-126) is always 0*/
- }
- move16();
- }
- }
-
- FOR( tile_idx = 0; tile_idx < hGrid->nTiles; tile_idx++ )
- {
- strt_cpy = hGrid->sbWrap[tile_idx];
- move16();
-
- FOR( sfb = hGrid->sfbWrap[tile_idx]; sfb < hGrid->sfbWrap[tile_idx + 1]; sfb++ )
- {
- width = sub( swb_offset[sfb + 1], swb_offset[sfb] );
- sfbEnergyTileR_fx = EPSILON_FX;
- sfbEnergyTileC_fx = EPSILON_FX;
- sfbEnergyC_fx = EPSILON_FX;
- sfbEnergyTileR_e = 0;
- sfbEnergyTileC_e = 0;
- sfbEnergyC_e = 0;
- move16();
- move16();
- move16();
- move32();
- move32();
- move32();
- IF( pPowerSpectrum_fx )
- {
- Word16 final_exp;
- Word16 norm_exp;
- Word32 scaled_value;
- tmp = strt_cpy;
- move16();
-
- FOR( sb = swb_offset[sfb]; sb < swb_offset[sfb + 1]; sb++ )
- {
- IF( NE_16( coreMsMask[sb], coreMsMask[strt_cpy] ) )
- {
- sfbEnergyC_fx = BASOP_Util_Add_Mant32Exp( sfbEnergyC_fx, sfbEnergyC_e, pPowerSpectrum_fx[sb], pPowerSpectrum_e[sb], &sfbEnergyC_e ); /*resultant exponent is stored in sfbEnergyC_e*/
- norm_exp = norm_l( pMDCTSpectrumMsInv_fx[strt_cpy] );
- final_exp = sub( pMDCTSpectrumMsInv_e, norm_exp );
- scaled_value = L_shl( pMDCTSpectrumMsInv_fx[strt_cpy], norm_exp );
- sfbEnergyTileR_fx = BASOP_Util_Add_Mant32Exp( sfbEnergyTileR_fx, sfbEnergyTileR_e, Mult_32_32( scaled_value, scaled_value ), shl( final_exp, 1 ), &sfbEnergyTileR_e ); /*resultant exponent is stored in sfbEnergyTileR_e*/
- sfbEnergyTileC_fx = BASOP_Util_Add_Mant32Exp( sfbEnergyTileC_fx, sfbEnergyTileC_e, pPowerSpectrumMsInv_fx[strt_cpy], sub( 31, q_pPowerSpectrumMsInv[strt_cpy] ), &sfbEnergyTileC_e ); /*resultant exponent is stored in sfbEnergyTileC_e*/
- tileSrcSpec_fx[strt_cpy - tmp] = temp_pPowerSpectrumMsInv[strt_cpy]; /*resultant exponent is stored in tileSrcSpec_e*/
- tileSrcSpec_e[strt_cpy - tmp] = sub( 31, q_temp_pPowerSpectrumMsInv );
- }
- ELSE
- {
- sfbEnergyC_fx = BASOP_Util_Add_Mant32Exp( sfbEnergyC_fx, sfbEnergyC_e, pPowerSpectrum_fx[sb], pPowerSpectrum_e[sb], &sfbEnergyC_e ); /*resultant exponent is stored in sfbEnergyC_e*/
- norm_exp = norm_l( pMDCTSpectrum_fx[strt_cpy] );
- final_exp = sub( pMDCTSpectrum_e, norm_exp );
- scaled_value = L_shl( pMDCTSpectrum_fx[strt_cpy], norm_exp );
- sfbEnergyTileR_fx = BASOP_Util_Add_Mant32Exp( sfbEnergyTileR_fx, sfbEnergyTileR_e, Mult_32_32( scaled_value, scaled_value ), shl( final_exp, 1 ), &sfbEnergyTileR_e ); /*resultant exponent is stored in sfbEnergyTileR_e*/
- sfbEnergyTileC_fx = BASOP_Util_Add_Mant32Exp( sfbEnergyTileC_fx, sfbEnergyTileC_e, pPowerSpectrum_fx[strt_cpy], pPowerSpectrum_e[strt_cpy], &sfbEnergyTileC_e ); /*resultant exponent is stored in sfbEnergyTileC_e*/
- tileSrcSpec_fx[strt_cpy - tmp] = pPowerSpectrum_fx[strt_cpy]; /*resultant exponent is stored in tileSrcSpec_e*/
- tileSrcSpec_e[strt_cpy - tmp] = pPowerSpectrum_e[strt_cpy];
- }
- move32();
- move16();
- strt_cpy = add( strt_cpy, 1 );
- }
-
- sfbEnergyTileR_fx = BASOP_Util_Divide3216_Scale( sfbEnergyTileR_fx, width, &tmp_e );
- sfbEnergyTileR_e = sub( add( sfbEnergyTileR_e, tmp_e ), 15 ); /*stores the resultant exponent for sfbEnergyTileR_fx*/
-
- /*gain = (float) ( sfbEnergyTileR * ( sfbEnergyC / sfbEnergyTileC ) );*/
- temp = BASOP_Util_Divide3232_Scale( sfbEnergyC_fx, L_add( sfbEnergyTileC_fx, EPSILON_FX ), &tmp_e );
- gain_e = add( tmp_e, sub( sfbEnergyC_e, sfbEnergyTileC_e ) );
- gain_fx = Mult_32_16( sfbEnergyTileR_fx, temp );
- gain_e = add( 16, add( gain_e, sfbEnergyTileR_e ) ); /*stores the resultant exponent for gain_fx*/
-
- IF( !isTransient )
- {
- Word16 diffSFM_fx;
- Word16 shiftedSFM_fx;
- Word16 shiftedSFM_e; /*stores the resultant exponent for shiftedSFM_fx*/
- shiftedSFM_fx = 0;
- shiftedSFM_e = 0;
- move16();
- move16();
-
- // tmp_tb = IGF_getSFM_ivas(pPowerSpectrum, swb_offset[sfb], swb_offset[sfb + 1]) / IGF_getCrest_ivas(pPowerSpectrum, swb_offset[sfb], swb_offset[sfb + 1]);
- sfm = IGF_getSFM_ivas_fx( &sfm_exp, pPowerSpectrum_fx, pPowerSpectrum_e, swb_offset[sfb], swb_offset[sfb + 1] );
- crest = IGF_getCrest_ivas( &crest_exp, pPowerSpectrum_fx, pPowerSpectrum_e, swb_offset[sfb], swb_offset[sfb + 1] );
- tmp_tb_fx = BASOP_Util_Divide1616_Scale( sfm, crest, &tmp_e );
- tmp_tb_e = add( tmp_e, sub( sfm_exp, crest_exp ) ); /*stores the resultant exponent for tmp_tb_fx*/
-
- // tmp_sb = IGF_getSFM_ivas(tileSrcSpec, 0, strt_cpy - tmp) / IGF_getCrest_ivas(tileSrcSpec, 0, strt_cpy - tmp);
- sfm = IGF_getSFM_ivas_fx( &sfm_exp, tileSrcSpec_fx, tileSrcSpec_e, 0, sub( strt_cpy, tmp ) );
- crest = IGF_getCrest_ivas( &crest_exp, tileSrcSpec_fx, tileSrcSpec_e, 0, sub( strt_cpy, tmp ) );
- tmp_sb_fx = BASOP_Util_Divide1616_Scale( sfm, crest, &tmp_e );
- tmp_sb_e = add( tmp_e, sub( sfm_exp, crest_exp ) ); /*stores the resultant exponent for tmp_sb_fx*/
-
- IF( last_core_acelp || hPrivateData->wasTransient )
- {
- hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] = hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] = tmp_tb_fx; /*Exponent for hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] and hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] values stored in hPrivateData->sfb_tb_e[sfb] */
- hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] = hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] = tmp_sb_fx; /*Exponent for hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] and hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] values stored in hPrivateData->sfb_sb_e[sfb]*/
- hPrivateData->prevSFB_FIR_TB_e[sfb] = tmp_sb_e;
- hPrivateData->prevSFB_IIR_TB_e[sfb] = tmp_sb_e;
- hPrivateData->prevSFB_FIR_SB_e[sfb] = tmp_sb_e;
- hPrivateData->prevSFB_IIR_SB_e[sfb] = tmp_sb_e;
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- }
- ELSE
- {
- /* Purpose of this block:
- -to make the exponent of hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] and hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] equal to that of tmp_tb_fx
- -to make the exponent of hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] and hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] equal to that of tmp_sb_fx
- */
- Word16 diff_sb_e; /*stores the difference of exponents for sb*/
- Word16 diff_tb_e; /*stores the difference of exponents for tb*/
- diff_sb_e = sub( tmp_sb_e, hPrivateData->sfb_sb_e[sfb] );
- diff_tb_e = sub( tmp_tb_e, hPrivateData->sfb_tb_e[sfb] );
- IF( LE_16( tmp_tb_e, hPrivateData->sfb_tb_e[sfb] ) )
- {
- tmp_tb_fx = shl( tmp_tb_fx, diff_tb_e );
- tmp_tb_e = hPrivateData->sfb_tb_e[sfb];
- move16();
- }
- ELSE
- {
- hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] = shr( hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb], diff_tb_e );
- hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] = shr( hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb], diff_tb_e );
- move16();
- move16();
- hPrivateData->prevSFB_FIR_TB_e[sfb] = tmp_tb_e;
- hPrivateData->prevSFB_IIR_TB_e[sfb] = tmp_tb_e;
- move16();
- move16();
- }
- IF( LE_16( tmp_sb_e, hPrivateData->sfb_sb_e[sfb] ) )
- {
- tmp_sb_fx = shl( tmp_sb_fx, diff_sb_e );
- tmp_sb_e = hPrivateData->sfb_sb_e[sfb];
- move16();
- }
- ELSE
- {
- hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] = shr( hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb], diff_sb_e );
- hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] = shr( hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb], diff_sb_e );
- move16();
- move16();
- hPrivateData->prevSFB_FIR_SB_e[sfb] = tmp_sb_e;
- hPrivateData->prevSFB_IIR_SB_e[sfb] = tmp_sb_e;
- move16();
- move16();
- }
- }
- tmp_tb_fx = shr_sat( tmp_tb_fx, sub( 2, tmp_tb_e ) ); /* Since we're limiting max value to 2.7f we can saturate to Q13 */
- tmp_sb_fx = shr_sat( tmp_sb_fx, sub( 2, tmp_sb_e ) ); /* Since we're limiting max value to 2.7f we can saturate to Q13 */
- hPrivateData->SFM_tb_fx[sfb] = add_sat( tmp_tb_fx, add_sat( shr( hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb], sub( 2, hPrivateData->prevSFB_FIR_TB_e[sfb] ) ), shr( hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb], sub( 3, hPrivateData->prevSFB_IIR_TB_e[sfb] ) ) ) ); /* Since we're limiting max value to 2.7f we can saturate to Q13 */
- hPrivateData->SFM_tb_fx[sfb] = s_min( 22118 /*2.7f Q13*/, hPrivateData->SFM_tb_fx[sfb] ); /* resultant exponent stored in hPrivateData->sfb_sb_e[sfb]*/
- hPrivateData->SFM_sb_fx[sfb] = add_sat( tmp_sb_fx, add_sat( shr( hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb], sub( 2, hPrivateData->prevSFB_FIR_SB_e[sfb] ) ), shr( hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb], sub( 3, hPrivateData->prevSFB_IIR_SB_e[sfb] ) ) ) ); /* Since we're limiting max value to 2.7f we can saturate to Q13 */
- hPrivateData->SFM_sb_fx[sfb] = s_min( 22118 /*2.7f Q13*/, hPrivateData->SFM_sb_fx[sfb] ); /*resultant exponent stores in hPrivateData->sfb_tb_e[sfb]*/
- move16();
- move16();
- move16();
- move16();
- hPrivateData->sfb_sb_e[sfb] = 2;
- hPrivateData->sfb_tb_e[sfb] = 2;
- move16();
- move16();
-
- diffSFM_fx = sub( hPrivateData->SFM_sb_fx[sfb], hPrivateData->SFM_tb_fx[sfb] ); /*Q13*/
-
- test();
- IF( diffSFM_fx > 0 && LT_16( hPrivateData->SFM_tb_fx[sfb], 819 /*0.1 Q13*/ ) ) /* check whether target SFB is more tonal than source SFB */
- {
- Word16 currDampingFactor_fx, dampingFactor_fx, alpha_fx;
- Word16 threshold_e, threshold_fx, alpha_e, currDampingFactor_e, dampingFactor_e;
- /* calculate spectral tilt to detect sudden drops (or increases) in energy in the current SFB */
- x = 1;
- mean_x_fx = mean_y_fx = 0;
- mean_xy_fx = mean_x2_fx = 0;
- mean_x_e = mean_y_e = 15;
- mean_xy_e = mean_x2_e = 31;
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- FOR( sb = swb_offset[sfb]; sb < swb_offset[sfb + 1]; sb++ )
- {
- mean_x_fx = add( mean_x_fx, x ); /*Q0*/
- mean_x2_fx = L_add( mean_x2_fx, L_mult0( x, x ) ); /*Q0*/
-
- /*y = 20 * (Word16) log10f( max( 1e-018f, pPowerSpectrum[sb] ) );*/
- IF( LT_32( pPowerSpectrum_fx[sb], 1 ) )
- {
- y = 20 * ( -18 );
- move16();
- }
- ELSE
- {
- y = imult1616( 20, extract_l( L_shr( Mult_32_16( ( L_add( BASOP_Util_Log2( pPowerSpectrum_fx[sb] ), L_shl( pPowerSpectrum_e[sb], Q25 ) ) ), INV_Log2_10_Q15 ), 25 ) ) ); /*Q0*/
- }
- mean_y_fx = add( mean_y_fx, y ); /*Q0*/
- mean_xy_fx = L_add( mean_xy_fx, L_mult0( y, x ) ); /*Q0*/
-
- x = add( x, 1 );
- }
- mean_y_fx = BASOP_Util_Divide1616_Scale( mean_y_fx, width, &tmp_e ); /* resultant exp stores in mean_y_e*/
- mean_y_e = add( mean_y_e, sub( tmp_e, 15 ) );
- mean_x_fx = BASOP_Util_Divide1616_Scale( mean_x_fx, width, &tmp_e ); /* resultant exp stores in mean_x_e*/
- mean_x_e = add( mean_x_e, sub( tmp_e, 15 ) );
- mean_xy_fx = BASOP_Util_Divide3216_Scale( mean_xy_fx, width, &tmp_e ); /* resultant exp stores in mean_xy_e*/
- mean_xy_e = add( mean_xy_e, sub( tmp_e, 15 ) );
- mean_x2_fx = BASOP_Util_Divide3216_Scale( mean_x2_fx, width, &tmp_e ); /* resultant exp stores in mean_x2_e*/
- mean_x2_e = add( mean_x2_e, sub( tmp_e, 15 ) );
-
- /*slope = ( mean_xy - mean_x * mean_y ) / ( mean_x2 - mean_x * mean_x );*/
- slope_fx = BASOP_Util_Divide3232_Scale( ( L_sub( mean_xy_fx, L_shl( mult( mean_x_fx, mean_y_fx ), sub( add( mean_x_e, mean_y_e ), mean_xy_e ) ) ) ), ( L_sub( mean_x2_fx, L_shl( mult( mean_x_fx, mean_x_fx ), sub( add( mean_x_e, mean_x_e ), mean_x2_e ) ) ) ), &slope_e );
- slope_e = add( slope_e, sub( mean_xy_e, mean_x2_e ) ); /*stores resultant exponent for slope_fx*/
-
- /* determine whether strong tilt is due to a step in the spectrum (e.g. band limitation, no damping)
- or a tonal component close the band border (apply damping) by calculating SFM for a shift of 1/2 SFB width*/
- threshold_fx = BASOP_Util_Divide1616_Scale( 60, width, &threshold_e ); /*stores resultant exponent for threshold_fx*/
- test();
- IF( EQ_16( BASOP_Util_Cmp_Mant32Exp( slope_fx, add( slope_e, 16 ), negate( threshold_fx ), add( threshold_e, 16 ) ), -1 ) )
- {
- Word16 shift = shr( width, 1 );
- // shiftedSFM = IGF_getSFM_ivas( pPowerSpectrum, swb_offset[sfb] - shift, swb_offset[sfb + 1] - shift ) / IGF_getCrest_ivas( pPowerSpectrum, swb_offset[sfb] - shift, swb_offset[sfb + 1] - shift );
- sfm = IGF_getSFM_ivas_fx( &sfm_exp, pPowerSpectrum_fx, pPowerSpectrum_e, sub( swb_offset[sfb], shift ), sub( swb_offset[sfb + 1], shift ) );
- crest = IGF_getCrest_ivas( &crest_exp, pPowerSpectrum_fx, pPowerSpectrum_e, sub( swb_offset[sfb], shift ), sub( swb_offset[sfb + 1], shift ) );
- shiftedSFM_fx = BASOP_Util_Divide1616_Scale( sfm, crest, &shiftedSFM_e );
- }
- ELSE IF( EQ_16( BASOP_Util_Cmp_Mant32Exp( slope_fx, add( slope_e, 16 ), threshold_fx, add( threshold_e, 16 ) ), 1 ) && ( NE_16( sfb, sub( hGrid->sfbWrap[hGrid->nTiles], 1 ) ) ) )
- {
- Word16 shift;
- shift = shr( width, 1 );
- // shiftedSFM = IGF_getSFM_ivas( pPowerSpectrum, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift ) / IGF_getCrest_ivas( pPowerSpectrum, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift );
- sfm = IGF_getSFM_ivas_fx( &sfm_exp, pPowerSpectrum_fx, pPowerSpectrum_e, add( swb_offset[sfb], shift ), add( swb_offset[sfb + 1], shift ) );
- crest = IGF_getCrest_ivas( &crest_exp, pPowerSpectrum_fx, pPowerSpectrum_e, add( swb_offset[sfb], shift ), add( swb_offset[sfb + 1], shift ) );
- shiftedSFM_fx = BASOP_Util_Divide1616_Scale( sfm, crest, &shiftedSFM_e );
- }
- IF( shiftedSFM_fx )
- {
- shiftedSFM_e = add( shiftedSFM_e, sub( sfm_exp, crest_exp ) ); /* stores resultant exponent for shiftedSFM_fx*/
- }
-
- // alpha = min( 320.f / (float) swb_offset[sfb + 1], 1.25f );
- temp = BASOP_Util_Divide1616_Scale( 320, swb_offset[sfb + 1], &alpha_e );
- alpha_fx = extract_l( L_min( temp, L_shl( 20480 /*1.25 Q14*/, sub( 1, alpha_e ) ) ) ); /* exponent is alpha_e*/
- temp = BASOP_Util_Divide1616_Scale( hPrivateData->SFM_tb_fx[sfb], hPrivateData->SFM_sb_fx[sfb], &tmp_e );
- tmp_e = add( tmp_e, sub( hPrivateData->sfb_tb_e[sfb], hPrivateData->sfb_sb_e[sfb] ) ); /* stores resultant exponent for temp */
-
- // currDampingFactor = expf( alpha * logf( hPrivateData->SFM_tb[sfb] / hPrivateData->SFM_sb[sfb] ) );
- currDampingFactor_fx = round_fx( BASOP_util_Pow2( Mpy_32_16_1( L_add( BASOP_Util_Log2( temp ), L_shl( add( 16, tmp_e ), 25 ) ), alpha_fx ), add( alpha_e, 6 ), &currDampingFactor_e ) ); /*exp is currDampingFactor_e*/
-
- IF( GT_32( shiftedSFM_fx, L_shl( 1311 /*0.04f Q15*/, negate( shiftedSFM_e ) ) ) )
- {
- currDampingFactor_fx = 32767; /*1.f Q15*/
- currDampingFactor_e = 0;
- move16();
- move16();
- }
- test();
- test();
- IF( last_core_acelp || hPrivateData->wasTransient || EQ_32( hPrivateData->prevDampingFactor_IIR_fx[sfb], L_shl( -1, sub( 15, hPrivateData->prevDampingFactor_IIR_e[sfb] ) ) ) )
- {
- tmp = BASOP_Util_Cmp_Mant32Exp( currDampingFactor_fx, currDampingFactor_e, 3277, 0 );
- IF( tmp >= 0 )
- {
- hPrivateData->prevDampingFactor_IIR_fx[sfb] = currDampingFactor_fx;
- hPrivateData->prevDampingFactor_IIR_e[sfb] = currDampingFactor_e;
- }
- ELSE
- {
- hPrivateData->prevDampingFactor_IIR_fx[sfb] = 3277; /* 0.1 in Q15 */
- hPrivateData->prevDampingFactor_IIR_e[sfb] = 0;
- }
-
- move16();
- move16();
- }
-
- {
- Word32 tonalToNoise;
- Word16 adap;
- Word16 adap_e; /*stores exp for adap*/
- Word16 tonalToNoise_e; /*stores exponent for tonalToNoise*/
- tonalToNoise_e = 9; /*stores exponent for tonalToNoise*/
- move16();
- adap = BASOP_Util_Divide1616_Scale( width, 30, &adap_e );
- tonalToNoise = IGF_getTNR_ivas_fx( pPowerSpectrum_fx, swb_offset[sfb], swb_offset[sfb + 1], adap, pPowerSpectrum_e, adap_e ); /*Q22*/
- IF( EQ_16( BASOP_Util_Cmp_Mant32Exp( tonalToNoise, tonalToNoise_e, L_add( L_shl( 10, sub( 15, adap_e ) ), adap ), add( 16, adap_e ) ), -1 ) )
- {
- // currDampingFactor += 0.1f * ( ( 10 + adap ) - tonalToNoise );
- Word32 temp2 = BASOP_Util_Add_Mant32Exp( L_add( L_shl( 10, sub( 15, adap_e ) ) /*exp:adap_e*/, adap ), add( adap_e, 16 ), L_negate( tonalToNoise ), tonalToNoise_e, &tmp_e ); /* resultant exp is tmp_e*/
- currDampingFactor_e = BASOP_Util_Add_MantExp( currDampingFactor_fx, currDampingFactor_e, extract_l( Mult_32_16( temp2, 3277 /*0.1f Q15*/ ) ), tmp_e, &currDampingFactor_fx ); /*stores resultant exp for currDampingFactor_fx*/
- }
- }
-
- dampingFactor_e = BASOP_Util_Add_MantExp( currDampingFactor_fx, currDampingFactor_e, hPrivateData->prevDampingFactor_IIR_fx[sfb], hPrivateData->prevDampingFactor_IIR_e[sfb], &dampingFactor_fx );
- dampingFactor_fx = shr( dampingFactor_fx, 1 ); /* resultant exponent is dampingFactor_e*/
- IF( NE_16( BASOP_Util_Cmp_Mant32Exp( dampingFactor_fx, add( dampingFactor_e, 16 ), shr( hPrivateData->prevDampingFactor_IIR_fx[sfb], 1 ), add( hPrivateData->prevDampingFactor_IIR_e[sfb], 16 ) ), -1 ) )
- {
- // do nothing
- }
- ELSE
- {
- dampingFactor_fx = shr( hPrivateData->prevDampingFactor_IIR_fx[sfb], 1 ); /* resultant exponent is hPrivateData->prevDampingFactor_IIR_e[sfb]*/
- dampingFactor_e = hPrivateData->prevDampingFactor_IIR_e[sfb];
- move16();
- }
- IF( dampingFactor_e < 0 )
- {
- dampingFactor_fx = shl( dampingFactor_fx, dampingFactor_e );
- dampingFactor_e = 0;
- move16();
- }
- gain_fx = Mult_32_16( gain_fx, shl_sat( extract_l( L_min( L_add( dampingFactor_fx, Mult_32_16( L_shl( hPrivateData->dampingFactorSmoothing[sfb], sub( 15, dampingFactor_e ) ) /*Q:15-dampingFactor_e*/, 3277 /*0.1f Q15*/ ) /*Q:15-dampingFactor_e*/ ), shl_sat( 1, sub( 15, dampingFactor_e ) ) ) ), dampingFactor_e ) /*Q15*/ );
-
- hPrivateData->prevDampingFactor_IIR_fx[sfb] = dampingFactor_fx;
- hPrivateData->prevDampingFactor_IIR_e[sfb] = dampingFactor_e;
- move16();
- move16();
- if ( hPrivateData->dampingFactorSmoothing[sfb] > 0 )
- {
- hPrivateData->dampingFactorSmoothing[sfb] = sub( hPrivateData->dampingFactorSmoothing[sfb], 1 );
- move16();
- }
- }
- ELSE
- {
- hPrivateData->prevDampingFactor_IIR_fx[sfb] = -( 1 << 15 ); /* resultant exp which is 0 stores in hPrivateData->prevDampingFactor_IIR_e[sfb]*/
- hPrivateData->prevDampingFactor_IIR_e[sfb] = 0;
- hPrivateData->dampingFactorSmoothing[sfb] = 1;
- move16();
- move16();
- move16();
- }
-
- hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] = tmp_tb_fx;
- hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] = hPrivateData->SFM_tb_fx[sfb];
- hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] = tmp_sb_fx;
- hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] = hPrivateData->SFM_sb_fx[sfb];
- hPrivateData->prevSFB_FIR_TB_e[sfb] = hPrivateData->sfb_tb_e[sfb];
- hPrivateData->prevSFB_IIR_TB_e[sfb] = hPrivateData->sfb_tb_e[sfb];
- hPrivateData->prevSFB_FIR_SB_e[sfb] = hPrivateData->sfb_sb_e[sfb];
- hPrivateData->prevSFB_IIR_SB_e[sfb] = hPrivateData->sfb_sb_e[sfb];
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- }
- ELSE
- {
- hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] = 0;
- hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] = 0;
- hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] = 0;
- hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] = 0;
- hPrivateData->prevSFB_FIR_TB_e[sfb] = 0;
- hPrivateData->prevSFB_IIR_TB_e[sfb] = 0;
- hPrivateData->prevSFB_FIR_SB_e[sfb] = 0;
- hPrivateData->prevSFB_IIR_SB_e[sfb] = 0;
-
- hPrivateData->dampingFactorSmoothing[sfb] = 2;
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- }
- }
- ELSE
- {
- tmp_e = pMDCTSpectrum_e;
- sfbEnergyR_fx = add_sat( EPSILON_FX, BASOP_Util_Divide3216_Scale( sum2_32_fx( pMDCTSpectrum_fx + swb_offset[sfb], width, &tmp_e ) /*exp: tmp_e*/, width, &sfbEnergyR_e ) );
- sfbEnergyR_e = add( sfbEnergyR_e, add( tmp_e, -15 ) ); /* stores resultant exponent for sfbEnergyR_fx*/
- gain_fx = sfbEnergyR_fx; /*resultant exponent stored in gain_e=sfbEnergyR_e*/
- move32();
- gain_e = add( sfbEnergyR_e, 16 ); /* because gain_fx is word32;only after adding 16 q of gain_fx is 15-sfbEnergyR_e*/
-
- hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] = 0;
- hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] = 0;
- hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] = 0;
- hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] = 0;
- hPrivateData->prevSFB_FIR_TB_e[sfb] = 0;
- hPrivateData->prevSFB_IIR_TB_e[sfb] = 0;
- hPrivateData->prevSFB_FIR_SB_e[sfb] = 0;
- hPrivateData->prevSFB_IIR_SB_e[sfb] = 0;
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- move16();
- }
- /*gain=0.5f+log2f(gain)*2+16 becuase 2.885390081777927f=2*1/loge(2) so 2*1/loge(2)*loge(x) can be written as 2*log2(x)*/
- gain_fx = L_add( ONE_IN_Q22, L_add( L_add( L_shr( BASOP_Util_Log2( gain_fx ), 1 ), L_shl( gain_e, Q24 ) ), L_shl( 16, Q23 ) ) ); /*Q23*/
- test();
- test();
- if ( !isTransient && ( EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_SWB_48000_CPE ) || EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_FB_48000_CPE ) ) )
- {
- gain_fx = L_add( gain_fx, ONE_IN_Q21 ); /* better preservation of original HF band energy */
- }
- test();
- test();
- if ( !isTransient && ( EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_SWB_64000_CPE ) || EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_FB_64000_CPE ) ) )
- {
- gain_fx = L_add( gain_fx, ONE_IN_Q20 );
- }
- gain_fx = L_min( gain_fx, 91 << Q23 ); /* 13+15+63, see arithcode encode residual */
- gain_fx = L_max( gain_fx, 0 );
- gain_e = 8; /* stores exponent for gain_fx*/
- move16();
- hPrivateData->igfScfQuantized[sfb] = (Word16) ( L_shr( gain_fx, 23 ) ); /*Q0*/
- move16();
- }
- }
-
- return;
-}
-
-
-/*-------------------------------------------------------------------*
- * IGF_WriteEnvelope()
- *
- * writes IGF SCF values
- *-------------------------------------------------------------------*/
-/*! r: number of bits writen */
-static Word16 IGF_WriteEnvelope(
- const IGF_ENC_INSTANCE_HANDLE hIGFEnc, /* i : instance handle of IGF Encoder */
- BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
- Word16 *pBitOffset, /* i : ptr to bitOffset counter */
- const Word16 igfGridIdx, /* i : igf grid index see declaration of IGF_GRID_IDX for details */
- const Word16 isIndepFlag, /* i : if 1 frame is independent, 0 = frame is coded with data from previous frame */
- Word16 *igfAllZero /* i : returns 1 if all IGF scfs are zero, else 0 */
-)
-{
- IGF_ENC_PRIVATE_DATA_HANDLE hPrivateData;
- H_IGF_GRID hGrid;
- Word16 sfb;
- Word16 totBitCount;
- Word16 startBitCount;
-
- startBitCount = *pBitOffset;
- totBitCount = 0;
- *igfAllZero = 1;
- move16();
- move16();
- move16();
- hPrivateData = &hIGFEnc->igfData;
- hGrid = &hPrivateData->igfInfo.grid[igfGridIdx];
-
- FOR( sfb = hGrid->startSfb; sfb < hGrid->stopSfb; sfb++ )
- {
- IF( hPrivateData->igfScfQuantized[sfb] != 0 )
- {
- *igfAllZero = 0;
- move16();
- BREAK;
- }
- }
-
- IF( *igfAllZero != 0 )
- {
- IGF_write_bit_fx( hBstr, pBitOffset, 1 );
-
- if ( NULL == hBstr )
- {
- IGFSCFEncoderSaveContextState_fx( &hPrivateData->hIGFSCFArithEnc, igfGridIdx );
- }
-
- IGFSCFEncoderReset_fx( &hPrivateData->hIGFSCFArithEnc );
-
- if ( NULL == hBstr )
- {
- IGFSCFEncoderRestoreContextState_fx( &hPrivateData->hIGFSCFArithEnc, igfGridIdx );
- }
- }
- ELSE
- {
- IGF_write_bit_fx( hBstr, pBitOffset, 0 );
-
- if ( NULL == hBstr )
- {
- IGFSCFEncoderSaveContextState_fx( &hPrivateData->hIGFSCFArithEnc, igfGridIdx );
- }
-
- *pBitOffset = IGFSCFEncoderEncode_ivas_fx( &hPrivateData->hIGFSCFArithEnc, hBstr, *pBitOffset, &hPrivateData->igfScfQuantized[hGrid->startSfb], igfGridIdx, isIndepFlag );
- move16();
-
- if ( NULL == hBstr )
- {
- IGFSCFEncoderRestoreContextState_fx( &hPrivateData->hIGFSCFArithEnc, igfGridIdx );
- }
- }
- totBitCount = sub( *pBitOffset, startBitCount );
-
- return totBitCount;
-}
-
-
-/*-------------------------------------------------------------------*
- * IGF_Whitening()
- *
- * calculates the IGF whitening levels by SFM and crest
- *-------------------------------------------------------------------*/
-static void IGF_Whitening_ivas_fx(
- const IGF_ENC_INSTANCE_HANDLE hIGFEnc, /* i : | instance handle of IGF Encoder */
- Word32 *powerSpectrum, /* i : Q31 | MDCT/MDST power spectrum */
- Word16 *powerSpectrum_e, /* i : Q31 | MDCT/MDST power spectrum */
- const Word16 igfGridIdx, /* i : Q0 | IGF grid index */
- const Word16 isTransient, /* i : Q0 | flag indicating if transient is detected */
- const Word16 last_core_acelp, /* i : Q0 | indicator if last frame was ACELP core */
- const Word16 isTNSActive, /* i : Q0 | indicator if TNS is active */
- const Word16 sp_aud_decision0, /* i : Q0 | first stage classifier decision */
- const Word32 brate, /* i : Q0 | bitrate */
- const Word16 element_mode /* i : Q0 | element mode */
-)
-{
- IGF_ENC_PRIVATE_DATA_HANDLE hPrivateData;
- H_IGF_GRID hGrid;
- Word16 p; /*Q0*/
- Word16 tmp;
- Word16 tmp_e;
- Word16 SFM_src;
- Word16 SFM_tar;
- Word16 SFM_src_e;
- Word16 SFM_tar_e;
- Word16 num_Tiles;
- Word16 SFM;
- Word16 crest_e;
-
- SFM = -ONE_IN_Q13; /*1.0f Q13*/
- move16();
-
- hPrivateData = &hIGFEnc->igfData;
- hGrid = &hPrivateData->igfInfo.grid[(Word16) igfGridIdx];
-
- IF( NE_16( igfGridIdx, IGF_GRID_LB_NORM ) )
- {
- FOR( p = 0; p < hGrid->nTiles; p++ )
- {
- /* reset filter */
- hPrivateData->prevSFM_FIR[p] = L_deposit_l( 0 );
- hPrivateData->prevSFM_IIR[p] = 0;
- move16();
-
- /* preset values: */
- hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_OFF;
- move16();
- }
- }
-
- FOR( p = 0; p < IGF_MAX_TILES; p++ )
- {
- /* update prev data: */
- hPrivateData->igfPrevWhiteningLevel[p] = hPrivateData->igfCurrWhiteningLevel[p];
- /* preset values: */
- hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_OFF;
- move16();
- move16();
- }
-
- test();
- IF( !( isTransient || hPrivateData->wasTransient ) )
- {
- IF( powerSpectrum )
- {
- FOR( p = 0; p < hGrid->nTiles; p++ )
- {
- Word16 sb;
-
- IF( isTNSActive )
- {
- FOR( sb = hGrid->tile[p]; sb < hGrid->tile[p + 1]; sb++ )
- {
- IF( LT_32( powerSpectrum[sb], 1 ) )
- hPrivateData->logSpec[sb] = 0; /* max(0,FLT_MIN_EXP )*/
- ELSE
- hPrivateData->logSpec[sb] = extract_l( L_max( 0, L_shr( L_add( BASOP_Util_Log2( powerSpectrum[sb] ), L_shl( powerSpectrum_e[sb], Q25 ) ), Q25 ) ) );
- move16();
- }
- }
-
- /* if current tile contains only a single SFB, reuse already computed SFM values */
- test();
- IF( element_mode > EVS_MONO && EQ_16( sub( hGrid->sfbWrap[p + 1], hGrid->sfbWrap[p] ), 1 ) )
- {
- tmp = hPrivateData->SFM_tb_fx[p];
- tmp_e = hPrivateData->sfb_tb_e[p];
- move16();
- move16();
- }
- ELSE
- {
- tmp = BASOP_Util_Divide1616_Scale( IGF_getSFM_new_fx( powerSpectrum, hPrivateData->logSpec, hGrid->tile[p], hGrid->tile[p + 1], powerSpectrum_e ), IGF_getCrest_new_fx( hPrivateData->logSpec, hGrid->tile[p], hGrid->tile[p + 1], &crest_e ), &tmp_e );
- tmp_e = sub( tmp_e, crest_e );
- }
-
- test();
- IF( last_core_acelp || hPrivateData->wasTransient )
- {
- hPrivateData->prevSFM_FIR[p] = L_shl( tmp, add( 1, tmp_e ) ); /*16-(15-exp)=>15Q16*/
- hPrivateData->prevSFM_IIR[p] = shl( tmp, sub( tmp_e, 2 ) ); /*13-(15-exp)=>2Q13*/
- move32();
- move16();
- }
-
- test();
- IF( LE_32( brate, IVAS_48k ) && EQ_16( element_mode, IVAS_CPE_MDCT ) )
- {
- Word16 temp;
- num_Tiles = 0;
- SFM_src = 0;
- SFM_tar = 0;
- SFM_src_e = 0;
- SFM_tar_e = 0;
- move16();
- move16();
- move16();
- move16();
- move16();
-
- FOR( sb = hGrid->sfbWrap[p]; sb < hGrid->sfbWrap[p + 1]; sb++ )
- {
- num_Tiles = add( num_Tiles, 1 );
- SFM_src_e = BASOP_Util_Add_MantExp( hPrivateData->SFM_sb_fx[sb], hPrivateData->sfb_sb_e[sb], SFM_src, SFM_src_e, &SFM_src );
- SFM_tar_e = BASOP_Util_Add_MantExp( hPrivateData->SFM_tb_fx[sb], hPrivateData->sfb_tb_e[sb], SFM_tar, SFM_tar_e, &SFM_tar );
- }
-
- /* compute the average */
- SFM_src = shr( BASOP_Util_Divide1616_Scale( SFM_src, num_Tiles, &temp ), 2 );
- SFM_src_e = add( SFM_src_e, sub( temp, 13 ) ); /*temp-15+2:because right shifted by 2 which are the guard bits*/
- SFM_tar = shr( BASOP_Util_Divide1616_Scale( SFM_tar, num_Tiles, &temp ), 2 );
- SFM_tar_e = add( SFM_tar_e, sub( temp, 13 ) ); /*temp-15+2:because right shifted by 2 which are the guard bits*/
-
- IF( LT_16( SFM_tar_e, SFM_src_e ) )
- {
- SFM_tar = shl( SFM_tar, sub( SFM_tar_e, SFM_src_e ) ); /*making the q for SFM_tar and SFM_src equal with 2 as guard bits*/
- SFM_tar_e = SFM_src_e;
- }
- ELSE
- {
- SFM_src = shr( SFM_src, sub( SFM_tar_e, SFM_src_e ) ); /*making the q for SFM_tar and SFM_src equal with 2 as guard bits*/
- SFM_src_e = SFM_tar_e;
- }
- move16();
-
- test();
- test();
- IF( ( p > 0 ) && ( EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_SWB_48000_CPE ) || EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_FB_48000_CPE ) ) )
- {
- test();
- if ( EQ_16( p, 1 ) && EQ_16( abs_s( sub( hPrivateData->igfCurrWhiteningLevel[0], hPrivateData->igfCurrWhiteningLevel[1] ) ), 2 ) ) /* OFF vs. STRONG */
- {
- hPrivateData->igfCurrWhiteningLevel[0] = IGF_WHITENING_MID;
- move16();
- }
- hPrivateData->igfCurrWhiteningLevel[p] = hPrivateData->igfCurrWhiteningLevel[p - 1];
- move16();
- }
- ELSE IF( sp_aud_decision0 )
- {
- /* Music */
- /* whitening Off: when tonality of target is more than source or tonality of target is close to that of source */
- test();
- if ( LE_16( SFM_tar, SFM_src ) || LE_32( SFM_tar, L_add( SFM_src, L_shl( 1, sub( 14, SFM_src_e /*0.5 with exponent SFM_src_e*/ ) ) ) ) )
- {
- hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_OFF;
- move16();
- }
-
- /* whitening mid: */
- test();
- if ( GT_32( SFM_tar, L_add( SFM_src, L_shl( 1, sub( 14, SFM_src_e /*0.5 with exponent SFM_src_e*/ ) ) ) ) && LE_32( SFM_tar, L_add( SFM_src, L_shl( 5, sub( 13, SFM_src_e ) ) /*1.25 with exponent SFM_src_e*/ ) ) )
- {
- hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_MID;
- move16();
- }
-
- /* whitening strong */
- if ( GT_32( SFM_tar, L_add( SFM_src, L_shl( 5, sub( 13, SFM_src_e ) ) /*1.25 with exponent SFM_src_e*/ ) ) )
- {
- hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_STRONG;
- move16();
- }
- }
- ELSE
- {
- /* Speech */
- /* whitening Off: when tonality of target is more than source or tonality of target is close to that of source */
- test();
- if ( LE_16( SFM_tar, SFM_src ) || LE_32( SFM_tar, L_add( SFM_src, L_shr( 3277 /*0.1 Q15*/, SFM_src_e ) ) ) )
- {
- hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_OFF;
- move16();
- }
-
- /* whitening mid: */
- test();
- if ( GT_32( SFM_tar, L_add( SFM_src, L_shr( 3277 /*0.1 Q15*/, SFM_src_e ) ) ) && LE_32( SFM_tar, L_add( SFM_src, L_shl( 1, sub( 14, SFM_src_e /*0.5 with exponent SFM_src_e*/ ) ) ) ) )
- {
- hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_MID;
- move16();
- }
-
- /* whitening strong */
- if ( GT_32( SFM_tar, L_add( SFM_src, L_shl( 1, sub( 14, SFM_src_e /*0.5 with exponent SFM_src_e*/ ) ) ) ) )
- {
- hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_STRONG;
- move16();
- }
- }
-
- SFM = shl( SFM_tar, sub( SFM_tar_e, 2 ) ); /*2Q13*/
- }
- ELSE
- {
- test();
- IF( element_mode > EVS_MONO && EQ_16( sub( hGrid->sfbWrap[p + 1], hGrid->sfbWrap[p] ), 1 ) )
- {
- SFM = shl( tmp, sub( tmp_e, 2 ) ); /*2Q13*/
- }
- ELSE
- {
- Word32 temp;
- temp = L_add( L_shl( tmp, sub( tmp_e, 2 ) ), L_add( L_shr( hPrivateData->prevSFM_FIR[p], 3 ), L_shr( hPrivateData->prevSFM_IIR[p], 1 ) ) );
- SFM = extract_l( L_min( 22118 /*2.7*/, temp ) ); /*2Q13*/
- }
- hPrivateData->prevSFM_FIR[p] = L_shl( tmp, add( 1, tmp_e ) ); /*15Q16*/
- hPrivateData->prevSFM_IIR[p] = SFM;
- move32();
- move16();
-
- IF( GT_16( SFM, hGrid->whiteningThreshold[1][p] ) )
- {
- hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_STRONG;
- move16();
- }
- ELSE IF( GT_16( SFM, hGrid->whiteningThreshold[0][p] ) )
- {
- hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_MID;
- move16();
- }
- ELSE
- {
- hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_OFF;
- move16();
- }
- }
-
- IF( element_mode > EVS_MONO )
- {
- IF( last_core_acelp ) /* reset */
- {
- set16_fx( hPrivateData->igfPastSFM_fx[p], -ONE_IN_Q13, IGF_PAST_SFM_LEN );
- hPrivateData->igfWhiteningHangoverCnt[p] = 2;
- move16();
- }
- ELSE
- {
- test();
- test();
- test();
- test();
- /* check whether change in whitening level should be allowed or not (if SFM is inside a certain margin around thresholds) */
- IF( NE_16( hPrivateData->igfCurrWhiteningLevel[p], hPrivateData->igfPrevWhiteningLevel[p] ) &&
- ( ( GT_32( SFM, L_sub( hGrid->whiteningThreshold[0][p], 1229 /*0.15f Q13*/ ) ) && LT_32( SFM, L_add( hGrid->whiteningThreshold[0][p], 1229 ) ) ) ||
- ( GT_32( SFM, L_sub( hGrid->whiteningThreshold[1][p], 1229 ) ) && LT_32( SFM, L_add( hGrid->whiteningThreshold[1][p], 1229 ) ) ) ) )
- {
- Word16 mean_past_SFM;
- Word16 mean_past_SFM_e;
- Word16 countable;
- Word16 i;
- mean_past_SFM = 0;
- mean_past_SFM_e = 0;
- countable = 0;
- move16();
- move16();
- move16();
-
- /* compute mean of last (available) SFM values */
- FOR( i = 0; i < IGF_PAST_SFM_LEN; i++ )
- {
- IF( hPrivateData->igfPastSFM_fx[p][i] >= 0 )
- {
- mean_past_SFM_e = BASOP_Util_Add_MantExp( mean_past_SFM, mean_past_SFM_e, hPrivateData->igfPastSFM_fx[p][i], 2, &mean_past_SFM );
- countable = add( countable, 1 );
- }
- }
- IF( countable )
- {
- Word16 temp;
- mean_past_SFM = BASOP_Util_Divide1616_Scale( mean_past_SFM, countable, &temp );
- mean_past_SFM_e = add( mean_past_SFM_e, sub( temp, 15 ) );
- mean_past_SFM = shl( mean_past_SFM, sub( mean_past_SFM_e, 2 ) ); /*mean_past_SFM_e=2*/
- /* deny change in whitening level for small deviations from mean SFM */
- if ( LT_16( abs_s( sub( SFM, mean_past_SFM ) ), 1638 ) /*0.2 in Q13*/ )
- {
- hPrivateData->igfCurrWhiteningLevel[p] = hPrivateData->igfPrevWhiteningLevel[p];
- move16();
- }
- }
- }
- }
-
- hPrivateData->igfPastSFM_fx[p][hPrivateData->igfPastSFM_pos] = SFM; /*2Q13*/
- move16();
- }
- }
-
- SWITCH( hPrivateData->igfInfo.bitRateIndex )
- {
- case IGF_BITRATE_WB_9600:
- case IGF_BITRATE_RF_WB_13200:
- case IGF_BITRATE_WB_13200_CPE:
- case IGF_BITRATE_WB_16400_CPE:
- case IGF_BITRATE_RF_SWB_13200:
- case IGF_BITRATE_SWB_9600:
- case IGF_BITRATE_SWB_13200_CPE:
- case IGF_BITRATE_SWB_16400:
- case IGF_BITRATE_SWB_24400:
- case IGF_BITRATE_SWB_24400_CPE:
- case IGF_BITRATE_SWB_32000_CPE:
- case IGF_BITRATE_SWB_32000:
- case IGF_BITRATE_FB_16400:
- case IGF_BITRATE_FB_24400:
- case IGF_BITRATE_FB_24400_CPE:
- case IGF_BITRATE_FB_32000_CPE:
- case IGF_BITRATE_FB_32000:
- hPrivateData->igfCurrWhiteningLevel[hGrid->nTiles - 1] = hPrivateData->igfCurrWhiteningLevel[hGrid->nTiles - 2];
- move16();
- break;
- default:
- break;
- }
- }
- ELSE
- {
- FOR( p = 0; p < hGrid->nTiles; p++ )
- {
- hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_MID;
- move16();
- }
- }
- }
- ELSE
- {
- /* reset filter */
- FOR( p = 0; p < IGF_MAX_TILES; p++ )
- {
- hPrivateData->prevSFM_FIR[p] = L_deposit_l( 0 );
- hPrivateData->prevSFM_IIR[p] = 0;
- move32();
- move16();
- }
- }
-
- IF( element_mode > EVS_MONO )
- {
- IF( EQ_16( SFM, -ONE_IN_Q13 /*1.0f 2Q13*/ ) ) /* reset */
- {
- FOR( p = 0; p < hGrid->nTiles; p++ )
- {
- set16_fx( hPrivateData->igfPastSFM_fx[p], -ONE_IN_Q13, IGF_PAST_SFM_LEN );
- hPrivateData->igfWhiteningHangoverCnt[p] = 2;
- move16();
- }
- }
-
- /* vibrato handling */
- FOR( p = 0; p < hGrid->nTiles; p = p + 2 )
- {
- test();
- test();
- test();
- IF( ( hPrivateData->igfPrevWhiteningLevel[p] == IGF_WHITENING_OFF && hPrivateData->igfCurrWhiteningLevel[p] != IGF_WHITENING_OFF ) ||
- ( hPrivateData->igfPrevWhiteningLevel[p + 1] == IGF_WHITENING_OFF && hPrivateData->igfCurrWhiteningLevel[p + 1] != IGF_WHITENING_OFF ) )
- {
- Word16 i;
- Word16 pastSfm_a[4], pastSfm_b[4];
- Word16 pastSfmDiffSum_a, pastSfmDiffSum_b;
-
- FOR( i = 0; i < 4; i++ )
- {
- pastSfm_a[i] = hPrivateData->igfPastSFM_fx[p][add( hPrivateData->igfPastSFM_pos, sub( 4, i ) ) % IGF_PAST_SFM_LEN];
- pastSfm_b[i] = hPrivateData->igfPastSFM_fx[p + 1][add( hPrivateData->igfPastSFM_pos, sub( 4, i ) ) % IGF_PAST_SFM_LEN];
- move16();
- move16();
- }
- pastSfmDiffSum_a = pastSfmDiffSum_b = 0;
- move16();
- move16();
- FOR( i = 0; i < 3; i++ )
- {
- IF( NE_16( pastSfm_a[i + 1], -ONE_IN_Q13 ) )
- {
- pastSfmDiffSum_a = add( pastSfmDiffSum_a, sub( pastSfm_a[i], pastSfm_a[i + 1] ) );
- pastSfmDiffSum_b = add( pastSfmDiffSum_b, sub( pastSfm_b[i], pastSfm_b[i + 1] ) );
- }
- ELSE
- {
- break;
- }
- }
- test();
- test();
- test();
- test();
- /* if tonality oscillates between two tiles, turn whitening off in both */
- IF( ( ( pastSfmDiffSum_a > 0 && pastSfmDiffSum_b < 0 ) ||
- ( pastSfmDiffSum_a < 0 && pastSfmDiffSum_b > 0 ) ) &&
- ( GT_32( L_abs( L_sub( pastSfmDiffSum_a, pastSfmDiffSum_b ) ), ONE_IN_Q12 /* 0.5 in Q13 */ ) ) )
- {
- hPrivateData->igfCurrWhiteningLevel[p] = hPrivateData->igfCurrWhiteningLevel[p + 1] = IGF_WHITENING_OFF;
- move16();
- move16();
- }
- }
- }
-
- /* hangover */
- FOR( p = 0; p < hGrid->nTiles; p++ )
- {
- IF( NE_16( hPrivateData->igfCurrWhiteningLevel[p], hPrivateData->igfPrevWhiteningLevel[p] ) )
- {
- hPrivateData->igfWhiteningHangoverCnt[p] = add( hPrivateData->igfWhiteningHangoverCnt[p], 1 );
- IF( EQ_16( hPrivateData->igfWhiteningHangoverCnt[p], 3 ) )
- {
- hPrivateData->igfWhiteningHangoverCnt[p] = 0;
- }
- ELSE
- {
- hPrivateData->igfCurrWhiteningLevel[p] = hPrivateData->igfPrevWhiteningLevel[p];
- }
- move16();
- move16();
- }
- ELSE
- {
- hPrivateData->igfWhiteningHangoverCnt[p] = 0;
- move16();
- }
- }
-
- hPrivateData->igfPastSFM_pos = add( hPrivateData->igfPastSFM_pos, 1 ) % IGF_PAST_SFM_LEN;
- move16();
- }
-
- hPrivateData->wasTransient = isTransient;
- move16();
-
- return;
-}
-
-
-/*-------------------------------------------------------------------*
- * IGF_WriteWhiteningTile_fx()
- *
- * write whitening levels into bitstream
- *-------------------------------------------------------------------*/
-
-/*! r: number of bits written */
-static Word16 IGF_WriteWhiteningTile_fx( /**< out: Q0 | number of bits written */
- BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
- Word16 *pBitOffset, /**< in: | ptr to bitOffset counter */
- Word16 whiteningLevel /**< in: Q0 | whitening levels to write */
-)
-{
- Word16 totBitCount;
- Word16 startBitCount;
-
- totBitCount = 0;
- startBitCount = *pBitOffset;
- move16();
- move16();
-
- IF( EQ_32( whiteningLevel, IGF_WHITENING_MID ) )
- {
- IGF_write_bits( hBstr, pBitOffset, 0, 1 );
- }
- ELSE
- {
- IGF_write_bits( hBstr, pBitOffset, 1, 1 );
- IF( whiteningLevel == IGF_WHITENING_OFF )
- {
- IGF_write_bits( hBstr, pBitOffset, 0, 1 );
- }
- ELSE
- {
- IGF_write_bits( hBstr, pBitOffset, 1, 1 );
- }
- }
- totBitCount = sub( *pBitOffset, startBitCount );
-
- return totBitCount;
-}
-
-
-/*-------------------------------------------------------------------*
- * IGF_WriteWhiteningLevels_fx()
- *
- * writes the whitening levels
- *-------------------------------------------------------------------*/
-
-static Word16 IGF_WriteWhiteningLevels_fx( /**< out: Q0 | total number of bits written */
- const IGF_ENC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF encoder */
- BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
- Word16 *pBitOffset, /**< in: | ptr to bitOffset counter */
- const Word16 igfGridIdx, /**< in: Q0 | igf grid index see declaration of IGF_GRID_IDX for details */
- const Word16 isIndepFlag /**< in: Q0 | if 1 frame is independent, 0 = frame is coded with data from previous frame */
-)
-{
- IGF_ENC_PRIVATE_DATA_HANDLE hPrivateData;
- H_IGF_GRID hGrid;
- Word16 p;
- Word16 nTiles;
- Word16 isSame;
- Word32 tmp32;
- Word16 totBitCount;
- Word16 startBitCount;
-
- totBitCount = 0;
- move16();
- isSame = 1;
- move16();
- startBitCount = *pBitOffset;
- move16();
- hPrivateData = &hInstance->igfData;
- hGrid = &hPrivateData->igfInfo.grid[igfGridIdx];
- nTiles = hGrid->nTiles;
- move16();
-
- IF( isIndepFlag )
- {
- isSame = 0;
- move16();
- }
- ELSE
- {
- p = 0;
- move16();
- tmp32 = 0;
- move32();
- test();
- WHILE( ( LT_16( p, nTiles ) ) && ( tmp32 == 0 ) )
- {
- test();
- tmp32 = L_sub( hPrivateData->igfCurrWhiteningLevel[p], hPrivateData->igfPrevWhiteningLevel[p] );
- if ( tmp32 != 0 )
- {
- isSame = 0;
- move16();
- }
- p++;
- }
- }
- IF( isSame )
- {
- IGF_write_bits( hBstr, pBitOffset, 1, 1 );
- }
- ELSE
- {
- IF( !isIndepFlag )
- {
- IGF_write_bits( hBstr, pBitOffset, 0, 1 );
- }
- IGF_WriteWhiteningTile_fx( hBstr, pBitOffset, hPrivateData->igfCurrWhiteningLevel[0] );
- p = 1;
- move16();
- tmp32 = 0;
- move32();
- test();
- IF( EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_SWB_48000_CPE ) || EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_FB_48000_CPE ) )
- {
- isSame = 1;
- move16();
- }
- ELSE
- {
- if ( LT_16( p, nTiles ) )
- {
- isSame = 1;
- move16();
- }
- test();
- WHILE( ( LT_16( p, nTiles ) ) && ( tmp32 == 0 ) )
- {
- test();
- tmp32 = L_sub( hPrivateData->igfCurrWhiteningLevel[p], hPrivateData->igfCurrWhiteningLevel[p - 1] );
- if ( tmp32 != 0 )
- {
- isSame = 0;
- move16();
- }
- p++;
- }
- }
- test();
- IF( !isSame )
- {
- IGF_write_bits( hBstr, pBitOffset, 1, 1 );
- FOR( p = 1; p < nTiles; p++ )
- {
- IGF_WriteWhiteningTile_fx( hBstr, pBitOffset, hPrivateData->igfCurrWhiteningLevel[p] );
- }
- }
- ELSE IF( NE_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_SWB_48000_CPE ) && NE_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_FB_48000_CPE ) )
- {
- IGF_write_bits( hBstr, pBitOffset, 0, 1 );
- }
- }
-
- totBitCount = sub( *pBitOffset, startBitCount );
-
- return totBitCount;
-}
-
-
-/*-------------------------------------------------------------------*
- * IGF_WriteFlatteningTrigger_fx()
- *
- * write flattening trigger
- *-------------------------------------------------------------------*/
-
-/*! r: number of bits written */
-static Word16 IGF_WriteFlatteningTrigger_fx( /**< out: | number of bits written */
- const IGF_ENC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Encoder */
- BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
- Word16 *pBitOffset /**< in: | ptr to bitOffset counter */
-)
-{
- Word16 flatteningTrigger;
-
- Word16 totBitCount;
- Word16 startBitCount;
- totBitCount = 0;
- startBitCount = *pBitOffset;
- flatteningTrigger = hInstance->flatteningTrigger;
- move16();
- move16();
- move16();
-
- IGF_write_bits( hBstr, pBitOffset, flatteningTrigger, 1 );
- totBitCount = sub( *pBitOffset, startBitCount );
-
- return totBitCount;
-}
-
-
-/*-------------------------------------------------------------------*
- * IGF_UpdateInfo()
- *
- * updates the start/stop frequency of IGF according to igfGridIdx
- *-------------------------------------------------------------------*/
-
-/*-------------------------------------------------------------------*
- * IGFEncWriteBitstream()
- *
- * IGF bitstream writer
- *-------------------------------------------------------------------*/
-
-/*! r: number of bits written per frame */
-Word16 IGFEncWriteBitstream_ivas_fx(
- const IGF_ENC_INSTANCE_HANDLE hIGFEnc, /* i : instance handle of IGF Encoder */
- BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
- Word16 *pBitOffset, /* i : ptr to bitOffset counter */
- const Word16 igfGridIdx, /* i : igf grid index see declaration of IGF_GRID_IDX for details */
- const Word16 isIndepFlag /* i : if 1 frame is independent, 0 = frame is coded with data from previous frame */
-)
-{
- Word16 igfAllZero;
- Word16 startBitCount;
-
- startBitCount = *pBitOffset;
- move16();
- hIGFEnc->infoTotalBitsPerFrameWritten = 0;
- move16();
-
- if ( isIndepFlag )
- {
- hIGFEnc->infoTotalBitsWritten = 0;
- move16();
- }
-
- IGF_WriteEnvelope( hIGFEnc, /* i: instance handle of IGF Encoder */
- hBstr, /* i: encoder state */
- pBitOffset, /* i: ptr to bitOffset counter */
- igfGridIdx, /* i: igf grid index see definition of IGF_GRID_IDX for details */
- isIndepFlag, /* i: if 1 frame is independent, 0 = frame is coded with data from previous frame */
- &igfAllZero ); /* o: *igfAllZero */
-
- IGF_WriteWhiteningLevels_fx( hIGFEnc, /* i: instance handle of IGF Encoder */
- hBstr, /* i: encoder state */
- pBitOffset, /* i: ptr to bitOffset counter */
- igfGridIdx, /* i: igf grid index see definition of IGF_GRID_IDX for details */
- isIndepFlag ); /* i: if 1 frame is independent, 0 = frame is coded with data from previous frame */
-
- IGF_WriteFlatteningTrigger_fx( hIGFEnc, /* i: instance handle of IGF Encoder */
- hBstr, /* i: encoder state */
- pBitOffset ); /* i: ptr to bitOffset counter */
-
- hIGFEnc->infoTotalBitsPerFrameWritten = sub( *pBitOffset, startBitCount );
- hIGFEnc->infoTotalBitsWritten = add( hIGFEnc->infoTotalBitsWritten, hIGFEnc->infoTotalBitsPerFrameWritten );
- move16();
- move16();
-
- return hIGFEnc->infoTotalBitsPerFrameWritten;
-}
-
-
-/*-------------------------------------------------------------------*
- * IGFEncSetMode()
- *
- * sets the IGF mode according to given bitrate
- *-------------------------------------------------------------------*/
-void IGFEncSetMode_ivas_fx(
- const IGF_ENC_INSTANCE_HANDLE hIGFEnc, /* i/o: instance handle of IGF Encoder */
- const Word32 total_brate, /* i : encoder total bitrate */
- const Word16 bwidth, /* i : encoder audio bandwidth */
- const Word16 element_mode, /* i : IVAS element mode */
- const Word16 rf_mode /* i : flag to signal the RF mode */
-)
-{
- IGF_ENC_PRIVATE_DATA_HANDLE hPrivateData;
- Word16 i;
-
- hPrivateData = &hIGFEnc->igfData;
- hPrivateData->igfBitstreamBits = 0;
- move16();
- set16_fx( hPrivateData->igfScfQuantized, 0, IGF_MAX_SFB );
- set16_fx( hPrivateData->igfCurrWhiteningLevel, 0, IGF_MAX_TILES );
- set16_fx( hPrivateData->igfPrevWhiteningLevel, 0, IGF_MAX_TILES );
- set16_fx( hPrivateData->igfWhiteningHangoverCnt, 0, IGF_MAX_TILES );
- FOR( i = 0; i < IGF_MAX_TILES; i++ )
- {
- set16_fx( hPrivateData->igfPastSFM_fx[i], -( ONE_IN_Q13 ), IGF_PAST_SFM_LEN );
- }
-
- hPrivateData->igfPastSFM_pos = 0;
- move16();
-
- FOR( i = 0; i < IGF_BITBUFSIZE / 8; i++ )
- {
- hPrivateData->igfBitstream[i] = 0;
- move16();
- }
- hPrivateData->wasTransient = 0;
- move16();
- set32_fx( hPrivateData->prevSFM_FIR, 0, IGF_MAX_TILES );
- set16_fx( hPrivateData->prevSFM_IIR, 0, IGF_MAX_TILES );
- set16_fx( hPrivateData->dampingFactorSmoothing, 2, IGF_MAX_SFB );
- set16_fx( hPrivateData->prevSFM_FIR_SFB_SB_fx, 0, IGF_MAX_SFB );
- set16_fx( hPrivateData->prevSFB_FIR_TB_e, 15, IGF_MAX_SFB );
- set16_fx( hPrivateData->prevSFB_FIR_SB_e, 15, IGF_MAX_SFB );
- set16_fx( hPrivateData->prevSFM_IIR_SFB_SB_fx, 0, IGF_MAX_SFB );
- set16_fx( hPrivateData->prevSFB_IIR_SB_e, 15, IGF_MAX_SFB );
- set16_fx( hPrivateData->prevSFM_FIR_SFB_TB_fx, 0, IGF_MAX_SFB );
- set16_fx( hPrivateData->prevSFB_IIR_TB_e, 15, IGF_MAX_SFB );
- set16_fx( hPrivateData->sfb_tb_e, 15, IGF_MAX_SFB );
- set16_fx( hPrivateData->sfb_sb_e, 15, IGF_MAX_SFB );
- set16_fx( hPrivateData->prevSFM_IIR_SFB_TB_fx, 0, IGF_MAX_SFB );
- set16_fx( hPrivateData->prevDampingFactor_IIR_fx, -( ONE_IN_Q15 ), IGF_MAX_SFB );
- set16_fx( hPrivateData->prevDampingFactor_IIR_e, 0, IGF_MAX_SFB );
- set16_fx( hPrivateData->logSpec, 0, L_FRAME_PLUS );
- set16_fx( hPrivateData->SFM_sb_fx, 0, IGF_MAX_SFB );
- set16_fx( hPrivateData->SFM_tb_fx, 0, IGF_MAX_SFB );
-
- IF( IGFCommonFuncsIGFConfiguration_ivas_fx( total_brate, bwidth, element_mode, &hPrivateData->igfInfo, rf_mode ) != 0 )
- {
- IGFSCFEncoderOpen_fx( &hPrivateData->hIGFSCFArithEnc, &hPrivateData->igfInfo, total_brate, bwidth, element_mode, rf_mode );
-
- hIGFEnc->infoSamplingRate = hPrivateData->igfInfo.sampleRate;
- move32();
- hIGFEnc->infoStartFrequency = hPrivateData->igfInfo.grid[0].startFrequency;
- move16();
- hIGFEnc->infoStopFrequency = hPrivateData->igfInfo.grid[0].stopFrequency;
- move16();
- hIGFEnc->infoStartLine = hPrivateData->igfInfo.grid[0].startLine;
- move16();
- hIGFEnc->infoStopLine = hPrivateData->igfInfo.grid[0].stopLine;
- move16();
- }
- ELSE
- {
- /* IGF configuration failed -> error! */
- hIGFEnc->infoSamplingRate = 0;
- move32();
- hIGFEnc->infoStartFrequency = -1;
- move16();
- hIGFEnc->infoStopFrequency = -1;
- move16();
- hIGFEnc->infoStartLine = -1;
- move16();
- hIGFEnc->infoStopLine = -1;
- move16();
- fprintf( stderr, "IGFEncSetMode_fx: initialization error!\n" );
- }
-
- /* reset remaining variables */
- hIGFEnc->infoTotalBitsWritten = 0;
- move16();
- hIGFEnc->infoTotalBitsPerFrameWritten = 0;
- move16();
- hIGFEnc->flatteningTrigger = 0;
- move16();
- hIGFEnc->spec_be_igf_e = 0;
- move16();
- hIGFEnc->tns_predictionGain = 0;
- move16();
- set32_fx( hIGFEnc->spec_be_igf, 0, N_MAX_TCX - IGF_START_MN );
- return;
-}
-
-
-/*-------------------------------------------------------------------*
- * IGFEncConcatenateBitstream()
- *
- * IGF bitstream concatenation for TCX10 modes
- *-------------------------------------------------------------------*/
-
-/*-------------------------------------------------------------------*
- * IGFEncResetTCX10BitCounter_ivas_fx()
- *
- * IGF reset bitstream bit counter for TCX10 modes
- *-------------------------------------------------------------------*/
-
-void IGFEncResetTCX10BitCounter_ivas_fx(
- const IGF_ENC_INSTANCE_HANDLE hIGFEnc /* i : instance handle of IGF Encoder */
-)
-{
- IGF_ENC_PRIVATE_DATA_HANDLE hPrivateData;
-
- hPrivateData = &hIGFEnc->igfData;
- hPrivateData->igfBitstreamBits = 0;
- hIGFEnc->infoTotalBitsWritten = 0;
- move16();
- move16();
- return;
-}
-
-
-/*-------------------------------------------------------------------*
- * IGFEncApplyMono()
- *
- * apply the IGF encoder, main encoder interface
- *-------------------------------------------------------------------*/
-
-void IGFEncApplyMono_ivas_fx(
- Encoder_State *st, /* i : Encoder state */
- Word16 powerSpectrum_len, /* i: length of pPowerSpectrum_fx buffer */
- const Word16 igfGridIdx, /* i : IGF grid index */
- Word32 *pMDCTSpectrum_fx, /* i/o: MDCT spectrum */
- Word16 e_mdct, /* i : exponent of pMDCTspectrum */
- Word32 *pPowerSpectrum_fx, /* i/o: MDCT^2 + MDST^2 spectrum, or estimate */
- Word16 *e_ps, /* i : exponent of pPowerSpectrum */
- const Word16 isTCX20, /* i : flag indicating if the input is TCX20 or TCX10/2xTCX5 */
- const Word8 isTNSActive, /* i : flag indicating if the TNS is active */
- const Word16 sp_aud_decision0, /* i : first stage switching decision */
- const Word16 vad_hover_flag /* i : VAD hangover flag */
-)
-{
- Word32 *pPowerSpectrumParameter_fx;
- Word16 *pPowerSpectrumParameter_exp;
- Word16 att_fx = MAX16B;
- Word16 last_core_acelp;
- move16();
-
- Word32 common_pPowerSpectrum_fx[N_MAX + L_MDCT_OVLP_MAX];
-
- set32_fx( common_pPowerSpectrum_fx, 0, N_MAX );
-
- Word16 common_pPowerSpectrum_exp = MIN16B;
- move16();
- IF( st->last_core == ACELP_CORE )
- {
- last_core_acelp = 1;
- move16();
- }
- ELSE
- {
- last_core_acelp = 0;
- move16();
- }
-
- test();
- IF( !isTNSActive && isTCX20 )
- {
- pPowerSpectrumParameter_fx = pPowerSpectrum_fx;
- pPowerSpectrumParameter_exp = e_ps;
- }
- ELSE
- {
- pPowerSpectrumParameter_fx = NULL;
- pPowerSpectrumParameter_exp = NULL;
- }
-
- IGF_UpdateInfo( st->hIGFEnc, igfGridIdx );
-
- test();
- IF( EQ_16( st->element_mode, IVAS_CPE_DFT ) || EQ_16( st->element_mode, IVAS_CPE_TD ) )
- {
- calculate_hangover_attenuation_gain_ivas_fx( st, &att_fx, vad_hover_flag );
- }
-
- IGF_CalculateEnvelope_ivas_fx( st->hIGFEnc, pMDCTSpectrum_fx, e_mdct, pPowerSpectrumParameter_fx, pPowerSpectrumParameter_exp, igfGridIdx, st->hTranDet->transientDetector.bIsAttackPresent, last_core_acelp, st->element_mode, att_fx );
-
- IF( isTCX20 )
- {
- pPowerSpectrumParameter_fx = pPowerSpectrum_fx;
- pPowerSpectrumParameter_exp = e_ps;
- }
- ELSE
- {
- pPowerSpectrumParameter_fx = NULL;
- pPowerSpectrumParameter_exp = NULL;
- }
-
- IF( EQ_16( st->element_mode, IVAS_CPE_MDCT ) )
- {
- IGF_Whitening_ivas_fx( st->hIGFEnc, pPowerSpectrumParameter_fx, pPowerSpectrumParameter_exp, igfGridIdx, st->hTranDet->transientDetector.bIsAttackPresent, last_core_acelp, isTNSActive, sp_aud_decision0, st->element_brate, st->element_mode );
- }
- ELSE
- {
- IGF_Whitening_ivas_fx( st->hIGFEnc, pPowerSpectrumParameter_fx, pPowerSpectrumParameter_exp, igfGridIdx, st->hTranDet->transientDetector.bIsAttackPresent, last_core_acelp, isTNSActive, sp_aud_decision0, st->total_brate, st->element_mode );
- }
-
- IF( pPowerSpectrumParameter_fx )
- {
- FOR( Word16 i = 0; i < powerSpectrum_len; i++ )
- {
- common_pPowerSpectrum_exp = s_max( common_pPowerSpectrum_exp, pPowerSpectrumParameter_exp[i] );
- }
-
- FOR( Word16 i = 0; i < powerSpectrum_len; i++ )
- {
- common_pPowerSpectrum_fx[i] = L_shl( pPowerSpectrumParameter_fx[i], sub( pPowerSpectrumParameter_exp[i], common_pPowerSpectrum_exp ) );
- move16();
- }
- pPowerSpectrumParameter_fx = common_pPowerSpectrum_fx;
- }
- IGF_ErodeSpectrum_ivas_fx( st->hIGFEnc, pMDCTSpectrum_fx, pPowerSpectrumParameter_fx, common_pPowerSpectrum_exp, igfGridIdx, 0 );
-}
-
-
-/*-------------------------------------------------------------------*
- * IGFEncApplyStereo()
- *
- * apply the IGF encoder, main encoder interface
- *-------------------------------------------------------------------*/
-
-void IGFEncApplyStereo_fx(
- STEREO_MDCT_ENC_DATA_HANDLE hStereoMdct, /* i/o: MDCT stereo encoder structure */
- Word16 ms_mask[2][MAX_SFB], /* i : bandwise MS mask */
- const IGF_ENC_INSTANCE_HANDLE hIGFEnc[CPE_CHANNELS], /* i : instance handle of IGF Encoder */
- const Word16 igfGridIdx, /* i : IGF grid index */
- Encoder_State *sts[CPE_CHANNELS], /* i : Encoder state */
- Word32 *pPowerSpectrum_fx[CPE_CHANNELS], /* i/o: MDCT^2 + MDST^2 spectrum, or estimate */
- Word16 *exp_pPowerSpectrum_fx[CPE_CHANNELS], /* i/o: exp of pPowerSpectrum_fx */
- Word32 *pPowerSpectrumMsInv_fx[CPE_CHANNELS][NB_DIV], /* i/o: inverse power spectrum */
- Word16 *q_pPowerSpectrumMsInv_fx[CPE_CHANNELS][NB_DIV], /* i/o: Q of pPowerSpectrumMsInv_fx */
- Word32 *inv_spectrum_fx[CPE_CHANNELS][NB_DIV], /* i : inverse spectrum */
- Word16 exp_inv_spectrum_fx[CPE_CHANNELS], /* i : exp of inverse spectrum */
- const Word16 frameno, /* i : flag indicating index of current subfr. */
- const Word16 sp_aud_decision0, /* i : sp_aud_decision0 */
- const Word32 element_brate, /* i : element bitrate */
- const Word16 mct_on )
-{
- Word32 *pPowerSpectrumParameter_fx[NB_DIV]; /* If it is NULL it informs a function that specific handling is needed */
- Word16 *exp_pPowerSpectrumParameter_fx[NB_DIV]; /* If it is NULL it informs a function that specific handling is needed */
- Word32 *pPowerSpectrumParameterMsInv_fx[NB_DIV];
- Word16 *q_pPowerSpectrumParameterMsInv_fx[NB_DIV];
- Word16 coreMsMask[N_MAX];
- Word16 sfb, ch, last_core_acelp;
- STEREO_MDCT_BAND_PARAMETERS *sfbConf;
- Word32 common_pPowerSpectrum_fx[N_MAX];
-
- set32_fx( common_pPowerSpectrum_fx, 0, N_MAX );
-
- Word16 common_pPowerSpectrum_exp = MIN16B;
- move16();
-
- /* assumptions: stereo filling was already done on the flattened spectra
- * IGF region is always coded M/S, never L/R (to be done in the encoder)
- * for residual bands with stereo filling infoTcxNoise is set to zero
- * both channels have the same IGF configuration
- */
-
- /* sanity checks: check if both channels have the same configuration...*/
- assert( ( sts[0]->core == sts[1]->core ) );
-
- /* initialization */
- IF( EQ_16( sts[0]->core, TCX_20_CORE ) )
- {
- sfbConf = &hStereoMdct->stbParamsTCX20;
- }
- ELSE
- {
- sfbConf = &hStereoMdct->stbParamsTCX10;
- }
- if ( sts[0]->last_core == ACELP_CORE )
- {
- sfbConf = &hStereoMdct->stbParamsTCX20afterACELP;
- }
-
- /* create line wise ms mask for the core bands */
- set16_fx( coreMsMask, 0, N_MAX );
- FOR( sfb = 0; sfb < sfbConf->sfbCnt; sfb++ )
- {
- set16_fx( &coreMsMask[sfbConf->sfbOffset[sfb]], ms_mask[frameno][sfb], sub( sfbConf->sfbOffset[sfb + 1], sfbConf->sfbOffset[sfb] ) );
- }
-
- test();
- test();
- IF( EQ_16( sts[0]->core, TCX_20_CORE ) && !sts[0]->hTcxEnc->fUseTns[frameno] && !sts[1]->hTcxEnc->fUseTns[frameno] )
- {
- pPowerSpectrumParameter_fx[0] = &pPowerSpectrum_fx[0][0];
- exp_pPowerSpectrumParameter_fx[0] = &exp_pPowerSpectrum_fx[0][0];
- pPowerSpectrumParameter_fx[1] = &pPowerSpectrum_fx[1][0];
- exp_pPowerSpectrumParameter_fx[1] = &exp_pPowerSpectrum_fx[1][0];
- pPowerSpectrumParameterMsInv_fx[0] = pPowerSpectrumMsInv_fx[0][0];
- pPowerSpectrumParameterMsInv_fx[1] = pPowerSpectrumMsInv_fx[1][0];
- q_pPowerSpectrumParameterMsInv_fx[0] = q_pPowerSpectrumMsInv_fx[0][0];
- q_pPowerSpectrumParameterMsInv_fx[1] = q_pPowerSpectrumMsInv_fx[1][0];
- }
- ELSE
- {
- pPowerSpectrumParameter_fx[0] = NULL;
- pPowerSpectrumParameter_fx[1] = NULL;
- pPowerSpectrumParameterMsInv_fx[0] = NULL;
- pPowerSpectrumParameterMsInv_fx[1] = NULL;
- q_pPowerSpectrumParameterMsInv_fx[0] = NULL;
- q_pPowerSpectrumParameterMsInv_fx[1] = NULL;
- }
- FOR( ch = 0; ch < CPE_CHANNELS; ch++ )
- {
- last_core_acelp = extract_l( EQ_16( sts[ch]->last_core, ACELP_CORE ) );
-
- IGF_UpdateInfo( hIGFEnc[ch], igfGridIdx );
- IGF_CalculateStereoEnvelope_fx( hIGFEnc[ch], sts[ch]->hTcxEnc->spectrum_fx[frameno], sts[ch]->hTcxEnc->spectrum_e[frameno], inv_spectrum_fx[ch][frameno],
- exp_inv_spectrum_fx[ch], pPowerSpectrumParameter_fx[ch], exp_pPowerSpectrum_fx[ch], pPowerSpectrumParameterMsInv_fx[ch],
- q_pPowerSpectrumParameterMsInv_fx[ch], igfGridIdx, coreMsMask, sts[ch]->hTranDet->transientDetector.bIsAttackPresent, last_core_acelp, mct_on );
-
- IF( EQ_16( sts[ch]->core, TCX_20_CORE ) )
- {
- pPowerSpectrumParameter_fx[ch] = pPowerSpectrum_fx[ch];
- exp_pPowerSpectrumParameter_fx[ch] = exp_pPowerSpectrum_fx[ch];
- }
- ELSE
- {
- pPowerSpectrumParameter_fx[ch] = NULL;
- }
-
- IGF_Whitening_ivas_fx( hIGFEnc[ch], pPowerSpectrumParameter_fx[ch], exp_pPowerSpectrumParameter_fx[ch], igfGridIdx, sts[ch]->hTranDet->transientDetector.bIsAttackPresent, last_core_acelp, ( sts[0]->hTcxEnc->fUseTns[frameno] || sts[1]->hTcxEnc->fUseTns[frameno] ), sp_aud_decision0, element_brate, sts[ch]->element_mode );
-
- IF( pPowerSpectrumParameter_fx[ch] )
- {
- Word16 length = N_MAX;
- move16();
- if ( mct_on )
- {
- length = L_FRAME48k;
- move16();
- }
- FOR( Word16 i = 0; i < length; i++ )
- {
- common_pPowerSpectrum_exp = s_max( common_pPowerSpectrum_exp, exp_pPowerSpectrumParameter_fx[ch][i] );
- }
-
- FOR( Word16 i = 0; i < length; i++ )
- {
- common_pPowerSpectrum_fx[i] = L_shl( pPowerSpectrumParameter_fx[ch][i], sub( exp_pPowerSpectrumParameter_fx[ch][i], common_pPowerSpectrum_exp ) );
- move32();
- }
- pPowerSpectrumParameter_fx[ch] = common_pPowerSpectrum_fx;
- }
- IGF_ErodeSpectrum_ivas_fx( hIGFEnc[ch], sts[ch]->hTcxEnc->spectrum_fx[frameno], pPowerSpectrumParameter_fx[ch], common_pPowerSpectrum_exp, igfGridIdx, mct_on );
- }
- return;
-}
-
-
-/*-------------------------------------------------------------------*
- * IGFSaveSpectrumForITF()
- *
- *
- *-------------------------------------------------------------------*/
-
-void IGFSaveSpectrumForITF_ivas_fx(
- IGF_ENC_INSTANCE_HANDLE hIGFEnc, /* i/o: instance handle of IGF Encoder */
- const Word16 igfGridIdx, /* i : IGF grid index */
- const Word32 *pITFSpectrum, /* i : MDCT spectrum */
- Word16 exp_pITFSpectrum )
-{
- IGF_UpdateInfo( hIGFEnc, igfGridIdx );
-
- Copy32( pITFSpectrum + IGF_START_MN, hIGFEnc->spec_be_igf, sub( hIGFEnc->infoStopLine, IGF_START_MN ) );
-
- scale_sig32( hIGFEnc->spec_be_igf, sub( hIGFEnc->infoStopLine, IGF_START_MN ), sub( exp_pITFSpectrum, s_max( exp_pITFSpectrum, hIGFEnc->spec_be_igf_e ) ) );
- scale_sig32( hIGFEnc->spec_be_igf + sub( hIGFEnc->infoStopLine, IGF_START_MN ), sub( N_MAX_TCX - IGF_START_MN, sub( hIGFEnc->infoStopLine, IGF_START_MN ) ), sub( hIGFEnc->spec_be_igf_e, s_max( exp_pITFSpectrum, hIGFEnc->spec_be_igf_e ) ) );
- hIGFEnc->spec_be_igf_e = s_max( exp_pITFSpectrum, hIGFEnc->spec_be_igf_e );
- move16();
-
- return;
-}
-
-ivas_error IGF_Reconfig(
- IGF_ENC_INSTANCE_HANDLE *hIGFEnc, /* i/o: instance handle of IGF Encoder */
- const Word16 igf, /* i : IGF on/off */
- const Word16 reset, /* i : reset flag */
- const Word32 brate, /* i : bitrate for configuration */
- const Word16 bwidth, /* i : signal bandwidth */
- const Word16 element_mode, /* i : IVAS element mode */
- const Word16 rf_mode /* i : flag to signal the RF mode */
-)
-{
- ivas_error error;
-
- error = IVAS_ERR_OK;
- move32();
-
- test();
- test();
- test();
- IF( igf && *hIGFEnc == NULL )
- {
- IF( ( *hIGFEnc = (IGF_ENC_INSTANCE_HANDLE) malloc( sizeof( IGF_ENC_INSTANCE ) ) ) == NULL )
- {
- return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for hIGFEnc\n" ) );
- }
- IGFEncSetMode_ivas_fx( *hIGFEnc, brate, bwidth, element_mode, rf_mode );
- }
- ELSE IF( igf && reset )
- {
- IGFEncSetMode_ivas_fx( *hIGFEnc, brate, bwidth, element_mode, rf_mode );
- }
- ELSE IF( !igf && *hIGFEnc != NULL )
- {
- free( *hIGFEnc );
- *hIGFEnc = NULL;
- }
-
- return error;
-}
diff --git a/lib_enc/igf_enc_fx.c b/lib_enc/igf_enc_fx.c
index c57f5ffb014c41b53f7a2caeff06cac9fcd422e3..12ac6e337eec3705e599b7fa5543722020818433 100644
--- a/lib_enc/igf_enc_fx.c
+++ b/lib_enc/igf_enc_fx.c
@@ -13,35 +13,46 @@
#include "stat_enc.h"
#include "basop_util.h"
-/**********************************************************************/ /*
-write single bit to stream
-**************************************************************************/
+
+/*-------------------------------------------------------------------*
+ * IGF_write_bit_fx()
+ *
+ * write single bit to stream
+ *-------------------------------------------------------------------*/
+
static void IGF_write_bit_fx(
- BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
- Word16 *bitCount, /**< in/out: | bit counter */
- Word16 bit /**< in: | value of bit */
+ BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
+ Word16 *bitCount, /* i/o: bit counter */
+ const Word16 value /* i : value */
)
{
- IGFCommonFuncsWriteSerialBit( hBstr, bitCount, bit );
+ IF( hBstr )
+ {
+ push_next_indice( hBstr, value, 1 );
+ }
+
+ ( *bitCount ) = add( ( *bitCount ), 1 );
+ move16();
+
+ return;
}
-/**********************************************************************/ /*
-write bits to stream
-**************************************************************************/
+/*-------------------------------------------------------------------*
+ * IGF_write_bits()
+ *
+ * write bits to stream
+ *-------------------------------------------------------------------*/
+
static void IGF_write_bits(
- BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
- Word16 *bitCount, /**< in/out: | bit counter */
- Word16 value, /**< in: | value to be written */
- Word16 bits /**< in: Q0 | number of bits */
+ BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
+ Word16 *bitCount, /* i/o: bit counter */
+ const Word16 value, /* i/o: value */
+ Word16 bits /* i : number of bits */
)
{
- Word16 tmp;
-
- WHILE( bits )
+ WHILE( bits-- )
{
- bits = sub( bits, 1 );
- tmp = s_and( value, shl( 1, bits ) );
- IF( tmp == 0 )
+ IF( s_and( value, shl( 1, bits ) ) == 0 )
{
IGF_write_bit_fx( hBstr, bitCount, 0 );
}
@@ -55,15 +66,16 @@ static void IGF_write_bits(
}
-/**********************************************************************/ /*
+/**********************************************************************/ /*
envelope estimation
**************************************************************************/
-static void IGF_CalculateEnvelope( const IGF_ENC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Encoder */
- Word32 *pMDCTSpectrum, /**< in: Q31 | MDCT spectrum */
- Word16 MDCTSpectrum_e, /**< in: | exponent of MDCT spectrum */
- Word32 *pPowerSpectrum, /**< in: Q31 | MDCT^2 + MDST^2 spectrum, or estimate */
- Word16 PowerSpectrum_e, /**< in: | exponent of MDCT^2 + MDST^2 spectrum, or estimate */
- const Word16 igfGridIdx /**< in: Q0 | IGF grid index */
+static void IGF_CalculateEnvelope(
+ const IGF_ENC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Encoder */
+ Word32 *pMDCTSpectrum, /**< in: Q31 | MDCT spectrum */
+ Word16 MDCTSpectrum_e, /**< in: | exponent of MDCT spectrum */
+ Word32 *pPowerSpectrum, /**< in: Q31 | MDCT^2 + MDST^2 spectrum, or estimate */
+ Word16 PowerSpectrum_e, /**< in: | exponent of MDCT^2 + MDST^2 spectrum, or estimate */
+ const Word16 igfGridIdx /**< in: Q0 | IGF grid index */
)
{
@@ -277,16 +289,19 @@ static void IGF_CalculateEnvelope( const IGF_ENC_INSTANCE_HANDLE hInstance, /**<
return;
}
+
/**********************************************************************/ /*
writes IGF SCF values
**************************************************************************/
-static void IGF_WriteEnvelope( /**< out: Q0 | number of bits writen */
- const IGF_ENC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Encoder */
- BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
- Word16 *pBitOffset, /**< in: | ptr to bitOffset counter */
- const Word16 igfGridIdx, /**< in: Q0 | igf grid index see declaration of IGF_GRID_IDX for details */
- const Word16 isIndepFlag, /**< in: Q0 | if 1 frame is independent, 0 = frame is coded with data from previous frame */
- Word16 *igfAllZero /**< in: Q0 | returns 1 if all IGF scfs are zero, else 0 */
+
+/**< out: Q0 | number of bits writen */
+static void IGF_WriteEnvelope(
+ const IGF_ENC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Encoder */
+ BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
+ Word16 *pBitOffset, /**< in: | ptr to bitOffset counter */
+ const Word16 igfGridIdx, /**< in: Q0 | igf grid index see declaration of IGF_GRID_IDX for details */
+ const Word16 isIndepFlag, /**< in: Q0 | if 1 frame is independent, 0 = frame is coded with data from previous frame */
+ Word16 *igfAllZero /**< in: Q0 | returns 1 if all IGF scfs are zero, else 0 */
)
{
IGF_ENC_PRIVATE_DATA_HANDLE hPrivateData;
@@ -1232,15 +1247,20 @@ static void IGF_Whitening( const IGF_ENC_INSTANCE_HANDLE hInstance, /**< in
}
hPrivateData->wasTransient = isTransient;
move16();
+
+ return;
}
+
/**********************************************************************/ /*
write whitening levels into bitstream
**************************************************************************/
-static void IGF_WriteWhiteningTile_fx( /**< out: Q0 | number of bits written */
- BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
- Word16 *pBitOffset, /**< in: | ptr to bitOffset counter */
- Word16 whiteningLevel /**< in: Q0 | whitening levels to write */
+
+/**< out: Q0 | number of bits written */
+static void IGF_WriteWhiteningTile_fx(
+ BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
+ Word16 *pBitOffset, /**< in: | ptr to bitOffset counter */
+ Word16 whiteningLevel /**< in: Q0 | whitening levels to write */
)
{
IF( EQ_32( whiteningLevel, IGF_WHITENING_MID ) )
@@ -1259,6 +1279,8 @@ static void IGF_WriteWhiteningTile_fx( /**< ou
IGF_write_bits( hBstr, pBitOffset, 1, 1 );
}
}
+
+ return;
}
/**********************************************************************/ /*
@@ -1627,29 +1649,16 @@ hBstr->nb_bits_tot = sub( hBstr->nb_bits_tot, nb_bits_written );
return;
}
-/**********************************************************************/ /*
- IGF reset bitsream bit counter for TCX10 modes
- **************************************************************************/
-void IGFEncResetTCX10BitCounter_fx( const IGF_ENC_INSTANCE_HANDLE hInstance /**< in: | instance handle of IGF Encoder */
-)
-{
- IGF_ENC_PRIVATE_DATA_HANDLE hPrivateData;
- hPrivateData = &hInstance->igfData;
- hPrivateData->igfBitstreamBits = 0;
- move16();
- hInstance->infoTotalBitsWritten = 0;
- move16();
- return;
-}
+/**********************************************************************/ /*
+ IGF write concatenated bitsream for TCX10 modes
+**************************************************************************/
-/**********************************************************************/ /*
- IGF write concatenated bitsream for TCX10 modes
- **************************************************************************/
-Word16 IGFEncWriteConcatenatedBitstream_fx( /**< out: Q0 | total number of bits written */
- const IGF_ENC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Encoder */
- BSTR_ENC_HANDLE hBstr /* i/o: encoder bitstream handle */
+/**< out: Q0 | total number of bits written */
+Word16 IGFEncWriteConcatenatedBitstream_fx(
+ const IGF_ENC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Encoder */
+ BSTR_ENC_HANDLE hBstr /* i/o: encoder bitstream handle */
)
{
IGF_ENC_PRIVATE_DATA_HANDLE hPrivateData;
@@ -1809,3 +1818,2602 @@ ivas_error IGF_Reconfig_fx(
return error;
}
+
+
+#define INV_Log2_10_Q15 9864 /*1/log2(10) in Q15*/
+#define INV_Log2_10_Q12 1233 /*1/log2(10) in Q12*/
+#define INV_Log2_e_Q15 22713 /*1/log2(e) in Q15*/
+
+
+/*-------------------------------------------------------------------*
+ * IGF_getCrest_new()
+ *
+ * crest factor calculation
+ *-------------------------------------------------------------------*/
+
+/*! r: crest factor */
+static Word16 IGF_getCrest_new_fx(
+ const Word16 *logSpec, /* i : power spectrum */
+ const Word16 start, /* i : start subband index */
+ const Word16 stop, /* i : stop subband index */
+ Word16 *crest_exp /*Stores the exponent of the result(return value)*/
+)
+{
+ Word16 i;
+ Word16 x;
+ Word32 x_eff;
+ Word16 x_max;
+ Word16 exp;
+ Word16 temp;
+ Word16 temp_e;
+ Word16 crest; /*1.0f in Q15*/
+ x_eff = 0;
+ x_max = 0;
+ exp = 0;
+ temp = 0;
+ crest = 32767; /*1.0f in Q15*/
+ move32();
+ move16();
+ move16();
+ move16();
+ move16();
+
+ FOR( i = start; i < stop; i++ )
+ {
+ x = logSpec[i];
+ move16();
+ x_eff = L_mac0( x_eff, x, x );
+
+ if ( GT_16( x, x_max ) )
+ {
+ x_max = x;
+ move16();
+ }
+ }
+
+ x_eff = BASOP_Util_Divide3216_Scale( x_eff, sub( stop, start ), &temp_e );
+ temp_e = add( temp_e, 16 ); /*exp += 31 - 15 + 16(because x_eff is word32)*/
+ x_eff = L_shr( x_eff, sub( 15, temp_e ) );
+ temp_e = 15;
+ move16();
+ temp = Sqrt16( extract_l( x_eff ), &temp_e );
+
+ test();
+ IF( x_eff > 0 && x_max > 0 )
+ {
+ temp = BASOP_Util_Divide1616_Scale( x_max, temp, &exp );
+ exp = add( exp, sub( 15, temp_e ) );
+ IF( exp < 0 )
+ {
+ temp = shl( temp, exp );
+ exp = 0;
+ move16();
+ }
+ crest = s_max( shl_sat( 1, sub( 15, exp ) ), temp );
+ }
+ *crest_exp = exp;
+ move16();
+ return crest;
+}
+
+
+/*-------------------------------------------------------------------*
+ * IGF_getSFM_new()
+ *
+ * calculates spectral flatness measurement
+ *-------------------------------------------------------------------*/
+
+/*! r: SFM value */
+static Word16 IGF_getSFM_new_fx(
+ const Word32 *powerSpectrum, /* i : power spectrum */
+ const Word16 *logSpec, /* i : log of power spectrum */
+ const Word16 start, /* i : start subband index */
+ const Word16 stop, /* i : stop subband index */
+ Word16 *e_ps /*Stores exp related to power spectrum*/
+)
+{
+ Word16 n;
+ Word16 i;
+ Word16 num;
+ Word32 denom;
+ Word16 numf;
+ Word32 tmp;
+ Word16 sfm;
+ Word16 sfm_e;
+ Word16 denom_e;
+ Word16 numf_e; /*stores exponent for numf*/
+ Word16 tmp_e;
+
+ num = 0;
+ denom = ONE_IN_Q30;
+ denom_e = 1;
+ sfm = MAX16B; // Q15
+ move16();
+ move32();
+ move16();
+ move16();
+
+ FOR( i = start; i < stop; i++ )
+ {
+ tmp = powerSpectrum[i];
+ n = logSpec[i /*-start*/];
+ move32();
+ move16();
+ num = add( num, n );
+ denom = BASOP_Util_Add_Mant32Exp( tmp, e_ps[i], denom, denom_e, &denom_e );
+ }
+
+ numf = BASOP_Util_Divide1616_Scale( num, sub( stop, start ), &numf_e );
+ denom = BASOP_Util_Divide3216_Scale( denom, sub( stop, start ), &tmp_e );
+ denom_e = add( add( denom_e, tmp_e ), 1 ); /*denom_e+tmp_e-15 +16(because type of denom is word32)*/
+
+ IF( denom != 0 )
+ {
+ tmp = BASOP_util_Pow2( L_add( numf, shl_sat( 1, sub( 14, numf_e ) ) ), add( 16, numf_e ), &tmp_e );
+ sfm = BASOP_Util_Divide3232_Scale( tmp, denom, &sfm_e );
+ sfm_e = add( sfm_e, sub( tmp_e, denom_e ) );
+ sfm = shl_sat( extract_l( L_min( sfm, L_shl_sat( 1, sub( 15, sfm_e ) ) ) ), sfm_e );
+ }
+
+ return sfm;
+}
+/*-------------------------------------------------------------------*
+ * IGF_getTilt()
+ *
+ * calculates spectral tilt
+ *-------------------------------------------------------------------*/
+
+/*! r: spectral tilt value */
+
+/*-------------------------------------------------------------------*
+ * IGF_getTNR()
+ *
+ * calculates tonal-to-noise ratio
+ *-------------------------------------------------------------------*/
+
+/*! r: spectral tilt value */
+/* Returns value with exponent as 9 and Q as 22*/
+
+static Word32 IGF_getTNR_ivas_fx(
+ const Word32 *powerSpectrum, /* i : energies */
+ const Word16 start, /* i : start subband index */
+ const Word16 stop, /* i : stop subband index */
+ const Word16 adap, /* i : SFB width adaptation */
+ Word16 *e_ps, /*Stores exponent for powerSpectrum*/
+ Word16 e_adap /*Stores exponent for adap*/
+)
+{
+ Word16 i;
+ Word16 width;
+ Word32 avg;
+ Word32 tonal;
+ Word16 tonal_e; /* holds exp for tonal*/
+ Word32 noise;
+ Word16 noise_e; /* holds exp for noise*/
+ Word32 tonalToNoise;
+ Word32 rootSpec[300];
+ Word16 rootSpec_e[300]; /*rootSpec_e[i] holds exp for rootSpec[i]*/
+ Word16 avg_e; /* holds exp for avg*/
+ Word16 tmp_e;
+ avg = 0;
+ tonal = 0;
+ noise = EPSILON_FX;
+ tonal_e = 0;
+ noise_e = 0;
+ avg_e = 0;
+ tmp_e = 0;
+ move32();
+ move32();
+ move32();
+ move16();
+ move16();
+ move16();
+ move16();
+
+ set32_fx( rootSpec, 0, 300 );
+ set16_fx( rootSpec_e, 0, 300 );
+
+ width = sub( stop, start );
+ FOR( i = start; i < stop; i++ )
+ {
+ rootSpec_e[( i - start )] = e_ps[i];
+ move16();
+ rootSpec[( i - start )] = Sqrt32( powerSpectrum[i], &rootSpec_e[( i - start )] ); /*rootSpec[i - start] = sqrtf( powerSpectrum[i] );*/
+ move32();
+ avg = BASOP_Util_Add_Mant32Exp( avg, avg_e, rootSpec[( i - start )], rootSpec_e[( i - start )], &avg_e ); /*avg += rootSpec[i - start];resultant exponent is avg_e*/
+ }
+ avg = BASOP_Util_Divide3216_Scale( avg, width, &tmp_e ); /*avg /= width;*/
+ avg_e = add( 16, sub( add( avg_e, tmp_e ), 15 ) );
+
+ FOR( i = start; i < stop; i++ )
+ {
+ Word16 normSpec_e; /*stores resultant exponent for normSpec*/
+ Word16 normSpec = BASOP_Util_Divide3232_Scale( rootSpec[i - start], avg, &normSpec_e ); /*rootSpec[i - start] / avg;*/
+ normSpec_e = add( normSpec_e, sub( rootSpec_e[i - start], avg_e ) );
+ IF( GT_32( normSpec, L_add_sat( L_shl_sat( 1, sub( 15, normSpec_e ) ), L_shl_sat( adap, sub( e_adap, normSpec_e ) ) ) ) )
+ {
+ tonal = BASOP_Util_Add_Mant32Exp( tonal, tonal_e, rootSpec[( i - start )], rootSpec_e[( i - start )], &tonal_e ); /*tonal += rootSpec[i - start];*/
+ }
+ ELSE IF( LT_32( normSpec, L_shl_sat( 1, sub( 15, normSpec_e ) ) ) )
+ {
+ noise = BASOP_Util_Add_Mant32Exp( noise, noise_e, rootSpec[( i - start )], rootSpec_e[( i - start )], &noise_e ); /*noise += rootSpec[i - start];*/
+ }
+ }
+
+ /*tonalToNoise = 20.f * log10f( max( 1e-018f, tonal / noise ) )*/
+ IF( noise == 0 ) // To handle condition if denom = 0
+ {
+ tonalToNoise = imult3216( L_shr( L_add( L_shl( 18 /* log10f(1e-018f) */, Q25 ), Mpy_32_16_1( L_add( BASOP_Util_Log2( tonal ), L_shl( tonal_e, Q25 ) ) /*Q25*/, INV_Log2_10_Q15 ) /*25+15-15*/ ), 3 ) /*Q22*/, 20 );
+ }
+ ELSE
+ {
+ Word16 temp = BASOP_Util_Divide3232_Scale( tonal, noise, &tmp_e ); /*tonal / noise*/
+ tmp_e = add( tmp_e, sub( tonal_e, noise_e ) );
+ IF( GE_16( temp, 1 ) )
+ {
+ tonalToNoise = imult3216( Mult_32_16( L_add( BASOP_Util_Log2( temp ), L_shl( add( 16, tmp_e ), Q25 ) ) /*Q25*/, INV_Log2_10_Q12 ) /*25+12-15*/, 20 ); /*Q22*/
+ }
+ ELSE
+ {
+ tonalToNoise = -1509949440; /*-360.f Q22*/
+ move32();
+ }
+ }
+
+ return tonalToNoise;
+}
+
+/*-------------------------------------------------------------------*
+ * IGF_CalculateEnvelope()
+ *
+ * envelope estimation
+ *-------------------------------------------------------------------*/
+
+static void IGF_CalculateEnvelope_ivas_fx(
+ const IGF_ENC_INSTANCE_HANDLE hIGFEnc, /* i : instance handle of IGF Encoder */
+ Word32 *pMDCTSpectrum_fx, /* i : MDCT spectrum */
+ Word16 e_mdct, /* i : exp of MDCT spectrum */
+ Word32 *pPowerSpectrum_fx, /* i : MDCT^2 + MDST^2 spectrum, or estimate */
+ Word16 *e_ps, /* i : exp of power spectrum */
+ const Word16 igfGridIdx, /* i : IGF grid index */
+ const Word16 isTransient, /* i : flag indicating if transient is detected */
+ const Word16 last_core_acelp, /* i : indicator if last frame was ACELP core */
+ const Word16 element_mode, /* i : IVAS element_mode */
+ const Word16 att /* i : attenuation */
+)
+{
+ IGF_ENC_PRIVATE_DATA_HANDLE hPrivateData;
+ H_IGF_GRID hGrid;
+ Word16 *swb_offset;
+ Word16 sfb; /* this is the actual scalefactor band */
+ Word16 width; /* this is width in subbands of the actual scalefactor band */
+ Word16 tile_idx;
+ Word16 strt_cpy;
+ Word32 gain; /* the gain which has to be applied to the source tile to get the destination energy */
+ Word16 sb;
+ Word32 sfbEnergyR;
+ Word32 sfbEnergyC; /* the energy of the destination region of the tile */
+ Word32 sfbEnergyTileR;
+ Word32 sfbEnergyTileC; /* the energy of the destination region of the tile */
+ Word16 tmp, x, y;
+ Word16 mean_x_fx, mean_y_fx;
+ Word32 mean_xy_fx, mean_x2_fx;
+ Word16 tmp_tb;
+ Word16 tmp_sb;
+ Word16 sfbCnt;
+ Word16 sfm;
+ Word16 crest;
+ Word16 temp;
+ Word16 mean_x_e, mean_y_e; /*Stores exponent for mean_x and mean_y respectively*/
+ Word16 mean_xy_e, mean_x2_e; /*stores exponent for mean_xy and mean_x2 respectively*/
+ Word16 sfbEnergyTileR_e; /*Exponent for sfbEnergyTileR*/
+ Word16 sfbEnergyTileC_e; /*Exponent for sfbEnergyTileC*/
+ Word16 sfbEnergyC_e; /*Exponent for sfbEnergyC*/
+ Word16 sfbEnergyR_e;
+ Word16 gain_e; /*exponent for gain*/
+ Word16 tmp_tb_e; /*Stores exponent for tmp_tb*/
+ Word16 tmp_sb_e; /*stores exponent for tmp_sb*/
+ Word16 crest_exp; /*Stores the exponent of the result(return value)*/
+ Word16 sfm_exp; /*stores exponent for ouput from sfm*/
+ Word16 tmp_e;
+
+ hPrivateData = &hIGFEnc->igfData;
+ hGrid = &hPrivateData->igfInfo.grid[(Word16) igfGridIdx];
+ swb_offset = hGrid->swb_offset;
+
+ IF( element_mode > EVS_MONO )
+ {
+ IF( igfGridIdx != IGF_GRID_LB_NORM )
+ {
+ FOR( sfbCnt = 0; sfbCnt < sub( hGrid->sfbWrap[hGrid->nTiles], hGrid->sfbWrap[0] ); sfbCnt++ )
+ {
+ /* reset filter */
+ hPrivateData->prevSFM_FIR_SFB_TB_fx[sfbCnt] = 0; // exponent : hPrivateData->prevSFB_FIR_TB_e[sfbCnt]
+ hPrivateData->prevSFB_FIR_TB_e[sfbCnt] = 0;
+ hPrivateData->prevSFM_IIR_SFB_TB_fx[sfbCnt] = 0; // exponent : hPrivateData->prevSFB_IIR_TB_e[sfbCnt]
+ hPrivateData->prevSFB_IIR_TB_e[sfbCnt] = 0;
+ hPrivateData->prevSFM_FIR_SFB_SB_fx[sfbCnt] = 0; // exponent : hPrivateData->prevSFB_FIR_SB_e[sfbCnt]
+ hPrivateData->prevSFB_FIR_SB_e[sfbCnt] = 0;
+ hPrivateData->prevSFM_IIR_SFB_SB_fx[sfbCnt] = 0; // exponent : hPrivateData->prevSFB_IIR_SB_e[sfbCnt]
+ hPrivateData->prevSFB_IIR_SB_e[sfbCnt] = 0;
+ hPrivateData->prevDampingFactor_IIR_fx[sfbCnt] = MIN16B; /* -1.f in Q15*/
+ hPrivateData->prevDampingFactor_IIR_e[sfbCnt] = 0;
+ hPrivateData->dampingFactorSmoothing[sfbCnt] = 2;
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ }
+ }
+ }
+
+ IF( pPowerSpectrum_fx )
+ {
+ FOR( sb = hGrid->sbWrap[0]; sb < swb_offset[hGrid->sfbWrap[hGrid->nTiles]]; sb++ )
+ {
+ IF( LT_32( 1, pPowerSpectrum_fx[sb] ) )
+ {
+ hPrivateData->logSpec[sb] = s_max( 0, extract_l( W_extract_l( W_shr( W_add( BASOP_Util_Log2( pPowerSpectrum_fx[sb] ), W_shl( e_ps[sb], Q25 ) ), Q25 ) ) ) );
+ move16();
+ }
+ ELSE
+ {
+ hPrivateData->logSpec[sb] = 0;
+ move16();
+ }
+ }
+ }
+
+ FOR( tile_idx = 0; tile_idx < hGrid->nTiles; tile_idx++ )
+ {
+ strt_cpy = hGrid->sbWrap[tile_idx];
+ move16();
+
+ FOR( sfb = hGrid->sfbWrap[tile_idx]; sfb < hGrid->sfbWrap[tile_idx + 1]; sfb++ )
+ {
+ width = sub( swb_offset[sfb + 1], swb_offset[sfb] );
+ sfbEnergyTileR = EPSILON_FIX;
+ sfbEnergyTileC = EPSILON_FIX;
+ sfbEnergyC = EPSILON_FX;
+ sfbEnergyTileR_e = 0;
+ sfbEnergyTileC_e = 0;
+ sfbEnergyC_e = 0;
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+
+ IF( pPowerSpectrum_fx != NULL )
+ {
+ tmp = strt_cpy;
+ move16();
+ FOR( sb = swb_offset[sfb]; sb < swb_offset[sfb + 1]; sb++ )
+ {
+ Word16 shift = norm_l( pPowerSpectrum_fx[sb] );
+ sfbEnergyC = BASOP_Util_Add_Mant32Exp( sfbEnergyC, sfbEnergyC_e, L_shl( pPowerSpectrum_fx[sb], shift ), sub( e_ps[sb], shift ), &sfbEnergyC_e );
+ // sfbEnergyTileR = BASOP_Util_Add_Mant32Exp( sfbEnergyTileR, sfbEnergyTileR_e, Mult_32_32( pMDCTSpectrum_fx[strt_cpy], pMDCTSpectrum_fx[strt_cpy] ), shl( e_mdct, 1 ), &sfbEnergyTileR_e );
+ Word64 tmp64 = W_mult_32_32( pMDCTSpectrum_fx[strt_cpy], pMDCTSpectrum_fx[strt_cpy] );
+ Word16 tmp64_e = W_norm( tmp64 );
+ tmp64 = W_shl( tmp64, tmp64_e );
+
+ sfbEnergyTileR = BASOP_Util_Add_Mant32Exp( sfbEnergyTileR, sfbEnergyTileR_e, W_extract_h( tmp64 ), shl( e_mdct, 1 ) - tmp64_e, &sfbEnergyTileR_e );
+ shift = norm_l( pPowerSpectrum_fx[strt_cpy] );
+ sfbEnergyTileC = BASOP_Util_Add_Mant32Exp( sfbEnergyTileC, sfbEnergyTileC_e, L_shl( pPowerSpectrum_fx[strt_cpy], shift ), sub( e_ps[strt_cpy], shift ), &sfbEnergyTileC_e );
+
+ strt_cpy = add( strt_cpy, 1 );
+ }
+
+ sfbEnergyTileR = L_deposit_h( BASOP_Util_Divide3232_Scale( sfbEnergyTileR, width, &tmp_e ) );
+ sfbEnergyTileR_e = add( sub( sfbEnergyTileR_e, Q31 ), tmp_e );
+
+ IF( sfbEnergyTileR == 0 )
+ {
+ sfbEnergyTileR = EPSILON_FX;
+ sfbEnergyTileR_e = 0;
+ move32();
+ move16();
+ }
+ IF( sfbEnergyC == 0 )
+ {
+ sfbEnergyC = EPSILON_FX;
+ sfbEnergyC_e = 0;
+ move32();
+ move16();
+ }
+ IF( sfbEnergyTileC == 0 )
+ {
+ sfbEnergyTileC = EPSILON_FX;
+ sfbEnergyTileC_e = 0;
+ temp = BASOP_Util_Divide3232_Scale( sfbEnergyC, sfbEnergyTileC, &tmp_e );
+ tmp_e = add( tmp_e, sub( sfbEnergyC_e, sfbEnergyTileC_e ) );
+ move32();
+ move16();
+ }
+ ELSE
+ {
+ /*gain = (float) ( sfbEnergyTileR * ( sfbEnergyC / sfbEnergyTileC ) );*/
+ temp = BASOP_Util_Divide3232_Scale( sfbEnergyC, sfbEnergyTileC, &tmp_e );
+ tmp_e = add( tmp_e, sub( sfbEnergyC_e, sfbEnergyTileC_e ) );
+ }
+
+ gain = Mult_32_16( sfbEnergyTileR, temp ); // gain_e
+ gain_e = add( tmp_e, sfbEnergyTileR_e );
+
+ IF( element_mode > EVS_MONO )
+ {
+ test();
+ IF( !isTransient )
+ {
+ Word16 diffSFM;
+ Word16 shiftedSFM = 0;
+ Word16 shiftedSFM_e = 0;
+ move16();
+ move16();
+
+ // tmp_tb = IGF_getSFM_new( pPowerSpectrum, hPrivateData->logSpec, swb_offset[sfb], swb_offset[sfb + 1] ) / IGF_getCrest_new( hPrivateData->logSpec, swb_offset[sfb], swb_offset[sfb + 1] );
+ sfm = IGF_getSFM_new_fx( pPowerSpectrum_fx, hPrivateData->logSpec, swb_offset[sfb], swb_offset[sfb + 1], e_ps );
+ sfm_exp = 0;
+ move16();
+ crest = IGF_getCrest_new_fx( hPrivateData->logSpec, swb_offset[sfb], swb_offset[sfb + 1], &crest_exp );
+ tmp_tb = BASOP_Util_Divide1616_Scale( sfm, crest, &tmp_e ); // tmp_tb_e
+ tmp_tb_e = add( tmp_e, sub( sfm_exp, crest_exp ) );
+
+ // tmp_sb = IGF_getSFM_new( pPowerSpectrum, hPrivateData->logSpec, tmp, strt_cpy ) / IGF_getCrest_new( hPrivateData->logSpec, tmp, strt_cpy );
+ sfm = IGF_getSFM_new_fx( pPowerSpectrum_fx, hPrivateData->logSpec, tmp, strt_cpy, e_ps );
+ crest = IGF_getCrest_new_fx( hPrivateData->logSpec, tmp, strt_cpy, &crest_exp );
+ tmp_sb = BASOP_Util_Divide1616_Scale( sfm, crest, &tmp_e ); // tmp_sb_e
+ tmp_sb_e = add( tmp_e, sub( sfm_exp, crest_exp ) );
+
+ test();
+ IF( last_core_acelp || hPrivateData->wasTransient )
+ {
+ hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] = hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] = tmp_tb; /*Exponent for hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] : hPrivateData->prevSFB_FIR_TB_e[sfb] and hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] : hPrivateData->prevSFB_IIR_TB_e[sfb] */
+ hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] = hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] = tmp_sb; /*Exponent for hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] : hPrivateData->prevSFB_FIR_SB_e[sfb] and hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] : hPrivateData->prevSFB_IIR_SB_e[sfb] */
+ hPrivateData->prevSFB_FIR_TB_e[sfb] = hPrivateData->prevSFB_IIR_TB_e[sfb] = tmp_tb_e;
+ hPrivateData->prevSFB_FIR_SB_e[sfb] = hPrivateData->prevSFB_IIR_SB_e[sfb] = tmp_sb_e;
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ }
+
+ tmp_tb = shr( tmp_tb, 2 ); /*taking 2 guard bits so it's exponent tmp_sb_e=+2*/
+ tmp_sb = shr( tmp_sb, 2 ); /*taking 2 guard bits so it's exponent tmp_tb_e=+2 */
+ tmp_sb_e = add( tmp_sb_e, 2 );
+ tmp_tb_e = add( tmp_tb_e, 2 );
+
+ Word16 tmp0, tmp2, tmp3, tmp4;
+ Word16 tmp0_e, tmp2_e, tmp3_e, tmp4_e;
+ tmp0 = shr( hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb], 2 );
+ tmp0_e = add( hPrivateData->prevSFB_FIR_TB_e[sfb], 2 );
+ move16();
+ tmp2 = shr( hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb], 2 );
+ tmp2_e = add( hPrivateData->prevSFB_IIR_TB_e[sfb], 2 );
+ move16();
+ tmp3 = shr( hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb], 2 );
+ tmp3_e = add( hPrivateData->prevSFB_FIR_SB_e[sfb], 2 );
+ move16();
+ tmp4 = shr( hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb], 2 );
+ tmp4_e = add( hPrivateData->prevSFB_IIR_SB_e[sfb], 2 );
+ move16();
+ Word16 x1, x2;
+
+ Word16 x1_e = BASOP_Util_Add_MantExp( tmp0, tmp0_e, tmp2, tmp2_e - 1, &x1 );
+ Word16 x2_e = BASOP_Util_Add_MantExp( tmp3, tmp3_e, tmp4, tmp4_e - 1, &x2 );
+ hPrivateData->sfb_tb_e[sfb] = BASOP_Util_Add_MantExp( tmp_tb, tmp_tb_e, x1, x1_e, &hPrivateData->SFM_tb_fx[sfb] ); // hPrivateData->sfb_sb_e[sfb]
+ move16();
+ BASOP_Util_Add_MantExp( 22118, 2, negate( hPrivateData->SFM_tb_fx[sfb] ), hPrivateData->sfb_tb_e[sfb], &tmp );
+
+ IF( tmp < 0 )
+ {
+ hPrivateData->sfb_tb_e[sfb] = 2;
+ hPrivateData->SFM_tb_fx[sfb] = 22118;
+ move16();
+ move16();
+ }
+
+ hPrivateData->sfb_sb_e[sfb] = BASOP_Util_Add_MantExp( tmp_sb, tmp_sb_e, x2, x2_e, &hPrivateData->SFM_sb_fx[sfb] ); // hPrivateData->sfb_tb_e[sfb]
+ move16();
+ BASOP_Util_Add_MantExp( 22118, 2, negate( hPrivateData->SFM_sb_fx[sfb] ), hPrivateData->sfb_sb_e[sfb], &tmp );
+
+ IF( tmp < 0 )
+ {
+ hPrivateData->sfb_sb_e[sfb] = 2;
+ hPrivateData->SFM_sb_fx[sfb] = 22118;
+ move16();
+ move16();
+ }
+
+ BASOP_Util_Add_MantExp( hPrivateData->SFM_sb_fx[sfb], hPrivateData->sfb_sb_e[sfb], negate( hPrivateData->SFM_tb_fx[sfb] ), hPrivateData->sfb_tb_e[sfb], &diffSFM );
+
+ test();
+ IF( diffSFM > 0 && LT_32( hPrivateData->SFM_tb_fx[sfb], L_shr( 3277 /*0.1 Q15*/, hPrivateData->sfb_tb_e[sfb] ) ) ) /* check whether target SFB is more tonal than source SFB */
+ {
+ Word16 currDampingFactor, dampingFactor;
+ Word16 slope, threshold;
+ Word16 alpha;
+ Word16 slope_e, threshold_e, currDampingFactor_e, dampingFactor_e, alpha_e;
+
+ /* calculate spectral tilt to detect sudden drops (or increases) in energy in the current SFB */
+ // slope = IGF_getTilt_fx( pPowerSpectrum, swb_offset[sfb], swb_offset[sfb + 1], e_ps, &slope_e );
+
+ x = 1;
+ mean_x_fx = mean_y_fx = 0;
+ Word32 mean_y_fx_tmp = 0;
+ move32();
+ mean_xy_fx = mean_x2_fx = 0;
+ mean_x_e = 15;
+ mean_xy_e = mean_y_e = mean_x2_e = 31;
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+
+ FOR( sb = swb_offset[sfb]; sb < swb_offset[sfb + 1]; sb++ )
+ {
+ mean_x_fx = add( mean_x_fx, x ); /*Q0*/
+ mean_x2_fx = L_add( mean_x2_fx, L_mult0( x, x ) ); /*Q0*/
+
+ /*y = 20.f * log10f( max( 1.f, powerSpectrum[i] ) );*/
+ IF( LE_64( W_deposit32_l( pPowerSpectrum_fx[sb] ), W_shl( 1, ( sub( 31, e_ps[sb] ) ) ) ) )
+ {
+ y = 0;
+ move16();
+ }
+ ELSE
+ {
+ y = imult1616( 20, extract_l( L_shr( Mult_32_16( ( L_add( BASOP_Util_Log2( pPowerSpectrum_fx[sb] ), L_shl( e_ps[sb], Q25 ) ) ), INV_Log2_10_Q15 ), Q25 ) ) ); /*Q0*/
+ }
+ mean_y_fx_tmp = L_mac0( mean_y_fx_tmp, y, 1 ); /*Q0*/
+ mean_xy_fx = L_add( mean_xy_fx, L_mult0( y, x ) ); /*Q0*/
+
+ x = add( x, 1 );
+ }
+ mean_y_fx = BASOP_Util_Divide3216_Scale( mean_y_fx_tmp, width, &tmp_e ); /* mean_y_e*/
+
+ mean_y_e = add( mean_y_e, sub( tmp_e, 15 ) );
+ mean_x_fx = BASOP_Util_Divide1616_Scale( mean_x_fx, width, &tmp_e ); /* mean_x_e*/
+ mean_x_e = add( mean_x_e, sub( tmp_e, 15 ) );
+ mean_xy_fx = BASOP_Util_Divide3216_Scale( mean_xy_fx, width, &tmp_e ); /* mean_xy_e*/
+ mean_xy_e = add( mean_xy_e, sub( tmp_e, 15 ) );
+ mean_x2_fx = BASOP_Util_Divide3216_Scale( mean_x2_fx, width, &tmp_e ); /* mean_x2_e*/
+ mean_x2_e = add( mean_x2_e, sub( tmp_e, 15 ) );
+
+ /*slope = ( mean_xy - mean_x * mean_y ) / ( mean_x2 - mean_x * mean_x );*/
+ slope = BASOP_Util_Divide3232_Scale( ( L_sub( mean_xy_fx, L_shl( mult( mean_x_fx, mean_y_fx ), sub( add( mean_x_e, mean_y_e ), mean_xy_e ) ) ) ), ( L_sub( mean_x2_fx, L_shl( mult( mean_x_fx, mean_x_fx ), sub( add( mean_x_e, mean_x_e ), mean_x2_e ) ) ) ), &slope_e );
+ slope_e = add( slope_e, sub( mean_xy_e, mean_x2_e ) );
+
+ /* determine whether strong tilt is due to a step in the spectrum (e.g. band limitation, no damping)
+ or a tonal component close the band border (apply damping) by calculating SFM for a shift of 1/2 SFB width*/
+ threshold = BASOP_Util_Divide1616_Scale( 60, width, &threshold_e );
+
+ test();
+ IF( EQ_16( BASOP_Util_Cmp_Mant32Exp( slope, add( slope_e, 16 ), negate( threshold ), add( threshold_e, 16 ) ), -1 ) )
+ {
+ Word16 shift = shr( width, 1 );
+ sfm = IGF_getSFM_new_fx( pPowerSpectrum_fx, hPrivateData->logSpec, swb_offset[sfb] - shift, swb_offset[sfb + 1] - shift, e_ps );
+ crest = IGF_getCrest_new_fx( hPrivateData->logSpec, swb_offset[sfb] - shift, swb_offset[sfb + 1] - shift, &crest_exp );
+ shiftedSFM = BASOP_Util_Divide1616_Scale( sfm, crest, &shiftedSFM_e );
+ }
+ ELSE IF( EQ_16( BASOP_Util_Cmp_Mant32Exp( slope, add( slope_e, 16 ), threshold, add( threshold_e, 16 ) ), 1 ) && ( NE_16( sfb, sub( hGrid->sfbWrap[hGrid->nTiles], 1 ) ) ) )
+ {
+ Word16 shift = shr( width, 1 );
+ shiftedSFM = BASOP_Util_Divide1616_Scale( IGF_getSFM_new_fx( pPowerSpectrum_fx, hPrivateData->logSpec, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift, e_ps ), IGF_getCrest_new_fx( hPrivateData->logSpec, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift, &crest_exp ), &tmp_e );
+ sfm = IGF_getSFM_new_fx( pPowerSpectrum_fx, hPrivateData->logSpec, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift, e_ps );
+ crest = IGF_getCrest_new_fx( hPrivateData->logSpec, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift, &crest_exp );
+ shiftedSFM = BASOP_Util_Divide1616_Scale( sfm, crest, &shiftedSFM_e );
+ }
+ shiftedSFM_e = add( shiftedSFM_e, sub( sfm_exp, crest_exp ) );
+
+ IF( GT_32( shiftedSFM, L_shl( 1311 /*0.04f Q15*/, negate( shiftedSFM_e ) ) ) )
+ {
+ currDampingFactor = 32767; /*1.f Q15*/
+ currDampingFactor_e = 0;
+ move16();
+ move16();
+ }
+ ELSE
+ {
+ // alpha = min( 320.f / (float) swb_offset[sfb + 1], 1.25f );
+ temp = BASOP_Util_Divide1616_Scale( 320, swb_offset[sfb + 1], &alpha_e );
+ alpha = extract_l( L_min( temp, L_shl( 20480 /*1.25 Q14*/, sub( 1, alpha_e ) ) ) ); // alpha_e
+
+ // currDampingFactor = expf( 1.25f * alpha * logf( hPrivateData->SFM_tb[sfb] / hPrivateData->SFM_sb[sfb] ) );
+ temp = BASOP_Util_Divide1616_Scale( hPrivateData->SFM_tb_fx[sfb], hPrivateData->SFM_sb_fx[sfb], &tmp_e ); // tmp_e
+ tmp_e = add( tmp_e, sub( hPrivateData->sfb_tb_e[sfb], hPrivateData->sfb_sb_e[sfb] ) );
+ Word16 temp1 = mult( 20480 /* 1.25f in Q14 */, alpha );
+ Word16 tmp1_e = add( 1, alpha_e );
+ currDampingFactor = round_fx( BASOP_util_Pow2( Mpy_32_16_1( L_add( BASOP_Util_Log2( temp ), L_shl_sat( add( 16, tmp_e ), 25 ) ), temp1 ), add( tmp1_e, 6 ), &currDampingFactor_e ) ); // currDampingFactor_e
+
+ /* calculate tonal-to-noise ratio and reduce damping for low values*/
+
+ Word32 tonalToNoise;
+ Word16 adap;
+ Word16 adap_e; /*stores exp for adap*/
+ Word16 tonalToNoise_e; /*stores exponent for tonalToNoise*/
+ tonalToNoise_e = 9;
+ move16();
+ adap = BASOP_Util_Divide1616_Scale( width, 40, &adap_e );
+ tonalToNoise = IGF_getTNR_ivas_fx( pPowerSpectrum_fx, swb_offset[sfb], swb_offset[sfb + 1], adap, e_ps, adap_e ); /*Q22*/
+
+ IF( EQ_16( BASOP_Util_Cmp_Mant32Exp( tonalToNoise, tonalToNoise_e, L_add( L_shl( 10, sub( 15, adap_e ) ), adap ), add( 16, adap_e ) ), -1 ) )
+ {
+ // currDampingFactor += 0.03f * ( ( 10 + adap ) - tonalToNoise );
+ Word32 temp2 = BASOP_Util_Add_Mant32Exp( L_add( L_shl( 10, sub( 15, adap_e ) ) /*exp:adap_e*/, adap ), add( adap_e, 16 ), L_negate( tonalToNoise ), tonalToNoise_e, &tmp_e ); // tmp_e
+ currDampingFactor_e = BASOP_Util_Add_MantExp( currDampingFactor, currDampingFactor_e, extract_l( Mult_32_32( 983 /*0.03f Q15*/, temp2 ) ), tmp_e, &currDampingFactor ); // currDampingFactor_e
+ }
+ }
+
+ Word32 L_tmp = hPrivateData->prevDampingFactor_IIR_fx[sfb];
+ move32();
+ L_tmp = L_shl( L_tmp, hPrivateData->prevDampingFactor_IIR_e[sfb] );
+ test();
+ test();
+ IF( last_core_acelp || hPrivateData->wasTransient || EQ_32( L_tmp, MIN16B ) )
+ {
+ tmp = BASOP_Util_Cmp_Mant32Exp( currDampingFactor, currDampingFactor_e, 3277 /* 0.1f in Q15 */, 0 );
+ IF( tmp >= 0 )
+ {
+ hPrivateData->prevDampingFactor_IIR_fx[sfb] = currDampingFactor;
+ hPrivateData->prevDampingFactor_IIR_e[sfb] = currDampingFactor_e;
+ move16();
+ move16();
+ }
+ ELSE
+ {
+ hPrivateData->prevDampingFactor_IIR_fx[sfb] = 3277; /* 0.1 in Q15 */
+ hPrivateData->prevDampingFactor_IIR_e[sfb] = 0;
+ move16();
+ move16();
+ }
+ }
+ IF( last_core_acelp )
+ {
+ hPrivateData->dampingFactorSmoothing[sfb] = 2;
+ move16();
+ }
+
+ dampingFactor_e = BASOP_Util_Add_MantExp( currDampingFactor, currDampingFactor_e, hPrivateData->prevDampingFactor_IIR_fx[sfb], hPrivateData->prevDampingFactor_IIR_e[sfb], &dampingFactor ); // dampingFactor_e
+ dampingFactor = shr( dampingFactor, 1 );
+
+ gain = Mult_32_16( gain, shl_sat( extract_l( L_min( L_add( dampingFactor, Mult_32_16( L_shl( hPrivateData->dampingFactorSmoothing[sfb], sub( 15, dampingFactor_e ) ) /*Q:15-dampingFactor_e*/, 3277 /*0.1f Q15*/ ) /*Q:15-dampingFactor_e*/ ), shl_sat( 1, sub( 15, dampingFactor_e ) ) ) ), dampingFactor_e ) /*Q15*/ );
+
+ hPrivateData->prevDampingFactor_IIR_fx[sfb] = dampingFactor;
+ move16();
+ hPrivateData->prevDampingFactor_IIR_e[sfb] = dampingFactor_e;
+ move16();
+ if ( hPrivateData->dampingFactorSmoothing[sfb] > 0 )
+ {
+ hPrivateData->dampingFactorSmoothing[sfb] = sub( hPrivateData->dampingFactorSmoothing[sfb], 1 );
+ move16();
+ }
+ }
+ ELSE
+ {
+ hPrivateData->prevDampingFactor_IIR_fx[sfb] = MIN16B; // exponent : hPrivateData->prevDampingFactor_IIR_e[sfb]
+ hPrivateData->prevDampingFactor_IIR_e[sfb] = 0;
+ hPrivateData->dampingFactorSmoothing[sfb] = 1;
+ move16();
+ move16();
+ move16();
+ }
+
+ hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] = tmp_tb; // hPrivateData->prevSFB_FIR_TB_e[sfb]
+ hPrivateData->prevSFB_FIR_TB_e[sfb] = tmp_tb_e;
+ hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] = hPrivateData->SFM_tb_fx[sfb]; // hPrivateData->prevSFB_IIR_TB_e[sfb]
+ hPrivateData->prevSFB_IIR_TB_e[sfb] = hPrivateData->sfb_tb_e[sfb];
+ hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] = tmp_sb; // hPrivateData->prevSFB_FIR_SB_e[sfb]
+ hPrivateData->prevSFB_FIR_SB_e[sfb] = tmp_sb_e;
+ hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] = hPrivateData->SFM_sb_fx[sfb]; // hPrivateData->prevSFB_IIR_SB_e[sfb]
+ hPrivateData->prevSFB_IIR_SB_e[sfb] = hPrivateData->sfb_sb_e[sfb];
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ }
+ ELSE
+ {
+ hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] = 0; // hPrivateData->prevSFB_FIR_TB_e[sfb]
+ hPrivateData->prevSFB_FIR_TB_e[sfb] = 0;
+ hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] = 0; // hPrivateData->prevSFB_IIR_TB_e[sfb]
+ hPrivateData->prevSFB_IIR_TB_e[sfb] = 0;
+ hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] = 0; // hPrivateData->prevSFB_IIR_TB_e[sfb]
+ hPrivateData->prevSFB_FIR_SB_e[sfb] = 0;
+ hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] = 0; // hPrivateData->prevSFB_IIR_SB_e[sfb]
+ hPrivateData->prevSFB_IIR_SB_e[sfb] = 0;
+ hPrivateData->prevDampingFactor_IIR_fx[sfb] = MIN16B; /* hPrivateData->prevDampingFactor_IIR_e[sfb]*/
+ hPrivateData->prevDampingFactor_IIR_e[sfb] = 0;
+ hPrivateData->dampingFactorSmoothing[sfb] = 2;
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ }
+ }
+ }
+ ELSE
+ {
+ tmp_e = e_mdct;
+ move16();
+ sfbEnergyR = add_sat( EPSILON_FX, BASOP_Util_Divide3216_Scale( sum2_32_fx( pMDCTSpectrum_fx + swb_offset[sfb], width, &tmp_e ) /*exp: tmp_e*/, width, &sfbEnergyR_e ) ); // sfbEnergyR_e
+ sfbEnergyR_e = add( sfbEnergyR_e, add( tmp_e, -15 ) );
+ gain = L_shl( sfbEnergyR, 16 ); // gain_e
+ move32();
+ gain_e = sfbEnergyR_e;
+
+ IF( element_mode > EVS_MONO )
+ {
+ hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] = 0; // hPrivateData->prevSFB_FIR_TB_e[sfb]
+ hPrivateData->prevSFB_FIR_TB_e[sfb] = 0;
+ hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] = 0; // hPrivateData->prevSFB_IIR_TB_e[sfb]
+ hPrivateData->prevSFB_IIR_TB_e[sfb] = 0;
+ hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] = 0; // hPrivateData->prevSFB_IIR_TB_e[sfb]
+ hPrivateData->prevSFB_FIR_SB_e[sfb] = 0;
+ hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] = 0; // hPrivateData->prevSFB_IIR_SB_e[sfb]
+ hPrivateData->prevSFB_IIR_SB_e[sfb] = 0;
+ hPrivateData->prevDampingFactor_IIR_fx[sfb] = MIN16B; /* hPrivateData->prevDampingFactor_IIR_e[sfb]*/
+ hPrivateData->prevDampingFactor_IIR_e[sfb] = 0;
+ hPrivateData->dampingFactorSmoothing[sfb] = 2;
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ }
+ }
+
+ gain = Mult_32_16( gain, att ); // gain_e
+ gain_e = add( gain_e, 0 );
+
+ /*gain=0.5f+log2f(gain)*2+16 becuase 2.885390081777927f=2*1/loge(2) so 2*1/loge(2)*loge(x) can be written as 2*log2(x)*/
+ gain = L_add( ONE_IN_Q22, L_add( L_add( L_shr( BASOP_Util_Log2( gain ), 1 ), L_shl( gain_e, Q24 ) ), L_shl( 16, Q23 ) ) ); /*Q23*/
+ test();
+ test();
+ IF( !isTransient && ( EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_SWB_48000_CPE ) || EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_FB_48000_CPE ) ) )
+ {
+ gain = L_add( gain, ONE_IN_Q21 ); /* better preservation of original HF band energy */
+ }
+ test();
+ test();
+ IF( !isTransient && ( EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_SWB_64000_CPE ) || EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_FB_64000_CPE ) ) )
+ {
+ gain = L_add( gain, ONE_IN_Q20 );
+ }
+ gain = L_min( gain, 91 << Q23 ); /* 13+15+63, see arithcode encode residual */
+ gain = L_max( gain, 0 );
+ gain_e = 8; /* stores exponent for gain_fx*/
+ move16();
+ hPrivateData->igfScfQuantized[sfb] = extract_l( L_shr( gain, Q23 ) ); /*Q0*/
+ move16();
+ }
+ }
+
+ return;
+}
+
+/*-------------------------------------------------------------------*
+ * IGF_CalculateStereoEnvelope_fx()
+ *
+ * envelope estimation
+
+ *-------------------------------------------------------------------*/
+static void IGF_CalculateStereoEnvelope_fx(
+ const IGF_ENC_INSTANCE_HANDLE hIGFEnc, /* i : instance handle of IGF Encoder */
+ const Word32 *pMDCTSpectrum_fx, /* i : MDCT spectrum */
+ Word16 pMDCTSpectrum_e, /* i : exponent for pMDCTSpectrum_fx */
+ const Word32 *pMDCTSpectrumMsInv_fx, /* i : MDCT spectrum */
+ Word16 pMDCTSpectrumMsInv_e, /* i : expontent for pMDCTSpectrumMsInv_fx */
+ const Word32 *pPowerSpectrum_fx, /* i : MDCT^2 + MDST^2 spectrum, or estimate */
+ Word16 *pPowerSpectrum_e, /* i : exponent for pPowerSpectrum_fx */
+ const Word32 *pPowerSpectrumMsInv_fx, /* i : inverse power spectrum */
+ Word16 *q_pPowerSpectrumMsInv, /* i : Q for pPowerSpectrumMsInv_fx */
+ const Word16 igfGridIdx, /* i : IGF grid index */
+ const Word16 coreMsMask[N_MAX], /* i : line wise ms Mask */
+ const Word16 isTransient, /* i : flag indicating if transient is detected */
+ const Word16 last_core_acelp, /* i : indicator if last frame was ACELP core */
+ const Word16 mct_on )
+{
+ IGF_ENC_PRIVATE_DATA_HANDLE hPrivateData;
+ H_IGF_GRID hGrid;
+ Word16 *swb_offset;
+ Word16 sfb; /* this is the actual scalefactor band */
+ Word16 width; /* this is width in subbands of the actual scalefactor band */
+ Word16 tile_idx;
+ Word16 strt_cpy;
+ Word32 gain_fx; /* the gain which has to be applied to the source tile to get the destination energy */
+ Word16 sb;
+ Word16 sfbEnergyR_fx;
+ Word32 sfbEnergyC_fx; /* the energy of the destination region of the tile */
+ Word32 sfbEnergyTileR_fx;
+ Word32 sfbEnergyTileC_fx; /* the energy of the destination region of the tile */
+ Word16 tmp, x, y;
+ Word16 mean_x_fx, mean_y_fx;
+ Word32 mean_xy_fx, mean_x2_fx;
+ Word16 slope_fx;
+ Word16 tmp_tb_fx;
+ Word16 tmp_sb_fx;
+ Word16 sfbCnt;
+ Word32 tileSrcSpec_fx[MAX_IGF_SFB_LEN];
+ Word16 sfm;
+ Word16 crest;
+ Word16 temp;
+ Word16 mean_x_e, mean_y_e; /*Stores exponent for mean_x and mean_y respectively*/
+ Word16 mean_xy_e, mean_x2_e; /*stores exponent for mean_xy and mean_x2 respectively*/
+ Word16 tileSrcSpec_e[MAX_IGF_SFB_LEN]; /*Exponent for tileSrcSpec_fx*/
+ Word16 sfbEnergyTileR_e; /*Exponent for sfbEnergyTileR_fx*/
+ Word16 sfbEnergyTileC_e; /*Exponent for sfbEnergyTileC_fx*/
+ Word16 sfbEnergyC_e; /*Exponent for sfbEnergyC_fx*/
+ Word16 gain_e; /*exponent for gain_fx*/
+ Word16 crest_exp; /*stores exponent for output from crest*/
+ Word16 sfm_exp; /*stores exponent for ouput from sfm*/
+ Word16 tmp_tb_e; /*Stores exponent for tmp_tb_fx*/
+ Word16 tmp_sb_e; /*stores exponent for tmp_sb_fx*/
+ Word16 slope_e; /*stores exponent for slope_fx*/
+ Word16 sfbEnergyR_e; /*stores exponent for sfbEnergyR*/
+ Word16 tmp_e;
+ Word32 temp_pPowerSpectrumMsInv[N_MAX], length;
+ Word16 q_temp_pPowerSpectrumMsInv = Q31, i;
+ move16();
+
+ IF( pPowerSpectrumMsInv_fx != NULL )
+ {
+ length = N_MAX;
+ move16();
+ if ( mct_on )
+ {
+ length = L_FRAME48k;
+ move16();
+ }
+ FOR( i = 0; i < length; i++ )
+ {
+ IF( pPowerSpectrumMsInv_fx[i] != 0 )
+ {
+ q_temp_pPowerSpectrumMsInv = s_min( q_temp_pPowerSpectrumMsInv, add( q_pPowerSpectrumMsInv[i], norm_l( pPowerSpectrumMsInv_fx[i] ) ) );
+ }
+ }
+ FOR( i = 0; i < length; i++ )
+ {
+ temp_pPowerSpectrumMsInv[i] = L_shl( pPowerSpectrumMsInv_fx[i], sub( q_temp_pPowerSpectrumMsInv, q_pPowerSpectrumMsInv[i] ) );
+ move32();
+ }
+ }
+
+ hPrivateData = &hIGFEnc->igfData;
+ hGrid = &hPrivateData->igfInfo.grid[(Word16) igfGridIdx];
+ swb_offset = hGrid->swb_offset;
+ move16();
+
+ IF( igfGridIdx != IGF_GRID_LB_NORM )
+ {
+ FOR( sfbCnt = 0; sfbCnt < sub( hGrid->sfbWrap[hGrid->nTiles], hGrid->sfbWrap[0] ); sfbCnt++ )
+ {
+ /* reset filter */
+ hPrivateData->prevSFM_FIR_SFB_TB_fx[sfbCnt] = 0; // exponent : hPrivateData->prevSFB_FIR_TB_e[sfbCnt]
+ hPrivateData->prevSFM_IIR_SFB_TB_fx[sfbCnt] = 0; // exponent : hPrivateData->prevSFB_IIR_TB_e[sfbCnt]
+ hPrivateData->prevSFM_FIR_SFB_SB_fx[sfbCnt] = 0; // exponent : hPrivateData->prevSFB_FIR_SB_e[sfbCnt]
+ hPrivateData->prevSFM_IIR_SFB_SB_fx[sfbCnt] = 0; // exponent : hPrivateData->prevSFB_IIR_SB_e[sfbCnt]
+ hPrivateData->prevSFB_FIR_TB_e[sfbCnt] = 0;
+ hPrivateData->prevSFB_IIR_TB_e[sfbCnt] = 0;
+ hPrivateData->prevSFB_FIR_SB_e[sfbCnt] = 0;
+ hPrivateData->prevSFB_IIR_SB_e[sfbCnt] = 0;
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ }
+ }
+
+ IF( pPowerSpectrum_fx )
+ {
+ FOR( sb = hGrid->sbWrap[0]; sb < swb_offset[hGrid->sfbWrap[hGrid->nTiles]]; sb++ )
+ {
+ /*hPrivateData->logSpec[sb] = max( 0, (Word16) ( logf( max( FLT_MIN, pPowerSpectrum[sb] ) ) * INV_LOG_2 ) );*/
+ IF( LE_32( 1, pPowerSpectrum_fx[sb] ) )
+ {
+ hPrivateData->logSpec[sb] = s_max( 0, (Word16) L_shr( L_add( BASOP_Util_Log2( pPowerSpectrum_fx[sb] ), L_shl( pPowerSpectrum_e[sb], Q25 ) ), 25 ) );
+ }
+ ELSE
+ {
+ hPrivateData->logSpec[sb] = 0; /*max(0,-126) is always 0*/
+ }
+ move16();
+ }
+ }
+
+ FOR( tile_idx = 0; tile_idx < hGrid->nTiles; tile_idx++ )
+ {
+ strt_cpy = hGrid->sbWrap[tile_idx];
+ move16();
+
+ FOR( sfb = hGrid->sfbWrap[tile_idx]; sfb < hGrid->sfbWrap[tile_idx + 1]; sfb++ )
+ {
+ width = sub( swb_offset[sfb + 1], swb_offset[sfb] );
+ sfbEnergyTileR_fx = EPSILON_FX;
+ sfbEnergyTileC_fx = EPSILON_FX;
+ sfbEnergyC_fx = EPSILON_FX;
+ sfbEnergyTileR_e = 0;
+ sfbEnergyTileC_e = 0;
+ sfbEnergyC_e = 0;
+ move16();
+ move16();
+ move16();
+ move32();
+ move32();
+ move32();
+ IF( pPowerSpectrum_fx )
+ {
+ Word16 final_exp;
+ Word16 norm_exp;
+ Word32 scaled_value;
+ tmp = strt_cpy;
+ move16();
+
+ FOR( sb = swb_offset[sfb]; sb < swb_offset[sfb + 1]; sb++ )
+ {
+ IF( NE_16( coreMsMask[sb], coreMsMask[strt_cpy] ) )
+ {
+ sfbEnergyC_fx = BASOP_Util_Add_Mant32Exp( sfbEnergyC_fx, sfbEnergyC_e, pPowerSpectrum_fx[sb], pPowerSpectrum_e[sb], &sfbEnergyC_e ); /*resultant exponent is stored in sfbEnergyC_e*/
+ norm_exp = norm_l( pMDCTSpectrumMsInv_fx[strt_cpy] );
+ final_exp = sub( pMDCTSpectrumMsInv_e, norm_exp );
+ scaled_value = L_shl( pMDCTSpectrumMsInv_fx[strt_cpy], norm_exp );
+ sfbEnergyTileR_fx = BASOP_Util_Add_Mant32Exp( sfbEnergyTileR_fx, sfbEnergyTileR_e, Mult_32_32( scaled_value, scaled_value ), shl( final_exp, 1 ), &sfbEnergyTileR_e ); /*resultant exponent is stored in sfbEnergyTileR_e*/
+ sfbEnergyTileC_fx = BASOP_Util_Add_Mant32Exp( sfbEnergyTileC_fx, sfbEnergyTileC_e, pPowerSpectrumMsInv_fx[strt_cpy], sub( 31, q_pPowerSpectrumMsInv[strt_cpy] ), &sfbEnergyTileC_e ); /*resultant exponent is stored in sfbEnergyTileC_e*/
+ tileSrcSpec_fx[strt_cpy - tmp] = temp_pPowerSpectrumMsInv[strt_cpy]; /*resultant exponent is stored in tileSrcSpec_e*/
+ tileSrcSpec_e[strt_cpy - tmp] = sub( 31, q_temp_pPowerSpectrumMsInv );
+ }
+ ELSE
+ {
+ sfbEnergyC_fx = BASOP_Util_Add_Mant32Exp( sfbEnergyC_fx, sfbEnergyC_e, pPowerSpectrum_fx[sb], pPowerSpectrum_e[sb], &sfbEnergyC_e ); /*resultant exponent is stored in sfbEnergyC_e*/
+ norm_exp = norm_l( pMDCTSpectrum_fx[strt_cpy] );
+ final_exp = sub( pMDCTSpectrum_e, norm_exp );
+ scaled_value = L_shl( pMDCTSpectrum_fx[strt_cpy], norm_exp );
+ sfbEnergyTileR_fx = BASOP_Util_Add_Mant32Exp( sfbEnergyTileR_fx, sfbEnergyTileR_e, Mult_32_32( scaled_value, scaled_value ), shl( final_exp, 1 ), &sfbEnergyTileR_e ); /*resultant exponent is stored in sfbEnergyTileR_e*/
+ sfbEnergyTileC_fx = BASOP_Util_Add_Mant32Exp( sfbEnergyTileC_fx, sfbEnergyTileC_e, pPowerSpectrum_fx[strt_cpy], pPowerSpectrum_e[strt_cpy], &sfbEnergyTileC_e ); /*resultant exponent is stored in sfbEnergyTileC_e*/
+ tileSrcSpec_fx[strt_cpy - tmp] = pPowerSpectrum_fx[strt_cpy]; /*resultant exponent is stored in tileSrcSpec_e*/
+ tileSrcSpec_e[strt_cpy - tmp] = pPowerSpectrum_e[strt_cpy];
+ }
+ move32();
+ move16();
+ strt_cpy = add( strt_cpy, 1 );
+ }
+
+ sfbEnergyTileR_fx = BASOP_Util_Divide3216_Scale( sfbEnergyTileR_fx, width, &tmp_e );
+ sfbEnergyTileR_e = sub( add( sfbEnergyTileR_e, tmp_e ), 15 ); /*stores the resultant exponent for sfbEnergyTileR_fx*/
+
+ /*gain = (float) ( sfbEnergyTileR * ( sfbEnergyC / sfbEnergyTileC ) );*/
+ temp = BASOP_Util_Divide3232_Scale( sfbEnergyC_fx, L_add( sfbEnergyTileC_fx, EPSILON_FX ), &tmp_e );
+ gain_e = add( tmp_e, sub( sfbEnergyC_e, sfbEnergyTileC_e ) );
+ gain_fx = Mult_32_16( sfbEnergyTileR_fx, temp );
+ gain_e = add( 16, add( gain_e, sfbEnergyTileR_e ) ); /*stores the resultant exponent for gain_fx*/
+
+ IF( !isTransient )
+ {
+ Word16 diffSFM_fx;
+ Word16 shiftedSFM_fx;
+ Word16 shiftedSFM_e; /*stores the resultant exponent for shiftedSFM_fx*/
+ shiftedSFM_fx = 0;
+ shiftedSFM_e = 0;
+ move16();
+ move16();
+
+ // tmp_tb = IGF_getSFM_ivas(pPowerSpectrum, swb_offset[sfb], swb_offset[sfb + 1]) / IGF_getCrest_ivas(pPowerSpectrum, swb_offset[sfb], swb_offset[sfb + 1]);
+ sfm = IGF_getSFM_ivas_fx( &sfm_exp, pPowerSpectrum_fx, pPowerSpectrum_e, swb_offset[sfb], swb_offset[sfb + 1] );
+ crest = IGF_getCrest_ivas( &crest_exp, pPowerSpectrum_fx, pPowerSpectrum_e, swb_offset[sfb], swb_offset[sfb + 1] );
+ tmp_tb_fx = BASOP_Util_Divide1616_Scale( sfm, crest, &tmp_e );
+ tmp_tb_e = add( tmp_e, sub( sfm_exp, crest_exp ) ); /*stores the resultant exponent for tmp_tb_fx*/
+
+ // tmp_sb = IGF_getSFM_ivas(tileSrcSpec, 0, strt_cpy - tmp) / IGF_getCrest_ivas(tileSrcSpec, 0, strt_cpy - tmp);
+ sfm = IGF_getSFM_ivas_fx( &sfm_exp, tileSrcSpec_fx, tileSrcSpec_e, 0, sub( strt_cpy, tmp ) );
+ crest = IGF_getCrest_ivas( &crest_exp, tileSrcSpec_fx, tileSrcSpec_e, 0, sub( strt_cpy, tmp ) );
+ tmp_sb_fx = BASOP_Util_Divide1616_Scale( sfm, crest, &tmp_e );
+ tmp_sb_e = add( tmp_e, sub( sfm_exp, crest_exp ) ); /*stores the resultant exponent for tmp_sb_fx*/
+
+ IF( last_core_acelp || hPrivateData->wasTransient )
+ {
+ hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] = hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] = tmp_tb_fx; /*Exponent for hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] and hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] values stored in hPrivateData->sfb_tb_e[sfb] */
+ hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] = hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] = tmp_sb_fx; /*Exponent for hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] and hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] values stored in hPrivateData->sfb_sb_e[sfb]*/
+ hPrivateData->prevSFB_FIR_TB_e[sfb] = tmp_sb_e;
+ hPrivateData->prevSFB_IIR_TB_e[sfb] = tmp_sb_e;
+ hPrivateData->prevSFB_FIR_SB_e[sfb] = tmp_sb_e;
+ hPrivateData->prevSFB_IIR_SB_e[sfb] = tmp_sb_e;
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ }
+ ELSE
+ {
+ /* Purpose of this block:
+ -to make the exponent of hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] and hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] equal to that of tmp_tb_fx
+ -to make the exponent of hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] and hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] equal to that of tmp_sb_fx
+ */
+ Word16 diff_sb_e; /*stores the difference of exponents for sb*/
+ Word16 diff_tb_e; /*stores the difference of exponents for tb*/
+ diff_sb_e = sub( tmp_sb_e, hPrivateData->sfb_sb_e[sfb] );
+ diff_tb_e = sub( tmp_tb_e, hPrivateData->sfb_tb_e[sfb] );
+ IF( LE_16( tmp_tb_e, hPrivateData->sfb_tb_e[sfb] ) )
+ {
+ tmp_tb_fx = shl( tmp_tb_fx, diff_tb_e );
+ tmp_tb_e = hPrivateData->sfb_tb_e[sfb];
+ move16();
+ }
+ ELSE
+ {
+ hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] = shr( hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb], diff_tb_e );
+ hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] = shr( hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb], diff_tb_e );
+ move16();
+ move16();
+ hPrivateData->prevSFB_FIR_TB_e[sfb] = tmp_tb_e;
+ hPrivateData->prevSFB_IIR_TB_e[sfb] = tmp_tb_e;
+ move16();
+ move16();
+ }
+ IF( LE_16( tmp_sb_e, hPrivateData->sfb_sb_e[sfb] ) )
+ {
+ tmp_sb_fx = shl( tmp_sb_fx, diff_sb_e );
+ tmp_sb_e = hPrivateData->sfb_sb_e[sfb];
+ move16();
+ }
+ ELSE
+ {
+ hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] = shr( hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb], diff_sb_e );
+ hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] = shr( hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb], diff_sb_e );
+ move16();
+ move16();
+ hPrivateData->prevSFB_FIR_SB_e[sfb] = tmp_sb_e;
+ hPrivateData->prevSFB_IIR_SB_e[sfb] = tmp_sb_e;
+ move16();
+ move16();
+ }
+ }
+ tmp_tb_fx = shr_sat( tmp_tb_fx, sub( 2, tmp_tb_e ) ); /* Since we're limiting max value to 2.7f we can saturate to Q13 */
+ tmp_sb_fx = shr_sat( tmp_sb_fx, sub( 2, tmp_sb_e ) ); /* Since we're limiting max value to 2.7f we can saturate to Q13 */
+ hPrivateData->SFM_tb_fx[sfb] = add_sat( tmp_tb_fx, add_sat( shr( hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb], sub( 2, hPrivateData->prevSFB_FIR_TB_e[sfb] ) ), shr( hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb], sub( 3, hPrivateData->prevSFB_IIR_TB_e[sfb] ) ) ) ); /* Since we're limiting max value to 2.7f we can saturate to Q13 */
+ hPrivateData->SFM_tb_fx[sfb] = s_min( 22118 /*2.7f Q13*/, hPrivateData->SFM_tb_fx[sfb] ); /* resultant exponent stored in hPrivateData->sfb_sb_e[sfb]*/
+ hPrivateData->SFM_sb_fx[sfb] = add_sat( tmp_sb_fx, add_sat( shr( hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb], sub( 2, hPrivateData->prevSFB_FIR_SB_e[sfb] ) ), shr( hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb], sub( 3, hPrivateData->prevSFB_IIR_SB_e[sfb] ) ) ) ); /* Since we're limiting max value to 2.7f we can saturate to Q13 */
+ hPrivateData->SFM_sb_fx[sfb] = s_min( 22118 /*2.7f Q13*/, hPrivateData->SFM_sb_fx[sfb] ); /*resultant exponent stores in hPrivateData->sfb_tb_e[sfb]*/
+ move16();
+ move16();
+ move16();
+ move16();
+ hPrivateData->sfb_sb_e[sfb] = 2;
+ hPrivateData->sfb_tb_e[sfb] = 2;
+ move16();
+ move16();
+
+ diffSFM_fx = sub( hPrivateData->SFM_sb_fx[sfb], hPrivateData->SFM_tb_fx[sfb] ); /*Q13*/
+
+ test();
+ IF( diffSFM_fx > 0 && LT_16( hPrivateData->SFM_tb_fx[sfb], 819 /*0.1 Q13*/ ) ) /* check whether target SFB is more tonal than source SFB */
+ {
+ Word16 currDampingFactor_fx, dampingFactor_fx, alpha_fx;
+ Word16 threshold_e, threshold_fx, alpha_e, currDampingFactor_e, dampingFactor_e;
+ /* calculate spectral tilt to detect sudden drops (or increases) in energy in the current SFB */
+ x = 1;
+ mean_x_fx = mean_y_fx = 0;
+ mean_xy_fx = mean_x2_fx = 0;
+ mean_x_e = mean_y_e = 15;
+ mean_xy_e = mean_x2_e = 31;
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ FOR( sb = swb_offset[sfb]; sb < swb_offset[sfb + 1]; sb++ )
+ {
+ mean_x_fx = add( mean_x_fx, x ); /*Q0*/
+ mean_x2_fx = L_add( mean_x2_fx, L_mult0( x, x ) ); /*Q0*/
+
+ /*y = 20 * (Word16) log10f( max( 1e-018f, pPowerSpectrum[sb] ) );*/
+ IF( LT_32( pPowerSpectrum_fx[sb], 1 ) )
+ {
+ y = 20 * ( -18 );
+ move16();
+ }
+ ELSE
+ {
+ y = imult1616( 20, extract_l( L_shr( Mult_32_16( ( L_add( BASOP_Util_Log2( pPowerSpectrum_fx[sb] ), L_shl( pPowerSpectrum_e[sb], Q25 ) ) ), INV_Log2_10_Q15 ), 25 ) ) ); /*Q0*/
+ }
+ mean_y_fx = add( mean_y_fx, y ); /*Q0*/
+ mean_xy_fx = L_add( mean_xy_fx, L_mult0( y, x ) ); /*Q0*/
+
+ x = add( x, 1 );
+ }
+ mean_y_fx = BASOP_Util_Divide1616_Scale( mean_y_fx, width, &tmp_e ); /* resultant exp stores in mean_y_e*/
+ mean_y_e = add( mean_y_e, sub( tmp_e, 15 ) );
+ mean_x_fx = BASOP_Util_Divide1616_Scale( mean_x_fx, width, &tmp_e ); /* resultant exp stores in mean_x_e*/
+ mean_x_e = add( mean_x_e, sub( tmp_e, 15 ) );
+ mean_xy_fx = BASOP_Util_Divide3216_Scale( mean_xy_fx, width, &tmp_e ); /* resultant exp stores in mean_xy_e*/
+ mean_xy_e = add( mean_xy_e, sub( tmp_e, 15 ) );
+ mean_x2_fx = BASOP_Util_Divide3216_Scale( mean_x2_fx, width, &tmp_e ); /* resultant exp stores in mean_x2_e*/
+ mean_x2_e = add( mean_x2_e, sub( tmp_e, 15 ) );
+
+ /*slope = ( mean_xy - mean_x * mean_y ) / ( mean_x2 - mean_x * mean_x );*/
+ slope_fx = BASOP_Util_Divide3232_Scale( ( L_sub( mean_xy_fx, L_shl( mult( mean_x_fx, mean_y_fx ), sub( add( mean_x_e, mean_y_e ), mean_xy_e ) ) ) ), ( L_sub( mean_x2_fx, L_shl( mult( mean_x_fx, mean_x_fx ), sub( add( mean_x_e, mean_x_e ), mean_x2_e ) ) ) ), &slope_e );
+ slope_e = add( slope_e, sub( mean_xy_e, mean_x2_e ) ); /*stores resultant exponent for slope_fx*/
+
+ /* determine whether strong tilt is due to a step in the spectrum (e.g. band limitation, no damping)
+ or a tonal component close the band border (apply damping) by calculating SFM for a shift of 1/2 SFB width*/
+ threshold_fx = BASOP_Util_Divide1616_Scale( 60, width, &threshold_e ); /*stores resultant exponent for threshold_fx*/
+ test();
+ IF( EQ_16( BASOP_Util_Cmp_Mant32Exp( slope_fx, add( slope_e, 16 ), negate( threshold_fx ), add( threshold_e, 16 ) ), -1 ) )
+ {
+ Word16 shift = shr( width, 1 );
+ // shiftedSFM = IGF_getSFM_ivas( pPowerSpectrum, swb_offset[sfb] - shift, swb_offset[sfb + 1] - shift ) / IGF_getCrest_ivas( pPowerSpectrum, swb_offset[sfb] - shift, swb_offset[sfb + 1] - shift );
+ sfm = IGF_getSFM_ivas_fx( &sfm_exp, pPowerSpectrum_fx, pPowerSpectrum_e, sub( swb_offset[sfb], shift ), sub( swb_offset[sfb + 1], shift ) );
+ crest = IGF_getCrest_ivas( &crest_exp, pPowerSpectrum_fx, pPowerSpectrum_e, sub( swb_offset[sfb], shift ), sub( swb_offset[sfb + 1], shift ) );
+ shiftedSFM_fx = BASOP_Util_Divide1616_Scale( sfm, crest, &shiftedSFM_e );
+ }
+ ELSE IF( EQ_16( BASOP_Util_Cmp_Mant32Exp( slope_fx, add( slope_e, 16 ), threshold_fx, add( threshold_e, 16 ) ), 1 ) && ( NE_16( sfb, sub( hGrid->sfbWrap[hGrid->nTiles], 1 ) ) ) )
+ {
+ Word16 shift;
+ shift = shr( width, 1 );
+ // shiftedSFM = IGF_getSFM_ivas( pPowerSpectrum, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift ) / IGF_getCrest_ivas( pPowerSpectrum, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift );
+ sfm = IGF_getSFM_ivas_fx( &sfm_exp, pPowerSpectrum_fx, pPowerSpectrum_e, add( swb_offset[sfb], shift ), add( swb_offset[sfb + 1], shift ) );
+ crest = IGF_getCrest_ivas( &crest_exp, pPowerSpectrum_fx, pPowerSpectrum_e, add( swb_offset[sfb], shift ), add( swb_offset[sfb + 1], shift ) );
+ shiftedSFM_fx = BASOP_Util_Divide1616_Scale( sfm, crest, &shiftedSFM_e );
+ }
+ IF( shiftedSFM_fx )
+ {
+ shiftedSFM_e = add( shiftedSFM_e, sub( sfm_exp, crest_exp ) ); /* stores resultant exponent for shiftedSFM_fx*/
+ }
+
+ // alpha = min( 320.f / (float) swb_offset[sfb + 1], 1.25f );
+ temp = BASOP_Util_Divide1616_Scale( 320, swb_offset[sfb + 1], &alpha_e );
+ alpha_fx = extract_l( L_min( temp, L_shl( 20480 /*1.25 Q14*/, sub( 1, alpha_e ) ) ) ); /* exponent is alpha_e*/
+ temp = BASOP_Util_Divide1616_Scale( hPrivateData->SFM_tb_fx[sfb], hPrivateData->SFM_sb_fx[sfb], &tmp_e );
+ tmp_e = add( tmp_e, sub( hPrivateData->sfb_tb_e[sfb], hPrivateData->sfb_sb_e[sfb] ) ); /* stores resultant exponent for temp */
+
+ // currDampingFactor = expf( alpha * logf( hPrivateData->SFM_tb[sfb] / hPrivateData->SFM_sb[sfb] ) );
+ currDampingFactor_fx = round_fx( BASOP_util_Pow2( Mpy_32_16_1( L_add( BASOP_Util_Log2( temp ), L_shl( add( 16, tmp_e ), 25 ) ), alpha_fx ), add( alpha_e, 6 ), &currDampingFactor_e ) ); /*exp is currDampingFactor_e*/
+
+ IF( GT_32( shiftedSFM_fx, L_shl( 1311 /*0.04f Q15*/, negate( shiftedSFM_e ) ) ) )
+ {
+ currDampingFactor_fx = 32767; /*1.f Q15*/
+ currDampingFactor_e = 0;
+ move16();
+ move16();
+ }
+ test();
+ test();
+ IF( last_core_acelp || hPrivateData->wasTransient || EQ_32( hPrivateData->prevDampingFactor_IIR_fx[sfb], L_shl( -1, sub( 15, hPrivateData->prevDampingFactor_IIR_e[sfb] ) ) ) )
+ {
+ tmp = BASOP_Util_Cmp_Mant32Exp( currDampingFactor_fx, currDampingFactor_e, 3277, 0 );
+ IF( tmp >= 0 )
+ {
+ hPrivateData->prevDampingFactor_IIR_fx[sfb] = currDampingFactor_fx;
+ hPrivateData->prevDampingFactor_IIR_e[sfb] = currDampingFactor_e;
+ }
+ ELSE
+ {
+ hPrivateData->prevDampingFactor_IIR_fx[sfb] = 3277; /* 0.1 in Q15 */
+ hPrivateData->prevDampingFactor_IIR_e[sfb] = 0;
+ }
+
+ move16();
+ move16();
+ }
+
+ {
+ Word32 tonalToNoise;
+ Word16 adap;
+ Word16 adap_e; /*stores exp for adap*/
+ Word16 tonalToNoise_e; /*stores exponent for tonalToNoise*/
+ tonalToNoise_e = 9; /*stores exponent for tonalToNoise*/
+ move16();
+ adap = BASOP_Util_Divide1616_Scale( width, 30, &adap_e );
+ tonalToNoise = IGF_getTNR_ivas_fx( pPowerSpectrum_fx, swb_offset[sfb], swb_offset[sfb + 1], adap, pPowerSpectrum_e, adap_e ); /*Q22*/
+ IF( EQ_16( BASOP_Util_Cmp_Mant32Exp( tonalToNoise, tonalToNoise_e, L_add( L_shl( 10, sub( 15, adap_e ) ), adap ), add( 16, adap_e ) ), -1 ) )
+ {
+ // currDampingFactor += 0.1f * ( ( 10 + adap ) - tonalToNoise );
+ Word32 temp2 = BASOP_Util_Add_Mant32Exp( L_add( L_shl( 10, sub( 15, adap_e ) ) /*exp:adap_e*/, adap ), add( adap_e, 16 ), L_negate( tonalToNoise ), tonalToNoise_e, &tmp_e ); /* resultant exp is tmp_e*/
+ currDampingFactor_e = BASOP_Util_Add_MantExp( currDampingFactor_fx, currDampingFactor_e, extract_l( Mult_32_16( temp2, 3277 /*0.1f Q15*/ ) ), tmp_e, &currDampingFactor_fx ); /*stores resultant exp for currDampingFactor_fx*/
+ }
+ }
+
+ dampingFactor_e = BASOP_Util_Add_MantExp( currDampingFactor_fx, currDampingFactor_e, hPrivateData->prevDampingFactor_IIR_fx[sfb], hPrivateData->prevDampingFactor_IIR_e[sfb], &dampingFactor_fx );
+ dampingFactor_fx = shr( dampingFactor_fx, 1 ); /* resultant exponent is dampingFactor_e*/
+ IF( NE_16( BASOP_Util_Cmp_Mant32Exp( dampingFactor_fx, add( dampingFactor_e, 16 ), shr( hPrivateData->prevDampingFactor_IIR_fx[sfb], 1 ), add( hPrivateData->prevDampingFactor_IIR_e[sfb], 16 ) ), -1 ) )
+ {
+ // do nothing
+ }
+ ELSE
+ {
+ dampingFactor_fx = shr( hPrivateData->prevDampingFactor_IIR_fx[sfb], 1 ); /* resultant exponent is hPrivateData->prevDampingFactor_IIR_e[sfb]*/
+ dampingFactor_e = hPrivateData->prevDampingFactor_IIR_e[sfb];
+ move16();
+ }
+ IF( dampingFactor_e < 0 )
+ {
+ dampingFactor_fx = shl( dampingFactor_fx, dampingFactor_e );
+ dampingFactor_e = 0;
+ move16();
+ }
+ gain_fx = Mult_32_16( gain_fx, shl_sat( extract_l( L_min( L_add( dampingFactor_fx, Mult_32_16( L_shl( hPrivateData->dampingFactorSmoothing[sfb], sub( 15, dampingFactor_e ) ) /*Q:15-dampingFactor_e*/, 3277 /*0.1f Q15*/ ) /*Q:15-dampingFactor_e*/ ), shl_sat( 1, sub( 15, dampingFactor_e ) ) ) ), dampingFactor_e ) /*Q15*/ );
+
+ hPrivateData->prevDampingFactor_IIR_fx[sfb] = dampingFactor_fx;
+ hPrivateData->prevDampingFactor_IIR_e[sfb] = dampingFactor_e;
+ move16();
+ move16();
+ if ( hPrivateData->dampingFactorSmoothing[sfb] > 0 )
+ {
+ hPrivateData->dampingFactorSmoothing[sfb] = sub( hPrivateData->dampingFactorSmoothing[sfb], 1 );
+ move16();
+ }
+ }
+ ELSE
+ {
+ hPrivateData->prevDampingFactor_IIR_fx[sfb] = -( 1 << 15 ); /* resultant exp which is 0 stores in hPrivateData->prevDampingFactor_IIR_e[sfb]*/
+ hPrivateData->prevDampingFactor_IIR_e[sfb] = 0;
+ hPrivateData->dampingFactorSmoothing[sfb] = 1;
+ move16();
+ move16();
+ move16();
+ }
+
+ hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] = tmp_tb_fx;
+ hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] = hPrivateData->SFM_tb_fx[sfb];
+ hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] = tmp_sb_fx;
+ hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] = hPrivateData->SFM_sb_fx[sfb];
+ hPrivateData->prevSFB_FIR_TB_e[sfb] = hPrivateData->sfb_tb_e[sfb];
+ hPrivateData->prevSFB_IIR_TB_e[sfb] = hPrivateData->sfb_tb_e[sfb];
+ hPrivateData->prevSFB_FIR_SB_e[sfb] = hPrivateData->sfb_sb_e[sfb];
+ hPrivateData->prevSFB_IIR_SB_e[sfb] = hPrivateData->sfb_sb_e[sfb];
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ }
+ ELSE
+ {
+ hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] = 0;
+ hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] = 0;
+ hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] = 0;
+ hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] = 0;
+ hPrivateData->prevSFB_FIR_TB_e[sfb] = 0;
+ hPrivateData->prevSFB_IIR_TB_e[sfb] = 0;
+ hPrivateData->prevSFB_FIR_SB_e[sfb] = 0;
+ hPrivateData->prevSFB_IIR_SB_e[sfb] = 0;
+
+ hPrivateData->dampingFactorSmoothing[sfb] = 2;
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ }
+ }
+ ELSE
+ {
+ tmp_e = pMDCTSpectrum_e;
+ sfbEnergyR_fx = add_sat( EPSILON_FX, BASOP_Util_Divide3216_Scale( sum2_32_fx( pMDCTSpectrum_fx + swb_offset[sfb], width, &tmp_e ) /*exp: tmp_e*/, width, &sfbEnergyR_e ) );
+ sfbEnergyR_e = add( sfbEnergyR_e, add( tmp_e, -15 ) ); /* stores resultant exponent for sfbEnergyR_fx*/
+ gain_fx = sfbEnergyR_fx; /*resultant exponent stored in gain_e=sfbEnergyR_e*/
+ move32();
+ gain_e = add( sfbEnergyR_e, 16 ); /* because gain_fx is word32;only after adding 16 q of gain_fx is 15-sfbEnergyR_e*/
+
+ hPrivateData->prevSFM_FIR_SFB_TB_fx[sfb] = 0;
+ hPrivateData->prevSFM_IIR_SFB_TB_fx[sfb] = 0;
+ hPrivateData->prevSFM_FIR_SFB_SB_fx[sfb] = 0;
+ hPrivateData->prevSFM_IIR_SFB_SB_fx[sfb] = 0;
+ hPrivateData->prevSFB_FIR_TB_e[sfb] = 0;
+ hPrivateData->prevSFB_IIR_TB_e[sfb] = 0;
+ hPrivateData->prevSFB_FIR_SB_e[sfb] = 0;
+ hPrivateData->prevSFB_IIR_SB_e[sfb] = 0;
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+ }
+ /*gain=0.5f+log2f(gain)*2+16 becuase 2.885390081777927f=2*1/loge(2) so 2*1/loge(2)*loge(x) can be written as 2*log2(x)*/
+ gain_fx = L_add( ONE_IN_Q22, L_add( L_add( L_shr( BASOP_Util_Log2( gain_fx ), 1 ), L_shl( gain_e, Q24 ) ), L_shl( 16, Q23 ) ) ); /*Q23*/
+ test();
+ test();
+ if ( !isTransient && ( EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_SWB_48000_CPE ) || EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_FB_48000_CPE ) ) )
+ {
+ gain_fx = L_add( gain_fx, ONE_IN_Q21 ); /* better preservation of original HF band energy */
+ }
+ test();
+ test();
+ if ( !isTransient && ( EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_SWB_64000_CPE ) || EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_FB_64000_CPE ) ) )
+ {
+ gain_fx = L_add( gain_fx, ONE_IN_Q20 );
+ }
+ gain_fx = L_min( gain_fx, 91 << Q23 ); /* 13+15+63, see arithcode encode residual */
+ gain_fx = L_max( gain_fx, 0 );
+ gain_e = 8; /* stores exponent for gain_fx*/
+ move16();
+ hPrivateData->igfScfQuantized[sfb] = (Word16) ( L_shr( gain_fx, 23 ) ); /*Q0*/
+ move16();
+ }
+ }
+
+ return;
+}
+
+
+/*-------------------------------------------------------------------*
+ * IGF_WriteEnvelope()
+ *
+ * writes IGF SCF values
+ *-------------------------------------------------------------------*/
+/*! r: number of bits writen */
+static Word16 IGF_WriteEnvelope_ivas(
+ const IGF_ENC_INSTANCE_HANDLE hIGFEnc, /* i : instance handle of IGF Encoder */
+ BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
+ Word16 *pBitOffset, /* i : ptr to bitOffset counter */
+ const Word16 igfGridIdx, /* i : igf grid index see declaration of IGF_GRID_IDX for details */
+ const Word16 isIndepFlag, /* i : if 1 frame is independent, 0 = frame is coded with data from previous frame */
+ Word16 *igfAllZero /* i : returns 1 if all IGF scfs are zero, else 0 */
+)
+{
+ IGF_ENC_PRIVATE_DATA_HANDLE hPrivateData;
+ H_IGF_GRID hGrid;
+ Word16 sfb;
+ Word16 totBitCount;
+ Word16 startBitCount;
+
+ startBitCount = *pBitOffset;
+ totBitCount = 0;
+ *igfAllZero = 1;
+ move16();
+ move16();
+ move16();
+ hPrivateData = &hIGFEnc->igfData;
+ hGrid = &hPrivateData->igfInfo.grid[igfGridIdx];
+
+ FOR( sfb = hGrid->startSfb; sfb < hGrid->stopSfb; sfb++ )
+ {
+ IF( hPrivateData->igfScfQuantized[sfb] != 0 )
+ {
+ *igfAllZero = 0;
+ move16();
+ BREAK;
+ }
+ }
+
+ IF( *igfAllZero != 0 )
+ {
+ IGF_write_bit_fx( hBstr, pBitOffset, 1 );
+
+ if ( NULL == hBstr )
+ {
+ IGFSCFEncoderSaveContextState_fx( &hPrivateData->hIGFSCFArithEnc, igfGridIdx );
+ }
+
+ IGFSCFEncoderReset_fx( &hPrivateData->hIGFSCFArithEnc );
+
+ if ( NULL == hBstr )
+ {
+ IGFSCFEncoderRestoreContextState_fx( &hPrivateData->hIGFSCFArithEnc, igfGridIdx );
+ }
+ }
+ ELSE
+ {
+ IGF_write_bit_fx( hBstr, pBitOffset, 0 );
+
+ if ( NULL == hBstr )
+ {
+ IGFSCFEncoderSaveContextState_fx( &hPrivateData->hIGFSCFArithEnc, igfGridIdx );
+ }
+
+ *pBitOffset = IGFSCFEncoderEncode_ivas_fx( &hPrivateData->hIGFSCFArithEnc, hBstr, *pBitOffset, &hPrivateData->igfScfQuantized[hGrid->startSfb], igfGridIdx, isIndepFlag );
+ move16();
+
+ if ( NULL == hBstr )
+ {
+ IGFSCFEncoderRestoreContextState_fx( &hPrivateData->hIGFSCFArithEnc, igfGridIdx );
+ }
+ }
+ totBitCount = sub( *pBitOffset, startBitCount );
+
+ return totBitCount;
+}
+
+
+/*-------------------------------------------------------------------*
+ * IGF_Whitening()
+ *
+ * calculates the IGF whitening levels by SFM and crest
+ *-------------------------------------------------------------------*/
+
+static void IGF_Whitening_ivas_fx(
+ const IGF_ENC_INSTANCE_HANDLE hIGFEnc, /* i : | instance handle of IGF Encoder */
+ Word32 *powerSpectrum, /* i : Q31 | MDCT/MDST power spectrum */
+ Word16 *powerSpectrum_e, /* i : Q31 | MDCT/MDST power spectrum */
+ const Word16 igfGridIdx, /* i : Q0 | IGF grid index */
+ const Word16 isTransient, /* i : Q0 | flag indicating if transient is detected */
+ const Word16 last_core_acelp, /* i : Q0 | indicator if last frame was ACELP core */
+ const Word16 isTNSActive, /* i : Q0 | indicator if TNS is active */
+ const Word16 sp_aud_decision0, /* i : Q0 | first stage classifier decision */
+ const Word32 brate, /* i : Q0 | bitrate */
+ const Word16 element_mode /* i : Q0 | element mode */
+)
+{
+ IGF_ENC_PRIVATE_DATA_HANDLE hPrivateData;
+ H_IGF_GRID hGrid;
+ Word16 p; /*Q0*/
+ Word16 tmp;
+ Word16 tmp_e;
+ Word16 SFM_src;
+ Word16 SFM_tar;
+ Word16 SFM_src_e;
+ Word16 SFM_tar_e;
+ Word16 num_Tiles;
+ Word16 SFM;
+ Word16 crest_e;
+
+ SFM = -ONE_IN_Q13; /*1.0f Q13*/
+ move16();
+
+ hPrivateData = &hIGFEnc->igfData;
+ hGrid = &hPrivateData->igfInfo.grid[(Word16) igfGridIdx];
+
+ IF( NE_16( igfGridIdx, IGF_GRID_LB_NORM ) )
+ {
+ FOR( p = 0; p < hGrid->nTiles; p++ )
+ {
+ /* reset filter */
+ hPrivateData->prevSFM_FIR[p] = L_deposit_l( 0 );
+ hPrivateData->prevSFM_IIR[p] = 0;
+ move16();
+
+ /* preset values: */
+ hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_OFF;
+ move16();
+ }
+ }
+
+ FOR( p = 0; p < IGF_MAX_TILES; p++ )
+ {
+ /* update prev data: */
+ hPrivateData->igfPrevWhiteningLevel[p] = hPrivateData->igfCurrWhiteningLevel[p];
+ /* preset values: */
+ hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_OFF;
+ move16();
+ move16();
+ }
+
+ test();
+ IF( !( isTransient || hPrivateData->wasTransient ) )
+ {
+ IF( powerSpectrum )
+ {
+ FOR( p = 0; p < hGrid->nTiles; p++ )
+ {
+ Word16 sb;
+
+ IF( isTNSActive )
+ {
+ FOR( sb = hGrid->tile[p]; sb < hGrid->tile[p + 1]; sb++ )
+ {
+ IF( LT_32( powerSpectrum[sb], 1 ) )
+ hPrivateData->logSpec[sb] = 0; /* max(0,FLT_MIN_EXP )*/
+ ELSE
+ hPrivateData->logSpec[sb] = extract_l( L_max( 0, L_shr( L_add( BASOP_Util_Log2( powerSpectrum[sb] ), L_shl( powerSpectrum_e[sb], Q25 ) ), Q25 ) ) );
+ move16();
+ }
+ }
+
+ /* if current tile contains only a single SFB, reuse already computed SFM values */
+ test();
+ IF( element_mode > EVS_MONO && EQ_16( sub( hGrid->sfbWrap[p + 1], hGrid->sfbWrap[p] ), 1 ) )
+ {
+ tmp = hPrivateData->SFM_tb_fx[p];
+ tmp_e = hPrivateData->sfb_tb_e[p];
+ move16();
+ move16();
+ }
+ ELSE
+ {
+ tmp = BASOP_Util_Divide1616_Scale( IGF_getSFM_new_fx( powerSpectrum, hPrivateData->logSpec, hGrid->tile[p], hGrid->tile[p + 1], powerSpectrum_e ), IGF_getCrest_new_fx( hPrivateData->logSpec, hGrid->tile[p], hGrid->tile[p + 1], &crest_e ), &tmp_e );
+ tmp_e = sub( tmp_e, crest_e );
+ }
+
+ test();
+ IF( last_core_acelp || hPrivateData->wasTransient )
+ {
+ hPrivateData->prevSFM_FIR[p] = L_shl( tmp, add( 1, tmp_e ) ); /*16-(15-exp)=>15Q16*/
+ hPrivateData->prevSFM_IIR[p] = shl( tmp, sub( tmp_e, 2 ) ); /*13-(15-exp)=>2Q13*/
+ move32();
+ move16();
+ }
+
+ test();
+ IF( LE_32( brate, IVAS_48k ) && EQ_16( element_mode, IVAS_CPE_MDCT ) )
+ {
+ Word16 temp;
+ num_Tiles = 0;
+ SFM_src = 0;
+ SFM_tar = 0;
+ SFM_src_e = 0;
+ SFM_tar_e = 0;
+ move16();
+ move16();
+ move16();
+ move16();
+ move16();
+
+ FOR( sb = hGrid->sfbWrap[p]; sb < hGrid->sfbWrap[p + 1]; sb++ )
+ {
+ num_Tiles = add( num_Tiles, 1 );
+ SFM_src_e = BASOP_Util_Add_MantExp( hPrivateData->SFM_sb_fx[sb], hPrivateData->sfb_sb_e[sb], SFM_src, SFM_src_e, &SFM_src );
+ SFM_tar_e = BASOP_Util_Add_MantExp( hPrivateData->SFM_tb_fx[sb], hPrivateData->sfb_tb_e[sb], SFM_tar, SFM_tar_e, &SFM_tar );
+ }
+
+ /* compute the average */
+ SFM_src = shr( BASOP_Util_Divide1616_Scale( SFM_src, num_Tiles, &temp ), 2 );
+ SFM_src_e = add( SFM_src_e, sub( temp, 13 ) ); /*temp-15+2:because right shifted by 2 which are the guard bits*/
+ SFM_tar = shr( BASOP_Util_Divide1616_Scale( SFM_tar, num_Tiles, &temp ), 2 );
+ SFM_tar_e = add( SFM_tar_e, sub( temp, 13 ) ); /*temp-15+2:because right shifted by 2 which are the guard bits*/
+
+ IF( LT_16( SFM_tar_e, SFM_src_e ) )
+ {
+ SFM_tar = shl( SFM_tar, sub( SFM_tar_e, SFM_src_e ) ); /*making the q for SFM_tar and SFM_src equal with 2 as guard bits*/
+ SFM_tar_e = SFM_src_e;
+ }
+ ELSE
+ {
+ SFM_src = shr( SFM_src, sub( SFM_tar_e, SFM_src_e ) ); /*making the q for SFM_tar and SFM_src equal with 2 as guard bits*/
+ SFM_src_e = SFM_tar_e;
+ }
+ move16();
+
+ test();
+ test();
+ IF( ( p > 0 ) && ( EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_SWB_48000_CPE ) || EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_FB_48000_CPE ) ) )
+ {
+ test();
+ if ( EQ_16( p, 1 ) && EQ_16( abs_s( sub( hPrivateData->igfCurrWhiteningLevel[0], hPrivateData->igfCurrWhiteningLevel[1] ) ), 2 ) ) /* OFF vs. STRONG */
+ {
+ hPrivateData->igfCurrWhiteningLevel[0] = IGF_WHITENING_MID;
+ move16();
+ }
+ hPrivateData->igfCurrWhiteningLevel[p] = hPrivateData->igfCurrWhiteningLevel[p - 1];
+ move16();
+ }
+ ELSE IF( sp_aud_decision0 )
+ {
+ /* Music */
+ /* whitening Off: when tonality of target is more than source or tonality of target is close to that of source */
+ test();
+ if ( LE_16( SFM_tar, SFM_src ) || LE_32( SFM_tar, L_add( SFM_src, L_shl( 1, sub( 14, SFM_src_e /*0.5 with exponent SFM_src_e*/ ) ) ) ) )
+ {
+ hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_OFF;
+ move16();
+ }
+
+ /* whitening mid: */
+ test();
+ if ( GT_32( SFM_tar, L_add( SFM_src, L_shl( 1, sub( 14, SFM_src_e /*0.5 with exponent SFM_src_e*/ ) ) ) ) && LE_32( SFM_tar, L_add( SFM_src, L_shl( 5, sub( 13, SFM_src_e ) ) /*1.25 with exponent SFM_src_e*/ ) ) )
+ {
+ hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_MID;
+ move16();
+ }
+
+ /* whitening strong */
+ if ( GT_32( SFM_tar, L_add( SFM_src, L_shl( 5, sub( 13, SFM_src_e ) ) /*1.25 with exponent SFM_src_e*/ ) ) )
+ {
+ hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_STRONG;
+ move16();
+ }
+ }
+ ELSE
+ {
+ /* Speech */
+ /* whitening Off: when tonality of target is more than source or tonality of target is close to that of source */
+ test();
+ if ( LE_16( SFM_tar, SFM_src ) || LE_32( SFM_tar, L_add( SFM_src, L_shr( 3277 /*0.1 Q15*/, SFM_src_e ) ) ) )
+ {
+ hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_OFF;
+ move16();
+ }
+
+ /* whitening mid: */
+ test();
+ if ( GT_32( SFM_tar, L_add( SFM_src, L_shr( 3277 /*0.1 Q15*/, SFM_src_e ) ) ) && LE_32( SFM_tar, L_add( SFM_src, L_shl( 1, sub( 14, SFM_src_e /*0.5 with exponent SFM_src_e*/ ) ) ) ) )
+ {
+ hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_MID;
+ move16();
+ }
+
+ /* whitening strong */
+ if ( GT_32( SFM_tar, L_add( SFM_src, L_shl( 1, sub( 14, SFM_src_e /*0.5 with exponent SFM_src_e*/ ) ) ) ) )
+ {
+ hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_STRONG;
+ move16();
+ }
+ }
+
+ SFM = shl( SFM_tar, sub( SFM_tar_e, 2 ) ); /*2Q13*/
+ }
+ ELSE
+ {
+ test();
+ IF( element_mode > EVS_MONO && EQ_16( sub( hGrid->sfbWrap[p + 1], hGrid->sfbWrap[p] ), 1 ) )
+ {
+ SFM = shl( tmp, sub( tmp_e, 2 ) ); /*2Q13*/
+ }
+ ELSE
+ {
+ Word32 temp;
+ temp = L_add( L_shl( tmp, sub( tmp_e, 2 ) ), L_add( L_shr( hPrivateData->prevSFM_FIR[p], 3 ), L_shr( hPrivateData->prevSFM_IIR[p], 1 ) ) );
+ SFM = extract_l( L_min( 22118 /*2.7*/, temp ) ); /*2Q13*/
+ }
+ hPrivateData->prevSFM_FIR[p] = L_shl( tmp, add( 1, tmp_e ) ); /*15Q16*/
+ hPrivateData->prevSFM_IIR[p] = SFM;
+ move32();
+ move16();
+
+ IF( GT_16( SFM, hGrid->whiteningThreshold[1][p] ) )
+ {
+ hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_STRONG;
+ move16();
+ }
+ ELSE IF( GT_16( SFM, hGrid->whiteningThreshold[0][p] ) )
+ {
+ hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_MID;
+ move16();
+ }
+ ELSE
+ {
+ hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_OFF;
+ move16();
+ }
+ }
+
+ IF( element_mode > EVS_MONO )
+ {
+ IF( last_core_acelp ) /* reset */
+ {
+ set16_fx( hPrivateData->igfPastSFM_fx[p], -ONE_IN_Q13, IGF_PAST_SFM_LEN );
+ hPrivateData->igfWhiteningHangoverCnt[p] = 2;
+ move16();
+ }
+ ELSE
+ {
+ test();
+ test();
+ test();
+ test();
+ /* check whether change in whitening level should be allowed or not (if SFM is inside a certain margin around thresholds) */
+ IF( NE_16( hPrivateData->igfCurrWhiteningLevel[p], hPrivateData->igfPrevWhiteningLevel[p] ) &&
+ ( ( GT_32( SFM, L_sub( hGrid->whiteningThreshold[0][p], 1229 /*0.15f Q13*/ ) ) && LT_32( SFM, L_add( hGrid->whiteningThreshold[0][p], 1229 ) ) ) ||
+ ( GT_32( SFM, L_sub( hGrid->whiteningThreshold[1][p], 1229 ) ) && LT_32( SFM, L_add( hGrid->whiteningThreshold[1][p], 1229 ) ) ) ) )
+ {
+ Word16 mean_past_SFM;
+ Word16 mean_past_SFM_e;
+ Word16 countable;
+ Word16 i;
+ mean_past_SFM = 0;
+ mean_past_SFM_e = 0;
+ countable = 0;
+ move16();
+ move16();
+ move16();
+
+ /* compute mean of last (available) SFM values */
+ FOR( i = 0; i < IGF_PAST_SFM_LEN; i++ )
+ {
+ IF( hPrivateData->igfPastSFM_fx[p][i] >= 0 )
+ {
+ mean_past_SFM_e = BASOP_Util_Add_MantExp( mean_past_SFM, mean_past_SFM_e, hPrivateData->igfPastSFM_fx[p][i], 2, &mean_past_SFM );
+ countable = add( countable, 1 );
+ }
+ }
+ IF( countable )
+ {
+ Word16 temp;
+ mean_past_SFM = BASOP_Util_Divide1616_Scale( mean_past_SFM, countable, &temp );
+ mean_past_SFM_e = add( mean_past_SFM_e, sub( temp, 15 ) );
+ mean_past_SFM = shl( mean_past_SFM, sub( mean_past_SFM_e, 2 ) ); /*mean_past_SFM_e=2*/
+ /* deny change in whitening level for small deviations from mean SFM */
+ if ( LT_16( abs_s( sub( SFM, mean_past_SFM ) ), 1638 ) /*0.2 in Q13*/ )
+ {
+ hPrivateData->igfCurrWhiteningLevel[p] = hPrivateData->igfPrevWhiteningLevel[p];
+ move16();
+ }
+ }
+ }
+ }
+
+ hPrivateData->igfPastSFM_fx[p][hPrivateData->igfPastSFM_pos] = SFM; /*2Q13*/
+ move16();
+ }
+ }
+
+ SWITCH( hPrivateData->igfInfo.bitRateIndex )
+ {
+ case IGF_BITRATE_WB_9600:
+ case IGF_BITRATE_RF_WB_13200:
+ case IGF_BITRATE_WB_13200_CPE:
+ case IGF_BITRATE_WB_16400_CPE:
+ case IGF_BITRATE_RF_SWB_13200:
+ case IGF_BITRATE_SWB_9600:
+ case IGF_BITRATE_SWB_13200_CPE:
+ case IGF_BITRATE_SWB_16400:
+ case IGF_BITRATE_SWB_24400:
+ case IGF_BITRATE_SWB_24400_CPE:
+ case IGF_BITRATE_SWB_32000_CPE:
+ case IGF_BITRATE_SWB_32000:
+ case IGF_BITRATE_FB_16400:
+ case IGF_BITRATE_FB_24400:
+ case IGF_BITRATE_FB_24400_CPE:
+ case IGF_BITRATE_FB_32000_CPE:
+ case IGF_BITRATE_FB_32000:
+ hPrivateData->igfCurrWhiteningLevel[hGrid->nTiles - 1] = hPrivateData->igfCurrWhiteningLevel[hGrid->nTiles - 2];
+ move16();
+ break;
+ default:
+ break;
+ }
+ }
+ ELSE
+ {
+ FOR( p = 0; p < hGrid->nTiles; p++ )
+ {
+ hPrivateData->igfCurrWhiteningLevel[p] = IGF_WHITENING_MID;
+ move16();
+ }
+ }
+ }
+ ELSE
+ {
+ /* reset filter */
+ FOR( p = 0; p < IGF_MAX_TILES; p++ )
+ {
+ hPrivateData->prevSFM_FIR[p] = L_deposit_l( 0 );
+ hPrivateData->prevSFM_IIR[p] = 0;
+ move32();
+ move16();
+ }
+ }
+
+ IF( element_mode > EVS_MONO )
+ {
+ IF( EQ_16( SFM, -ONE_IN_Q13 /*1.0f 2Q13*/ ) ) /* reset */
+ {
+ FOR( p = 0; p < hGrid->nTiles; p++ )
+ {
+ set16_fx( hPrivateData->igfPastSFM_fx[p], -ONE_IN_Q13, IGF_PAST_SFM_LEN );
+ hPrivateData->igfWhiteningHangoverCnt[p] = 2;
+ move16();
+ }
+ }
+
+ /* vibrato handling */
+ FOR( p = 0; p < hGrid->nTiles; p = p + 2 )
+ {
+ test();
+ test();
+ test();
+ IF( ( hPrivateData->igfPrevWhiteningLevel[p] == IGF_WHITENING_OFF && hPrivateData->igfCurrWhiteningLevel[p] != IGF_WHITENING_OFF ) ||
+ ( hPrivateData->igfPrevWhiteningLevel[p + 1] == IGF_WHITENING_OFF && hPrivateData->igfCurrWhiteningLevel[p + 1] != IGF_WHITENING_OFF ) )
+ {
+ Word16 i;
+ Word16 pastSfm_a[4], pastSfm_b[4];
+ Word16 pastSfmDiffSum_a, pastSfmDiffSum_b;
+
+ FOR( i = 0; i < 4; i++ )
+ {
+ pastSfm_a[i] = hPrivateData->igfPastSFM_fx[p][add( hPrivateData->igfPastSFM_pos, sub( 4, i ) ) % IGF_PAST_SFM_LEN];
+ pastSfm_b[i] = hPrivateData->igfPastSFM_fx[p + 1][add( hPrivateData->igfPastSFM_pos, sub( 4, i ) ) % IGF_PAST_SFM_LEN];
+ move16();
+ move16();
+ }
+ pastSfmDiffSum_a = pastSfmDiffSum_b = 0;
+ move16();
+ move16();
+ FOR( i = 0; i < 3; i++ )
+ {
+ IF( NE_16( pastSfm_a[i + 1], -ONE_IN_Q13 ) )
+ {
+ pastSfmDiffSum_a = add( pastSfmDiffSum_a, sub( pastSfm_a[i], pastSfm_a[i + 1] ) );
+ pastSfmDiffSum_b = add( pastSfmDiffSum_b, sub( pastSfm_b[i], pastSfm_b[i + 1] ) );
+ }
+ ELSE
+ {
+ break;
+ }
+ }
+ test();
+ test();
+ test();
+ test();
+ /* if tonality oscillates between two tiles, turn whitening off in both */
+ IF( ( ( pastSfmDiffSum_a > 0 && pastSfmDiffSum_b < 0 ) ||
+ ( pastSfmDiffSum_a < 0 && pastSfmDiffSum_b > 0 ) ) &&
+ ( GT_32( L_abs( L_sub( pastSfmDiffSum_a, pastSfmDiffSum_b ) ), ONE_IN_Q12 /* 0.5 in Q13 */ ) ) )
+ {
+ hPrivateData->igfCurrWhiteningLevel[p] = hPrivateData->igfCurrWhiteningLevel[p + 1] = IGF_WHITENING_OFF;
+ move16();
+ move16();
+ }
+ }
+ }
+
+ /* hangover */
+ FOR( p = 0; p < hGrid->nTiles; p++ )
+ {
+ IF( NE_16( hPrivateData->igfCurrWhiteningLevel[p], hPrivateData->igfPrevWhiteningLevel[p] ) )
+ {
+ hPrivateData->igfWhiteningHangoverCnt[p] = add( hPrivateData->igfWhiteningHangoverCnt[p], 1 );
+ IF( EQ_16( hPrivateData->igfWhiteningHangoverCnt[p], 3 ) )
+ {
+ hPrivateData->igfWhiteningHangoverCnt[p] = 0;
+ }
+ ELSE
+ {
+ hPrivateData->igfCurrWhiteningLevel[p] = hPrivateData->igfPrevWhiteningLevel[p];
+ }
+ move16();
+ move16();
+ }
+ ELSE
+ {
+ hPrivateData->igfWhiteningHangoverCnt[p] = 0;
+ move16();
+ }
+ }
+
+ hPrivateData->igfPastSFM_pos = add( hPrivateData->igfPastSFM_pos, 1 ) % IGF_PAST_SFM_LEN;
+ move16();
+ }
+
+ hPrivateData->wasTransient = isTransient;
+ move16();
+
+ return;
+}
+
+
+/*-------------------------------------------------------------------*
+ * IGF_WriteWhiteningTile_fx()
+ *
+ * write whitening levels into bitstream
+ *-------------------------------------------------------------------*/
+
+/*! r: number of bits written */
+static Word16 IGF_WriteWhiteningTile_ivas_fx(
+ BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
+ Word16 *pBitOffset, /**< in: | ptr to bitOffset counter */
+ Word16 whiteningLevel /**< in: Q0 | whitening levels to write */
+)
+{
+ Word16 totBitCount;
+ Word16 startBitCount;
+
+ totBitCount = 0;
+ startBitCount = *pBitOffset;
+ move16();
+ move16();
+
+ IF( EQ_32( whiteningLevel, IGF_WHITENING_MID ) )
+ {
+ IGF_write_bits( hBstr, pBitOffset, 0, 1 );
+ }
+ ELSE
+ {
+ IGF_write_bits( hBstr, pBitOffset, 1, 1 );
+ IF( whiteningLevel == IGF_WHITENING_OFF )
+ {
+ IGF_write_bits( hBstr, pBitOffset, 0, 1 );
+ }
+ ELSE
+ {
+ IGF_write_bits( hBstr, pBitOffset, 1, 1 );
+ }
+ }
+ totBitCount = sub( *pBitOffset, startBitCount );
+
+ return totBitCount;
+}
+
+
+/*-------------------------------------------------------------------*
+ * IGF_WriteWhiteningLevels_fx()
+ *
+ * writes the whitening levels
+ *-------------------------------------------------------------------*/
+
+/**< out: Q0 | total number of bits written */
+static Word16 IGF_WriteWhiteningLevels_ivas_fx(
+ const IGF_ENC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF encoder */
+ BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
+ Word16 *pBitOffset, /**< in: | ptr to bitOffset counter */
+ const Word16 igfGridIdx, /**< in: Q0 | igf grid index see declaration of IGF_GRID_IDX for details */
+ const Word16 isIndepFlag /**< in: Q0 | if 1 frame is independent, 0 = frame is coded with data from previous frame */
+)
+{
+ IGF_ENC_PRIVATE_DATA_HANDLE hPrivateData;
+ H_IGF_GRID hGrid;
+ Word16 p;
+ Word16 nTiles;
+ Word16 isSame;
+ Word32 tmp32;
+ Word16 totBitCount;
+ Word16 startBitCount;
+
+ totBitCount = 0;
+ move16();
+ isSame = 1;
+ move16();
+ startBitCount = *pBitOffset;
+ move16();
+ hPrivateData = &hInstance->igfData;
+ hGrid = &hPrivateData->igfInfo.grid[igfGridIdx];
+ nTiles = hGrid->nTiles;
+ move16();
+
+ IF( isIndepFlag )
+ {
+ isSame = 0;
+ move16();
+ }
+ ELSE
+ {
+ p = 0;
+ move16();
+ tmp32 = 0;
+ move32();
+ test();
+ WHILE( ( LT_16( p, nTiles ) ) && ( tmp32 == 0 ) )
+ {
+ test();
+ tmp32 = L_sub( hPrivateData->igfCurrWhiteningLevel[p], hPrivateData->igfPrevWhiteningLevel[p] );
+ if ( tmp32 != 0 )
+ {
+ isSame = 0;
+ move16();
+ }
+ p++;
+ }
+ }
+ IF( isSame )
+ {
+ IGF_write_bits( hBstr, pBitOffset, 1, 1 );
+ }
+ ELSE
+ {
+ IF( !isIndepFlag )
+ {
+ IGF_write_bits( hBstr, pBitOffset, 0, 1 );
+ }
+ IGF_WriteWhiteningTile_ivas_fx( hBstr, pBitOffset, hPrivateData->igfCurrWhiteningLevel[0] );
+ p = 1;
+ move16();
+ tmp32 = 0;
+ move32();
+ test();
+ IF( EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_SWB_48000_CPE ) || EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_FB_48000_CPE ) )
+ {
+ isSame = 1;
+ move16();
+ }
+ ELSE
+ {
+ if ( LT_16( p, nTiles ) )
+ {
+ isSame = 1;
+ move16();
+ }
+ test();
+ WHILE( ( LT_16( p, nTiles ) ) && ( tmp32 == 0 ) )
+ {
+ test();
+ tmp32 = L_sub( hPrivateData->igfCurrWhiteningLevel[p], hPrivateData->igfCurrWhiteningLevel[p - 1] );
+ if ( tmp32 != 0 )
+ {
+ isSame = 0;
+ move16();
+ }
+ p++;
+ }
+ }
+ test();
+ IF( !isSame )
+ {
+ IGF_write_bits( hBstr, pBitOffset, 1, 1 );
+ FOR( p = 1; p < nTiles; p++ )
+ {
+ IGF_WriteWhiteningTile_ivas_fx( hBstr, pBitOffset, hPrivateData->igfCurrWhiteningLevel[p] );
+ }
+ }
+ ELSE IF( NE_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_SWB_48000_CPE ) && NE_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_FB_48000_CPE ) )
+ {
+ IGF_write_bits( hBstr, pBitOffset, 0, 1 );
+ }
+ }
+
+ totBitCount = sub( *pBitOffset, startBitCount );
+
+ return totBitCount;
+}
+
+
+/*-------------------------------------------------------------------*
+ * IGF_WriteFlatteningTrigger_fx()
+ *
+ * write flattening trigger
+ *-------------------------------------------------------------------*/
+
+/*! r: number of bits written */
+static Word16 IGF_WriteFlatteningTrigger_ivas_fx(
+ const IGF_ENC_INSTANCE_HANDLE hInstance, /**< in: | instance handle of IGF Encoder */
+ BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
+ Word16 *pBitOffset /**< in: | ptr to bitOffset counter */
+)
+{
+ Word16 flatteningTrigger;
+
+ Word16 totBitCount;
+ Word16 startBitCount;
+ totBitCount = 0;
+ startBitCount = *pBitOffset;
+ flatteningTrigger = hInstance->flatteningTrigger;
+ move16();
+ move16();
+ move16();
+
+ IGF_write_bits( hBstr, pBitOffset, flatteningTrigger, 1 );
+ totBitCount = sub( *pBitOffset, startBitCount );
+
+ return totBitCount;
+}
+
+
+/*-------------------------------------------------------------------*
+ * IGFEncWriteBitstream()
+ *
+ * IGF bitstream writer
+ *-------------------------------------------------------------------*/
+
+/*! r: number of bits written per frame */
+Word16 IGFEncWriteBitstream_ivas_fx(
+ const IGF_ENC_INSTANCE_HANDLE hIGFEnc, /* i : instance handle of IGF Encoder */
+ BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
+ Word16 *pBitOffset, /* i : ptr to bitOffset counter */
+ const Word16 igfGridIdx, /* i : igf grid index see declaration of IGF_GRID_IDX for details */
+ const Word16 isIndepFlag /* i : if 1 frame is independent, 0 = frame is coded with data from previous frame */
+)
+{
+ Word16 igfAllZero;
+ Word16 startBitCount;
+
+ startBitCount = *pBitOffset;
+ move16();
+ hIGFEnc->infoTotalBitsPerFrameWritten = 0;
+ move16();
+
+ if ( isIndepFlag )
+ {
+ hIGFEnc->infoTotalBitsWritten = 0;
+ move16();
+ }
+
+ IGF_WriteEnvelope_ivas( hIGFEnc, /* i: instance handle of IGF Encoder */
+ hBstr, /* i: encoder state */
+ pBitOffset, /* i: ptr to bitOffset counter */
+ igfGridIdx, /* i: igf grid index see definition of IGF_GRID_IDX for details */
+ isIndepFlag, /* i: if 1 frame is independent, 0 = frame is coded with data from previous frame */
+ &igfAllZero ); /* o: *igfAllZero */
+
+ IGF_WriteWhiteningLevels_ivas_fx( hIGFEnc, /* i: instance handle of IGF Encoder */
+ hBstr, /* i: encoder state */
+ pBitOffset, /* i: ptr to bitOffset counter */
+ igfGridIdx, /* i: igf grid index see definition of IGF_GRID_IDX for details */
+ isIndepFlag ); /* i: if 1 frame is independent, 0 = frame is coded with data from previous frame */
+
+ IGF_WriteFlatteningTrigger_ivas_fx( hIGFEnc, /* i: instance handle of IGF Encoder */
+ hBstr, /* i: encoder state */
+ pBitOffset ); /* i: ptr to bitOffset counter */
+
+ hIGFEnc->infoTotalBitsPerFrameWritten = sub( *pBitOffset, startBitCount );
+ hIGFEnc->infoTotalBitsWritten = add( hIGFEnc->infoTotalBitsWritten, hIGFEnc->infoTotalBitsPerFrameWritten );
+ move16();
+ move16();
+
+ return hIGFEnc->infoTotalBitsPerFrameWritten;
+}
+
+
+/*-------------------------------------------------------------------*
+ * IGFEncSetMode()
+ *
+ * sets the IGF mode according to given bitrate
+ *-------------------------------------------------------------------*/
+
+void IGFEncSetMode_ivas_fx(
+ const IGF_ENC_INSTANCE_HANDLE hIGFEnc, /* i/o: instance handle of IGF Encoder */
+ const Word32 total_brate, /* i : encoder total bitrate */
+ const Word16 bwidth, /* i : encoder audio bandwidth */
+ const Word16 element_mode, /* i : IVAS element mode */
+ const Word16 rf_mode /* i : flag to signal the RF mode */
+)
+{
+ IGF_ENC_PRIVATE_DATA_HANDLE hPrivateData;
+ Word16 i;
+
+ hPrivateData = &hIGFEnc->igfData;
+ hPrivateData->igfBitstreamBits = 0;
+ move16();
+ set16_fx( hPrivateData->igfScfQuantized, 0, IGF_MAX_SFB );
+ set16_fx( hPrivateData->igfCurrWhiteningLevel, 0, IGF_MAX_TILES );
+ set16_fx( hPrivateData->igfPrevWhiteningLevel, 0, IGF_MAX_TILES );
+ set16_fx( hPrivateData->igfWhiteningHangoverCnt, 0, IGF_MAX_TILES );
+ FOR( i = 0; i < IGF_MAX_TILES; i++ )
+ {
+ set16_fx( hPrivateData->igfPastSFM_fx[i], -( ONE_IN_Q13 ), IGF_PAST_SFM_LEN );
+ }
+
+ hPrivateData->igfPastSFM_pos = 0;
+ move16();
+
+ FOR( i = 0; i < IGF_BITBUFSIZE / 8; i++ )
+ {
+ hPrivateData->igfBitstream[i] = 0;
+ move16();
+ }
+ hPrivateData->wasTransient = 0;
+ move16();
+ set32_fx( hPrivateData->prevSFM_FIR, 0, IGF_MAX_TILES );
+ set16_fx( hPrivateData->prevSFM_IIR, 0, IGF_MAX_TILES );
+ set16_fx( hPrivateData->dampingFactorSmoothing, 2, IGF_MAX_SFB );
+ set16_fx( hPrivateData->prevSFM_FIR_SFB_SB_fx, 0, IGF_MAX_SFB );
+ set16_fx( hPrivateData->prevSFB_FIR_TB_e, 15, IGF_MAX_SFB );
+ set16_fx( hPrivateData->prevSFB_FIR_SB_e, 15, IGF_MAX_SFB );
+ set16_fx( hPrivateData->prevSFM_IIR_SFB_SB_fx, 0, IGF_MAX_SFB );
+ set16_fx( hPrivateData->prevSFB_IIR_SB_e, 15, IGF_MAX_SFB );
+ set16_fx( hPrivateData->prevSFM_FIR_SFB_TB_fx, 0, IGF_MAX_SFB );
+ set16_fx( hPrivateData->prevSFB_IIR_TB_e, 15, IGF_MAX_SFB );
+ set16_fx( hPrivateData->sfb_tb_e, 15, IGF_MAX_SFB );
+ set16_fx( hPrivateData->sfb_sb_e, 15, IGF_MAX_SFB );
+ set16_fx( hPrivateData->prevSFM_IIR_SFB_TB_fx, 0, IGF_MAX_SFB );
+ set16_fx( hPrivateData->prevDampingFactor_IIR_fx, -( ONE_IN_Q15 ), IGF_MAX_SFB );
+ set16_fx( hPrivateData->prevDampingFactor_IIR_e, 0, IGF_MAX_SFB );
+ set16_fx( hPrivateData->logSpec, 0, L_FRAME_PLUS );
+ set16_fx( hPrivateData->SFM_sb_fx, 0, IGF_MAX_SFB );
+ set16_fx( hPrivateData->SFM_tb_fx, 0, IGF_MAX_SFB );
+
+ IF( IGFCommonFuncsIGFConfiguration_ivas_fx( total_brate, bwidth, element_mode, &hPrivateData->igfInfo, rf_mode ) != 0 )
+ {
+ IGFSCFEncoderOpen_fx( &hPrivateData->hIGFSCFArithEnc, &hPrivateData->igfInfo, total_brate, bwidth, element_mode, rf_mode );
+
+ hIGFEnc->infoSamplingRate = hPrivateData->igfInfo.sampleRate;
+ move32();
+ hIGFEnc->infoStartFrequency = hPrivateData->igfInfo.grid[0].startFrequency;
+ move16();
+ hIGFEnc->infoStopFrequency = hPrivateData->igfInfo.grid[0].stopFrequency;
+ move16();
+ hIGFEnc->infoStartLine = hPrivateData->igfInfo.grid[0].startLine;
+ move16();
+ hIGFEnc->infoStopLine = hPrivateData->igfInfo.grid[0].stopLine;
+ move16();
+ }
+ ELSE
+ {
+ /* IGF configuration failed -> error! */
+ hIGFEnc->infoSamplingRate = 0;
+ move32();
+ hIGFEnc->infoStartFrequency = -1;
+ move16();
+ hIGFEnc->infoStopFrequency = -1;
+ move16();
+ hIGFEnc->infoStartLine = -1;
+ move16();
+ hIGFEnc->infoStopLine = -1;
+ move16();
+ fprintf( stderr, "IGFEncSetMode_fx: initialization error!\n" );
+ }
+
+ /* reset remaining variables */
+ hIGFEnc->infoTotalBitsWritten = 0;
+ move16();
+ hIGFEnc->infoTotalBitsPerFrameWritten = 0;
+ move16();
+ hIGFEnc->flatteningTrigger = 0;
+ move16();
+ hIGFEnc->spec_be_igf_e = 0;
+ move16();
+ hIGFEnc->tns_predictionGain = 0;
+ move16();
+ set32_fx( hIGFEnc->spec_be_igf, 0, N_MAX_TCX - IGF_START_MN );
+
+ return;
+}
+
+
+/*-------------------------------------------------------------------*
+ * IGFEncResetTCX10BitCounter_fx()
+ *
+ * IGF reset bitstream bit counter for TCX10 modes
+ *-------------------------------------------------------------------*/
+
+void IGFEncResetTCX10BitCounter_fx(
+ const IGF_ENC_INSTANCE_HANDLE hIGFEnc /* i : instance handle of IGF Encoder */
+)
+{
+ IGF_ENC_PRIVATE_DATA_HANDLE hPrivateData;
+
+ hPrivateData = &hIGFEnc->igfData;
+ hPrivateData->igfBitstreamBits = 0;
+ hIGFEnc->infoTotalBitsWritten = 0;
+ move16();
+ move16();
+
+ return;
+}
+
+
+/*-------------------------------------------------------------------*
+ * IGFEncApplyMono()
+ *
+ * apply the IGF encoder, main encoder interface
+ *-------------------------------------------------------------------*/
+
+void IGFEncApplyMono_ivas_fx(
+ Encoder_State *st, /* i : Encoder state */
+ Word16 powerSpectrum_len, /* i: length of pPowerSpectrum_fx buffer */
+ const Word16 igfGridIdx, /* i : IGF grid index */
+ Word32 *pMDCTSpectrum_fx, /* i/o: MDCT spectrum */
+ Word16 e_mdct, /* i : exponent of pMDCTspectrum */
+ Word32 *pPowerSpectrum_fx, /* i/o: MDCT^2 + MDST^2 spectrum, or estimate */
+ Word16 *e_ps, /* i : exponent of pPowerSpectrum */
+ const Word16 isTCX20, /* i : flag indicating if the input is TCX20 or TCX10/2xTCX5 */
+ const Word8 isTNSActive, /* i : flag indicating if the TNS is active */
+ const Word16 sp_aud_decision0, /* i : first stage switching decision */
+ const Word16 vad_hover_flag /* i : VAD hangover flag */
+)
+{
+ Word32 *pPowerSpectrumParameter_fx;
+ Word16 *pPowerSpectrumParameter_exp;
+ Word16 att_fx = MAX16B;
+ Word16 last_core_acelp;
+ move16();
+
+ Word32 common_pPowerSpectrum_fx[N_MAX + L_MDCT_OVLP_MAX];
+
+ set32_fx( common_pPowerSpectrum_fx, 0, N_MAX );
+
+ Word16 common_pPowerSpectrum_exp = MIN16B;
+ move16();
+ IF( st->last_core == ACELP_CORE )
+ {
+ last_core_acelp = 1;
+ move16();
+ }
+ ELSE
+ {
+ last_core_acelp = 0;
+ move16();
+ }
+
+ test();
+ IF( !isTNSActive && isTCX20 )
+ {
+ pPowerSpectrumParameter_fx = pPowerSpectrum_fx;
+ pPowerSpectrumParameter_exp = e_ps;
+ }
+ ELSE
+ {
+ pPowerSpectrumParameter_fx = NULL;
+ pPowerSpectrumParameter_exp = NULL;
+ }
+
+ IGF_UpdateInfo( st->hIGFEnc, igfGridIdx );
+
+ test();
+ IF( EQ_16( st->element_mode, IVAS_CPE_DFT ) || EQ_16( st->element_mode, IVAS_CPE_TD ) )
+ {
+ calculate_hangover_attenuation_gain_ivas_fx( st, &att_fx, vad_hover_flag );
+ }
+
+ IGF_CalculateEnvelope_ivas_fx( st->hIGFEnc, pMDCTSpectrum_fx, e_mdct, pPowerSpectrumParameter_fx, pPowerSpectrumParameter_exp, igfGridIdx, st->hTranDet->transientDetector.bIsAttackPresent, last_core_acelp, st->element_mode, att_fx );
+
+ IF( isTCX20 )
+ {
+ pPowerSpectrumParameter_fx = pPowerSpectrum_fx;
+ pPowerSpectrumParameter_exp = e_ps;
+ }
+ ELSE
+ {
+ pPowerSpectrumParameter_fx = NULL;
+ pPowerSpectrumParameter_exp = NULL;
+ }
+
+ IF( EQ_16( st->element_mode, IVAS_CPE_MDCT ) )
+ {
+ IGF_Whitening_ivas_fx( st->hIGFEnc, pPowerSpectrumParameter_fx, pPowerSpectrumParameter_exp, igfGridIdx, st->hTranDet->transientDetector.bIsAttackPresent, last_core_acelp, isTNSActive, sp_aud_decision0, st->element_brate, st->element_mode );
+ }
+ ELSE
+ {
+ IGF_Whitening_ivas_fx( st->hIGFEnc, pPowerSpectrumParameter_fx, pPowerSpectrumParameter_exp, igfGridIdx, st->hTranDet->transientDetector.bIsAttackPresent, last_core_acelp, isTNSActive, sp_aud_decision0, st->total_brate, st->element_mode );
+ }
+
+ IF( pPowerSpectrumParameter_fx )
+ {
+ FOR( Word16 i = 0; i < powerSpectrum_len; i++ )
+ {
+ common_pPowerSpectrum_exp = s_max( common_pPowerSpectrum_exp, pPowerSpectrumParameter_exp[i] );
+ }
+
+ FOR( Word16 i = 0; i < powerSpectrum_len; i++ )
+ {
+ common_pPowerSpectrum_fx[i] = L_shl( pPowerSpectrumParameter_fx[i], sub( pPowerSpectrumParameter_exp[i], common_pPowerSpectrum_exp ) );
+ move16();
+ }
+ pPowerSpectrumParameter_fx = common_pPowerSpectrum_fx;
+ }
+
+ IGF_ErodeSpectrum_ivas_fx( st->hIGFEnc, pMDCTSpectrum_fx, pPowerSpectrumParameter_fx, common_pPowerSpectrum_exp, igfGridIdx, 0 );
+
+ return;
+}
+
+
+/*-------------------------------------------------------------------*
+ * IGFEncApplyStereo()
+ *
+ * apply the IGF encoder, main encoder interface
+ *-------------------------------------------------------------------*/
+
+void IGFEncApplyStereo_fx(
+ STEREO_MDCT_ENC_DATA_HANDLE hStereoMdct, /* i/o: MDCT stereo encoder structure */
+ Word16 ms_mask[2][MAX_SFB], /* i : bandwise MS mask */
+ const IGF_ENC_INSTANCE_HANDLE hIGFEnc[CPE_CHANNELS], /* i : instance handle of IGF Encoder */
+ const Word16 igfGridIdx, /* i : IGF grid index */
+ Encoder_State *sts[CPE_CHANNELS], /* i : Encoder state */
+ Word32 *pPowerSpectrum_fx[CPE_CHANNELS], /* i/o: MDCT^2 + MDST^2 spectrum, or estimate */
+ Word16 *exp_pPowerSpectrum_fx[CPE_CHANNELS], /* i/o: exp of pPowerSpectrum_fx */
+ Word32 *pPowerSpectrumMsInv_fx[CPE_CHANNELS][NB_DIV], /* i/o: inverse power spectrum */
+ Word16 *q_pPowerSpectrumMsInv_fx[CPE_CHANNELS][NB_DIV], /* i/o: Q of pPowerSpectrumMsInv_fx */
+ Word32 *inv_spectrum_fx[CPE_CHANNELS][NB_DIV], /* i : inverse spectrum */
+ Word16 exp_inv_spectrum_fx[CPE_CHANNELS], /* i : exp of inverse spectrum */
+ const Word16 frameno, /* i : flag indicating index of current subfr. */
+ const Word16 sp_aud_decision0, /* i : sp_aud_decision0 */
+ const Word32 element_brate, /* i : element bitrate */
+ const Word16 mct_on )
+{
+ Word32 *pPowerSpectrumParameter_fx[NB_DIV]; /* If it is NULL it informs a function that specific handling is needed */
+ Word16 *exp_pPowerSpectrumParameter_fx[NB_DIV]; /* If it is NULL it informs a function that specific handling is needed */
+ Word32 *pPowerSpectrumParameterMsInv_fx[NB_DIV];
+ Word16 *q_pPowerSpectrumParameterMsInv_fx[NB_DIV];
+ Word16 coreMsMask[N_MAX];
+ Word16 sfb, ch, last_core_acelp;
+ STEREO_MDCT_BAND_PARAMETERS *sfbConf;
+ Word32 common_pPowerSpectrum_fx[N_MAX];
+
+ set32_fx( common_pPowerSpectrum_fx, 0, N_MAX );
+
+ Word16 common_pPowerSpectrum_exp = MIN16B;
+ move16();
+
+ /* assumptions: stereo filling was already done on the flattened spectra
+ * IGF region is always coded M/S, never L/R (to be done in the encoder)
+ * for residual bands with stereo filling infoTcxNoise is set to zero
+ * both channels have the same IGF configuration
+ */
+
+ /* sanity checks: check if both channels have the same configuration...*/
+ assert( ( sts[0]->core == sts[1]->core ) );
+
+ /* initialization */
+ IF( EQ_16( sts[0]->core, TCX_20_CORE ) )
+ {
+ sfbConf = &hStereoMdct->stbParamsTCX20;
+ }
+ ELSE
+ {
+ sfbConf = &hStereoMdct->stbParamsTCX10;
+ }
+ if ( sts[0]->last_core == ACELP_CORE )
+ {
+ sfbConf = &hStereoMdct->stbParamsTCX20afterACELP;
+ }
+
+ /* create line wise ms mask for the core bands */
+ set16_fx( coreMsMask, 0, N_MAX );
+ FOR( sfb = 0; sfb < sfbConf->sfbCnt; sfb++ )
+ {
+ set16_fx( &coreMsMask[sfbConf->sfbOffset[sfb]], ms_mask[frameno][sfb], sub( sfbConf->sfbOffset[sfb + 1], sfbConf->sfbOffset[sfb] ) );
+ }
+
+ test();
+ test();
+ IF( EQ_16( sts[0]->core, TCX_20_CORE ) && !sts[0]->hTcxEnc->fUseTns[frameno] && !sts[1]->hTcxEnc->fUseTns[frameno] )
+ {
+ pPowerSpectrumParameter_fx[0] = &pPowerSpectrum_fx[0][0];
+ exp_pPowerSpectrumParameter_fx[0] = &exp_pPowerSpectrum_fx[0][0];
+ pPowerSpectrumParameter_fx[1] = &pPowerSpectrum_fx[1][0];
+ exp_pPowerSpectrumParameter_fx[1] = &exp_pPowerSpectrum_fx[1][0];
+ pPowerSpectrumParameterMsInv_fx[0] = pPowerSpectrumMsInv_fx[0][0];
+ pPowerSpectrumParameterMsInv_fx[1] = pPowerSpectrumMsInv_fx[1][0];
+ q_pPowerSpectrumParameterMsInv_fx[0] = q_pPowerSpectrumMsInv_fx[0][0];
+ q_pPowerSpectrumParameterMsInv_fx[1] = q_pPowerSpectrumMsInv_fx[1][0];
+ }
+ ELSE
+ {
+ pPowerSpectrumParameter_fx[0] = NULL;
+ pPowerSpectrumParameter_fx[1] = NULL;
+ pPowerSpectrumParameterMsInv_fx[0] = NULL;
+ pPowerSpectrumParameterMsInv_fx[1] = NULL;
+ q_pPowerSpectrumParameterMsInv_fx[0] = NULL;
+ q_pPowerSpectrumParameterMsInv_fx[1] = NULL;
+ }
+ FOR( ch = 0; ch < CPE_CHANNELS; ch++ )
+ {
+ last_core_acelp = extract_l( EQ_16( sts[ch]->last_core, ACELP_CORE ) );
+
+ IGF_UpdateInfo( hIGFEnc[ch], igfGridIdx );
+ IGF_CalculateStereoEnvelope_fx( hIGFEnc[ch], sts[ch]->hTcxEnc->spectrum_fx[frameno], sts[ch]->hTcxEnc->spectrum_e[frameno], inv_spectrum_fx[ch][frameno],
+ exp_inv_spectrum_fx[ch], pPowerSpectrumParameter_fx[ch], exp_pPowerSpectrum_fx[ch], pPowerSpectrumParameterMsInv_fx[ch],
+ q_pPowerSpectrumParameterMsInv_fx[ch], igfGridIdx, coreMsMask, sts[ch]->hTranDet->transientDetector.bIsAttackPresent, last_core_acelp, mct_on );
+
+ IF( EQ_16( sts[ch]->core, TCX_20_CORE ) )
+ {
+ pPowerSpectrumParameter_fx[ch] = pPowerSpectrum_fx[ch];
+ exp_pPowerSpectrumParameter_fx[ch] = exp_pPowerSpectrum_fx[ch];
+ }
+ ELSE
+ {
+ pPowerSpectrumParameter_fx[ch] = NULL;
+ }
+
+ IGF_Whitening_ivas_fx( hIGFEnc[ch], pPowerSpectrumParameter_fx[ch], exp_pPowerSpectrumParameter_fx[ch], igfGridIdx, sts[ch]->hTranDet->transientDetector.bIsAttackPresent, last_core_acelp, ( sts[0]->hTcxEnc->fUseTns[frameno] || sts[1]->hTcxEnc->fUseTns[frameno] ), sp_aud_decision0, element_brate, sts[ch]->element_mode );
+
+ IF( pPowerSpectrumParameter_fx[ch] )
+ {
+ Word16 length = N_MAX;
+ move16();
+ if ( mct_on )
+ {
+ length = L_FRAME48k;
+ move16();
+ }
+ FOR( Word16 i = 0; i < length; i++ )
+ {
+ common_pPowerSpectrum_exp = s_max( common_pPowerSpectrum_exp, exp_pPowerSpectrumParameter_fx[ch][i] );
+ }
+
+ FOR( Word16 i = 0; i < length; i++ )
+ {
+ common_pPowerSpectrum_fx[i] = L_shl( pPowerSpectrumParameter_fx[ch][i], sub( exp_pPowerSpectrumParameter_fx[ch][i], common_pPowerSpectrum_exp ) );
+ move32();
+ }
+ pPowerSpectrumParameter_fx[ch] = common_pPowerSpectrum_fx;
+ }
+ IGF_ErodeSpectrum_ivas_fx( hIGFEnc[ch], sts[ch]->hTcxEnc->spectrum_fx[frameno], pPowerSpectrumParameter_fx[ch], common_pPowerSpectrum_exp, igfGridIdx, mct_on );
+ }
+
+ return;
+}
+
+
+/*-------------------------------------------------------------------*
+ * IGFSaveSpectrumForITF()
+ *
+ *
+ *-------------------------------------------------------------------*/
+
+void IGFSaveSpectrumForITF_ivas_fx(
+ IGF_ENC_INSTANCE_HANDLE hIGFEnc, /* i/o: instance handle of IGF Encoder */
+ const Word16 igfGridIdx, /* i : IGF grid index */
+ const Word32 *pITFSpectrum, /* i : MDCT spectrum */
+ Word16 exp_pITFSpectrum )
+{
+ IGF_UpdateInfo( hIGFEnc, igfGridIdx );
+
+ Copy32( pITFSpectrum + IGF_START_MN, hIGFEnc->spec_be_igf, sub( hIGFEnc->infoStopLine, IGF_START_MN ) );
+
+ scale_sig32( hIGFEnc->spec_be_igf, sub( hIGFEnc->infoStopLine, IGF_START_MN ), sub( exp_pITFSpectrum, s_max( exp_pITFSpectrum, hIGFEnc->spec_be_igf_e ) ) );
+ scale_sig32( hIGFEnc->spec_be_igf + sub( hIGFEnc->infoStopLine, IGF_START_MN ), sub( N_MAX_TCX - IGF_START_MN, sub( hIGFEnc->infoStopLine, IGF_START_MN ) ), sub( hIGFEnc->spec_be_igf_e, s_max( exp_pITFSpectrum, hIGFEnc->spec_be_igf_e ) ) );
+ hIGFEnc->spec_be_igf_e = s_max( exp_pITFSpectrum, hIGFEnc->spec_be_igf_e );
+ move16();
+
+ return;
+}
+
+
+/*-------------------------------------------------------------------*
+ * IGF_Reconfig()
+ *
+ *
+ *-------------------------------------------------------------------*/
+
+ivas_error IGF_Reconfig(
+ IGF_ENC_INSTANCE_HANDLE *hIGFEnc, /* i/o: instance handle of IGF Encoder */
+ const Word16 igf, /* i : IGF on/off */
+ const Word16 reset, /* i : reset flag */
+ const Word32 brate, /* i : bitrate for configuration */
+ const Word16 bwidth, /* i : signal bandwidth */
+ const Word16 element_mode, /* i : IVAS element mode */
+ const Word16 rf_mode /* i : flag to signal the RF mode */
+)
+{
+ ivas_error error;
+
+ error = IVAS_ERR_OK;
+ move32();
+
+ test();
+ test();
+ test();
+ IF( igf && *hIGFEnc == NULL )
+ {
+ IF( ( *hIGFEnc = (IGF_ENC_INSTANCE_HANDLE) malloc( sizeof( IGF_ENC_INSTANCE ) ) ) == NULL )
+ {
+ return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for hIGFEnc\n" ) );
+ }
+ IGFEncSetMode_ivas_fx( *hIGFEnc, brate, bwidth, element_mode, rf_mode );
+ }
+ ELSE IF( igf && reset )
+ {
+ IGFEncSetMode_ivas_fx( *hIGFEnc, brate, bwidth, element_mode, rf_mode );
+ }
+ ELSE IF( !igf && *hIGFEnc != NULL )
+ {
+ free( *hIGFEnc );
+ *hIGFEnc = NULL;
+ }
+
+ return error;
+}
diff --git a/lib_enc/init_enc_fx.c b/lib_enc/init_enc_fx.c
index 0ee479a7cf59f692fc95738e97befb45c88daecd..b84fd8fb7731d7866e926ccc3df3d821a6be26aa 100644
--- a/lib_enc/init_enc_fx.c
+++ b/lib_enc/init_enc_fx.c
@@ -2,11 +2,9 @@
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
-#include "options.h" /* Compilation switches */
-#include "cnst.h" /* Common constants */
-#include "rom_com_fx.h" /* Static table prototypes */
-#include "rom_com.h" /* Static table prototypes */
-// #include "prot_fx.h" /* Function prototypes */
+#include "options.h" /* Compilation switches */
+#include "cnst.h" /* Common constants */
+#include "rom_com.h" /* Static table prototypes */
#include "stl.h"
#include "ivas_cnst.h"
#include "ivas_error.h"
@@ -29,8 +27,6 @@ ivas_error init_encoder_fx(
{
Word16 i;
Word32 L_tmp;
-
-
Word16 idchan = 0; /* i : channel ID */
Word16 vad_only_flag = 0; /* i : channel ID */
move16();
diff --git a/lib_enc/inov_enc_fx.c b/lib_enc/inov_enc_fx.c
index b7358df5f5a11c1355fa28c09d4c84d258a42eaa..88f95864599a7aebc516b70f56e4f4790203ea48 100644
--- a/lib_enc/inov_enc_fx.c
+++ b/lib_enc/inov_enc_fx.c
@@ -1,12 +1,11 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
#include "options.h" /* Compilation switches */
#include "cnst.h" /* Common constants */
-//#include "prot_fx.h" /* Function prototypes */
#include "basop_util.h"
-#include "rom_com_fx.h" /* Static table prototypes */
#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "ivas_prot_fx.h" /* Function prototypes */
diff --git a/lib_enc/ivas_dirac_enc_fx.c b/lib_enc/ivas_dirac_enc_fx.c
index 4551282964ed86c3d6509465fa652dff5a0a53c4..efd6129032cbf9f514d40cfaa97e0a960e82f55d 100644
--- a/lib_enc/ivas_dirac_enc_fx.c
+++ b/lib_enc/ivas_dirac_enc_fx.c
@@ -39,12 +39,13 @@
#include "ivas_prot_fx.h"
#include "ivas_cnst.h"
#include "ivas_rom_com.h"
-#include "ivas_rom_com_fx.h"
#include "wmc_auto.h"
+
/*-------------------------------------------------------------------------
* Local function prototypes
*------------------------------------------------------------------------*/
+
static void computeIntensityVector_enc_fx(
const DIRAC_ENC_HANDLE hDirAC,
Word32 Cldfb_RealBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX],
@@ -55,6 +56,7 @@ static void computeIntensityVector_enc_fx(
Word16 q_cldfb,
Word16 q_intensity_real[DIRAC_MAX_NBANDS] );
+
/*-------------------------------------------------------------------------
* ivas_dirac_enc_open()
*
diff --git a/lib_enc/ivas_ism_metadata_enc_fx.c b/lib_enc/ivas_ism_metadata_enc_fx.c
index d35327de0cb0aacb322d1e8ab8b21a23eaddc481..32582f2db10e8e7dedae16d3796559b0727d65ce 100644
--- a/lib_enc/ivas_ism_metadata_enc_fx.c
+++ b/lib_enc/ivas_ism_metadata_enc_fx.c
@@ -41,7 +41,6 @@
#include
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
/*-----------------------------------------------------------------------*
diff --git a/lib_enc/ivas_ism_param_enc_fx.c b/lib_enc/ivas_ism_param_enc_fx.c
index cda8cffd674b477b98ea0d5bc665a92cd1198792..47da31a1ab0c03b5be9d96ed9d931e6e55ee11c1 100644
--- a/lib_enc/ivas_ism_param_enc_fx.c
+++ b/lib_enc/ivas_ism_param_enc_fx.c
@@ -40,7 +40,6 @@
#include "ivas_cnst.h"
#include "ivas_rom_com.h"
#include "wmc_auto.h"
-#include "ivas_rom_com_fx.h"
/*-------------------------------------------------------------------------
* Local function definitions
@@ -310,7 +309,7 @@ void ivas_param_ism_stereo_dmx_fx(
cardioid_right[i] = sub( ONE_IN_Q14 /* 1.0f in Q14 */, cardioid_left[i] ); /* corresponds to: alpha + ( 1 - alpha ) * cosf( tmp + tmp_1 ); */
move16();
/* Loop over all samples */
- FOR( j = 0; j < input_frame >> 1; j++ )
+ FOR( j = 0; j < ( input_frame >> 1 ); j++ )
{
tmp = data[i][j];
move32();
@@ -387,7 +386,7 @@ void ivas_param_ism_stereo_dmx_fx(
tmp_1 = 15 + 1;
move16();
- FOR( i = 0; i < input_frame >> 1; i++ )
+ FOR( i = 0; i < ( input_frame >> 1 ); i++ )
{
stereo_dmx[0][i] = W_extract_l( W_shr( W_mult_32_32( stereo_dmx[0][i], L_add( tmp, mult0( i, grad ) ) ), tmp_1 ) ); // Qx
move32();
diff --git a/lib_enc/ivas_masa_enc_fx.c b/lib_enc/ivas_masa_enc_fx.c
index 2f765fe058b6debab7c39d7da857f622f3d25a5a..0abe2450e1cb9bef8cf7fb025500bb9a2817f8ed 100644
--- a/lib_enc/ivas_masa_enc_fx.c
+++ b/lib_enc/ivas_masa_enc_fx.c
@@ -40,7 +40,6 @@
#include "prot_fx.h"
#include "prot_fx_enc.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
/*-----------------------------------------------------------------------*
diff --git a/lib_enc/ivas_mc_paramupmix_enc_fx.c b/lib_enc/ivas_mc_paramupmix_enc_fx.c
index c1f7357042c0eea950db02102160e179edb20407..0e8c845e145f04160a57bf7442cb56b6a4251643 100644
--- a/lib_enc/ivas_mc_paramupmix_enc_fx.c
+++ b/lib_enc/ivas_mc_paramupmix_enc_fx.c
@@ -39,7 +39,6 @@
#include "prot_fx.h"
#include "ivas_prot_fx.h"
#include "basop_util.h"
-#include "ivas_rom_com_fx.h"
#include "ivas_cnst.h"
#include "ivas_rom_com.h"
#include "ivas_rom_enc.h"
diff --git a/lib_enc/ivas_mcmasa_enc_fx.c b/lib_enc/ivas_mcmasa_enc_fx.c
index 1a208d0cca88d6b2caf9a866713f80c513b6fdc8..5c8822919feef1571338decf22762ada6081021e 100644
--- a/lib_enc/ivas_mcmasa_enc_fx.c
+++ b/lib_enc/ivas_mcmasa_enc_fx.c
@@ -39,7 +39,6 @@
#include "options.h"
#include "prot_fx.h"
#include "ivas_rom_com.h"
-#include "ivas_rom_com_fx.h"
#include "ivas_rom_enc.h"
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
diff --git a/lib_enc/ivas_qmetadata_enc_fx.c b/lib_enc/ivas_qmetadata_enc_fx.c
index 6b56b36a380bc2822b361881bdeda9a2976eedb8..f69127ff4ca8fb6dd175b0c337b95b509c7138a9 100644
--- a/lib_enc/ivas_qmetadata_enc_fx.c
+++ b/lib_enc/ivas_qmetadata_enc_fx.c
@@ -40,53 +40,29 @@
#include "ivas_rom_com.h"
#include "ivas_stat_enc.h"
#include "wmc_auto.h"
-
#include "basop_util.h"
-#include "ivas_rom_com_fx.h"
#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS )
#include
#endif
+
/*-----------------------------------------------------------------------*
* Local function prototypes
*-----------------------------------------------------------------------*/
static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_fx( IVAS_QMETADATA_HANDLE hQMetaData, Word16 *needed_bits, Word16 *nbits_diff, Word16 *dfRatioBits, const Word16 hodirac_flag );
-static Word16 ivas_qmetadata_entropy_encode_diffuseness_fx(
- BSTR_ENC_HANDLE hMetaData,
- IVAS_QDIRECTION *q_direction,
- UWord16 *diffuseness_index_max_ec_frame );
+static Word16 ivas_qmetadata_entropy_encode_diffuseness_fx( BSTR_ENC_HANDLE hMetaData, IVAS_QDIRECTION *q_direction, UWord16 *diffuseness_index_max_ec_frame );
static void ivas_qmetadata_reorder_2dir_bands_fx( IVAS_QMETADATA_HANDLE hQMetaData );
-static Word16 ivas_qmetadata_entropy_encode_df_ratio_fx(
- BSTR_ENC_HANDLE hMetaData,
- IVAS_QDIRECTION *q_direction,
- Word16 *df_ratio_bits );
+static Word16 ivas_qmetadata_entropy_encode_df_ratio_fx( BSTR_ENC_HANDLE hMetaData, IVAS_QDIRECTION *q_direction, Word16 *df_ratio_bits );
-static Word16 ivas_qmetadata_entropy_encode_dir_fx(
- BSTR_ENC_HANDLE hMetaData,
- IVAS_QDIRECTION *q_direction,
- const UWord16 diffuseness_index_max_ec_frame,
- const Word16 nbands,
- const Word16 start_band,
- const Word16 direction_bits_raw,
- Word16 max_bits,
- const Word16 hrmasa_flag );
-
-static Word16 ivas_qmetadata_raw_encode_dir_fx(
- BSTR_ENC_HANDLE hMetaData,
- IVAS_QDIRECTION *q_direction,
- const Word16 nbands,
- const Word16 start_band );
+static Word16 ivas_qmetadata_entropy_encode_dir_fx( BSTR_ENC_HANDLE hMetaData, IVAS_QDIRECTION *q_direction, const UWord16 diffuseness_index_max_ec_frame, const Word16 nbands, const Word16 start_band, const Word16 direction_bits_raw, Word16 max_bits, const Word16 hrmasa_flag );
+static Word16 ivas_qmetadata_raw_encode_dir_fx( BSTR_ENC_HANDLE hMetaData, IVAS_QDIRECTION *q_direction, const Word16 nbands, const Word16 start_band );
-static Word16 ivas_qmetadata_get_optimal_gr_param_fx(
- UWord16 *unsigned_data,
- const Word16 count,
- const Word16 gr_param_count,
- Word16 *opt_gr_size );
+static Word16 ivas_qmetadata_get_optimal_gr_param_fx( UWord16 *unsigned_data, const Word16 count, const Word16 gr_param_count, Word16 *opt_gr_size );
Word16 ivas_qmetadata_encode_extended_gr_length_fx( const UWord16 value, const UWord16 alphabet_size, const Word16 gr_param );
@@ -94,17 +70,11 @@ static Word16 ivas_qmetadata_encode_quasi_uniform_length_fx( const UWord16 value
static void ivas_qmetadata_encode_quasi_uniform_fx( BSTR_ENC_HANDLE hMetaData, const UWord16 value, const UWord16 alphabet_size );
-static Word16 ivas_qmetadata_reorder_elevation_index_fx(
- const Word16 elevation_index,
- const Word16 avg_elevation_index,
- const Word16 elevation_alphabet );
+static Word16 ivas_qmetadata_reorder_elevation_index_fx( const Word16 elevation_index, const Word16 avg_elevation_index, const Word16 elevation_alphabet );
-static Word16 ivas_qmetadata_reorder_azimuth_index_fx(
- const Word16 azimuth_index,
- const Word16 avg_azimuth_index,
- const Word16 azimuth_alphabet );
-static ivas_error requantize_direction_EC_3_fx( Word16 *extra_bits, IVAS_QDIRECTION *q_direction, const Word16 coding_subbands, BSTR_ENC_HANDLE hMetaData, Word32 elevation_orig[MASA_MAXIMUM_CODING_SUBBANDS][MAX_PARAM_SPATIAL_SUBFRAMES], Word32 azimuth_orig[MASA_MAXIMUM_CODING_SUBBANDS][MAX_PARAM_SPATIAL_SUBFRAMES], Word16 *ind_order );
+static Word16 ivas_qmetadata_reorder_azimuth_index_fx( const Word16 azimuth_index, const Word16 avg_azimuth_index, const Word16 azimuth_alphabet );
+static ivas_error requantize_direction_EC_3_fx( Word16 *extra_bits, IVAS_QDIRECTION *q_direction, const Word16 coding_subbands, BSTR_ENC_HANDLE hMetaData, Word32 elevation_orig[MASA_MAXIMUM_CODING_SUBBANDS][MAX_PARAM_SPATIAL_SUBFRAMES], Word32 azimuth_orig[MASA_MAXIMUM_CODING_SUBBANDS][MAX_PARAM_SPATIAL_SUBFRAMES], Word16 *ind_order );
static void calculate_two_distances_fx(
Word32 *el_fx, /* i : elevation values */
@@ -119,7 +89,6 @@ static void joint_encoding_fx( IVAS_QDIRECTION *q_direction, const Word16 j, con
static ivas_error write_ec_direction_fx( Word16 *num_bits_written, BSTR_ENC_HANDLE hMetaData, IVAS_QDIRECTION *q_direction, const Word16 j_idx, const Word16 len, const Word16 GR_ord_elevation, const Word16 GR_ord_azimuth, const Word16 use_context, const Word16 same );
static Word16 write_fixed_rate_direction_fx( BSTR_ENC_HANDLE hMetaData, IVAS_QDIRECTION *q_direction, const Word16 j_idx, const Word16 len );
-
static Word16 ivas_qmetadata_quantize_coherence_fx(
IVAS_QMETADATA *hQMetaData, /* i/o: quantized metadata */
const Word16 idx_d, /* i : current direction index */
@@ -168,31 +137,17 @@ static Word16 encode_surround_coherence_fx(
IVAS_QMETADATA *hQMetaData, /* i : quantized metadata */
BSTR_ENC_HANDLE hMetaData /* i/o: metadata bitstream handle */
);
-static Word16 common_direction_fx(
- IVAS_QDIRECTION *q_direction,
- const Word16 band_idx,
- const Word16 len,
- const Word16 bits_allowed,
- BSTR_ENC_HANDLE hMetaData,
- Word32 *elevation_orig_fx,
- Word32 *azimuth_orig_fx );
-static Word16 ivas_diffuseness_huff_ec_encode_fx(
- BSTR_ENC_HANDLE hMetaData,
- const UWord16 idx );
+static Word16 common_direction_fx( IVAS_QDIRECTION *q_direction, const Word16 band_idx, const Word16 len, const Word16 bits_allowed, BSTR_ENC_HANDLE hMetaData, Word32 *elevation_orig_fx, Word32 *azimuth_orig_fx );
-static void ivas_diffuseness_huff_ec_prepare_fx(
- IVAS_QDIRECTION *q_direction,
- Word16 *best_av,
- UWord16 *avr_idx,
- Word16 *diffuseness_bits_huff );
+static Word16 ivas_diffuseness_huff_ec_encode_fx( BSTR_ENC_HANDLE hMetaData, const UWord16 idx );
+
+static void ivas_diffuseness_huff_ec_prepare_fx( IVAS_QDIRECTION *q_direction, Word16 *best_av, UWord16 *avr_idx, Word16 *diffuseness_bits_huff );
static Word16 coherence_coding_length( const UWord16 *idx_sur_coh_shift, const UWord8 idx_shift_len, const Word16 coding_subbands, const Word16 *no_cv, UWord16 *mr_idx, Word16 *no_cv_shift, Word16 *p_min_idx, Word16 *GR_ord, Word16 *nbits_fr, Word16 *nbits_fr1 );
static Word16 write_2dir_info( BSTR_ENC_HANDLE hMetaData, UWord8 *twoDirBands, const Word16 n, const Word16 k );
-static void transform_azimuth_dir2_fx(
- IVAS_QMETADATA_HANDLE hQMetaData,
- Word16 *dir2_bands );
+static void transform_azimuth_dir2_fx( IVAS_QMETADATA_HANDLE hQMetaData, Word16 *dir2_bands );
static Word16 ivas_qmetadata_quantize_coherence_hr_512_fx( IVAS_QMETADATA *hQMetaData, const Word16 idx_d, const Word16 all_coherence_zero, BSTR_ENC_HANDLE hMetaData, const Word16 bits_coh );
diff --git a/lib_enc/ivas_qspherical_enc_fx.c b/lib_enc/ivas_qspherical_enc_fx.c
index 2e7a289f9d38d51dbe634700f0ff7dd66ee23b17..3f17a423e7025e5e4e34de78a2d49c3f5305a7e1 100644
--- a/lib_enc/ivas_qspherical_enc_fx.c
+++ b/lib_enc/ivas_qspherical_enc_fx.c
@@ -40,7 +40,6 @@
#include "wmc_auto.h"
#include "prot_fx.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
/*-----------------------------------------------------------------------*
diff --git a/lib_enc/ivas_sns_enc_fx.c b/lib_enc/ivas_sns_enc_fx.c
index 610f39b1b2f0610a24bd4764d3cfd61ee0dfa108..252637e73999bfd53a81b60a4640118f3db6cac1 100644
--- a/lib_enc/ivas_sns_enc_fx.c
+++ b/lib_enc/ivas_sns_enc_fx.c
@@ -39,11 +39,11 @@
#include "ivas_prot_fx.h"
#include "rom_com.h"
#include "ivas_rom_com.h"
-#include "ivas_rom_com_fx.h"
#include "ivas_cnst.h"
#include "wmc_auto.h"
#include "prot_fx_enc.h"
+
/*-------------------------------------------------------------------
* sns_1st_cod()
*
diff --git a/lib_enc/ivas_spar_md_enc_fx.c b/lib_enc/ivas_spar_md_enc_fx.c
index 33a02669ef1e3aa915f900fe9a1da6ebeaf72b43..be07b38cbc7a47018b4e88b3523129d0661bf154 100644
--- a/lib_enc/ivas_spar_md_enc_fx.c
+++ b/lib_enc/ivas_spar_md_enc_fx.c
@@ -37,7 +37,6 @@
#include "ivas_prot_fx.h"
#include "math.h"
#include "ivas_rom_com.h"
-#include "ivas_rom_com_fx.h"
#include
#include "wmc_auto.h"
diff --git a/lib_enc/ivas_stereo_dft_enc_fx.c b/lib_enc/ivas_stereo_dft_enc_fx.c
index 80c4b5a21c8d67576543e593b880993231f2e9b9..1eb89a74af4cab0fbcf3994b059aa5dca5c23958 100644
--- a/lib_enc/ivas_stereo_dft_enc_fx.c
+++ b/lib_enc/ivas_stereo_dft_enc_fx.c
@@ -41,7 +41,6 @@
#include "ivas_prot_fx.h"
#include "ivas_cnst.h"
#include "ivas_rom_com.h"
-#include "ivas_rom_com_fx.h"
#include "ivas_rom_enc.h"
#include "wmc_auto.h"
diff --git a/lib_enc/ivas_stereo_dmx_evs_fx.c b/lib_enc/ivas_stereo_dmx_evs_fx.c
index e3e49193a5a78ebb9634320eb677347b8c602e08..852be98fe7132d51bdd0c5c4dba5a892a779c27f 100644
--- a/lib_enc/ivas_stereo_dmx_evs_fx.c
+++ b/lib_enc/ivas_stereo_dmx_evs_fx.c
@@ -39,7 +39,6 @@
#include "prot_fx.h"
#include "ivas_prot_fx.h"
#include "ivas_rom_com.h"
-#include "ivas_rom_com_fx.h"
#include "ivas_rom_enc.h"
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
@@ -529,7 +528,7 @@ static void calc_poc_fx(
move32();
gamma = L_sub( gamma, igamma );
}
- FOR( ; i < n0 >> 4; i++ ) /*search from 4 angles */
+ FOR( ; i < ( n0 >> 4 ); i++ ) /*search from 4 angles */
{
tmp1 = Mpy_32_16_1( Mpy_32_32_r( wnd[i * step + bias], gamma ), 23170 /*0.7071f*/ );
@@ -540,7 +539,7 @@ static void calc_poc_fx(
gamma = L_sub( gamma, igamma );
}
- FOR( ; i < n0 >> 3; i++ ) /* binary search from 8 angles */
+ FOR( ; i < ( n0 >> 3 ); i++ ) /* binary search from 8 angles */
{
tmp1 = Mpy_32_32_r( wnd[i * step + bias], gamma ); // Q31
diff --git a/lib_enc/ivas_stereo_ica_enc_fx.c b/lib_enc/ivas_stereo_ica_enc_fx.c
index d0252a1f154a32df2845bea6d5c3dc695368e2a0..e5c7af987416ee004fd5405e36a175643b479827 100644
--- a/lib_enc/ivas_stereo_ica_enc_fx.c
+++ b/lib_enc/ivas_stereo_ica_enc_fx.c
@@ -40,13 +40,13 @@
#include "wmc_auto.h"
#include "rom_com.h"
#include "ivas_rom_com.h"
-
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
+
/*---------------------------------------------------------------
* Local function prototypes
* ---------------------------------------------------------------*/
+
static void unclr_calc_corr_features_fx(
STEREO_CLASSIF_HANDLE hStereoClassif, /* i/o: stereo classifier handle */
STEREO_TCA_ENC_HANDLE hStereoTCA, /* i/o: ICA Stereo Encoder handle */
@@ -78,6 +78,7 @@ static void unclr_calc_corr_features_fx(
*
* Temporal channel adjustment of LA samples in target channel
* ---------------------------------------------------------------*/
+
static void tcaTargetCh_LA_fx(
STEREO_TCA_ENC_HANDLE hStereoTCA,
Word32 *ptrChanL, /* q_com */
diff --git a/lib_enc/ivas_stereo_icbwe_enc_fx.c b/lib_enc/ivas_stereo_icbwe_enc_fx.c
index 67ba071a055792d0c100a798df8fbe58a027160f..85c35ed50f80ab35a492daf9b536088e6573dffe 100644
--- a/lib_enc/ivas_stereo_icbwe_enc_fx.c
+++ b/lib_enc/ivas_stereo_icbwe_enc_fx.c
@@ -39,15 +39,14 @@
#include "wmc_auto.h"
#include "rom_com.h"
#include "ivas_rom_com.h"
-
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
/*-------------------------------------------------------------------*
* ic_bwe_enc_reset()
*
* core switching reset of IC BWE memory
*-------------------------------------------------------------------*/
+
static void ic_bwe_enc_reset_fx(
STEREO_ICBWE_ENC_HANDLE hStereoICBWE /* i/o: Stereo ICBWE handle */
)
diff --git a/lib_enc/ivas_stereo_mdct_stereo_enc_fx.c b/lib_enc/ivas_stereo_mdct_stereo_enc_fx.c
index 23094eb22427e41b2be53d56139a77e49d07cf22..bcc4462a23f3d3574a5996509226e5e9174a0491 100644
--- a/lib_enc/ivas_stereo_mdct_stereo_enc_fx.c
+++ b/lib_enc/ivas_stereo_mdct_stereo_enc_fx.c
@@ -39,7 +39,6 @@
#include "prot_fx.h"
#include "prot_fx_enc.h"
#include "ivas_rom_com.h"
-#include "ivas_rom_com_fx.h"
#include "ivas_rom_enc.h"
#include "wmc_auto.h"
#include "stat_enc.h"
diff --git a/lib_enc/ivas_stereo_switching_enc_fx.c b/lib_enc/ivas_stereo_switching_enc_fx.c
index 469bf211aa443e9fe034f37021355f840f627d34..3bee884824a9fd1af85a79e4c36727efa40b4d54 100644
--- a/lib_enc/ivas_stereo_switching_enc_fx.c
+++ b/lib_enc/ivas_stereo_switching_enc_fx.c
@@ -35,13 +35,13 @@
#include "cnst.h"
#include "rom_com.h"
#include "prot_fx.h"
-#include "ivas_rom_com_fx.h"
#include "ivas_rom_com.h"
#include "assert.h"
#include "wmc_auto.h"
#include "prot_fx_enc.h"
#include "ivas_prot_fx.h"
+
/*-------------------------------------------------------------------*
* Function allocate_CoreCoder_enc()
*
diff --git a/lib_enc/ivas_stereo_td_analysis_fx.c b/lib_enc/ivas_stereo_td_analysis_fx.c
index de47ea8e25afb906ebb9c9afe386c86c1f887e39..ab28f7f7e4e64c63a8d86c43f1751a5cbc9dd921 100644
--- a/lib_enc/ivas_stereo_td_analysis_fx.c
+++ b/lib_enc/ivas_stereo_td_analysis_fx.c
@@ -41,7 +41,6 @@
#include "rom_enc.h"
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
/*-------------------------------------------------------------------*
diff --git a/lib_enc/ivas_stereo_td_enc_fx.c b/lib_enc/ivas_stereo_td_enc_fx.c
index 8f1d2d9c9c46d088fd8d6375b55d48e2028fd660..e617e1a9ab707d744a1a3d6a97498694ba3d0812 100644
--- a/lib_enc/ivas_stereo_td_enc_fx.c
+++ b/lib_enc/ivas_stereo_td_enc_fx.c
@@ -43,7 +43,6 @@
#endif
#include "prot_fx_enc.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
/*-------------------------------------------------------------------*
@@ -51,6 +50,7 @@
*
* Initialize TD stereo encoder
*-------------------------------------------------------------------*/
+
void stereo_td_init_enc_fx(
STEREO_TD_ENC_DATA_HANDLE hStereoTD, /* i/o: TD stereo encoder handle */
const Word16 last_element_mode /* i : last element mode */
diff --git a/lib_enc/ivas_tcx_core_enc_fx.c b/lib_enc/ivas_tcx_core_enc_fx.c
index da141f473432c7384c43abc984a1f67b800d5514..b069892262b0d1657b59a11635c06484d5b21e17 100644
--- a/lib_enc/ivas_tcx_core_enc_fx.c
+++ b/lib_enc/ivas_tcx_core_enc_fx.c
@@ -41,7 +41,6 @@
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
#include "prot_fx_enc.h"
-#include "rom_com_fx.h"
#include "ivas_prot_fx.h"
/*-------------------------------------------------------------------*
diff --git a/lib_enc/lead_indexing_fx.c b/lib_enc/lead_indexing_fx.c
index 70e0c4796ac2a53ea93ea8b1e7368999f4726e5c..c26c817f406acd1157f25b49a12974e4ac798703 100644
--- a/lib_enc/lead_indexing_fx.c
+++ b/lib_enc/lead_indexing_fx.c
@@ -1,11 +1,10 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
#include "options.h" /* Compilation switches */
#include "cnst.h"
-//#include "prot_fx.h"
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
@@ -13,6 +12,7 @@
/*-------------------------------------------------------------------*
* Local function prototypes
*-------------------------------------------------------------------*/
+
static Word16 fcb_encode_pos_fx( const Word16 pos_vector[], const Word16 pulse_num, const Word16 pos_num );
/*-------------------------------------------------------------------*
@@ -20,6 +20,7 @@ static Word16 fcb_encode_pos_fx( const Word16 pos_vector[], const Word16 pulse_n
*
* Compute base index for RE8
*-------------------------------------------------------------------*/
+
void re8_compute_base_index_fx(
const Word16 *x, /* i : Elemen of Q2, Q3 or Q4 */
const Word16 ka, /* i : Identifier of the absolute leader related to x Q0*/
diff --git a/lib_enc/lsf_enc_fx.c b/lib_enc/lsf_enc_fx.c
index 505114459b9f39d71d0cc62afd1a7713e61e61d6..ec89c04111282817f30f825d191a15be7d433120 100644
--- a/lib_enc/lsf_enc_fx.c
+++ b/lib_enc/lsf_enc_fx.c
@@ -5,9 +5,7 @@
#include
#include "options.h" /* Compilation switches */
#include "rom_enc.h"
-#include "rom_com_fx.h" /* Static table prototypes */
-#include "rom_com.h" /* Static table prototypes */
-//#include "prot_fx.h" /* Function prototypes */
+#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
#include "ivas_prot_fx.h" /* Function prototypes */
@@ -16,6 +14,7 @@
/*-----------------------------------------------------------------*
* Local constants
*-----------------------------------------------------------------*/
+
#define MIN_LOG_FX 0
#define MIN_LOG_VAL_FX -15360 /* -60.0f in Q8 */
#define MSVQ_MAXCNT 3000
@@ -35,6 +34,7 @@ static void lsf_mid_enc_fx( BSTR_ENC_HANDLE hBstr, Word16 nb_bits, const Word16
static void lsf_mid_enc_ivas_fx( BSTR_ENC_HANDLE hBstr, Word16 nb_bits, const Word32 int_fs, const Word16 qlsp0[], const Word16 qlsp1[], Word16 lsp[], const Word16 coder_type, const Word16 bwidth, Word32 Bin_Ener_old[], Word16 Q_ener, Word16 ppp_mode, Word16 nelp_mode );
+
/*===========================================================================*/
/* FUNCTION : lsf_enc_fx() */
/*---------------------------------------------------------------------------*/
diff --git a/lib_enc/lsf_msvq_ma_enc_fx.c b/lib_enc/lsf_msvq_ma_enc_fx.c
index 8e04e86d9e10435a9bb24017cfeb8c653a41bb5a..81a0071e530851d4971abeabe640601225849dd8 100644
--- a/lib_enc/lsf_msvq_ma_enc_fx.c
+++ b/lib_enc/lsf_msvq_ma_enc_fx.c
@@ -5,9 +5,7 @@
#include
#include
#include "options.h"
-//#include "prot_fx.h"
#include "cnst.h"
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "rom_enc.h"
#include "basop_util.h"
diff --git a/lib_enc/mslvq_enc_fx.c b/lib_enc/mslvq_enc_fx.c
index 4955dede80a4a7e57d285bebf54ec13d0fda2508..05c379f3199b38da686b7ee4cd4040024e4c9e67 100644
--- a/lib_enc/mslvq_enc_fx.c
+++ b/lib_enc/mslvq_enc_fx.c
@@ -2,8 +2,9 @@
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+#include
+#include "options.h" /* Compilation switches */
#include "cnst.h"
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "stl.h"
#include "prot_fx.h" /* Function prototypes */
diff --git a/lib_enc/noise_adjust_fx.c b/lib_enc/noise_adjust_fx.c
index 1a2e204aea8c14b96a983c05f1eb02cd3a29c09f..2a6ffd22e4b5d6edf7d35d75d4f6f2b865e523cf 100644
--- a/lib_enc/noise_adjust_fx.c
+++ b/lib_enc/noise_adjust_fx.c
@@ -1,27 +1,29 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
-#include "options.h" /* Compilation switches */
-#include "cnst.h" /* Common constants */
-#include "rom_com_fx.h" /* Static table prototypes */
-//#include "prot_fx.h" /* Function prototypes */
+#include "options.h" /* Compilation switches */
+#include "cnst.h" /* Common constants */
+#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
/*--------------------------------------------------------------------------*
* noise_adjust_fx()
*
* Calculate attenuation
*--------------------------------------------------------------------------*/
-Word16 noise_adjust_fx( /* o : index of noise attenuation Q0 */
- const Word16 *coeffs_norm, /* i : normalized coefficients Qx */
- const Word16 qx, /* i : Q value of coeffs_norm */
- const Word16 *bitalloc, /* i : bit allocation Q0 */
- const Word16 *sfm_start, /* i : band start Q0 */
- const Word16 *sfm_end, /* i : band end Q0 */
- const Word16 core_sfm /* i : index of the end band for core Q0 */
+/* o : index of noise attenuation Q0 */
+Word16 noise_adjust_fx(
+ const Word16 *coeffs_norm, /* i : normalized coefficients Qx */
+ const Word16 qx, /* i : Q value of coeffs_norm */
+ const Word16 *bitalloc, /* i : bit allocation Q0 */
+ const Word16 *sfm_start, /* i : band start Q0 */
+ const Word16 *sfm_end, /* i : band end Q0 */
+ const Word16 core_sfm /* i : index of the end band for core Q0 */
)
{
Word16 nf_idx, sfm, bin, num_coeffs;
diff --git a/lib_enc/peak_vq_enc_fx.c b/lib_enc/peak_vq_enc_fx.c
index dffab490016b224c5abeea742c81d24cf7d79e0b..bd87efb23cec3986c22e08e44636e0a08029e160 100644
--- a/lib_enc/peak_vq_enc_fx.c
+++ b/lib_enc/peak_vq_enc_fx.c
@@ -6,13 +6,12 @@
#include
#include "options.h" /* Compilation switches */
#include "cnst.h" /* Common constants */
-//#include "prot_fx.h"
#include "rom_enc.h"
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
/*--------------------------------------------------------------------------
* Local function prototypes
*--------------------------------------------------------------------------*/
@@ -23,7 +22,7 @@ static Word16 sparse_code_pos_fx( const Word16 *inp, const Word16 length, Word16
static Word16 hvq_code_pos_ivas_fx( BSTR_ENC_HANDLE hBstr, const Word16 *inp, const Word16 length, const Word16 num_peaks );
static void quant_peaks_ivas_fx(
- BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
+ BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle*/
const Word32 *vect_in, /* i : Target vector in Q12 */
Word32 *vect_out, /* i/o: Quantized vector in Q12 */
const Word32 *peak_gain, /* i : Peak gain vector in Q12 */
@@ -32,11 +31,14 @@ static void quant_peaks_ivas_fx(
const Word32 core_brate, /* i : Core bitrate */
const Word16 Npeaks /* i : Number of peaks */
);
+
+
/*--------------------------------------------------------------------------
* peak_vq_enc_fx()
*
* Vector Quantization of MDCT peaks
*--------------------------------------------------------------------------*/
+
Word16 peak_vq_enc_ivas_fx(
BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
const Word16 bwidth, /* i : audio bandwidth */
diff --git a/lib_enc/pit_enc_fx.c b/lib_enc/pit_enc_fx.c
index c629597995f4f9ef6c002caab243ab8dcbe0a82a..004dc297d1c2aadcecce8ae366a40101a6abd9a8 100644
--- a/lib_enc/pit_enc_fx.c
+++ b/lib_enc/pit_enc_fx.c
@@ -3,17 +3,16 @@
====================================================================================*/
#include
#include
-#include "options.h" /* Compilation switches */
-#include "cnst.h" /* Common constants */
-#include "rom_enc.h" /* Encoder static table prototypes */
-#include "rom_com_fx.h" /* Static table prototypes */
-#include "rom_com.h" /* Static table prototypes */
-//#include "prot_fx.h" /* Function prototypes */
+#include "options.h" /* Compilation switches */
+#include "cnst.h" /* Common constants */
+#include "rom_enc.h" /* Encoder static table prototypes */
+#include "rom_com.h" /* Static table prototypes */
#include "rom_basop_util.h"
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
#define inv_T0_res InvIntTable
static void limit_T0_voiced2( Word16 res, const Word16 *T_op, Word16 *T0_min, Word16 *T0_min_frac, Word16 *T0_max, Word16 *T0_max_frac, Word16 pit_min, Word16 pit_max, Word16 i_subfr );
diff --git a/lib_enc/pitch_ol2_fx.c b/lib_enc/pitch_ol2_fx.c
index c0c17ec6333267c793f6fb0fe8cd044cd652454e..1e23b7cdb65d5b0ba4ac9d70b79be55c8aa010ce 100644
--- a/lib_enc/pitch_ol2_fx.c
+++ b/lib_enc/pitch_ol2_fx.c
@@ -1,17 +1,17 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
-#include "options.h" /* Compilation switches */
-#include "cnst.h" /* Common constants */
-#include "rom_enc.h" /* Encoder static table prototypes */
-#include "rom_com_fx.h" /* Encoder static table prototypes */
-#include "rom_com.h" /* Encoder static table prototypes */
+#include "options.h" /* Compilation switches */
+#include "cnst.h" /* Common constants */
+#include "rom_enc.h" /* Encoder static table prototypes */
+#include "rom_com.h" /* Encoder static table prototypes */
#include "rom_dec.h"
-//#include "prot_fx.h" /* Function prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
/*-------------------------------------------------------------------*
* Local constants
*-------------------------------------------------------------------*/
diff --git a/lib_enc/pitch_ol_fx.c b/lib_enc/pitch_ol_fx.c
index 56647f7b12030b02e8d4c2733102b9d9d4e95792..4e2aff772b72809b8ad29448eee637d88d1acab2 100644
--- a/lib_enc/pitch_ol_fx.c
+++ b/lib_enc/pitch_ol_fx.c
@@ -5,14 +5,13 @@
#include
#include "options.h"
#include "cnst.h"
-// #include "prot_fx.h"
#include "basop_util.h"
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "rom_enc.h"
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
/*-----------------------------------------------------------------*
* Local Constants
*-----------------------------------------------------------------*/
diff --git a/lib_enc/ppp_enc_fx.c b/lib_enc/ppp_enc_fx.c
index d6dc8b6d68adcec9c2466e1069b658ce85791c7e..836689df2728a02a0e28634bdecffebc4b21c739 100644
--- a/lib_enc/ppp_enc_fx.c
+++ b/lib_enc/ppp_enc_fx.c
@@ -5,15 +5,16 @@
#include
#include "options.h"
#include "cnst.h"
-#include "rom_com_fx.h"
#include "rom_com.h" /* Common constants */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
#include "basop_util.h" /* Function prototypes */
+
/*-------------------------------------------------------------------*
* Local constants
*-------------------------------------------------------------------*/
+
#define ERB_CBSIZE1 64
#define ERB_CBSIZE2 64
#define P_CBSIZE 64
@@ -21,6 +22,7 @@
/*-------------------------------------------------------------------*
* Local functions
*--------------------------------------------------------------------*/
+
static Word16 DTFS_quant_cw_fx( DTFS_STRUCTURE *X_fx, Word16 pl, const Word16 *curr_lpc_fx, Word16 *POWER_IDX, Word16 *AMP_IDX, Word16 *lastLgainE_fx, Word16 *lastHgainE_fx, Word16 *lasterbE_fx, Word16 *sin_tab, Word16 *cos_tab );
static Word16 DTFS_alignment_fine_new_fx( DTFS_STRUCTURE X1_fx, DTFS_STRUCTURE X2_fx, Word16 *S_fx, Word16 *C_fx );
static void erb_diff_fx( const Word16 *prev_erb, Word16 pl, const Word16 *curr_erb, Word16 l, const Word16 *curr_lsp, Word16 *index, Word16 num_erb );
diff --git a/lib_enc/pre_proc_fx.c b/lib_enc/pre_proc_fx.c
index 55e7437ee2f1fef5fcc9b5c84abef4eeeb69a934..6949618d1ee48417c52a8c7c018c9adea79f5098 100644
--- a/lib_enc/pre_proc_fx.c
+++ b/lib_enc/pre_proc_fx.c
@@ -5,12 +5,12 @@
#include
#include "options.h"
#include "cnst.h"
-#include "rom_com_fx.h"
#include "rom_com.h" /* Common constants */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
#include "basop_util.h" /* Function prototypes */
+
/*-------------------------------------------------------------------*
* pre_proc()
*
diff --git a/lib_enc/prot_fx_enc.h b/lib_enc/prot_fx_enc.h
index 5e2e144472add4930a7f0db4b1b2bcc7fe703230..239ea927ba1087f179235c7fef51fd96fc888636 100644
--- a/lib_enc/prot_fx_enc.h
+++ b/lib_enc/prot_fx_enc.h
@@ -62,9 +62,7 @@ ivas_error acelp_core_enc_fx(
Word16 *unbits_fx, /* o : number of unused bits Q0*/
STEREO_TD_ENC_DATA_HANDLE hStereoTD, /* i/o: TD stereo encoder handle */
const Word16 Q_new,
- const Word16 shift
-
-);
+ const Word16 shift );
void analy_lp_fx(
const Word16 speech[], /* i :(Q_new) pointer to the speech frame */
@@ -106,6 +104,7 @@ void AVQ_encmux_fx(
Word16 avq_bit_sFlag, /* i : flag for AVQ bit saving solution */
Word16 trgtSvPos /* i : target SV for AVQ bit savings */
);
+
void bw_detect_fx(
Encoder_State *st, /* i/o: Encoder State */
const Word16 signal_in[], /* i : input signal */
@@ -233,37 +232,39 @@ void find_tilt_fx(
Word16 Opt_vbr_mode /* Q0 */
);
-Word16 find_uv_ivas_fx( /* o : coding type */
- Encoder_State *st_fx, /* i/o: encoder state structure */
- const Word16 *T_op_fr, /* i : pointer to adjusted fractional pitch (4 val.) Q6*/
- const Word16 *voicing_fr, /* i : refined correlation for each subframes Q15*/
- const Word16 *speech, /* i : pointer to speech signal for E computation Q_new*/
- const Word32 *ee, /* i : lf/hf Energy ratio for present frame Q6*/
- Word32 *dE1X, /* o : sudden energy increase for S/M classifier Q13*/
- const Word16 corr_shift, /* i : normalized correlation correction in noise Q15*/
- const Word16 relE, /* i : relative frame energy Q8*/
- const Word16 Etot, /* i : total energy Q8*/
- const Word32 hp_E[], /* i : energy in HF q_hp_E*/
- Word16 *flag_spitch, /* i/o: flag to indicate very short stable pitch and high correlation Q0*/
- const Word16 last_core_orig, /* i : original last core Q0*/
- STEREO_CLASSIF_HANDLE hStereoClassif, /* i/o: stereo classifier structure */
- const Word16 Q_new,
- const Word16 q_hp_E );
-
-Word16 find_uv_fx( /* o : coding type */
- Encoder_State *st_fx, /* i/o: encoder state structure */
- const Word16 *T_op_fr, /* i : pointer to adjusted fractional pitch (4 val.) Q6*/
- const Word16 *voicing_fr, /* i : refined correlation for each subframes Q15*/
- const Word16 *speech, /* i : pointer to speech signal for E computation Q_new*/
- const Word32 *ee, /* i : lf/hf Energy ratio for present frame Q6*/
- const Word16 corr_shift, /* i : normalized correlation correction in noise Q15*/
- const Word16 relE, /* i : relative frame energy Q8*/
- const Word16 Etot, /* i : total energy Q8*/
- const Word32 hp_E[], /* i : energy in HF Q_new + Q_SCALE*/
- const Word16 Q_new,
- Word16 *flag_spitch, /* i/o: flag to indicate very short stable pitch and high correlation Q0*/
- const Word16 shift,
- const Word16 last_core_orig /* i : original last core Q0*/
+/* o : coding type */
+Word16 find_uv_ivas_fx(
+ Encoder_State *st_fx, /* i/o: encoder state structure */
+ const Word16 *T_op_fr, /* i : pointer to adjusted fractional pitch (4 val.) Q6*/
+ const Word16 *voicing_fr, /* i : refined correlation for each subframes Q15*/
+ const Word16 *speech, /* i : pointer to speech signal for E computation Q_new*/
+ const Word32 *ee, /* i : lf/hf Energy ratio for present frame Q6*/
+ Word32 *dE1X, /* o : sudden energy increase for S/M classifier Q13*/
+ const Word16 corr_shift, /* i : normalized correlation correction in noise Q15*/
+ const Word16 relE, /* i : relative frame energy Q8*/
+ const Word16 Etot, /* i : total energy Q8*/
+ const Word32 hp_E[], /* i : energy in HF q_hp_E*/
+ Word16 *flag_spitch, /* i/o: flag to indicate very short stable pitch and high correlation Q0*/
+ const Word16 last_core_orig, /* i : original last core Q0*/
+ STEREO_CLASSIF_HANDLE hStereoClassif, /* i/o: stereo classifier structure */
+ const Word16 Q_new,
+ const Word16 q_hp_E );
+
+/* o : coding type */
+Word16 find_uv_fx(
+ Encoder_State *st_fx, /* i/o: encoder state structure */
+ const Word16 *T_op_fr, /* i : pointer to adjusted fractional pitch (4 val.) Q6*/
+ const Word16 *voicing_fr, /* i : refined correlation for each subframes Q15*/
+ const Word16 *speech, /* i : pointer to speech signal for E computation Q_new*/
+ const Word32 *ee, /* i : lf/hf Energy ratio for present frame Q6*/
+ const Word16 corr_shift, /* i : normalized correlation correction in noise Q15*/
+ const Word16 relE, /* i : relative frame energy Q8*/
+ const Word16 Etot, /* i : total energy Q8*/
+ const Word32 hp_E[], /* i : energy in HF Q_new + Q_SCALE*/
+ const Word16 Q_new,
+ Word16 *flag_spitch, /* i/o: flag to indicate very short stable pitch and high correlation Q0*/
+ const Word16 shift,
+ const Word16 last_core_orig /* i : original last core Q0*/
);
void fine_gain_quant_fx(
@@ -289,6 +290,7 @@ void long_enr_fx(
const Word16 Etot, /* i : total channel E (see lib_enc\analy_sp.c) */
const Word16 localVAD_HE_SAD, /* i : HE-SAD flag without hangover */
Word16 high_lpn_flag );
+
void ivas_long_enr_fx(
Encoder_State *st_fx, /* i/o: state structure */
const Word32 Etot, /* i : total channel E (see lib_enc\analy_sp.c) Q=24*/
@@ -300,12 +302,14 @@ void ivas_long_enr_fx(
const Word16 Etot_LR[] /* i : total channel energy LR channels Q=8*/
);
-Word16 mdct_classifier_fx( /* o: MDCT A/B decision */
- const Word16 *Y, /* i: re[0], re[1], ..., re[n/2], im[n/2 - 1], im[n/2 - 2], ..., im[1] */
- Encoder_State *st_fx, /* i/o: Encoder state variable */
- Word32 *cldfbBuf_Ener,
- Word16 enerBuffer_exp,
- const Word32 brate /* i : current brate, IVAS: nominal bitrate, EVS: st->total_brate */
+
+/* o: MDCT A/B decision */
+Word16 mdct_classifier_fx(
+ const Word16 *Y, /* i: re[0], re[1], ..., re[n/2], im[n/2 - 1], im[n/2 - 2], ..., im[1] */
+ Encoder_State *st_fx, /* i/o: Encoder state variable */
+ Word32 *cldfbBuf_Ener,
+ Word16 enerBuffer_exp,
+ const Word32 brate /* i : current brate, IVAS: nominal bitrate, EVS: st->total_brate */
);
void noise_est_down_fx(
@@ -369,6 +373,7 @@ void noise_est_fx(
Word16 S_map[], /* o : short-term correlation map Q7 */
const Word16 ini_frame /* i : Frame number (init) */
);
+
void noise_est_ivas_fx(
Encoder_State *st_fx, /* i/o: state structure */
const Word16 old_pitch1, /* i : previous frame OL pitch[1] */
@@ -401,6 +406,7 @@ void noise_est_ivas_fx(
FRONT_VAD_ENC_HANDLE hFrontVad, /* i/o: front-VAD handle */
const Word16 ini_frame /* i : Frame number (init) */
);
+
void noise_est_pre_fx(
const Word16 Etot, /* i : Energy of current frame */
const Word16 ini_frame_fx, /* i : Frame number (init) */
@@ -422,17 +428,14 @@ void noise_est_pre_32fx(
);
void pitch_ol2_fx(
- const Word16 pit_min, /* i : minimum pitch value (20 or 29) */
- const Word16 pitch_ol, /* i : pitch to be improved */
- Word16 *pitch_fr_fx,
- /* o : adjusted 1/4 fractional pitch */ /*Q7*/
- Word16 *voicing_fr_fx,
- /* o : adjusted 1/4 fractional voicing */ /*Q15*/
- const Word16 pos, /* i : position in frame where to calculate the improv. */
- const Word16 *wsp_fx,
- /* i : weighted speech for current frame and look-ahead */ /*Q_new-1+shift*/
- const Word16 delta, /* i : delta for pitch search (2 or 7) */
- const Word16 element_mode /* i : EVS or IVAS */
+ const Word16 pit_min, /* i : minimum pitch value (20 or 29) */
+ const Word16 pitch_ol, /* i : pitch to be improved */
+ Word16 *pitch_fr_fx, /* o : adjusted 1/4 fractional pitch Q7*/
+ Word16 *voicing_fr_fx, /* o : adjusted 1/4 fractional voicing Q15*/
+ const Word16 pos, /* i : position in frame where to calculate the improv. */
+ const Word16 *wsp_fx, /* i : weighted speech for current frame and look-ahead Q_new-1+shift*/
+ const Word16 delta, /* i : delta for pitch search (2 or 7) */
+ const Word16 element_mode /* i : EVS or IVAS */
);
void pitch_ol_ivas_fx(
@@ -503,19 +506,20 @@ void Scale_mem_enc(
Word16 *last_exc_dct_in,
Word16 *old_input_lp );
-Word32 Scale_mem_pre_proc( /* o : Min energy scaled */
- Word16 ini_frame_fx, /* i : Frame number Q0*/
- Word16 Q_exp, /* i : Diff scaling factor */
- Word16 *Q_new, /* i/o: Absolute scaling factor */
- Word16 *old_speech, /* i/o: Speech memory */
- Word16 *mem_wsp, /* i/o: wsp vector memory st->mem_wsp_q*/
- Word32 *enrO, /* i/o: Enr mem q_enrO*/
- Word32 *bckr, /* i/o: Back ground_fx ener mem q_bckr*/
- Word32 *ave_enr, /* i/o: Ave_enr mem Q_new + QSCALE*/
- Word32 *ave_enr2, /* i/o: Ave_enr2 mem Q_new + QSCALE*/
- Word32 *st_fr_bands1, /* i/o: spectrum per critical bands of the previous frame Q_new + QSCALE*/
- Word32 *st_fr_bands2, /* i/o: spectrum per critical bands 2 frames ago Q_new + QSCALE*/
- Word32 *st_Bin_E_old );
+/* o : Min energy scaled */
+Word32 Scale_mem_pre_proc(
+ Word16 ini_frame_fx, /* i : Frame number Q0*/
+ Word16 Q_exp, /* i : Diff scaling factor */
+ Word16 *Q_new, /* i/o: Absolute scaling factor */
+ Word16 *old_speech, /* i/o: Speech memory */
+ Word16 *mem_wsp, /* i/o: wsp vector memory st->mem_wsp_q*/
+ Word32 *enrO, /* i/o: Enr mem q_enrO*/
+ Word32 *bckr, /* i/o: Back ground_fx ener mem q_bckr*/
+ Word32 *ave_enr, /* i/o: Ave_enr mem Q_new + QSCALE*/
+ Word32 *ave_enr2, /* i/o: Ave_enr2 mem Q_new + QSCALE*/
+ Word32 *st_fr_bands1, /* i/o: spectrum per critical bands of the previous frame Q_new + QSCALE*/
+ Word32 *st_fr_bands2, /* i/o: spectrum per critical bands 2 frames ago Q_new + QSCALE*/
+ Word32 *st_Bin_E_old );
void Scale_wsp(
Word16 *wsp, /* i : Weigthed speech */
@@ -529,22 +533,24 @@ void Scale_wsp(
const Word16 Len_p_look /* i : L_frame + look ahead Q0*/
);
-Word16 signal_clas_fx( /* o : classification for current frames */
- Encoder_State *st, /* i/o: encoder state structure */
- const Word16 *speech, /* i : pointer to speech signal for E computation */
- const Word32 *ee, /* i : lf/hf E ration for 2 half-frames */
- const Word16 relE, /* i : frame relative E to the long term average */
- const Word16 L_look, /* i : look-ahead */
- Word16 *uc_clas /* o : temporary classification used in music/speech class*/
+/* o : classification for current frames */
+Word16 signal_clas_fx(
+ Encoder_State *st, /* i/o: encoder state structure */
+ const Word16 *speech, /* i : pointer to speech signal for E computation */
+ const Word32 *ee, /* i : lf/hf E ration for 2 half-frames */
+ const Word16 relE, /* i : frame relative E to the long term average */
+ const Word16 L_look, /* i : look-ahead */
+ Word16 *uc_clas /* o : temporary classification used in music/speech class*/
);
-Word16 signal_clas_ivas_fx( /* o : classification for current frames */
- Encoder_State *st, /* i/o: encoder state structure */
- const Word16 *speech, /* i : pointer to speech signal for E computation */
- const Word32 *ee, /* i : lf/hf E ration for 2 half-frames */
- const Word16 relE, /* i : frame relative E to the long term average */
- const Word16 L_look, /* i : look-ahead */
- Word16 *uc_clas /* o : temporary classification used in music/speech class*/
+/* o : classification for current frames */
+Word16 signal_clas_ivas_fx(
+ Encoder_State *st, /* i/o: encoder state structure */
+ const Word16 *speech, /* i : pointer to speech signal for E computation */
+ const Word32 *ee, /* i : lf/hf E ration for 2 half-frames */
+ const Word16 relE, /* i : frame relative E to the long term average */
+ const Word16 L_look, /* i : look-ahead */
+ Word16 *uc_clas /* o : temporary classification used in music/speech class*/
);
void speech_music_classif_fx(
@@ -634,17 +640,14 @@ void swb_CNG_enc_ivas_fx(
);
void swb_pre_proc_fx(
- Encoder_State *st_fx, /* i/o: encoder state structure */
- const Word16 *input_fx, /* i : original i signal */
- Word16 *new_swb_speech_fx, /* o : original i signal at 32kHz */
- Word16 *shb_speech_fx, /* o : SHB target signal (6-14kHz) at 16kHz */
- Word16 *Q_shb_spch /* o : shb target signal Q factor */
- ,
- Word32 realBuffer[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX] /* i : real buffer */
- ,
- Word32 imagBuffer[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX] /* i : imag buffer */
- ,
- const CLDFB_SCALE_FACTOR *cldfbScale /* i : scale data of real and imag CLDFB buffers */
+ Encoder_State *st_fx, /* i/o: encoder state structure */
+ const Word16 *input_fx, /* i : original i signal */
+ Word16 *new_swb_speech_fx, /* o : original i signal at 32kHz */
+ Word16 *shb_speech_fx, /* o : SHB target signal (6-14kHz) at 16kHz */
+ Word16 *Q_shb_spch, /* o : shb target signal Q factor */
+ Word32 realBuffer[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i : real buffer */
+ Word32 imagBuffer[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i : imag buffer */
+ const CLDFB_SCALE_FACTOR *cldfbScale /* i : scale data of real and imag CLDFB buffers */
);
void InitSWBencBufferStates_fx(
@@ -691,20 +694,23 @@ Word16 tfaEnc_TBE_fx(
const Word16 *pitch_buf, /* Q6 */
const Word16 Q_enr );
-Word32 VAD_Log2( Word32 i_s32Val,
- Word16 i_s16Q );
+Word32 VAD_Log2(
+ Word32 i_s32Val,
+ Word16 i_s16Q );
-Word32 VAD_L_ADD( Word32 s32Mantissa1,
- Word16 i_tExp1,
- Word32 s32Mantissa2,
- Word16 i_tExp2,
- Word16 *s16Exp );
+Word32 VAD_L_ADD(
+ Word32 s32Mantissa1,
+ Word16 i_tExp1,
+ Word32 s32Mantissa2,
+ Word16 i_tExp2,
+ Word16 *s16Exp );
-Word32 VAD_L_div( Word32 L_var1,
- Word32 L_var2,
- Word16 Q_L_var1,
- Word16 Q_L_var2,
- Word16 *Q_OUT );
+Word32 VAD_L_div(
+ Word32 L_var1,
+ Word32 L_var2,
+ Word16 Q_L_var1,
+ Word16 Q_L_var2,
+ Word16 *Q_OUT );
void vad_param_updt_fx(
Encoder_State *st_fx, /* i/o: state structure */
@@ -760,7 +766,6 @@ void wb_tbe_enc_ivas_fx(
const Word16 pitch_buf[] /* i : pitch for each subframe Q6 */
);
-
Word16 wb_vad_fx(
Encoder_State *st_fx, /* i/o: encoder state structure */
const Word32 fr_bands[], /* i : per band i energy (contains 2 vectors) Q_new+QSCALE*/
@@ -793,14 +798,15 @@ Word16 wb_vad_ivas_fx(
Word16 lp_noise /* i : long term noise energy */
);
-Word32 construct_snr_thresh_fx( Word16 sp_center[], /*(i) spectral center Q10*/
- Word32 snr_flux, /*(i) snr flux Q25*/
- Word32 lt_snr, /*(i) long time time domain snr Q25*/
- Word32 l_snr, /*(i) long time frequency domain snr Q25*/
- Word32 continuous_speech_num, /*(i) amount of continuous speech frames Q0*/
- Word16 continuous_noise_num, /*(i) amount of continuous noise frames Q0*/
- Word32 fg_energy_est_start, /*(i) whether if estimated energy Q0*/
- Word16 bw_index /*(i) band width index Q0*/
+Word32 construct_snr_thresh_fx(
+ Word16 sp_center[], /*(i) spectral center Q10*/
+ Word32 snr_flux, /*(i) snr flux Q25*/
+ Word32 lt_snr, /*(i) long time time domain snr Q25*/
+ Word32 l_snr, /*(i) long time frequency domain snr Q25*/
+ Word32 continuous_speech_num, /*(i) amount of continuous speech frames Q0*/
+ Word16 continuous_noise_num, /*(i) amount of continuous noise frames Q0*/
+ Word32 fg_energy_est_start, /*(i) whether if estimated energy Q0*/
+ Word16 bw_index /*(i) band width index Q0*/
);
void sc_vbr_enc_init_fx(
@@ -813,28 +819,42 @@ void updt_enc_common_fx(
const Word16 Q_new /* i : CUrrent frame scaling */
);
-void attenuateNbSpectrum_fx( Word16 L_frame, Word32 *spectrum );
-
-Word16 corr_xy1_fx( /* o : pitch gain (0..GAIN_PIT_MAX) */
- const Word16 xn_1[], /* i : target signal */
- const Word16 y1_1[], /* i : filtered adaptive codebook excitation */
- Word16 g_corr[], /* o : correlations and -2 */
- const Word16 L_subfr, /* i : vector length */
- const Word16 norm_flag /* i : flag for constraining pitch contribution */
- ,
- Flag *Overflow_out /* o : propagating the Overflow flag to upper level */
-);
-
-Word16 E_ACELP_indexing_fx( const Word16 code[] /*Q9*/, const PulseConfig *config, Word16 num_tracks /*Q0*/, Word16 prm[] /*Q(shift_bits)*/ );
-void fcb_pulse_track_joint_fx( UWord16 *idxs /*Q0*/, Word16 wordcnt /*Q0*/, UWord32 *index_n /*Q0*/, Word16 *pulse_num /*Q0*/, Word16 track_num /*Q0*/ );
+void attenuateNbSpectrum_fx(
+ Word16 L_frame,
+ Word32 *spectrum );
+
+/* o : pitch gain (0..GAIN_PIT_MAX) */
+Word16 corr_xy1_fx(
+ const Word16 xn_1[], /* i : target signal */
+ const Word16 y1_1[], /* i : filtered adaptive codebook excitation */
+ Word16 g_corr[], /* o : correlations and -2 */
+ const Word16 L_subfr, /* i : vector length */
+ const Word16 norm_flag, /* i : flag for constraining pitch contribution */
+ Flag *Overflow_out /* o : propagating the Overflow flag to upper level */
+);
+
+Word16 E_ACELP_indexing_fx(
+ const Word16 code[] /*Q9*/,
+ const PulseConfig *config,
+ Word16 num_tracks /*Q0*/,
+ Word16 prm[] /*Q(shift_bits)*/ );
+
+void fcb_pulse_track_joint_fx(
+ UWord16 *idxs /*Q0*/,
+ Word16 wordcnt /*Q0*/,
+ UWord32 *index_n /*Q0*/,
+ Word16 *pulse_num /*Q0*/,
+ Word16 track_num /*Q0*/ );
+
+/* o: quantization index */
+Word16 gain_quant_fx(
+ Word32 *gain, /* i/o: quantized gain */
+ Word16 *gain16,
+ const Word16 c_min, /* i: log10 of lower limit in Q14 */
+ const Word16 c_max, /* i: log10 of upper limit in Q13 */
+ const Word16 bits, /* i: number of bits to quantize */
+ Word16 *expg );
-Word16 gain_quant_fx( /* o: quantization index */
- Word32 *gain, /* i/o: quantized gain */
- Word16 *gain16,
- const Word16 c_min, /* i: log10 of lower limit in Q14 */
- const Word16 c_max, /* i: log10 of upper limit in Q13 */
- const Word16 bits, /* i: number of bits to quantize */
- Word16 *expg );
void gsc_enc_fx(
Encoder_State *st_fx, /* i/o: State structure */
Word16 res_dct_in[], /* i : dct of residual signal */
@@ -971,25 +991,27 @@ void pit16k_Q_enc_fx(
Word16 *T0_min, /* i/o: delta search min */
Word16 *T0_max /* o : delta search max */
);
-Word16 pitch_fr4_fx( /* o : chosen integer pitch lag */
- const Word16 exc[], /* i : excitation buffer Q_new*/
- const Word16 xn[], /* i : target signal Q_new-1+shift*/
- const Word16 h[], /* i : weighted synthesis filter impulse response Q(14+shift)*/
- const Word16 t0_min, /* i : minimum value in the searched range. Q0*/
- const Word16 t0_max, /* i : maximum value in the searched range. Q0*/
- Word16 *pit_frac, /* o : chosen fraction (0, 1, 2 or 3) */
- const Word16 i_subfr, /* i : flag to first subframe */
- const Word16 limit_flag, /* i : flag for limits (0=restrained, 1=extended) */
- const Word16 t0_fr2, /* i : minimum value for resolution 1/2 */
- const Word16 t0_fr1, /* i : minimum value for resolution 1 */
- const Word16 L_frame, /* i : length of the frame */
- const Word16 L_subfr /* i : size of subframe */
+/* o : chosen integer pitch lag */
+Word16 pitch_fr4_fx(
+ const Word16 exc[], /* i : excitation buffer Q_new*/
+ const Word16 xn[], /* i : target signal Q_new-1+shift*/
+ const Word16 h[], /* i : weighted synthesis filter impulse response Q(14+shift)*/
+ const Word16 t0_min, /* i : minimum value in the searched range. Q0*/
+ const Word16 t0_max, /* i : maximum value in the searched range. Q0*/
+ Word16 *pit_frac, /* o : chosen fraction (0, 1, 2 or 3) */
+ const Word16 i_subfr, /* i : flag to first subframe */
+ const Word16 limit_flag, /* i : flag for limits (0=restrained, 1=extended) */
+ const Word16 t0_fr2, /* i : minimum value for resolution 1/2 */
+ const Word16 t0_fr1, /* i : minimum value for resolution 1 */
+ const Word16 L_frame, /* i : length of the frame */
+ const Word16 L_subfr /* i : size of subframe */
#if !defined REUSE_EVS_ACELP_PITCH_NORM_CORR
- ,
- const Word16 element_mode, /* i : mode element */
- const Word16 Q_new /* i : scaling factor */
+ ,
+ const Word16 element_mode, /* i : mode element */
+ const Word16 Q_new /* i : scaling factor */
#endif
);
+
void pit_Q_enc_fx(
BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
const Word16 Opt_AMR_WB, /* i : flag indicating AMR-WB IO mode */
@@ -1002,9 +1024,12 @@ void pit_Q_enc_fx(
Word16 *T0_min, /* i/o: delta search min */
Word16 *T0_max /* o : delta search max */
);
-void PsychAdaptLowFreqEmph_fx( Word32 x[],
- const Word16 lpcGains[],
- const Word16 lpcGains_e[] );
+
+void PsychAdaptLowFreqEmph_fx(
+ Word32 x[],
+ const Word16 lpcGains[],
+ const Word16 lpcGains_e[] );
+
void set_bw_fx(
const Word16 element_mode, /* i : element mode */
const Word32 element_brate, /* i : element bitrate */
@@ -1016,20 +1041,22 @@ void set_bw_stereo_fx(
CPE_ENC_HANDLE hCPE /* i/o: CPE encoder structures */
);
-Word16 WB_BWE_encoding_fx( /* o : classification of wb signal */
- const Word16 coder_type, /* i : coder type */
- const Word16 *yos_fx, /* i : MDCT coefficients of weighted original */
- Word16 *WB_fenv_fx, /* i/o: energy of WB envelope */
- Encoder_State *st_fx, /* i/o: Encoder structure */
- Word16 Q_synth,
- Word16 Q_synth_lf );
+/* o : classification of wb signal */
+Word16 WB_BWE_encoding_fx(
+ const Word16 coder_type, /* i : coder type */
+ const Word16 *yos_fx, /* i : MDCT coefficients of weighted original */
+ Word16 *WB_fenv_fx, /* i/o: energy of WB envelope */
+ Encoder_State *st_fx, /* i/o: Encoder structure */
+ Word16 Q_synth,
+ Word16 Q_synth_lf );
-Word16 WB_BWE_encoding_ivas_fx( /* o : classification of wb signal */
- Encoder_State *st_fx, /* i/o: Encoder structure */
- const Word32 *yos_fx, /* i : MDCT coefficients of weighted original */
- Word16 *WB_fenv_fx, /* i/o: energy of WB envelope */
- Word16 Q_synth,
- Word16 Q_synth_lf );
+/* o : classification of wb signal */
+Word16 WB_BWE_encoding_ivas_fx(
+ Encoder_State *st_fx, /* i/o: Encoder structure */
+ const Word32 *yos_fx, /* i : MDCT coefficients of weighted original */
+ Word16 *WB_fenv_fx, /* i/o: energy of WB envelope */
+ Word16 Q_synth,
+ Word16 Q_synth_lf );
void calculate_hangover_attenuation_gain_fx(
Encoder_State *st, /* i : encoder state structure */
@@ -1045,14 +1072,16 @@ void calculate_hangover_attenuation_gain_fx(
* Don't include the delay of the MDCT overlap.
* @param pTransientDetection Structure to be initialized. It contains all transient detectors to be used.
*/
-void InitTransientDetection_fx( Word16 nFrameLength,
- Word16 nTCXDelay,
- struct TransientDetection *pTransientDetection );
+void InitTransientDetection_fx(
+ Word16 nFrameLength,
+ Word16 nTCXDelay,
+ struct TransientDetection *pTransientDetection );
-void InitTransientDetection_ivas_fx( Word16 nFrameLength,
- Word16 nTCXDelay,
- TRAN_DET_HANDLE pTransientDetection,
- const Word16 ext_mem_flag );
+void InitTransientDetection_ivas_fx(
+ Word16 nFrameLength,
+ Word16 nTCXDelay,
+ TRAN_DET_HANDLE pTransientDetection,
+ const Word16 ext_mem_flag );
/** Runs transient detection.
* Runs all transient detectors defined in pTransientDetection
@@ -1061,7 +1090,10 @@ void InitTransientDetection_ivas_fx( Word16 nFrameLength,
* @param nSamplesAvailable Number of new i samples available.
* @param pTransientDetection Structure that contains transient detectors to be run.
*/
-void RunTransientDetection_fx( Word16 const *i, Word16 nSamplesAvailable, struct TransientDetection *pTransientDetection );
+void RunTransientDetection_fx(
+ Word16 const *i,
+ Word16 nSamplesAvailable,
+ struct TransientDetection *pTransientDetection );
void RunTransientDetection_ivas_fx(
@@ -1078,8 +1110,15 @@ void RunTransientDetection_ivas_fx(
* @param nPrevSubblocks Number of subblocks from the previous frames to use for the calculation.
* @return average temporal flatness measure with exponent AVG_FLAT_E
*/
-Word16 GetTCXAvgTemporalFlatnessMeasure_fx( struct TransientDetection const *pTransientDetection, Word16 nCurrentSubblocks, Word16 nPrevSubblocks );
-Word32 GetTCXAvgTemporalFlatnessMeasure_ivas_fx( struct TransientDetection const *pTransientDetection, Word16 nCurrentSubblocks, Word16 nPrevSubblocks );
+Word16 GetTCXAvgTemporalFlatnessMeasure_fx(
+ struct TransientDetection const *pTransientDetection,
+ Word16 nCurrentSubblocks,
+ Word16 nPrevSubblocks );
+
+Word32 GetTCXAvgTemporalFlatnessMeasure_ivas_fx(
+ struct TransientDetection const *pTransientDetection,
+ Word16 nCurrentSubblocks,
+ Word16 nPrevSubblocks );
/** Get the maximum energy change using subblock energies aligned with the TCX.
* @param pTransientDetection Structure that contains transient detectors to be run.
@@ -1088,16 +1127,18 @@ Word32 GetTCXAvgTemporalFlatnessMeasure_ivas_fx( struct TransientDetection const
* @param nPrevSubblocks Number of subblocks from the previous frames to use for the calculation.
* @param maximum energy change with exponent NRG_CHANGE_E
*/
-Word16 GetTCXMaxenergyChange_fx( struct TransientDetection const *pTransientDetection,
- const Word8 isTCX10,
- const Word16 nCurrentSubblocks,
- const Word16 nPrevSubblocks );
+Word16 GetTCXMaxenergyChange_fx(
+ struct TransientDetection const *pTransientDetection,
+ const Word8 isTCX10,
+ const Word16 nCurrentSubblocks,
+ const Word16 nPrevSubblocks );
-Word16 GetTCXMaxenergyChange_ivas_fx( TRAN_DET_HANDLE hTranDet,
- const Word8 isTCX10,
- const Word16 nCurrentSubblocks,
- const Word16 nPrevSubblocks );
+Word16 GetTCXMaxenergyChange_ivas_fx(
+ TRAN_DET_HANDLE hTranDet,
+ const Word8 isTCX10,
+ const Word16 nCurrentSubblocks,
+ const Word16 nPrevSubblocks );
/** Set TCX window length and overlap configuration
* @param prevEnergyHF previous HF energy. Exponent must be the same as for currEnergyHF.
@@ -1113,13 +1154,15 @@ void SetTCXModeInfo_ivas_fx(
* @param prevEnergyHF previous HF energy. Exponent must be the same as for currEnergyHF.
* @param currEnergyHF current HF energy. Exponent must be the same as for prevEnergyHF.
*/
-void SetTCXModeInfo_fx( Encoder_State *st,
- struct TransientDetection const *pTransientDetection,
- Word16 *tcxModeOverlap );
+void SetTCXModeInfo_fx(
+ Encoder_State *st,
+ struct TransientDetection const *pTransientDetection,
+ Word16 *tcxModeOverlap );
void GSC_enc_init_fx(
GSC_ENC_HANDLE hGSCEnc /* i/o: GSC data handle */
);
+
void td_cng_enc_init_fx(
TD_CNG_ENC_HANDLE hTdCngEnc, /* i/o: DTX/TD CNG data handle */
const Word16 Opt_DTX_ON, /* i : flag indicating DTX operation Q0*/
@@ -1137,6 +1180,7 @@ void dtx_enc_init_fx(
const Word16 var_SID_rate_flag, /* i : flag for variable SID update rate Q0*/
const Word16 interval_SID /* i : interval for SID update Q0*/
);
+
void select_TC_fx(
const Word16 codec_mode, /* i : codec mode */
const Word16 tc_cnt, /* i : TC frame counter */
@@ -1166,6 +1210,7 @@ void pitchDoubling_det_fx(
Word16 *pitch_ol,
Word16 *T_op_fr,
Word16 *voicing_fr );
+
void fd_bwe_enc_init_fx(
FD_BWE_ENC_HANDLE hBWE_FD /* i/o: FD BWE data handle */
);
@@ -1208,6 +1253,7 @@ void ProcessIGF_fx(
Word16 isTransition, /**< in: flag indicating if the i is the transition from from ACELP to TCX20/TCX10 */
Word16 frameno /**< in: flag indicating index of current subframe */
);
+
void AnalyzePowerSpectrum_fx(
Encoder_State *st, /* i/o: encoder states */
Word16 L_frame, /* i : frame length */
@@ -1233,35 +1279,40 @@ void AnalyzePowerSpectrum_ivas_fx(
Word32 powerSpec[], /* o : Power spectrum. Can point to signal */
Word16 powerSpec_e[] );
-void AdaptLowFreqEmph_fx( Word32 x[],
- Word16 x_e,
- Word16 xq[],
- Word16 invGain,
- Word16 invGain_e,
- Word16 tcx_lpc_shaped_ari,
- Word16 lpcGains[],
- Word16 lpcGains_e[],
- const Word16 lg );
-Word16 SQ_gain_fx( /* o : SQ gain */
- Word32 x[], /* i : vector to quantize */
- Word16 x_e, /* i : exponent */
- Word16 nbitsSQ, /* i : number of bits targeted */
- Word16 lg, /* i : vector size (2048 max) */
- Word16 *gain_e ); /* o : SQ gain exponent */
-
-Word16 SQ_gain_ivas_fx( /* o : SQ gain */
- Word32 x[], /* i : vector to quantize */
- Word16 x_e, /* i : exponent */
- Word16 nbitsSQ, /* i : number of bits targeted */
- Word16 lg, /* i : vector size (2048 max) */
- Word16 *gain_e ); /* o : SQ gain exponent */
-
-Word16 SQ_gain_estimate_fx( /* o : SQ gain */
- Word32 x[], /* i : vector to quantize */
- Word16 x_e, /* i : exponent */
- Word16 nbitsSQ, /* i : number of bits targeted */
- Word16 lg, /* i : vector size (2048 max) */
- Word16 *gain_e ); /* o : SQ gain exponent */
+void AdaptLowFreqEmph_fx(
+ Word32 x[],
+ Word16 x_e,
+ Word16 xq[],
+ Word16 invGain,
+ Word16 invGain_e,
+ Word16 tcx_lpc_shaped_ari,
+ Word16 lpcGains[],
+ Word16 lpcGains_e[],
+ const Word16 lg );
+
+/* o : SQ gain */
+Word16 SQ_gain_fx(
+ Word32 x[], /* i : vector to quantize */
+ Word16 x_e, /* i : exponent */
+ Word16 nbitsSQ, /* i : number of bits targeted */
+ Word16 lg, /* i : vector size (2048 max) */
+ Word16 *gain_e ); /* o : SQ gain exponent */
+
+/* o : SQ gain */
+Word16 SQ_gain_ivas_fx(
+ Word32 x[], /* i : vector to quantize */
+ Word16 x_e, /* i : exponent */
+ Word16 nbitsSQ, /* i : number of bits targeted */
+ Word16 lg, /* i : vector size (2048 max) */
+ Word16 *gain_e ); /* o : SQ gain exponent */
+
+/* o : SQ gain */
+Word16 SQ_gain_estimate_fx(
+ Word32 x[], /* i : vector to quantize */
+ Word16 x_e, /* i : exponent */
+ Word16 nbitsSQ, /* i : number of bits targeted */
+ Word16 lg, /* i : vector size (2048 max) */
+ Word16 *gain_e ); /* o : SQ gain exponent */
void tcx_scalar_quantization_fx(
Word32 *x, /* i: i coefficients */
@@ -1439,19 +1490,21 @@ Word16 tcx_res_Q_spec_ivas_fx(
const Word16 lf_deemph_factors[] );
/* compute noise-measure flags for spectrum filling and quantization (0: tonal, 1: noise-like) */
-void ComputeSpectrumNoiseMeasure_fx( const Word32 *powerSpec,
- Word16 L_frame,
- Word16 startLine,
- Word8 resetMemory,
- Word8 *noiseFlags,
- Word16 lowpassLine );
+void ComputeSpectrumNoiseMeasure_fx(
+ const Word32 *powerSpec,
+ Word16 L_frame,
+ Word16 startLine,
+ Word8 resetMemory,
+ Word8 *noiseFlags,
+ Word16 lowpassLine );
-void ComputeSpectrumNoiseMeasure_ivas_fx( Word64 *powerSpec, /* Qx */
- Word16 L_frame, /* Q0 */
- Word16 startLine, /* Q0 */
- Word8 resetMemory, /* Q0 */
- Word8 *noiseFlags, /* Q0 */
- Word16 lowpassLine /* Q0 */
+void ComputeSpectrumNoiseMeasure_ivas_fx(
+ Word64 *powerSpec, /* Qx */
+ Word16 L_frame, /* Q0 */
+ Word16 startLine, /* Q0 */
+ Word8 resetMemory, /* Q0 */
+ Word8 *noiseFlags, /* Q0 */
+ Word16 lowpassLine /* Q0 */
);
void lpc_quantization_fx(
@@ -1507,7 +1560,15 @@ void Mode2_pit_encode_fx(
Word16 pit_fr2,
Word16 pit_max,
Word16 pit_res_max );
-void E_ACELP_4tsearch_fx( Word16 dn[] /*Qdn*/, const Word16 cn[] /*Q_xn*/, const Word16 H[] /*Q12*/, Word16 code[] /*Q9*/, const PulseConfig *config, Word16 ind[] /*Q0*/, Word16 y[] /*Qy*/, const Word16 element_mode );
+void E_ACELP_4tsearch_fx(
+ Word16 dn[] /*Qdn*/,
+ const Word16 cn[] /*Q_xn*/,
+ const Word16 H[] /*Q12*/,
+ Word16 code[] /*Q9*/,
+ const PulseConfig *config,
+ Word16 ind[] /*Q0*/,
+ Word16 y[] /*Qy*/,
+ const Word16 element_mode );
void E_ACELP_4t_fx(
Word16 dn[], /* Qdn */
Word16 cn[] /* Q_xn */,
@@ -1565,10 +1626,11 @@ void CalculateTnsFilt_fx(
* @param pTnsData TNS data is filled with sensible information.
* @return Returns 1 if Tns should be used, otherwise 0.
*/
-Word16 DetectTnsFilt_fx( STnsConfig const *pTnsConfig,
- Word32 const pSpectrum[],
- STnsData *pTnsData,
- Word16 *predictionGain );
+Word16 DetectTnsFilt_fx(
+ STnsConfig const *pTnsConfig,
+ Word32 const pSpectrum[],
+ STnsData *pTnsData,
+ Word16 *predictionGain );
/** Detect TNS parameters.
* Detects if TNS should be used and fills TNS data in pTnsData.
@@ -1579,13 +1641,14 @@ TNS is tested on the spectrum defined by pSpectrum.
* @param pTnsData TNS data is filled with sensible information.
* @return Returns 1 if Tns should be used, otherwise 0.
*/
-Word16 DetectTnsFilt_ivas_fx( STnsConfig const *pTnsConfig, /* i : TNS Configuration struct */
- Word32 const pSpectrum[], /* i : MDCT spectrum Q=Qx */
- STnsData *pTnsData, /* o : TNS data struct */
- TRAN_DET_HANDLE hTranDet, /* i : transient detection handle */
- Word8 isTCX10, /* i : TCX10 or TCX20? */
- Word16 ltp_gain, /* i : LTP gain Q=15 */
- Word16 *predictionGain /* o : TNS prediction gain Q=7 */
+Word16 DetectTnsFilt_ivas_fx(
+ STnsConfig const *pTnsConfig, /* i : TNS Configuration struct */
+ Word32 const pSpectrum[], /* i : MDCT spectrum Q=Qx */
+ STnsData *pTnsData, /* o : TNS data struct */
+ TRAN_DET_HANDLE hTranDet, /* i : transient detection handle */
+ Word8 isTCX10, /* i : TCX10 or TCX20? */
+ Word16 ltp_gain, /* i : LTP gain Q=15 */
+ Word16 *predictionGain /* o : TNS prediction gain Q=7 */
);
@@ -1598,11 +1661,12 @@ Word16 DetectTnsFilt_ivas_fx( STnsConfig const *pTnsConfig, /* i : TNS Configur
* @param pnBits Set to the number of required.
* @return 0 on success, otherwise 1.
*/
-Word16 EncodeTnsData_fx( STnsConfig const *pTnsConfig,
- STnsData const *pTnsData,
- Word16 *stream,
- Word16 *pnSize,
- Word16 *pnBits );
+Word16 EncodeTnsData_fx(
+ STnsConfig const *pTnsConfig,
+ STnsData const *pTnsData,
+ Word16 *stream,
+ Word16 *pnSize,
+ Word16 *pnBits );
/** Write TNS data into a bitstream.
* Writes TNS data into a bitstream.
@@ -1613,17 +1677,19 @@ Word16 EncodeTnsData_fx( STnsConfig const *pTnsConfig,
* @param pnBits Set to the number of bits written.
* @return 0 on success, otherwise 1.
*/
-Word16 WriteTnsData_fx( STnsConfig const *pTnsConfig,
- Word16 const *stream,
- Word16 *pnSize,
- Encoder_State *st,
- Word16 *pnBits );
-
-Word16 WriteTnsData_ivas_fx( STnsConfig const *pTnsConfig,
- Word16 const *stream,
- Word16 *pnSize,
- BSTR_ENC_HANDLE hBstr,
- Word16 *pnBits );
+Word16 WriteTnsData_fx(
+ STnsConfig const *pTnsConfig,
+ Word16 const *stream,
+ Word16 *pnSize,
+ Encoder_State *st,
+ Word16 *pnBits );
+
+Word16 WriteTnsData_ivas_fx(
+ STnsConfig const *pTnsConfig,
+ Word16 const *stream,
+ Word16 *pnSize,
+ BSTR_ENC_HANDLE hBstr,
+ Word16 *pnBits );
void subband_FFT_fx(
Word32 **Sr, /*(i) real part of the CLDFB*/
@@ -1639,7 +1705,13 @@ Word16 E_ACELP_toeplitz_mul_fx(
const Word16 L_subfr, /* Q0 */
const Word16 highrate /* Q0 */
);
-Word16 E_ACELP_code43bit_fx( const Word16 code[], UWord32 *ps, Word16 *p, UWord16 idxs[] );
+
+Word16 E_ACELP_code43bit_fx(
+ const Word16 code[],
+ UWord32 *ps,
+ Word16 *p,
+ UWord16 idxs[] );
+
void tc_classif_enc_fx(
const Word16 Q_new, /* i : scaling factor */
const Word16 L_frame, /* i : length of the frame */
@@ -1664,6 +1736,7 @@ Word16 gain_enc_uv_fx(
Word16 *gain_inov, /*0=rel */
- const Word32 sr_core /* i : internal sampling rate */
+/* o : number of allocated bits */
+Word16 vlpc_2st_cod_fx(
+ const Word16 *lsf, /* i : normalized vector to quantize */
+ Word16 *lsfq, /* i/o: i:1st stage o:1st+2nd stage */
+ Word16 *indx, /* o : index[] (4 bits per words) */
+ const Word16 mode, /* i : 0=abs, >0=rel */
+ const Word32 sr_core /* i : internal sampling rate */
);
Word16 update_decision_fx(
@@ -3165,9 +3310,10 @@ void spec_center_fx(
const Word16 Q_sb_p /* i : the Scaling of sb_power*/
);
-void spec_flatness_fx( Word32 *spec_amp, /*(i) spectral amplitude*/
- Word32 smooth_spec_amp[], /*(i) smoothed spectral amplitude*/
- Word16 sSFM[SFM_NUM] /*(o) spectral flatness rate*/
+void spec_flatness_fx(
+ Word32 *spec_amp, /*(i) spectral amplitude*/
+ Word32 smooth_spec_amp[], /*(i) smoothed spectral amplitude*/
+ Word16 sSFM[SFM_NUM] /*(o) spectral flatness rate*/
);
void SetModeIndex_fx(
@@ -3188,6 +3334,7 @@ void MDCT_selector_fx(
void MDCT_selector_reset_fx(
TCX_ENC_HANDLE hTcxEnc );
+
void MDCT_classifier_reset_fx(
TCX_ENC_HANDLE hTcxEnc /* i/o: TCX Encoder Handle */
);
@@ -3199,6 +3346,7 @@ void ltd_stable_fx(
const Word16 frameloop, /* i : amount of frames*/
const Word16 Q_frames_power /* i : the Scaling of frames_power*/
);
+
/* IGFSCFEncoder.c */
void IGFSCFEncoderOpen_fx(
IGFSCFENC_INSTANCE_HANDLE hPublicData, /* i/o: handle to public data */
@@ -3264,22 +3412,23 @@ void background_update_fx(
);
/* enc_gain.c */
-Word16 E_GAIN_closed_loop_search_fx( Word16 exc[], /*Q_new*/
- Word16 xn[], /*Q_xn*/
- Word16 h[], /* Q14+shift */
- Word16 t0_min,
- Word16 t0_min_frac,
- Word16 t0_max,
- Word16 t0_max_frac,
- Word16 t0_min_max_res,
- Word16 *pit_frac,
- Word16 *pit_res,
- Word16 pit_res_max,
- Word16 i_subfr,
- Word16 pit_min,
- Word16 pit_fr2,
- Word16 pit_fr1,
- Word16 L_subfr );
+Word16 E_GAIN_closed_loop_search_fx(
+ Word16 exc[], /*Q_new*/
+ Word16 xn[], /*Q_xn*/
+ Word16 h[], /* Q14+shift */
+ Word16 t0_min,
+ Word16 t0_min_frac,
+ Word16 t0_max,
+ Word16 t0_max_frac,
+ Word16 t0_min_max_res,
+ Word16 *pit_frac,
+ Word16 *pit_res,
+ Word16 pit_res_max,
+ Word16 i_subfr,
+ Word16 pit_min,
+ Word16 pit_fr2,
+ Word16 pit_fr1,
+ Word16 L_subfr );
void core_acelp_tcx20_switching_fx(
Encoder_State *st, /* i/o: encoder state structure */
@@ -3305,6 +3454,7 @@ Word16 comvad_decision_fx(
const Word16 frame_energy_Q, /*(i) the Scaling of current frame energy*/
Word16 *cldfb_addition, /*(o) adjust the harmonized hangover */
const Word16 vada_flag );
+
void amr_wb_enc_init_fx(
AMRWB_IO_ENC_HANDLE hAmrwb_IO /* i/o: AMR-WB IO encoder handle */
);
@@ -3317,6 +3467,7 @@ void snr_calc(
const Word32 frame_energy, /* i : current frame energy sacle_sbpower*/
const Word32 bwidth /* i : audio band width Q0*/
);
+
void FEC_encode_fx(
BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
const ACELP_config acelp_cfg, /* i/o: configuration of the ACELP */
@@ -3352,30 +3503,32 @@ void update_average_rate_fx(
SC_VBR_ENC_HANDLE hSC_VBR, /* i/o: SC-VBR state structure */
const Word32 core_brate_fx /* i : core bitrate */
);
-Word16 pit_encode_fx( /* o : Fractional pitch for each subframe */
- BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
- const Word16 pitch_bits[], /* i : pitch bits */
- const Word32 core_brate, /* i : core bitrate */
- const Word16 Opt_AMR_WB, /* i : flag indicating AMR-WB IO mode */
- const Word16 L_frame, /* i : length of the frame */
- const Word16 coder_type, /* i : coding type */
- Word16 *limit_flag, /* i/o: restrained(0) or extended(1) Q limits */
- const Word16 i_subfr, /* i : subframe index */
- Word16 *exc, /* i/o: pointer to excitation signal frame */
- const Word16 L_subfr, /* i : subframe length */
- const Word16 *T_op, /* i : open loop pitch estimates in current frame */
- Word16 *T0_min, /* i/o: lower limit for close-loop search */
- Word16 *T0_max, /* i/o: higher limit for close-loop search */
- Word16 *T0, /* i/o: close loop integer pitch */
- Word16 *T0_frac, /* i/o: close loop fractional part of the pitch */
- const Word16 *h1, /* i : weighted filter i response */
- const Word16 *xn, /* i : target vector */
- const Word16 tdm_Pitch_reuse_flag, /* i : primary channel pitch reuse flag */
- const Word16 tdm_Pri_pitch_buf[] /* i : primary channel pitch buffer */
+
+/* o : Fractional pitch for each subframe */
+Word16 pit_encode_fx(
+ BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
+ const Word16 pitch_bits[], /* i : pitch bits */
+ const Word32 core_brate, /* i : core bitrate */
+ const Word16 Opt_AMR_WB, /* i : flag indicating AMR-WB IO mode */
+ const Word16 L_frame, /* i : length of the frame */
+ const Word16 coder_type, /* i : coding type */
+ Word16 *limit_flag, /* i/o: restrained(0) or extended(1) Q limits */
+ const Word16 i_subfr, /* i : subframe index */
+ Word16 *exc, /* i/o: pointer to excitation signal frame */
+ const Word16 L_subfr, /* i : subframe length */
+ const Word16 *T_op, /* i : open loop pitch estimates in current frame */
+ Word16 *T0_min, /* i/o: lower limit for close-loop search */
+ Word16 *T0_max, /* i/o: higher limit for close-loop search */
+ Word16 *T0, /* i/o: close loop integer pitch */
+ Word16 *T0_frac, /* i/o: close loop fractional part of the pitch */
+ const Word16 *h1, /* i : weighted filter i response */
+ const Word16 *xn, /* i : target vector */
+ const Word16 tdm_Pitch_reuse_flag, /* i : primary channel pitch reuse flag */
+ const Word16 tdm_Pri_pitch_buf[] /* i : primary channel pitch buffer */
#if !defined REUSE_EVS_ACELP_PITCH_NORM_CORR
- ,
- const Word16 element_mode, /* i : mode element */
- const Word16 Q_new /* i : scaling factor */
+ ,
+ const Word16 element_mode, /* i : mode element */
+ const Word16 Q_new /* i : scaling factor */
#endif
);
@@ -3395,6 +3548,7 @@ Word16 lp_filt_exc_enc_fx(
Word16 *gain_pit, /* o : adaptive excitation gain Q14 */
Word16 *lp_flag /* i/o: mode selection Q0 */
);
+
Word16 inov_encode_fx(
Encoder_State *st_fx, /* i/o: encoder state structure */
const Word32 core_brate, /* i : core bitrate */
@@ -3553,7 +3707,6 @@ void gain_enc_amr_wb_fx(
Word16 *past_qua_en /* i/o: gain quantization memory (4 words) Q10*/
);
-
void hf_cod_fx(
const Word32 core_brate_fx, /* i : core bitrate */
const Word16 *speech16k_fx, /* i : original speech at 16 kHz */
@@ -4019,28 +4172,32 @@ void diffcod_fx(
Word16 *difidx /* (o) differential code Q0*/
);
-Word16 hq_classifier_enc_fx( /* o : Consumed bits Q0 */
- Encoder_State *st_fx, /* i/o: encoder state structure */
- const Word16 length, /* i : Frame length Q0 */
- const Word32 *coefs, /* i : Spectral coefficients Q12 */
- const Word16 is_transient, /* i : Transient flag Q0 */
- Word16 *Npeaks, /* o : Number of identified peaks Q0 */
- Word16 *peaks, /* o : Peak indices Q0 */
- Word32 *pe_gains, /* o : Peak gains Q12 */
- Word32 *nf_gains, /* o : Noise-fill gains Q12 */
- Word16 *hqswb_clas /* o : HQ class Q0 */
-);
-Word16 hq_classifier_enc_ivas_fx( /* o : Consumed bits Q0 */
- Encoder_State *st_fx, /* i/o: encoder state structure */
- const Word16 length, /* i : Frame length Q0 */
- const Word32 *coefs, /* i : Spectral coefficients Q12 */
- const Word16 is_transient, /* i : Transient flag Q0 */
- Word16 *Npeaks, /* o : Number of identified peaks Q0 */
- Word16 *peaks, /* o : Peak indices Q0 */
- Word32 *pe_gains, /* o : Peak gains Q12 */
- Word32 *nf_gains, /* o : Noise-fill gains Q12 */
- Word16 *hqswb_clas /* o : HQ class Q0 */
+/* o : Consumed bits Q0 */
+Word16 hq_classifier_enc_fx(
+ Encoder_State *st_fx, /* i/o: encoder state structure */
+ const Word16 length, /* i : Frame length Q0 */
+ const Word32 *coefs, /* i : Spectral coefficients Q12 */
+ const Word16 is_transient, /* i : Transient flag Q0 */
+ Word16 *Npeaks, /* o : Number of identified peaks Q0 */
+ Word16 *peaks, /* o : Peak indices Q0 */
+ Word32 *pe_gains, /* o : Peak gains Q12 */
+ Word32 *nf_gains, /* o : Noise-fill gains Q12 */
+ Word16 *hqswb_clas /* o : HQ class Q0 */
+);
+
+/* o : Consumed bits Q0 */
+Word16 hq_classifier_enc_ivas_fx(
+ Encoder_State *st_fx, /* i/o: encoder state structure */
+ const Word16 length, /* i : Frame length Q0 */
+ const Word32 *coefs, /* i : Spectral coefficients Q12 */
+ const Word16 is_transient, /* i : Transient flag Q0 */
+ Word16 *Npeaks, /* o : Number of identified peaks Q0 */
+ Word16 *peaks, /* o : Peak indices Q0 */
+ Word32 *pe_gains, /* o : Peak gains Q12 */
+ Word32 *nf_gains, /* o : Noise-fill gains Q12 */
+ Word16 *hqswb_clas /* o : HQ class Q0 */
);
+
void diff_envelope_coding_fx(
const Word16 is_transient, /* i : transient indicator Q0 */
const Word16 num_env_bands, /* i : number of envelope bands to code Q0 */
@@ -4050,16 +4207,17 @@ void diff_envelope_coding_fx(
Word16 *difidx /* o : differential code Q0 */
);
-Word16 encode_envelope_indices_ivas_fx( /* o : Number of bits if flag_pack=0,0 if flag_pack=1 Q0 */
- BSTR_ENC_HANDLE hBstr, /* i : handle to the bitstream Q0 */
- const Word16 num_sfm, /* i : Number of subbands Q0 */
- const Word16 numnrmibits, /* i : Bitrate of fall-back coding mode Q0 */
- Word16 *difidx, /* i/o: Diff indices/encoded diff indices Q0 */
- Word16 *LCmode, /* o : Coding mode if flag_pack=0, i : if flag_pack=1 Q0 */
- const Word16 flag_pack, /* i : indicator of packing or estimating bits Q0 */
- const Word16 flag_HQ2 /* i : indicator of HQ2 core Q0 */
- ,
- const Word16 is_transient /* i : indicator of HQ_TRANSIENT Q0 */
+/* o : Number of bits if flag_pack=0,0 if flag_pack=1 Q0 */
+Word16 encode_envelope_indices_ivas_fx(
+ BSTR_ENC_HANDLE hBstr, /* i : handle to the bitstream Q0 */
+ const Word16 num_sfm, /* i : Number of subbands Q0 */
+ const Word16 numnrmibits, /* i : Bitrate of fall-back coding mode Q0 */
+ Word16 *difidx, /* i/o: Diff indices/encoded diff indices Q0 */
+ Word16 *LCmode, /* o : Coding mode if flag_pack=0, i : if flag_pack=1 Q0 */
+ const Word16 flag_pack, /* i : indicator of packing or estimating bits Q0 */
+ const Word16 flag_HQ2 /* i : indicator of HQ2 core Q0 */
+ ,
+ const Word16 is_transient /* i : indicator of HQ_TRANSIENT Q0 */
);
void hq_generic_encoding_fx(
@@ -4079,34 +4237,38 @@ void normalizecoefs_fx(
Word16 *coefs_norm /* o : Normalized output vector (Q12) */
);
-Word16 hvq_enc_fx( /* o : Consumed bits */
- Encoder_State *st_fx, /* i/o: encoder state structure */
- const Word32 brate, /* i : Total bit rate */
- const Word16 hvq_bits, /* i : HVQ bit budget */
- const Word16 Npeaks, /* i : Number of peaks */
- const Word16 *ynrm, /* i : Envelope coefficients */
- Word16 *R, /* i/o: Bit allocation/updated bit allocation */
- Word16 *peaks, /* i : Peak pos. / Encoded peak pos. */
- Word32 *nf_gains, /* i/o: Noise fill gains / Quant. nf gains */
- Word16 *noise_level, /* o : Quantized noise level */
- const Word32 *pe_gains, /* i : Peak gains */
- const Word32 *coefs, /* i : spectrum coefficients in Q14 */
- Word32 *coefs_out /* o : encoded spectrum coefficients in Q14 */
-);
-Word16 hvq_enc_ivas_fx( /*o : Consumed bits */
- Encoder_State *st_fx, /*i/o: encoder state structure */
- const Word32 core_brate, /*i : Total bit rate */
- const Word16 hvq_bits, /*i : HVQ bit budget */
- const Word16 Npeaks, /*i : Number of peaks */
- const Word16 *ynrm, /* i : Envelope coefficients */
- Word16 *R, /* i/o: Bit allocation/updated bit allocation */
- Word16 *peaks, /* i : Peak pos. / Encoded peak pos. */
- Word32 *nf_gains, /* i/o: Noise fill gains / Quant. nf gains Q12 */
- Word16 *noise_level, /* o : Quantized noise level Q15 */
- const Word32 *pe_gains, /* i : Peak gains */
- const Word32 *coefs, /* i : spectrum coefficients in Q12 */
- Word32 *coefs_out /* o : encoded spectrum coefficients in Q12 */
+/* o : Consumed bits */
+Word16 hvq_enc_fx(
+ Encoder_State *st_fx, /* i/o: encoder state structure */
+ const Word32 brate, /* i : Total bit rate */
+ const Word16 hvq_bits, /* i : HVQ bit budget */
+ const Word16 Npeaks, /* i : Number of peaks */
+ const Word16 *ynrm, /* i : Envelope coefficients */
+ Word16 *R, /* i/o: Bit allocation/updated bit allocation */
+ Word16 *peaks, /* i : Peak pos. / Encoded peak pos. */
+ Word32 *nf_gains, /* i/o: Noise fill gains / Quant. nf gains */
+ Word16 *noise_level, /* o : Quantized noise level */
+ const Word32 *pe_gains, /* i : Peak gains */
+ const Word32 *coefs, /* i : spectrum coefficients in Q14 */
+ Word32 *coefs_out /* o : encoded spectrum coefficients in Q14 */
+);
+
+/* o : Consumed bits */
+Word16 hvq_enc_ivas_fx(
+ Encoder_State *st_fx, /*i/o: encoder state structure */
+ const Word32 core_brate, /*i : Total bit rate */
+ const Word16 hvq_bits, /*i : HVQ bit budget */
+ const Word16 Npeaks, /*i : Number of peaks */
+ const Word16 *ynrm, /* i : Envelope coefficients */
+ Word16 *R, /* i/o: Bit allocation/updated bit allocation */
+ Word16 *peaks, /* i : Peak pos. / Encoded peak pos. */
+ Word32 *nf_gains, /* i/o: Noise fill gains / Quant. nf gains Q12 */
+ Word16 *noise_level, /* o : Quantized noise level Q15 */
+ const Word32 *pe_gains, /* i : Peak gains */
+ const Word32 *coefs, /* i : spectrum coefficients in Q12 */
+ Word32 *coefs_out /* o : encoded spectrum coefficients in Q12 */
);
+
Word16 pvq_core_enc_fx(
BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
Word16 coefs_norm[], /* i/o: normalized coefficients to encode */
@@ -4124,14 +4286,17 @@ Word16 pvq_core_enc_fx(
const Word16 core /* i : number of bands */
);
-Word16 noise_adjust_fx( /* o : index of noise attenuation Q0 */
- const Word16 *coeffs_norm, /* i : normalized coefficients Qx */
- const Word16 qx, /* i : Q value of coeffs_norm */
- const Word16 *bitalloc, /* i : bit allocation Q0 */
- const Word16 *sfm_start, /* i : band start Q0 */
- const Word16 *sfm_end, /* i : band end Q0 */
- const Word16 core_sfm /* i : index of the end band for core Q0 */
+/* o : index of noise attenuation Q0 */
+Word16 noise_adjust_fx(
+ const Word16 *coeffs_norm, /* i : normalized coefficients Qx */
+ const Word16 qx, /* i : Q value of coeffs_norm */
+ const Word16 *bitalloc, /* i : bit allocation Q0 */
+ const Word16 *sfm_start, /* i : band start Q0 */
+ const Word16 *sfm_end, /* i : band end Q0 */
+ const Word16 core_sfm /* i : index of the end band for core Q0 */
);
+
+
ivas_error tcq_core_LR_enc_fx(
BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
Word16 inp_vector_fx[], /* x5 */
@@ -4173,17 +4338,18 @@ ivas_error tcq_core_LR_enc_ivas_fx(
const Word16 adjustFlag,
const Word16 is_transient );
-Word16 encode_envelope_indices_fx( /* o : Number of bits if flag_pack=0,0 if flag_pack=1 Q0 */
- BSTR_ENC_HANDLE hBstr, /* i : handle to the bitstream Q0 */
- const Word16 num_sfm, /* i : Number of subbands Q0 */
- const Word16 numnrmibits, /* i : Bitrate of fall-back coding mode Q0 */
- Word16 *difidx, /* i/o: Diff indices/encoded diff indices Q0 */
- Word16 *LCmode, /* o : Coding mode if flag_pack=0, i : if flag_pack=1 Q0 */
- const Word16 flag_pack, /* i : indicator of packing or estimating bits Q0 */
- const Word16 flag_HQ2 /* i : indicator of HQ2 core Q0 */
- ,
- const Word16 is_transient /* i : indicator of HQ_TRANSIENT Q0 */
+/* o : Number of bits if flag_pack=0,0 if flag_pack=1 Q0 */
+Word16 encode_envelope_indices_fx(
+ BSTR_ENC_HANDLE hBstr, /* i : handle to the bitstream Q0 */
+ const Word16 num_sfm, /* i : Number of subbands Q0 */
+ const Word16 numnrmibits, /* i : Bitrate of fall-back coding mode Q0 */
+ Word16 *difidx, /* i/o: Diff indices/encoded diff indices Q0 */
+ Word16 *LCmode, /* o : Coding mode if flag_pack=0, i : if flag_pack=1 Q0 */
+ const Word16 flag_pack, /* i : indicator of packing or estimating bits Q0 */
+ const Word16 flag_HQ2, /* i : indicator of HQ2 core Q0 */
+ const Word16 is_transient /* i : indicator of HQ_TRANSIENT Q0 */
);
+
void diffcod_lrmdct_fx(
const Word16 N, /* i : number of sub-vectors Q0*/
const Word16 be_ref, /* i : band energy reference Q0*/
@@ -4191,6 +4357,7 @@ void diffcod_lrmdct_fx(
Word16 *difidx, /* o : differential code Q0*/
const Word16 is_transient /* i : transient flag Q0*/
);
+
Word16 peak_vq_enc_ivas_fx(
BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
const Word16 bwidth, /* i : audio bandwidth */
@@ -4204,6 +4371,7 @@ Word16 peak_vq_enc_ivas_fx(
Word16 *vq_peak_idx, /* i : Peak index vector */
Word32 *nf_gains /* i : Estimated noise floor gains Q12 */
);
+
Word16 peak_vq_enc_fx(
BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
const Word16 bwidth, /* i : audio bandwidth */
@@ -4241,7 +4409,12 @@ void InitSWBencBuffer_ivas_fx(
void ResetSHBbuffer_Enc_fx(
Encoder_State *st_fx /* i/o: SHB encoder structure */
);
-Word16 E_ACELP_hh_corr( Word16 *x /*Q11*/, Word16 *y /*Qy*/, Word16 L_subfr /*Q0*/, Word16 bits /*Q0*/ );
+
+Word16 E_ACELP_hh_corr(
+ Word16 *x /*Q11*/,
+ Word16 *y /*Qy*/,
+ Word16 L_subfr /*Q0*/,
+ Word16 bits /*Q0*/ );
void acelp_1t64_fx(
BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
@@ -4272,6 +4445,7 @@ Word16 acelp_4t64_fx(
const Word16 Opt_AMR_WB /* i : flag indicating AMR-WB IO mode */
,
const Word16 element_mode );
+
ivas_error evs_enc_fx(
Encoder_State *st, /* i/o: encoder state structure */
const Word16 *data, /* i : input signal Q0*/
@@ -4279,17 +4453,19 @@ ivas_error evs_enc_fx(
const Word16 n_samples /* i : number of input samples Q0*/
);
+/* o: Qx y(n) */
/* y(n)(Qx) = alpha(Q15) * x(Qx) + (1.0f-alpha)* y(n-1) (Qx) */
-Word16 noise_est_AR1_Qx( /* o: Qx y(n) */
- Word16 x, /* i : Qx x(n) */
- Word16 y, /* i : Qx y(n-1) */
- Word16 alpha /*i : Q15 scaling of driving x(n) */
+Word16 noise_est_AR1_Qx(
+ Word16 x, /* i : Qx x(n) */
+ Word16 y, /* i : Qx y(n-1) */
+ Word16 alpha /*i : Q15 scaling of driving x(n) */
);
-Word32 noise_est_AR1_Qx_32( /* o: Qx y(n) */
- Word32 x, /* i : Qx x(n) */
- Word32 y, /* i : Qx y(n-1) */
- Word32 alpha /*i : Q15 scaling of driving x(n) */
+/*o : Qx y( n ) */
+Word32 noise_est_AR1_Qx_32(
+ Word32 x, /* i : Qx x(n) */
+ Word32 y, /* i : Qx y(n-1) */
+ Word32 alpha /*i : Q15 scaling of driving x(n) */
);
void FEC_lsf_estim_enc_fx(
@@ -4350,34 +4526,36 @@ Word32 mslvq_fx(
Word16 no_scales[][2] );
-Word16 multi_harm_fx( /* o : frame multi-harmonicity (1-harmonic, 0-not) */
- const Word16 Bin_E[], /* i : log-energy spectrum of the current frame Q7 */
- Word16 old_S[], /* i/o: prev. log-energy spectrum w. subtracted floor Q7 */
- Word16 cor_map_LT[], /* i/o: LT correlation map Q15 */
- Word16 *multi_harm_limit, /* i/o: multi harminic threshold Q9 */
- const Word32 total_brate, /* i : total bitrate Q0 */
- const Word16 bwidth, /* i : i signal bandwidth Q0 */
- Word16 *cor_strong_limit, /* i/o: HF correlation indicator Q0 */
- Word16 *st_mean_avr_dyn, /* i/o: long term average dynamic Q7 */
- Word16 *st_last_sw_dyn, /* i/o: last dynamic Q7 */
- Word16 *cor_map_sum, /* i : sum of correlation map Q8 */
- Word16 *sp_floor, /* o: noise floor estimate Q7 */
- Word16 S_map[] /* o : short-term correlation map Q7 */
-);
-
-Word16 multi_harm_ivas_fx( /* o : frame multi-harmonicity (1-harmonic, 0-not) */
- const Word16 Bin_E[], /* i : log-energy spectrum of the current frame Q7 */
- Word16 old_S[], /* i/o: prev. log-energy spectrum w. subtracted floor Q7 */
- Word16 cor_map_LT[], /* i/o: LT correlation map Q15 */
- Word16 *multi_harm_limit, /* i/o: multi harminic threshold Q9 */
- const Word32 total_brate, /* i : total bitrate Q0 */
- const Word16 bwidth, /* i : i signal bandwidth Q0 */
- Word16 *cor_strong_limit, /* i/o: HF correlation indicator Q0 */
- Word16 *st_mean_avr_dyn, /* i/o: long term average dynamic Q7 */
- Word16 *st_last_sw_dyn, /* i/o: last dynamic Q7 */
- Word16 *cor_map_sum, /* i : sum of correlation map Q8 */
- Word16 *sp_floor, /* o: noise floor estimate Q7 */
- Word16 S_map[] /* o : short-term correlation map Q7 */
+/* o : frame multi-harmonicity (1-harmonic, 0-not) */
+Word16 multi_harm_fx(
+ const Word16 Bin_E[], /* i : log-energy spectrum of the current frame Q7 */
+ Word16 old_S[], /* i/o: prev. log-energy spectrum w. subtracted floor Q7 */
+ Word16 cor_map_LT[], /* i/o: LT correlation map Q15 */
+ Word16 *multi_harm_limit, /* i/o: multi harminic threshold Q9 */
+ const Word32 total_brate, /* i : total bitrate Q0 */
+ const Word16 bwidth, /* i : i signal bandwidth Q0 */
+ Word16 *cor_strong_limit, /* i/o: HF correlation indicator Q0 */
+ Word16 *st_mean_avr_dyn, /* i/o: long term average dynamic Q7 */
+ Word16 *st_last_sw_dyn, /* i/o: last dynamic Q7 */
+ Word16 *cor_map_sum, /* i : sum of correlation map Q8 */
+ Word16 *sp_floor, /* o: noise floor estimate Q7 */
+ Word16 S_map[] /* o : short-term correlation map Q7 */
+);
+
+/* o : frame multi-harmonicity (1-harmonic, 0-not) */
+Word16 multi_harm_ivas_fx(
+ const Word16 Bin_E[], /* i : log-energy spectrum of the current frame Q7 */
+ Word16 old_S[], /* i/o: prev. log-energy spectrum w. subtracted floor Q7 */
+ Word16 cor_map_LT[], /* i/o: LT correlation map Q15 */
+ Word16 *multi_harm_limit, /* i/o: multi harminic threshold Q9 */
+ const Word32 total_brate, /* i : total bitrate Q0 */
+ const Word16 bwidth, /* i : i signal bandwidth Q0 */
+ Word16 *cor_strong_limit, /* i/o: HF correlation indicator Q0 */
+ Word16 *st_mean_avr_dyn, /* i/o: long term average dynamic Q7 */
+ Word16 *st_last_sw_dyn, /* i/o: last dynamic Q7 */
+ Word16 *cor_map_sum, /* i : sum of correlation map Q8 */
+ Word16 *sp_floor, /* o: noise floor estimate Q7 */
+ Word16 S_map[] /* o : short-term correlation map Q7 */
);
void pvq_encode_frame_fx(
@@ -4412,9 +4590,11 @@ void pvq_encode_frame_ivas_fx(
const Word16 pvq_bits, /* i : number of bits avaiable */
const Word16 core /* i : core */
);
-Word16 Interpol_4( /*Qx o : interpolated value */
- Word16 *x, /*Qx i : i vector */
- Word16 frac /* i : fraction (-4..+3) */
+
+/*Qx o : interpolated value */
+Word16 Interpol_4(
+ Word16 *x, /*Qx i : i vector */
+ Word16 frac /* i : fraction (-4..+3) */
);
void set_ppp_mode_fx(
@@ -4441,6 +4621,7 @@ void pvq_encode_fx(
const Word16 dim, /* i: Length of vector */
const Word16 neg_gain /* i: - Gain use - negative gain in Q15 0 ..1 */
);
+
void pvq_encode_ivas_fx(
BSTR_ENC_HANDLE hBstr,
PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */
@@ -4452,6 +4633,7 @@ void pvq_encode_ivas_fx(
const Word16 dim, /* i: Length of vector */
const Word16 neg_gain /* i: - Gain use - negative gain in Q15 0 ..1 */
);
+
void rc_enc_init_fx(
PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */
Word16 tot_bits /* i : Total bit budget Q0*/
@@ -4461,11 +4643,13 @@ void rc_enc_finish_fx(
BSTR_ENC_HANDLE hBstr, /* i/o: Encoder state */
PVQ_ENC_HANDLE hPVQ /* i/o: PVQ encoder handle */
);
+
void rc_enc_finish_ivas_fx(
BSTR_ENC_HANDLE hBstr,
PVQ_ENC_HANDLE hPVQ /* i/o: PVQ encoder handle */
);
+
void rc_encode_fx(
BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */
@@ -4473,6 +4657,7 @@ void rc_encode_fx(
UWord32 sym_freq, /* i : Symbol probability Q0*/
UWord32 tot /* i : Total cumulative frequency Q0*/
);
+
void rc_encode_ivas_fx(
BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */
@@ -4480,12 +4665,14 @@ void rc_encode_ivas_fx(
UWord32 sym_freq, /* i : Symbol probability Q0*/
UWord32 tot /* i : Total cumulative frequency Q0*/
);
+
void rc_enc_uniform_ivas_fx(
BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */
UWord32 value, /* i : Value to encode Q0*/
UWord32 tot /* i : Maximum value Q0*/
);
+
void rc_enc_uniform_fx(
BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */
@@ -4499,12 +4686,14 @@ void rc_enc_bits_fx(
UWord32 value, /* i : Value to encode Q0*/
Word16 bits /* i : Number of bits used Q0*/
);
+
void rc_enc_bits_ivas_fx(
BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */
PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */
UWord32 value, /* i : Value to encode Q0*/
Word16 bits /* i : Number of bits used Q0*/
);
+
void re8_compute_base_index_fx(
const Word16 *x, /* i : Elemen of Q2, Q3 or Q4 */
const Word16 ka, /* i : Identifier of the absolute leader related to x */
@@ -4515,11 +4704,12 @@ void tfaCalcEnv_fx(
const Word16 *shb_speech,
Word32 *enr );
-Word16 delta_pit_enc_fx( /* o : pitch index */
- const Word16 fr_steps, /* i : fractional resolution steps (2 or 4)*/
- const Word16 T0, /* i : integer pitch lag */
- const Word16 T0_frac, /* i : pitch fraction */
- const Word16 T0_min /* i : delta search min */
+/* o : pitch index */
+Word16 delta_pit_enc_fx(
+ const Word16 fr_steps, /* i : fractional resolution steps (2 or 4)*/
+ const Word16 T0, /* i : integer pitch lag */
+ const Word16 T0_frac, /* i : pitch fraction */
+ const Word16 T0_min /* i : delta search min */
);
void set_impulse_fx(
@@ -4533,11 +4723,12 @@ void set_impulse_fx(
Word16 Q_new /* i : Current scaling */
);
-Word16 abs_pit_enc_fx( /* o : pitch index */
- const Word16 fr_steps, /* i : fractional resolution steps (2 or 4) for shortest pitches*/
- const Word16 limit_flag, /* i : restrained(0) or extended(1) limits */
- const Word16 T0, /* i : integer pitch lag */
- const Word16 T0_frac /* i : pitch fraction */
+/* o : pitch index */
+Word16 abs_pit_enc_fx(
+ const Word16 fr_steps, /* i : fractional resolution steps (2 or 4) for shortest pitches*/
+ const Word16 limit_flag, /* i : restrained(0) or extended(1) limits */
+ const Word16 T0, /* i : integer pitch lag */
+ const Word16 T0_frac /* i : pitch fraction */
);
ivas_error ppp_quarter_encoder_fx(
@@ -4615,9 +4806,10 @@ Word16 cng_energy_ivas_fx(
const Word16 Q_new /* i : Input scaling */
);
-void generate_comfort_noise_enc_ivas_fx( Encoder_State *stcod,
- Word16 Q_new,
- Word16 gen_exc );
+void generate_comfort_noise_enc_ivas_fx(
+ Encoder_State *stcod,
+ Word16 Q_new,
+ Word16 gen_exc );
void SynthesisSTFT_enc_ivas_fx(
Word32 *fftBuffer, /* i : pointer to FFT bins */
diff --git a/lib_enc/pvq_core_enc_fx.c b/lib_enc/pvq_core_enc_fx.c
index 647e97f8722a40d91865851668c661b5aef37f74..854c269386eadd3a39565e72993e5437d938e3aa 100644
--- a/lib_enc/pvq_core_enc_fx.c
+++ b/lib_enc/pvq_core_enc_fx.c
@@ -5,15 +5,16 @@
#include
#include "options.h" /* Compilation switches */
#include "cnst.h"
-#include "rom_com_fx.h" /* Static table prototypes */
#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
#include "ivas_prot_fx.h"
+
/*-------------------------------------------------------------------*
* Local function prototypes
*--------------------------------------------------------------------*/
+
static Word16 calc_pvq_splits_fx( BSTR_ENC_HANDLE hBstr, PVQ_ENC_HANDLE hPVQ, const Word16 band_bits, const Word16 sfmsize, const Word16 *y, const Word16 Q_y, Word16 *bits );
static Word16 calc_pvq_splits_ivas_fx( /* o : Number of segments */
BSTR_ENC_HANDLE hBstr, /* i/o: Encoder state */
@@ -44,7 +45,6 @@ static void pvq_encode_band_ivas_fx(
const Word16 strict_bits /* i : conservative rounding flag */
)
{
-
Word16 K_val;
Word16 j, Np;
Word32 enr, E_part[MAX_SPLITS + 1];
diff --git a/lib_enc/pvq_encode_fx.c b/lib_enc/pvq_encode_fx.c
index e989067048836a0c59074edb501cffd7a49cd677..0034f5423992dca3ada73cdf8cbb79b363b5b0bc 100644
--- a/lib_enc/pvq_encode_fx.c
+++ b/lib_enc/pvq_encode_fx.c
@@ -6,18 +6,19 @@
#include "cnst.h"
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
-#include "rom_com_fx.h"
#include "rom_com.h"
+
/* PVQ MIXED_SEARCH_LOOP:
low precision 16/32 + energy selective high precision 32/64,
mixed perf , 10 dB SEGSNR better than the low precision loop only,
active if k>=128 and accumulated energy is high enough,
comes at a controlled complexity cost, as dimensions decrease for high k's*/
-static Word16 max_val_fx( /* o : maximum value in the input vector */
- const Word16 *vec, /* i : input vector */
- const Word16 lvec /* i : length of input vector */
+/* o : maximum value in the input vector */
+static Word16 max_val_fx(
+ const Word16 *vec, /* i : input vector */
+ const Word16 lvec /* i : length of input vector */
)
{
Word16 j, tmp;
@@ -31,7 +32,9 @@ static Word16 max_val_fx( /* o : maximum value in the input
return tmp;
}
-static Word16 pyramidSearchProjInit_fx( Word16 L, Word16 Ptot )
+static Word16 pyramidSearchProjInit_fx(
+ const Word16 L,
+ const Word16 Ptot )
{
return ( sub( Ptot, extract_l( L_shr( L_mult0( 8223, (Word32) L ), 14 ) ) ) > 0 );
}
diff --git a/lib_enc/q_gain2p_fx.c b/lib_enc/q_gain2p_fx.c
index 4618483d26b649a5e066f1dc307655f4bec5c505..be5d41799d733a98b80c9075b08aa9f0a8bf5226 100644
--- a/lib_enc/q_gain2p_fx.c
+++ b/lib_enc/q_gain2p_fx.c
@@ -7,12 +7,12 @@
#include "options.h"
#include "cnst.h" /* Common constants */
#include "basop_util.h"
-#include "rom_com_fx.h"
#include "rom_com.h" /* Common constants */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
#include "basop_util.h" /* Function prototypes */
+
static Word16 gain_enc( /* o : quantization pitch index */
const Word16 *code, /* i : algebraic excitation */
Word16 lcode, /* i : Subframe size in range: 40,64,80 */
diff --git a/lib_enc/qlpc_stoch_fx.c b/lib_enc/qlpc_stoch_fx.c
index d6f0b504f8f2c5ebc0aea689ff87b5eaac0a7ad0..e6a30da0ff084caea509844b686ea54f06588a61 100644
--- a/lib_enc/qlpc_stoch_fx.c
+++ b/lib_enc/qlpc_stoch_fx.c
@@ -2,15 +2,12 @@
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
-
#include
#include
#include "options.h"
#include "cnst.h"
#include "rom_enc.h"
-#include "rom_com_fx.h"
#include "rom_com.h"
-//#include "prot_fx.h"
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
#include "basop_util.h"
diff --git a/lib_enc/range_enc_fx.c b/lib_enc/range_enc_fx.c
index 767b2ecb5a98bc692e6a0bbcecf7e9ba3213e7b9..3f157b0939d5123d4a93fbf51a4538b825645e61 100644
--- a/lib_enc/range_enc_fx.c
+++ b/lib_enc/range_enc_fx.c
@@ -4,11 +4,9 @@
#include
#include
-#include "options.h" /* Compilation switches */
-#include "cnst.h" /* Common constants */
-#include "rom_com_fx.h" /* Static table prototypes */
-#include "rom_com.h" /* Static table prototypes */
-//#include "prot_fx.h" /* Function prototypes */
+#include "options.h" /* Compilation switches */
+#include "cnst.h" /* Common constants */
+#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
@@ -17,6 +15,7 @@ static void rc_enc_shift_fx( BSTR_ENC_HANDLE hBstr, PVQ_ENC_HANDLE hPVQ );
static void rc_enc_write_fx( BSTR_ENC_HANDLE hBstr, Word16 byte, Word16 bits );
static void rc_enc_shift_ivas_fx( BSTR_ENC_HANDLE hBstr, PVQ_ENC_HANDLE hPVQ );
static void rc_enc_write_ivas_fx( BSTR_ENC_HANDLE hBstr, Word16 byte, Word16 bits );
+
/*-------------------------------------------------------------------*
* rc_enc_init()
*
diff --git a/lib_enc/reordernorm_fx.c b/lib_enc/reordernorm_fx.c
index 176b54f8e586150bc57f8f4e6f404d3c9724d994..31d7ad869151343b235efb54618ba6a06abb1446 100644
--- a/lib_enc/reordernorm_fx.c
+++ b/lib_enc/reordernorm_fx.c
@@ -5,11 +5,11 @@
#include
#include "options.h" /* Compilation switches */
#include "cnst.h" /* Common constants */
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
/*--------------------------------------------------------------------------*/
/* Function reordernorm_fx */
/* ~~~~~~~~~~~~~~~~~~~~~ */
diff --git a/lib_enc/rst_enc_fx.c b/lib_enc/rst_enc_fx.c
index 9c5c7263bdfb7d3ca9d78296a7b4bf679334776e..bbe32afb3605d7333c807144bbbacfb9a60a7e22 100644
--- a/lib_enc/rst_enc_fx.c
+++ b/lib_enc/rst_enc_fx.c
@@ -2,15 +2,14 @@
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
-#include "options.h" /* Compilation switches */
-#include "cnst.h" /* Common constants */
-#include "rom_com_fx.h" /* Static table prototypes */
-#include "rom_com.h" /* Static table prototypes */
-//#include "prot_fx.h" /* Function prototypes */
+#include "options.h" /* Compilation switches */
+#include "cnst.h" /* Common constants */
+#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
#include "stl.h"
+
/*-------------------------------------------------------------------*
* CNG_reset_enc()
*
diff --git a/lib_enc/scale_enc_fx.c b/lib_enc/scale_enc_fx.c
index 2f3cd18338af7c7145123d6507512b60cba3f80d..608bf8339e36ac0f0587b0bc3139394b56923f3c 100644
--- a/lib_enc/scale_enc_fx.c
+++ b/lib_enc/scale_enc_fx.c
@@ -2,19 +2,20 @@
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
-#include "options.h" /* Compilation switches */
-#include "cnst.h" /* Common constants */
-#include "rom_com_fx.h" /* Static table prototypes */
-//#include "prot_fx.h" /* Function prototypes */
+#include "options.h" /* Compilation switches */
+#include "cnst.h" /* Common constants */
+#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
#include "stl.h"
+
/*-------------------------------------------------------------------*
* Scale_wsp
*
* Find scaling factor for weighted speech input
*-------------------------------------------------------------------*/
+
void Scale_wsp(
Word16 *wsp, /* i : Weigthed speech */
Word16 *old_wsp_max, /* i : Last weigthed speech maximal valu */
@@ -24,7 +25,7 @@ void Scale_wsp(
Word16 *old_wsp, /* i/o: Old weighted speech buffer */
Word16 *mem_decim2, /* i/o: Decimation buffer */
Word16 *old_wsp12k8, /* i/o: wsp memory @ 12.8 kHz used in pitol2 */
- const Word16 Len_p_look /* i : L_frame + look ahead Q0*/
+ const Word16 Len_p_look /* i : L_frame + look ahead Q0*/
)
{
Word16 max, i, tmp;
diff --git a/lib_enc/set_impulse_fx.c b/lib_enc/set_impulse_fx.c
index 46693bfe0381e8af458a385fab86077fa2644418..8831a7ae52610cecf64439661f6bfb89014b2ac3 100644
--- a/lib_enc/set_impulse_fx.c
+++ b/lib_enc/set_impulse_fx.c
@@ -1,27 +1,31 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
#include "options.h"
-#include "cnst.h" /* Common constants */
-#include "rom_com_fx.h" /* Static table prototypes */
-#include "rom_com.h" /* Static table prototypes */
-//#include "prot_fx.h" /* Function prototypes */
+#include "cnst.h" /* Common constants */
+#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
/*-----------------------------------------------------------------*
* Local constant
*-----------------------------------------------------------------*/
+
#define INPOL 4 /* +- range in samples for impulse position searching */
+
/*-----------------------------------------------------------------*
* Local function prototypes
*-----------------------------------------------------------------*/
+
static void convolve_tc_fx( const Word16 g[], const Word16 h[], Word16 y[], const Word16 L_1, const Word16 L_2 );
static void correlate_tc_fx( const Word16 *x, Word16 *y, const Word16 *h, const Word16 start, const Word16 L_1, const Word16 L_2 );
static void convolve_tc2_fx( const Word16 g[], const Word16 h[], Word16 y[], const Word16 pos_max );
+
/*---------------------------------------------------------------------------------------*
* Function set_impulse() for TC *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
diff --git a/lib_enc/setmodeindex_fx.c b/lib_enc/setmodeindex_fx.c
index 012c5757f2b9ea041c5bb4541e580f11fd27e656..c1d52bbc7bb25f03d59a095455d15d674b030d87 100644
--- a/lib_enc/setmodeindex_fx.c
+++ b/lib_enc/setmodeindex_fx.c
@@ -5,11 +5,12 @@
#include
#include "options.h"
#include "cnst.h"
-#include "rom_com_fx.h"
+#include "rom_com.h"
#include "rom_enc.h"
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
/*---------------------------------------------------------------------------
function name: SetModeIndex_fx
diff --git a/lib_enc/speech_music_classif_fx.c b/lib_enc/speech_music_classif_fx.c
index e2c8f59ffcd6ffbc872fde234cfeb83dee1555e2..bd814e04b36becddb37f76d08f0c4a9106ba83fb 100644
--- a/lib_enc/speech_music_classif_fx.c
+++ b/lib_enc/speech_music_classif_fx.c
@@ -6,9 +6,7 @@
#include
#include "options.h"
#include "cnst.h"
-// #include "prot_fx.h"
#include "rom_enc.h"
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "stl.h"
#include "prot_fx.h" /* Function prototypes */
@@ -23,6 +21,7 @@
/*---------------------------------------------------------------------*
* Local constants
*---------------------------------------------------------------------*/
+
#define ATT_NSEG 32
#define ATT_SEG_LEN ( L_FRAME / ATT_NSEG )
#define ATT_3LSUB_POS ( 3 * ATT_NSEG / NB_SUBFR )
@@ -44,7 +43,6 @@
static Word16 sp_mus_classif_gmm_fx( Encoder_State *st_fx, const Word16 localVAD_HE_SAD, const Word16 lsp_new[M], const Word16 cor_map_sum, const Word32 epsP[M + 1], const Word32 PS[], Word16 non_sta, Word16 relE, Word16 *voi_fv, Word16 *cor_map_sum_fv, Word16 *LPCErr, Word16 Q_esp, Word16 *high_lpn_flag_ptr );
-
static void sp_mus_classif_2nd_fx( Encoder_State *st, const Word16 Etot, Word16 *attack_flag, const Word16 *inp, const Word16 Qx );
static void music_mixed_classif_improv_fx( Encoder_State *st, const Word16 *new_inp, const Word32 *epsP, Word16 Q_epsP, Word16 etot, Word16 old_cor, Word16 cor_map_sum );
diff --git a/lib_enc/stat_noise_uv_enc_fx.c b/lib_enc/stat_noise_uv_enc_fx.c
index 598745ebd34f60402923f6bb31109b1fa60934b9..ed65b6793da84fa756f2e509511cc8a4ac075b6c 100644
--- a/lib_enc/stat_noise_uv_enc_fx.c
+++ b/lib_enc/stat_noise_uv_enc_fx.c
@@ -5,8 +5,6 @@
#include
#include "options.h"
#include "cnst.h"
-//#include "prot_fx.h" /* Function prototypes */
-#include "rom_com_fx.h" /* Static table prototypes */
#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
@@ -37,6 +35,7 @@
/* RETURN ARGUMENTS : */
/* _ None */
/*=======================================================================*/
+
void stat_noise_uv_enc_fx(
Encoder_State *st_fx, /* i/o: state structure */
const Word32 *LepsP, /* i : LP prediction errors */
diff --git a/lib_enc/swb_bwe_enc_fx.c b/lib_enc/swb_bwe_enc_fx.c
index 2b2c809a9837b449d812759564a996d1d535d609..bd4bb6788da31172603d27643fd4cc7944fbe17a 100644
--- a/lib_enc/swb_bwe_enc_fx.c
+++ b/lib_enc/swb_bwe_enc_fx.c
@@ -6,7 +6,6 @@
#include "options.h"
#include "prot_fx.h"
#include "cnst.h"
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "stl.h"
#include "prot_fx_enc.h" /* Function prototypes */
diff --git a/lib_enc/swb_bwe_enc_hr_fx.c b/lib_enc/swb_bwe_enc_hr_fx.c
index dc962d1bc18e35f997468a694c58084d2a9acb96..dbd6a258d3ec0b0bbf6166509b6c636ed2b1a796 100644
--- a/lib_enc/swb_bwe_enc_hr_fx.c
+++ b/lib_enc/swb_bwe_enc_hr_fx.c
@@ -1,12 +1,12 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
#include
#include "options.h"
#include "cnst.h" /* Common constants */
#include "rom_enc.h" /* Encoder static table prototypes */
-#include "rom_com_fx.h" /* Static table prototypes */
#include "rom_com.h" /* Common constants */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
@@ -38,10 +38,11 @@
* Quantize the band envelop
*-------------------------------------------------------------------*/
-static Word16 en_band_quant_fx( /* o : quantization index */
- Word16 *en_band, /* i/o: (un)quantized envelope value */
- const Word16 *env_code, /* i : envelope codebook */
- const Word16 N /* i : codebook dimension */
+/* o : quantization index */
+static Word16 en_band_quant_fx(
+ Word16 *en_band, /* i/o: (un)quantized envelope value */
+ const Word16 *env_code, /* i : envelope codebook */
+ const Word16 N /* i : codebook dimension */
)
{
Word16 i, ind, tmp16;
diff --git a/lib_enc/swb_pre_proc_fx.c b/lib_enc/swb_pre_proc_fx.c
index ca7233c956e89d4f4356039c0a3c191251102e11..2cd295acd7f43512eed3a204067af7a6d8be04fb 100644
--- a/lib_enc/swb_pre_proc_fx.c
+++ b/lib_enc/swb_pre_proc_fx.c
@@ -5,8 +5,6 @@
#include
#include "options.h"
#include "cnst.h"
-//#include "prot_fx.h"
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "stl.h"
#include "prot_fx.h" /* Function prototypes */
@@ -14,9 +12,9 @@
#include "prot_fx_enc.h" /* Function prototypes */
#include "basop_util.h"
#include "ivas_rom_enc.h"
-
#include
+
/*========================================================================*/
/* FUNCTION : wb_pre_proc_fx() */
/*------------------------------------------------------------------------*/
diff --git a/lib_enc/swb_tbe_enc_fx.c b/lib_enc/swb_tbe_enc_fx.c
index d5c546c35569fdb118a0cef6e1c31b2fde915e2f..aa0025ab5ec8a6f2f8c27ea02d2b526ad5b110f8 100644
--- a/lib_enc/swb_tbe_enc_fx.c
+++ b/lib_enc/swb_tbe_enc_fx.c
@@ -2,11 +2,9 @@
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
-
#include
#include "options.h"
#include "cnst.h"
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
@@ -24,16 +22,11 @@
/*-----------------------------------------------------------------*
* Local functions
*-----------------------------------------------------------------*/
-static void return_M_Least_fx_GainFrame( const Word32 *inp,
- const Word32 *codebook,
- const Word16 num_grp,
- const Word16 interNum,
- Word16 *least );
+static void return_M_Least_fx_GainFrame( const Word32 *inp, const Word32 *codebook, const Word16 num_grp, const Word16 interNum, Word16 *least );
static void singlevectortest_gain_fx( const Word32 *inp, const Word16 dimen, const Word16 cb_size, Word16 *index, Word32 *recon, const Word32 *codebook );
-
static void determine_gain_weights_fx( const Word32 *gain, Word16 *weights, const Word16 dims );
static void QuantizeSHBsubgains_fx( Encoder_State *st_fx, Word16 *subgains, const Word16 extl );
@@ -48,38 +41,11 @@ static Word16 closest_centroid_fx( const Word16 *data, const Word16 *weights, co
static Word16 closest_centroid_lc_fx( const Word16 *data, const Word16 *quantizer, const Word16 centroids );
-static void EstimateSHBFrameGain_fx( const Word16 length,
- const Word16 *oriSHB,
- const Word16 Q_oriSHB,
- const Word16 *synSHB,
- const Word16 Q_synSHB,
- Word16 *subgain,
- Word32 *GainFrame,
- const Word16 *win_shb,
- const Word16 *subwin_shb,
- const Word16 n_subfr_saturation );
-
-static void EstimateSHBFrameGain_ivas_fx( const Word16 length,
- const Word16 *oriSHB,
- const Word16 Q_oriSHB,
- const Word16 *synSHB,
- const Word16 Q_synSHB,
- Word16 *subgain,
- Word32 *GainFrame,
- const Word16 *win_shb,
- const Word16 *subwin_shb,
- const Word16 n_subfr_saturation );
-
-static void EstimateSHBGainShape_fx( const Word16 length,
- const Word16 *oriSHB,
- const Word16 Q_oriSHB,
- const Word16 *synSHB,
- const Word16 Q_synSHB,
- Word16 *subgain,
- const Word16 *subwin,
- Word16 *n_subfr_saturation,
- const Flag limit_min_gain );
+static void EstimateSHBFrameGain_fx( const Word16 length, const Word16 *oriSHB, const Word16 Q_oriSHB, const Word16 *synSHB, const Word16 Q_synSHB, Word16 *subgain, Word32 *GainFrame, const Word16 *win_shb, const Word16 *subwin_shb, const Word16 n_subfr_saturation );
+static void EstimateSHBFrameGain_ivas_fx( const Word16 length, const Word16 *oriSHB, const Word16 Q_oriSHB, const Word16 *synSHB, const Word16 Q_synSHB, Word16 *subgain, Word32 *GainFrame, const Word16 *win_shb, const Word16 *subwin_shb, const Word16 n_subfr_saturation );
+
+static void EstimateSHBGainShape_fx( const Word16 length, const Word16 *oriSHB, const Word16 Q_oriSHB, const Word16 *synSHB, const Word16 Q_synSHB, Word16 *subgain, const Word16 *subwin, Word16 *n_subfr_saturation, const Flag limit_min_gain );
static Word32 pow_off_pk_fx( Word16 a[], Word16 len, Word16 step );
@@ -90,9 +56,7 @@ static void rescale_genSHB_mem_enc( Encoder_State *st_fx, Word16 sf );
static void find_max_mem_wb_enc( Encoder_State *st_fx, Word16 *n_mem );
static void rescale_genWB_mem_enc( Encoder_State *st_fx, Word16 sf );
-static void Quant_lower_LSF_fx( const Word16 lsf[],
- Word16 lsf_q[],
- Word16 lsf_idx[] );
+static void Quant_lower_LSF_fx( const Word16 lsf[], Word16 lsf_q[], Word16 lsf_idx[] );
static Word16 Quant_mirror_point_fx( const Word16 lsf[], const Word16 lsf_q[], Word16 *m );
static Word16 Find_LSF_grid_fx( const Word16 lsf[], Word16 lsf_q[], const Word16 m );
@@ -109,21 +73,9 @@ static void Quant_shb_res_gshape_fx( Encoder_State *st_fx, Word16 *shb_res_gshap
static void Quant_shb_res_gshape_ivas_fx( Encoder_State *st, Word16 shb_res_gshape_fx[] );
-static void gainFrSmooth_En_fx( Encoder_State *st_fx,
- Word16 *shb_frame_fx,
- const Word16 *lpc_shb_fx,
- const Word16 *lsp_shb_fx,
- Word16 *MA_lsp_shb_spacing,
- Word16 *frGainAttenuate,
- Word16 *frGainSmoothEn );
+static void gainFrSmooth_En_fx( Encoder_State *st_fx, Word16 *shb_frame_fx, const Word16 *lpc_shb_fx, const Word16 *lsp_shb_fx, Word16 *MA_lsp_shb_spacing, Word16 *frGainAttenuate, Word16 *frGainSmoothEn );
-static void gainFrSmooth_En_ivas_fx( Encoder_State *st_fx,
- Word16 *shb_frame_fx /* Q_in */,
- const Word16 *lpc_shb_fx /* Q12 */,
- const Word16 *lsp_shb_fx /* Q15 */,
- Word16 *MA_lsp_shb_spacing /* Q15 */,
- Word16 *frGainAttenuate /* Q0 */,
- Word16 *frGainSmoothEn /* Q0 */ );
+static void gainFrSmooth_En_ivas_fx( Encoder_State *st_fx, Word16 *shb_frame_fx /* Q_in */, const Word16 *lpc_shb_fx /* Q12 */, const Word16 *lsp_shb_fx /* Q15 */, Word16 *MA_lsp_shb_spacing /* Q15 */, Word16 *frGainAttenuate /* Q0 */, Word16 *frGainSmoothEn /* Q0 */ );
/*-------------------------------------------------------------------*
diff --git a/lib_enc/tcx_ltp_enc_fx.c b/lib_enc/tcx_ltp_enc_fx.c
index 3cb55ba25ac4f44f2abc05215aa5ae9b1157c96b..08b866289e18d15262a485951ac527ce57992818 100644
--- a/lib_enc/tcx_ltp_enc_fx.c
+++ b/lib_enc/tcx_ltp_enc_fx.c
@@ -8,12 +8,15 @@
#include "stl.h"
#include "cnst.h"
#include "basop_util.h"
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
-static Word32 dot( const Word16 *X, const Word16 *Y, Word16 n )
+
+static Word32 dot(
+ const Word16 *X,
+ const Word16 *Y,
+ Word16 n )
{
Word32 acc;
Word16 i;
@@ -30,20 +33,22 @@ static Word32 dot( const Word16 *X, const Word16 *Y, Word16 n )
return acc;
}
-static Word32 interpolate_corr( /* o : interpolated value */
- const Word32 *x, /* i : input vector */
- const Word16 frac, /* i : fraction of lag */
- const Word16 frac_max /* i : max fraction */
+
+/* o : interpolated value */
+static Word32 interpolate_corr(
+ const Word32 *x, /* i : input vector */
+ const Word16 frac, /* i : fraction of lag */
+ const Word16 frac_max /* i : max fraction */
)
{
Word32 s;
const Word16 *c, *win;
-
win = E_ROM_inter4_1_fx;
if ( EQ_16( frac_max, 6 ) )
+ {
win = E_ROM_inter6_1_fx;
-
+ }
s = L_deposit_l( 0 );
@@ -87,7 +92,6 @@ static void tcx_ltp_pitch_search(
Word32 cor_max, cor[256], *pt_cor, temp;
Word16 wsp2[L_FRAME_PLUS + PIT_MAX_MAX + L_INTERPOL1];
-
delta = 16;
move16();
if ( EQ_16( pitres, 6 ) )
diff --git a/lib_enc/tns_base_enc_fx.c b/lib_enc/tns_base_enc_fx.c
index 05b35813a5bb1efb1a2507cc5e2f7daa65a565cf..5a8daddc3b09cfb01023a85e2eac7dbf70ecdebe 100644
--- a/lib_enc/tns_base_enc_fx.c
+++ b/lib_enc/tns_base_enc_fx.c
@@ -2,7 +2,7 @@
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
-
+#include "options.h"
#include "cnst.h"
#include "stl.h"
//#include "prot_fx.h"
@@ -10,11 +10,11 @@
#include "stl.h"
#include
#include
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
#define HLM_MIN_NRG_FX 858993459 // ( 32768.0f * 2 * NORM_MDCT_FACTOR / ( 640 * 640 ) ) in Q26
/** Get TNS filter parameters from autocorrelation.
diff --git a/lib_enc/transition_enc_fx.c b/lib_enc/transition_enc_fx.c
index 8ed4b2fa831302dfade9954be2653aa1529bdf8d..d2297ebed17c63a4295b0b65a8fbf112b158178d 100644
--- a/lib_enc/transition_enc_fx.c
+++ b/lib_enc/transition_enc_fx.c
@@ -5,7 +5,6 @@
#include
#include "options.h" /* Compilation switches */
#include "cnst.h" /* Common constants */
-#include "rom_com_fx.h" /* Static table prototypes */
#include "rom_com.h" /* Static table prototypes */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
diff --git a/lib_enc/updt_enc_fx.c b/lib_enc/updt_enc_fx.c
index aed3bf81271924fb7dbf5f7228293c5434829f37..2982e618914b0e8338db39d89c154643af56b862 100644
--- a/lib_enc/updt_enc_fx.c
+++ b/lib_enc/updt_enc_fx.c
@@ -1,11 +1,10 @@
/*====================================================================================
EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0
====================================================================================*/
+
#include
-#include "options.h" /* Compilation switches */
-#include "cnst.h" /* Common constants */
-#include "rom_com_fx.h" /* Static table prototypes */
-//#include "prot_fx.h" /* Function prototypes */
+#include "options.h" /* Compilation switches */
+#include "cnst.h" /* Common constants */
#include "rom_com.h" /* Common constants */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
diff --git a/lib_enc/vbr_average_rate_fx.c b/lib_enc/vbr_average_rate_fx.c
index 28371b2d716d2cd26f8cba81e5bdc40929ed02cb..d591db58a9b932311d4cf48900ee1835a405250f 100644
--- a/lib_enc/vbr_average_rate_fx.c
+++ b/lib_enc/vbr_average_rate_fx.c
@@ -3,10 +3,8 @@
====================================================================================*/
#include
-#include "options.h" /* Compilation switches */
-#include "cnst.h" /* Common constants */
-//#include "prot_fx.h" /* Function prototypes */
-#include "rom_com_fx.h" /* Static table prototypes */
+#include "options.h" /* Compilation switches */
+#include "cnst.h" /* Common constants */
#include "stat_enc.h" /* Static table prototypes */
#include "rom_com.h" /* Common constants */
#include "prot_fx.h" /* Function prototypes */
diff --git a/lib_enc/vlpc_1st_cod_fx.c b/lib_enc/vlpc_1st_cod_fx.c
index 9bfe0d8ae90c59aa69f96b024678e1fbd341760a..9cbbd87964c44b8fa187ab7e5c197ce34d460fe2 100644
--- a/lib_enc/vlpc_1st_cod_fx.c
+++ b/lib_enc/vlpc_1st_cod_fx.c
@@ -5,12 +5,11 @@
#include
#include "options.h"
#include "cnst.h"
-//#include "prot_fx.h"
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
#define ISF_ONE 3 /*1.0f*1.28f Q1*/ /*=1.0f in 14Q1*1.28*/
/*------------------------------------------------------------------*
diff --git a/lib_enc/voiced_enc_fx.c b/lib_enc/voiced_enc_fx.c
index be1272c2a6c8f27d483c3192bb4e6cb86150a00e..ac0637f617de151f7a168783a579b977b31fe83f 100644
--- a/lib_enc/voiced_enc_fx.c
+++ b/lib_enc/voiced_enc_fx.c
@@ -5,21 +5,22 @@
#include
#include "options.h"
#include "cnst.h"
-//#include "prot_fx.h"
-#include "rom_com_fx.h"
#include "rom_com.h" /* Common constants */
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
#include "basop_util.h" /* Function prototypes */
+
/*-------------------------------------------------------------------*
* Local functions
*--------------------------------------------------------------------*/
+
static void synthesis_filter_fx( Word16 b[], Word16 x[], Word16 y[], Word16 buf[], Word16 P, Word16 N );
static Word32 DTFS_freq_corr_fx( DTFS_STRUCTURE X1_DTFS_fx, DTFS_STRUCTURE X2_DTFS_fx, Word16 lband, Word16 hband, Word16 *Qout );
static Word16 DTFS_alignment_extract_td_fx( Word16 *x1, Word16 *x2, Word16 lag );
static Word32 DTFS_getEngy_band_fx( DTFS_STRUCTURE X_fx, const Word16 lband, const Word16 hband );
+
/*=======================================================================================*/
/* FUNCTION : ppp_voiced_encoder_fx() */
/*---------------------------------------------------------------------------------------*/
diff --git a/lib_enc/waveadjust_fec_cod_fx.c b/lib_enc/waveadjust_fec_cod_fx.c
index f10a1bd0b2d1fff339dc2c8f93ef7ffdbbee9067..4efe9b9fef3c422bca866726e53010a98fe3758c 100644
--- a/lib_enc/waveadjust_fec_cod_fx.c
+++ b/lib_enc/waveadjust_fec_cod_fx.c
@@ -5,13 +5,12 @@
#include
#include "options.h" /* for wmc_tool */
#include "cnst.h"
-//#include "prot_fx.h"
-#include "rom_com_fx.h"
#include "rom_com.h"
#include "stat_com.h"
#include "prot_fx.h" /* Function prototypes */
#include "prot_fx_enc.h" /* Function prototypes */
+
/*-------------------------------------------------------------------*
* SFM_Cal_fx()
*
diff --git a/lib_rend/ivas_dirac_output_synthesis_dec_fx.c b/lib_rend/ivas_dirac_output_synthesis_dec_fx.c
index 541e4d5a8148c97d9af968befd62d9703ad53a79..574a6950ec9aa2337bfc0d825dbd0b22b89e00c9 100644
--- a/lib_rend/ivas_dirac_output_synthesis_dec_fx.c
+++ b/lib_rend/ivas_dirac_output_synthesis_dec_fx.c
@@ -43,7 +43,7 @@
#include "ivas_rom_dec.h"
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
+
/*-------------------------------------------------------------------------
* Local constants
diff --git a/lib_rend/ivas_mcmasa_ana_fx.c b/lib_rend/ivas_mcmasa_ana_fx.c
index 1ce8dc77f2fbfc56d5747d0ad716945d699dedfe..4dee666004b0802699ec594ea1b767e6543e02b7 100644
--- a/lib_rend/ivas_mcmasa_ana_fx.c
+++ b/lib_rend/ivas_mcmasa_ana_fx.c
@@ -41,7 +41,7 @@
#include "ivas_rom_com.h"
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
-#include "ivas_rom_com_fx.h"
+
/*-------------------------------------------------------------------------
* Local constants
diff --git a/lib_rend/ivas_objectRenderer_fx.c b/lib_rend/ivas_objectRenderer_fx.c
index 850debb72510d383900f4431eed154c5dda2d275..aee0c42978e9d926b5cb2ae5cd0c0281c95f6083 100644
--- a/lib_rend/ivas_objectRenderer_fx.c
+++ b/lib_rend/ivas_objectRenderer_fx.c
@@ -40,15 +40,12 @@
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
#include "debug.h"
-#include "ivas_rom_com_fx.h"
-#define float_to_fixed( n, factor ) ( round( n * ( 1 << factor ) ) )
-#define fixed_to_float( n, factor ) ( (float) n / ( 1 << factor ) )
+
/*---------------------------------------------------------------------*
* Local function prototypes
*---------------------------------------------------------------------*/
-
static void TDREND_Clear_Update_flags_fx(
BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd /* i/o: TD renderer handle */
);
diff --git a/lib_rend/ivas_output_init_fx.c b/lib_rend/ivas_output_init_fx.c
index ebd1f3f278f7e18a2cb50005709b7be91a290154..170581b2391c5b786729aaf3836c9f9abdfe1477 100644
--- a/lib_rend/ivas_output_init_fx.c
+++ b/lib_rend/ivas_output_init_fx.c
@@ -37,9 +37,10 @@
#include "prot_fx.h"
#include "ivas_prot_rend_fx.h"
#include "ivas_rom_com.h"
-#include "ivas_rom_com_fx.h"
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
+
+
/*-------------------------------------------------------------------------*
* audioCfg2channels()
*
diff --git a/lib_rend/ivas_reflections_fx.c b/lib_rend/ivas_reflections_fx.c
index 6bd0ed87c14b7a2cbbd9a3f6f89856361688c014..3bf9f71693b040f72bdd32bf21cdd60853a4b8f6 100644
--- a/lib_rend/ivas_reflections_fx.c
+++ b/lib_rend/ivas_reflections_fx.c
@@ -42,7 +42,7 @@
#include "ivas_rom_com.h"
#include "wmc_auto.h"
#include "debug.h"
-#include "ivas_rom_com_fx.h"
+
/*-----------------------------------------------------------------------------------------*
* Local constants/tabels
@@ -66,6 +66,7 @@ static UWord16 LC_mixing_7_1_4[11] = { 0, 1, 2, 3, 4, 3, 4, 0, 1, 3, 4 };
*
* Initializes the reflections data structure according to the requested input config.
*-----------------------------------------------------------------------------------------*/
+
ivas_error ivas_er_init(
er_struct_t *reflections,
const AUDIO_CONFIG inConfig )
diff --git a/lib_rend/ivas_reverb_utils_fx.c b/lib_rend/ivas_reverb_utils_fx.c
index 553dbdb0a4409e137550bc7cbeee67f655ac39a6..d527bb66385ba5a41e7d0aa03a4fd40c519a827b 100644
--- a/lib_rend/ivas_reverb_utils_fx.c
+++ b/lib_rend/ivas_reverb_utils_fx.c
@@ -37,7 +37,7 @@
#include "ivas_rom_rend.h"
#include
#include "wmc_auto.h"
-#include "options_warnings.h"
+
/*-----------------------------------------------------------------------------------------*
* Local constants
diff --git a/lib_rend/ivas_shoebox_fx.c b/lib_rend/ivas_shoebox_fx.c
index fb580de75d104ee5fde02b1f3c39652b9ead6984..36af55838b6dcbb024b46d75b7bfaf320a90ebc8 100644
--- a/lib_rend/ivas_shoebox_fx.c
+++ b/lib_rend/ivas_shoebox_fx.c
@@ -40,7 +40,6 @@
#include "prot_fx.h"
#include "wmc_auto.h"
#include "ivas_rom_com.h"
-#include "ivas_rom_com_fx.h"
/*-------------------------------------------------------------------------
diff --git a/lib_rend/lib_rend_fx.c b/lib_rend/lib_rend_fx.c
index c74d77bf9494e6cc72fae05897705cc76d0e4736..9345db048f4d1160a5dbde8c1e8d747c8c7cb5cc 100644
--- a/lib_rend/lib_rend_fx.c
+++ b/lib_rend/lib_rend_fx.c
@@ -41,7 +41,6 @@
#include "lib_isar_pre_rend.h"
#include "ivas_cnst.h"
#include "ivas_rom_com.h"
-#include "ivas_rom_com_fx.h"
#include "ivas_rom_rend.h"
#include
#include