shithub: opus

ref: d513d743fb5d9802e2d39d74a13f5628c1553059
dir: /src_common/SKP_Silk_tables_NLSF_CB1_16.c/

View raw version
/***********************************************************************
Copyright (c) 2006-2010, Skype Limited. All rights reserved. 
Redistribution and use in source and binary forms, with or without 
modification, (subject to the limitations in the disclaimer below) 
are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright 
notice, this list of conditions and the following disclaimer in the 
documentation and/or other materials provided with the distribution.
- Neither the name of Skype Limited, nor the names of specific 
contributors, may be used to endorse or promote products derived from 
this software without specific prior written permission.
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED 
BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/

/**********************************************/
/* This file has been automatically generated */
/*                                            */
/* ROM usage:  0.29 + 1.80 kB                 */
/**********************************************/

#include "SKP_Silk_structs.h"
#include "SKP_Silk_tables.h"
#include "SKP_Silk_tables_NLSF_CB1_16.h"

const SKP_uint16 SKP_Silk_NLSF_MSVQ_CB1_16_CDF[ NLSF_MSVQ_CB1_16_VECTORS + NLSF_MSVQ_CB1_16_STAGES ] =
{
            0,
        17152,
        24057,
        28733,
        32040,
        34820,
        37262,
        39228,
        41194,
        42997,
        44723,
        46376,
        47959,
        49543,
        50994,
        52446,
        53777,
        54897,
        56016,
        57088,
        58071,
        59013,
        59876,
        60667,
        61305,
        61942,
        62455,
        62969,
        63482,
        63995,
        64508,
        65022,
        65535,
            0,
        27679,
        38351,
        48138,
        52625,
        56739,
        60199,
        62867,
        65535,
            0,
        31319,
        40235,
        45312,
        50174,
        54632,
        59091,
        62383,
        65535,
            0,
        39134,
        44026,
        48322,
        52261,
        55873,
        59185,
        62498,
        65535,
            0,
        42248,
        46688,
        50941,
        55013,
        58437,
        61078,
        63499,
        65535,
            0,
        44150,
        48053,
        51334,
        54477,
        57486,
        60245,
        63005,
        65535,
            0,
        40440,
        45076,
        49515,
        53089,
        56512,
        59651,
        62657,
        65535,
            0,
        31605,
        39507,
        45094,
        50444,
        55567,
        59351,
        62973,
        65535,
            0,
        28639,
        39681,
        47834,
        52682,
        55965,
        59248,
        62391,
        65535,
            0,
        17932,
        34375,
        42961,
        49875,
        55689,
        59458,
        62628,
        65535
};

const SKP_uint16 * const SKP_Silk_NLSF_MSVQ_CB1_16_CDF_start_ptr[ NLSF_MSVQ_CB1_16_STAGES ] =
{
     &SKP_Silk_NLSF_MSVQ_CB1_16_CDF[   0 ],
     &SKP_Silk_NLSF_MSVQ_CB1_16_CDF[  33 ],
     &SKP_Silk_NLSF_MSVQ_CB1_16_CDF[  42 ],
     &SKP_Silk_NLSF_MSVQ_CB1_16_CDF[  51 ],
     &SKP_Silk_NLSF_MSVQ_CB1_16_CDF[  60 ],
     &SKP_Silk_NLSF_MSVQ_CB1_16_CDF[  69 ],
     &SKP_Silk_NLSF_MSVQ_CB1_16_CDF[  78 ],
     &SKP_Silk_NLSF_MSVQ_CB1_16_CDF[  87 ],
     &SKP_Silk_NLSF_MSVQ_CB1_16_CDF[  96 ],
     &SKP_Silk_NLSF_MSVQ_CB1_16_CDF[ 105 ]
};

const SKP_int SKP_Silk_NLSF_MSVQ_CB1_16_CDF_middle_idx[ NLSF_MSVQ_CB1_16_STAGES ] =
{
       5,
       2,
       2,
       2,
       2,
       2,
       2,
       2,
       2,
       3
};

const SKP_uint8 SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[ NLSF_MSVQ_CB1_16_VECTORS ] =
{
               31,               52,
               61,               69,
               73,               76,
               81,               81,
               83,               84,
               85,               86,
               86,               88,
               88,               90,
               94,               94,
               95,               97,
               98,              100,
              102,              107,
              107,              112,
              112,              112,
              112,              112,
              112,              112,
               20,               42,
               44,               62,
               64,               68,
               74,               74,
               17,               46,
               59,               60,
               62,               62,
               69,               70,
               12,               60,
               63,               65,
               67,               69,
               69,               71,
               10,               62,
               63,               64,
               68,               74,
               76,               80,
                9,               65,
               69,               70,
               71,               73,
               73,               75,
               11,               61,
               62,               67,
               68,               70,
               71,               72,
               17,               49,
               57,               58,
               59,               66,
               67,               75,
               19,               41,
               48,               60,
               69,               69,
               70,               70,
               30,               32,
               47,               52,
               56,               66,
               70,               72
};

const SKP_int SKP_Silk_NLSF_MSVQ_CB1_16_ndelta_min_Q15[ 16 + 1 ] =
{
              110,
               28,
              122,
               68,
               75,
               71,
               64,
               78,
               83,
               77,
               81,
               76,
               84,
               73,
               69,
               21,
              778
};

const SKP_int8 SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 * NLSF_MSVQ_CB1_16_VECTORS ] =
{
             -118,             -105,              -90,              -74,
              -58,              -44,              -29,              -13,
                3,               18,               33,               49,
               64,               79,               95,              109,
             -118,             -110,              -95,              -81,
              -66,              -52,              -37,              -21,
               -4,               12,               27,               43,
               60,               77,               93,              107,
             -120,             -114,              -94,              -78,
              -60,              -45,              -29,              -13,
                3,               19,               34,               49,
               65,               80,               95,              110,
             -122,             -117,             -103,              -88,
              -69,              -52,              -37,              -19,
               -2,               15,               31,               47,
               63,               79,               95,              110,
             -119,             -111,              -95,              -81,
              -68,              -53,              -36,              -22,
               -5,                9,               27,               40,
               56,               70,               85,               96,
             -117,             -106,              -90,              -76,
              -62,              -49,              -31,              -15,
               -2,               10,               26,               39,
               51,               64,               80,               90,
             -113,             -102,              -84,              -69,
              -54,              -42,              -27,              -15,
               -1,               13,               28,               42,
               58,               73,               90,              106,
             -115,             -104,              -90,              -76,
              -63,              -50,              -35,              -21,
               -8,                7,               22,               37,
               53,               70,               88,              107,
             -109,              -98,              -82,              -66,
              -49,              -35,              -18,               -2,
               14,               30,               45,               58,
               73,               86,              100,              113,
             -106,              -96,              -82,              -68,
              -53,              -40,              -25,              -10,
                5,               19,               34,               49,
               65,               80,               96,              110,
             -120,             -113,              -99,              -86,
              -72,              -59,              -50,              -36,
               -7,               10,               27,               45,
               61,               78,               94,              109,
             -117,             -109,              -96,              -84,
              -72,              -58,              -47,              -32,
              -19,               -2,               23,               40,
               57,               75,               92,              109,
             -119,             -112,              -99,              -87,
              -78,              -66,              -42,              -20,
               -6,               11,               28,               44,
               60,               78,               94,              110,
             -110,              -97,              -79,              -62,
              -44,              -26,               -8,                8,
               23,               36,               49,               60,
               72,               84,               97,              111,
             -109,              -94,              -73,              -55,
              -37,              -22,               -8,                2,
               13,               24,               37,               50,
               65,               79,               95,              110,
             -114,             -101,              -83,              -67,
              -48,              -31,              -15,               -1,
               10,               21,               34,               49,
               65,               80,               96,              111,
             -118,             -112,             -100,              -92,
              -80,              -49,              -34,              -19,
               -7,                8,               26,               43,
               60,               78,               94,              110,
             -118,             -112,             -100,              -78,
              -61,              -51,              -38,              -26,
               -6,                6,               19,               33,
               52,               73,               94,              110,
             -117,             -110,              -94,              -79,
              -67,              -54,              -42,              -27,
              -16,               -6,                8,               35,
               57,               75,               92,              109,
             -113,              -92,              -71,              -57,
              -45,              -34,              -22,              -10,
                4,               17,               32,               46,
               62,               77,               93,              107,
             -120,             -110,              -90,              -71,
              -54,              -37,              -17,               -1,
               16,               31,               44,               56,
               70,               82,               97,              111,
             -110,             -101,              -88,              -80,
              -69,              -50,              -30,              -13,
                2,               17,               32,               48,
               64,               80,               97,              111,
             -118,             -112,             -101,              -86,
              -55,              -41,              -29,              -16,
               -4,               10,               30,               43,
               56,               72,               90,              107,
             -112,             -103,              -88,              -74,
              -61,              -49,              -36,              -24,
              -10,                4,               17,               29,
               43,               57,               74,              102,
             -118,             -107,              -84,              -69,
              -52,              -35,              -17,               -5,
                9,               20,               34,               45,
               59,               69,               84,               93,
             -106,              -95,              -78,              -63,
              -48,              -36,              -24,              -13,
               -1,                9,               21,               32,
               46,               60,               76,               92,
             -116,             -101,              -85,              -69,
              -54,              -37,              -21,               -6,
               11,               24,               39,               53,
               76,               93,              104,              112,
             -114,             -104,              -87,              -74,
              -61,              -50,              -40,              -30,
              -19,              -10,                4,               14,
               36,               69,               89,              109,
             -112,              -98,              -85,              -72,
              -54,              -35,              -23,              -11,
                3,               20,               38,               56,
               69,               81,               90,              108,
             -116,             -101,              -84,              -70,
              -55,              -40,              -25,               -8,
               11,               30,               41,               49,
               62,               83,              105,              117,
             -115,              -98,              -82,              -61,
              -48,              -40,              -29,              -14,
                6,               22,               39,               53,
               68,               82,               96,              110,
             -113,              -96,              -76,              -68,
              -59,              -44,              -21,               -8,
                3,               15,               33,               49,
               65,               80,               95,              110,
               -1,                0,                0,                1,
                1,                2,                2,                2,
                2,                2,                2,                1,
                1,                1,                1,                0,
                0,               -1,               -3,               -6,
               -6,               -5,               -4,               -4,
               -3,               -1,                0,                0,
                0,                0,                1,                1,
                0,                0,               -1,                0,
               -1,               -2,               -3,               -3,
               -4,               -5,               -5,               -4,
               -3,               -2,               -2,                0,
                9,                8,                5,                2,
                1,               -1,               -1,               -2,
               -1,               -2,               -1,               -2,
               -2,               -2,               -2,               -2,
               -5,               -8,                3,                2,
                2,                0,                0,                0,
                0,                0,                1,                1,
                1,                1,                0,                0,
                0,                0,                2,                8,
                9,                8,                5,                2,
               -1,               -2,               -2,               -2,
               -1,                1,                1,                2,
               -1,                0,               -1,                0,
                0,                2,                4,                5,
                4,                2,               -1,               -5,
               -8,               -8,               -6,               -2,
                0,                0,               -2,               -2,
               -1,               -1,                0,                2,
                5,                5,                5,                8,
                9,                7,                6,                3,
               -1,               -1,               -1,               -1,
               -1,               -1,               -1,               -1,
               -1,               -1,               -1,                0,
               -1,                0,                0,                0,
                4,                3,                4,                3,
                3,                3,                3,                3,
                2,                2,                2,                2,
                2,                2,                2,                2,
               -1,               -3,               -6,               -7,
                0,                0,                4,                3,
                3,                1,                1,                1,
                1,                1,                1,                1,
               -4,                7,                4,                4,
                3,                3,                2,                2,
                1,                1,                1,                1,
                1,                1,                1,                1,
               -2,               -5,               -7,                5,
                3,                3,                3,                3,
                2,                2,                1,                1,
                1,                0,                0,                0,
                2,                1,                4,                3,
                0,               -3,               -7,               -6,
               -5,               -3,               -2,               -1,
                0,                0,                0,                0,
                0,                0,                0,                1,
                2,                3,                3,                4,
                3,                4,                5,                4,
                1,               -3,               -6,               -7,
                2,                2,                1,               -1,
               -3,               -2,               -2,               -1,
                2,               -1,               -6,               -9,
               -4,               -1,                1,                2,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                3,                3,                1,               -1,
               -5,               -7,                1,               -1,
                0,                1,                0,                0,
                0,                0,                1,                1,
               -1,               -1,                1,                1,
                2,                3,                4,                4,
                3,                0,               -3,               -5,
               -4,               -3,               -2,               -1,
                2,                2,                1,                1,
                0,               -2,               -2,               -2,
                1,                3,                3,                0,
               -4,               -6,               -4,               -1,
                0,                0,                1,                1,
                2,                0,               -2,               -5,
               -7,               -5,               -1,                0,
                2,                2,                3,                2,
                0,                0,               -4,               -7,
                5,                3,               -1,               -2,
               -1,               -1,               -1,                0,
                0,                0,                0,                0,
                0,               -1,               -1,               -3,
               -7,                2,                0,                4,
                3,                3,                2,                1,
                1,                1,                0,                0,
                0,                0,                2,                3,
                1,                0,                0,               -1,
                2,                2,                4,                6,
                6,                3,                0,               -2,
                1,                1,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
               -4,               -4,                2,                0,
                2,                2,                2,                1,
                2,                1,                1,                1,
                1,                0,                1,                0,
               -1,               -2,               -4,                3,
                1,               -2,               -1,               -4,
                2,                0,               -2,               -1,
               -1,               -2,               -2,               -1,
                0,                0,                1,               -2,
               -1,                3,                4,                0,
               -3,               -5,               -4,               -1,
               -1,               -1,                0,                0,
               -1,               -1,                2,                2,
                0,               -3,               -4,                1,
                4,                4,                3,                1,
                0,                1,                1,                2,
                0,               -1,               -1,               -1,
               -1,               -2,               -5,                4,
               -1,               -5,                2,                1,
               -1,                0,                0,                1,
                0,               -1,                0,                0,
                1,                0,                0,               -4,
               -7,                5,                2,                0,
                1,                1,                0,                0,
                1,                1,                0,                1,
                1,                0,                2,                1,
                0,                0,               -3,               -3,
                6,                5,                0,               -3,
                0,                0,                0,                0,
               -1,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                1,                1,                1,                0,
                1,                3,                1,                1,
                0,                0,                0,                0,
               -1,               -2,               -3,               -4,
                1,                0,               -2,                0,
                4,                0,               -4,                1,
                0,                1,                0,               -1,
               -1,                0,                0,                0,
                0,               -2,                4,                3,
                1,               -1,               -2,                3,
               -2,                0,               -2,               -1,
                0,                1,                1,                0,
                1,                1,                0,               -1,
               -1,                2,               -2,               -5,
                4,                1,                1,                0,
               -1,               -1,                0,                1,
                1,                0,               -2,                2,
                2,                0,                5,                3,
                2,                1,                1,                0,
               -2,                1,                3,                0,
                0,                0,                1,                0,
                1,                0,               -1,               -1,
               -1,               -2,                1,                5,
                3,               -2,               -4,                2,
               -2,                5,                3,               -2,
                0,               -1,               -1,               -1,
                0,                1,                0,                0,
                2,                1,                0,               -1,
               -1,                0,                0,                0,
                1,                1,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                1,               -1,               -3,               -1,
               -3,                0,                0,               -1,
               -2,               -1,                0,                0,
                0,                0,                0,                0,
                1,                0,                0,                0,
               -1,               -2,               -2,               -2,
                1,                2,                0,               -1,
               -1,                0,                0,               -4,
                0,               -1,                4,                2,
               -3,                0,                1,               -1,
                0,               -2,               -1,                0,
                0,                0,               -1,               -1,
                1,                0,               -1,               -1,
                1,               -2,                2,                2,
               -2,                3,                0,               -2,
               -2,               -1,               -3,                0,
                0,                0,               -1,               -1,
               -1,               -2,               -3,                2,
                3,                0,               -4,                1,
                2,                1,                0,                0,
                1,                1,                0,               -2,
                1,                0,                1,                0,
               -2,               -1,                3,                0,
                1,                3,                2,                0,
                0,                0,                0,                0,
                0,                1,                0,                0,
                0,                0,                1,               -1,
               -3,               -4,                5,                3,
               -1,               -1,                0,               -1,
               -1,                0,               -1,               -1,
               -1,               -1,               -1,               -1,
                0,                0,                0,                0,
               -1,                2,                1,                1,
                1,                2,                1,                1,
                1,                1,                0,                1,
                1,                1,                1,                1,
                2,                1,                0,                1,
                2,               -1,                0,               -2,
               -1,                0,               -1,                0,
                1,                0,                0,                0,
                1,                0,                1,               -1,
                0,                1,               -1,                3,
                1,                1,                1,                1,
                0,               -1,               -1,               -1,
                0,                0,               -1,                1,
                0,               -3,                3,                1,
                0,               -2,                2,                1,
                0,               -1,               -1,                0,
                0,                0,               -1,               -1,
               -1,                1,                2,               -2,
                2,                3,               -1,               -1,
                1,               -1,                0,                0,
                1,               -1,               -2,                4,
                0,                0,               -2,                1,
                0,                0,                0,                0,
                1,                1,                0,                0,
                1,                0,                0,                0,
                0,                1,                0,                0,
                0,                0,                1,               -1,
               -5,                3,                1,                0,
               -1,               -1,               -1,               -1,
                0,               -1,                0,                0,
                0,                1,                1,                1,
                1,                1,                0,                0,
                2,                1,                0,                1,
               -1,               -1,                1,                1,
                1,                0,               -1,                0,
               -1,                0,                0,                0,
                0,               -1,                1,                2,
                1,                1,                1,                0,
               -1,                1,                1,                0,
               -1,               -1,               -1,               -1,
                0,                0,                2,               -3,
                1,               -1,                0,                0,
                1,                0,               -1,                0,
               -1,               -1,                0,                0,
                1,                0,                1,                0,
                0,                4,               -1,               -1,
               -1,                1,               -1,                0,
                1,                1,                1,                1,
                1,                0,               -1,                0,
                1,                1,                0,                0,
                1,               -4,                0,                1,
                0,                0,                1,               -2,
                0,                0,                0,                0,
               -1,                0,               -1,                0,
                1,               -1,                2,               -4,
                1,                0,               -1,                1,
               -2,                3,                0,                1,
               -1,                0,               -1,                0,
               -1,                0,                0,                1,
                0,                0,               -1,                0,
                1,                1,                1,                0,
               -1,                0,                0,                0,
               -1,                0,                1,                1,
                0,                0,                0,                0,
               -1,                0,                1,                1,
                1,               -1,               -1,               -1,
                1,               -1,                0,               -1,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                1,                1,
               -1,                0,               -1,               -1,
                1,               -1,                0,               -1,
                1,               -2,                0,               -1,
                0,                0,                0,                0,
                1,                0,                0,                0,
                0,                0,                1,                1,
                1,                2,               -3,               -1,
                0,                0,                0,                0,
                0,                0,                0,                0,
               -1,                0,                0,                0,
                0,                0,                0,                0,
                1,                0,                0,                0,
               -1,                0,               -2,                3,
               -1,                0,                1,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                1,                2,               -4,               -1,
               -2,               -1,                0,                0,
               -1,                1,                0,                1,
                1,                0,                0,                0,
                0,                0,                0,                0
};

const SKP_Silk_NLSF_CBS SKP_Silk_NLSF_CB1_16_Stage_info[ NLSF_MSVQ_CB1_16_STAGES ] =
{
        {  32, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *   0 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[   0 ] },
        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *  32 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[  32 ] },
        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *  40 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[  40 ] },
        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *  48 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[  48 ] },
        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *  56 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[  56 ] },
        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *  64 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[  64 ] },
        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *  72 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[  72 ] },
        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *  80 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[  80 ] },
        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *  88 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[  88 ] },
        {   8, &SKP_Silk_NLSF_MSVQ_CB1_16_Q8[ 16 *  96 ], &SKP_Silk_NLSF_MSVQ_CB1_16_rates_Q4[  96 ] }
};

const SKP_Silk_NLSF_CB_struct SKP_Silk_NLSF_CB1_16 =
{
        NLSF_MSVQ_CB1_16_STAGES,
        SKP_Silk_NLSF_CB1_16_Stage_info,
        SKP_Silk_NLSF_MSVQ_CB1_16_ndelta_min_Q15,
        SKP_Silk_NLSF_MSVQ_CB1_16_CDF,
        SKP_Silk_NLSF_MSVQ_CB1_16_CDF_start_ptr,
        SKP_Silk_NLSF_MSVQ_CB1_16_CDF_middle_idx
};