Home | History | Annotate | Download | only in srce
      1 /******************************************************************************
      2  *
      3  *  Copyright (C) 1999-2012 Broadcom Corporation
      4  *
      5  *  Licensed under the Apache License, Version 2.0 (the "License");
      6  *  you may not use this file except in compliance with the License.
      7  *  You may obtain a copy of the License at:
      8  *
      9  *  http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  *  Unless required by applicable law or agreed to in writing, software
     12  *  distributed under the License is distributed on an "AS IS" BASIS,
     13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  *  See the License for the specific language governing permissions and
     15  *  limitations under the License.
     16  *
     17  ******************************************************************************/
     18 
     19 /******************************************************************************
     20  *
     21  *  This file contains the Windowing coeffs for synthesis filter
     22  *
     23  ******************************************************************************/
     24 
     25 #include "sbc_encoder.h"
     26 
     27 #if (SBC_ARM_ASM_OPT==FALSE && SBC_IPAQ_OPT==FALSE)
     28 #if (SBC_IS_64_MULT_IN_WINDOW_ACCU ==  FALSE)
     29 /*Window coeff for 4 sub band case*/
     30 const SINT16 gas32CoeffFor4SBs[] =
     31 {
     32     (SINT16)((SINT32)0x00000000 >> 16),	(SINT16)0x00000000,
     33 	(SINT16)((SINT32)0x001194E6 >> 16),	(SINT16)0x001194E6,
     34 	(SINT16)((SINT32)0x0030E2D3 >> 16),	(SINT16)0x0030E2D3,
     35 	(SINT16)((SINT32)0x00599403 >> 16),	(SINT16)0x00599403,
     36 	(SINT16)((SINT32)0x007DBCC8 >> 16),	(SINT16)0x007DBCC8,
     37 	(SINT16)((SINT32)0x007F88E4 >> 16),	(SINT16)0x007F88E4,
     38 	(SINT16)((SINT32)0x003D239B >> 16),	(SINT16)0x003D239B,
     39 	(SINT16)((SINT32)0xFF9BB9D5 >> 16),	(SINT16)0xFF9BB9D5,
     40 
     41 	(SINT16)((SINT32)0x01659F45 >> 16),	(SINT16)0x01659F45,
     42 	(SINT16)((SINT32)0x029DBAA3 >> 16),	(SINT16)0x029DBAA3,
     43 	(SINT16)((SINT32)0x03B23341 >> 16),	(SINT16)0x03B23341,
     44 	(SINT16)((SINT32)0x041EEE40 >> 16),	(SINT16)0x041EEE40,
     45 	(SINT16)((SINT32)0x034FEE2C >> 16),	(SINT16)0x034FEE2C,
     46 	(SINT16)((SINT32)0x00C8F2BC >> 16),	(SINT16)0x00C8F2BC,
     47 	(SINT16)((SINT32)0xFC4F91D4 >> 16),	(SINT16)0xFC4F91D4,
     48 	(SINT16)((SINT32)0xF60FAF37 >> 16),	(SINT16)0xF60FAF37,
     49 
     50 	(SINT16)((SINT32)0x115B1ED2 >> 16),	(SINT16)0x115B1ED2,
     51 	(SINT16)((SINT32)0x18F55C90 >> 16),	(SINT16)0x18F55C90,
     52 	(SINT16)((SINT32)0x1F91CA46 >> 16),	(SINT16)0x1F91CA46,
     53 	(SINT16)((SINT32)0x2412F251 >> 16),	(SINT16)0x2412F251,
     54 	(SINT16)((SINT32)0x25AC1FF2 >> 16),	(SINT16)0x25AC1FF2,
     55 	(SINT16)((SINT32)0x2412F251 >> 16),	(SINT16)0x2412F251,
     56 	(SINT16)((SINT32)0x1F91CA46 >> 16),	(SINT16)0x1F91CA46,
     57 	(SINT16)((SINT32)0x18F55C90 >> 16),	(SINT16)0x18F55C90,
     58 
     59 	(SINT16)((SINT32)0xEEA4E12E >> 16),	(SINT16)0xEEA4E12E,
     60 	(SINT16)((SINT32)0xF60FAF37 >> 16),	(SINT16)0xF60FAF37,
     61 	(SINT16)((SINT32)0xFC4F91D4 >> 16),	(SINT16)0xFC4F91D4,
     62 	(SINT16)((SINT32)0x00C8F2BC >> 16),	(SINT16)0x00C8F2BC,
     63 	(SINT16)((SINT32)0x034FEE2C >> 16),	(SINT16)0x034FEE2C,
     64 	(SINT16)((SINT32)0x041EEE40 >> 16),	(SINT16)0x041EEE40,
     65 	(SINT16)((SINT32)0x03B23341 >> 16),	(SINT16)0x03B23341,
     66 	(SINT16)((SINT32)0x029DBAA3 >> 16),	(SINT16)0x029DBAA3,
     67 
     68 	(SINT16)((SINT32)0xFE9A60BB >> 16),	(SINT16)0xFE9A60BB,
     69 	(SINT16)((SINT32)0xFF9BB9D5 >> 16),	(SINT16)0xFF9BB9D5,
     70 	(SINT16)((SINT32)0x003D239B >> 16),	(SINT16)0x003D239B,
     71 	(SINT16)((SINT32)0x007F88E4 >> 16),	(SINT16)0x007F88E4,
     72 	(SINT16)((SINT32)0x007DBCC8 >> 16),	(SINT16)0x007DBCC8,
     73 	(SINT16)((SINT32)0x00599403 >> 16),	(SINT16)0x00599403,
     74 	(SINT16)((SINT32)0x0030E2D3 >> 16),	(SINT16)0x0030E2D3,
     75 	(SINT16)((SINT32)0x001194E6 >> 16),	(SINT16)0x001194E6
     76 };
     77 
     78 /*Window coeff for 8 sub band case*/
     79 const SINT16 gas32CoeffFor8SBs[] =
     80 {
     81     (SINT16)((SINT32)0x00000000 >>16),	(SINT16)0x00000000,
     82 	(SINT16)((SINT32)0x00052173 >>16),	(SINT16)0x00052173,
     83 	(SINT16)((SINT32)0x000B3F71 >>16),	(SINT16)0x000B3F71,
     84 	(SINT16)((SINT32)0x00122C7D >>16),	(SINT16)0x00122C7D,
     85 	(SINT16)((SINT32)0x001AFF89 >>16),	(SINT16)0x001AFF89,
     86 	(SINT16)((SINT32)0x00255A62 >>16),	(SINT16)0x00255A62,
     87 	(SINT16)((SINT32)0x003060F4 >>16),	(SINT16)0x003060F4,
     88 	(SINT16)((SINT32)0x003A72E7 >>16),	(SINT16)0x003A72E7,
     89 
     90 	(SINT16)((SINT32)0x0041EC6A >>16),	(SINT16)0x0041EC6A,  /* 8 */
     91 	(SINT16)((SINT32)0x0044EF48 >>16),	(SINT16)0x0044EF48,
     92 	(SINT16)((SINT32)0x00415B75 >>16),	(SINT16)0x00415B75,
     93 	(SINT16)((SINT32)0x0034F8B6 >>16),	(SINT16)0x0034F8B6,
     94 	(SINT16)((SINT32)0x001D8FD2 >>16),	(SINT16)0x001D8FD2,
     95 	(SINT16)((SINT32)0xFFFA2413 >>16),	(SINT16)0xFFFA2413,
     96 	(SINT16)((SINT32)0xFFC9F10E >>16),	(SINT16)0xFFC9F10E,
     97 	(SINT16)((SINT32)0xFF8D6793 >>16),	(SINT16)0xFF8D6793,
     98 
     99 	(SINT16)((SINT32)0x00B97348 >>16),	(SINT16)0x00B97348,  /* 16 */
    100 	(SINT16)((SINT32)0x01071B96 >>16),	(SINT16)0x01071B96,
    101 	(SINT16)((SINT32)0x0156B3CA >>16),	(SINT16)0x0156B3CA,
    102 	(SINT16)((SINT32)0x01A1B38B >>16),	(SINT16)0x01A1B38B,
    103 	(SINT16)((SINT32)0x01E0224C >>16),	(SINT16)0x01E0224C,
    104 	(SINT16)((SINT32)0x0209291F >>16),	(SINT16)0x0209291F,
    105 	(SINT16)((SINT32)0x02138653 >>16),	(SINT16)0x02138653,
    106 	(SINT16)((SINT32)0x01F5F424 >>16),	(SINT16)0x01F5F424,
    107 
    108 	(SINT16)((SINT32)0x01A7ECEF >>16),	(SINT16)0x01A7ECEF, /* 24 */
    109 	(SINT16)((SINT32)0x01223EBA >>16),	(SINT16)0x01223EBA,
    110 	(SINT16)((SINT32)0x005FD0FF >>16),	(SINT16)0x005FD0FF,
    111 	(SINT16)((SINT32)0xFF5EEB73 >>16),	(SINT16)0xFF5EEB73,
    112 	(SINT16)((SINT32)0xFE20435D >>16),	(SINT16)0xFE20435D,
    113 	(SINT16)((SINT32)0xFCA86E7E >>16),	(SINT16)0xFCA86E7E,
    114 	(SINT16)((SINT32)0xFAFF95FC >>16),	(SINT16)0xFAFF95FC,
    115 	(SINT16)((SINT32)0xF9312891 >>16),	(SINT16)0xF9312891,
    116 
    117 	(SINT16)((SINT32)0x08B4307A >>16),	(SINT16)0x08B4307A, /* 32 */
    118 	(SINT16)((SINT32)0x0A9F3E9A >>16),	(SINT16)0x0A9F3E9A,
    119 	(SINT16)((SINT32)0x0C7D59B6 >>16),	(SINT16)0x0C7D59B6,
    120 	(SINT16)((SINT32)0x0E3BB16F >>16),	(SINT16)0x0E3BB16F,
    121 	(SINT16)((SINT32)0x0FC721F9 >>16),	(SINT16)0x0FC721F9,
    122 	(SINT16)((SINT32)0x110ECEF0 >>16),	(SINT16)0x110ECEF0,
    123 	(SINT16)((SINT32)0x120435FA >>16),	(SINT16)0x120435FA,
    124 	(SINT16)((SINT32)0x129C226F >>16),	(SINT16)0x129C226F,
    125 
    126 	(SINT16)((SINT32)0x12CF6C75 >>16),	(SINT16)0x12CF6C75, /* 40 */
    127 	(SINT16)((SINT32)0x129C226F >>16),	(SINT16)0x129C226F,
    128 	(SINT16)((SINT32)0x120435FA >>16),	(SINT16)0x120435FA,
    129 	(SINT16)((SINT32)0x110ECEF0 >>16),	(SINT16)0x110ECEF0,
    130 	(SINT16)((SINT32)0x0FC721F9 >>16),	(SINT16)0x0FC721F9,
    131 	(SINT16)((SINT32)0x0E3BB16F >>16),	(SINT16)0x0E3BB16F,
    132 	(SINT16)((SINT32)0x0C7D59B6 >>16),	(SINT16)0x0C7D59B6,
    133 	(SINT16)((SINT32)0x0A9F3E9A >>16),	(SINT16)0x0A9F3E9A,
    134 
    135 	(SINT16)((SINT32)0xF74BCF86 >>16),	(SINT16)0xF74BCF86, /* 48 */
    136 	(SINT16)((SINT32)0xF9312891 >>16),	(SINT16)0xF9312891,
    137 	(SINT16)((SINT32)0xFAFF95FC >>16),	(SINT16)0xFAFF95FC,
    138 	(SINT16)((SINT32)0xFCA86E7E >>16),	(SINT16)0xFCA86E7E,
    139 	(SINT16)((SINT32)0xFE20435D >>16),	(SINT16)0xFE20435D,
    140 	(SINT16)((SINT32)0xFF5EEB73 >>16),	(SINT16)0xFF5EEB73,
    141 	(SINT16)((SINT32)0x005FD0FF >>16),	(SINT16)0x005FD0FF,
    142 	(SINT16)((SINT32)0x01223EBA >>16),	(SINT16)0x01223EBA,
    143 
    144 	(SINT16)((SINT32)0x01A7ECEF >>16),	(SINT16)0x01A7ECEF, /* 56 */
    145 	(SINT16)((SINT32)0x01F5F424 >>16),	(SINT16)0x01F5F424,
    146 	(SINT16)((SINT32)0x02138653 >>16),	(SINT16)0x02138653,
    147 	(SINT16)((SINT32)0x0209291F >>16),	(SINT16)0x0209291F,
    148 	(SINT16)((SINT32)0x01E0224C >>16),	(SINT16)0x01E0224C,
    149 	(SINT16)((SINT32)0x01A1B38B >>16),	(SINT16)0x01A1B38B,
    150 	(SINT16)((SINT32)0x0156B3CA >>16),	(SINT16)0x0156B3CA,
    151 	(SINT16)((SINT32)0x01071B96 >>16),	(SINT16)0x01071B96,
    152 
    153 	(SINT16)((SINT32)0xFF468CB8 >>16),	(SINT16)0xFF468CB8, /* 64 */
    154 	(SINT16)((SINT32)0xFF8D6793 >>16),	(SINT16)0xFF8D6793,
    155 	(SINT16)((SINT32)0xFFC9F10E >>16),	(SINT16)0xFFC9F10E,
    156 	(SINT16)((SINT32)0xFFFA2413 >>16),	(SINT16)0xFFFA2413,
    157 	(SINT16)((SINT32)0x001D8FD2 >>16),	(SINT16)0x001D8FD2,
    158 	(SINT16)((SINT32)0x0034F8B6 >>16),	(SINT16)0x0034F8B6,
    159 	(SINT16)((SINT32)0x00415B75 >>16),	(SINT16)0x00415B75,
    160 	(SINT16)((SINT32)0x0044EF48 >>16),	(SINT16)0x0044EF48,
    161 
    162 	(SINT16)((SINT32)0x0041EC6A >>16),	(SINT16)0x0041EC6A, /* 72 */
    163 	(SINT16)((SINT32)0x003A72E7 >>16),	(SINT16)0x003A72E7,
    164 	(SINT16)((SINT32)0x003060F4 >>16),	(SINT16)0x003060F4,
    165 	(SINT16)((SINT32)0x00255A62 >>16),	(SINT16)0x00255A62,
    166 	(SINT16)((SINT32)0x001AFF89 >>16),	(SINT16)0x001AFF89,
    167 	(SINT16)((SINT32)0x00122C7D >>16),	(SINT16)0x00122C7D,
    168 	(SINT16)((SINT32)0x000B3F71 >>16),	(SINT16)0x000B3F71,
    169 	(SINT16)((SINT32)0x00052173 >>16),	(SINT16)0x00052173
    170 };
    171 
    172 #else
    173 
    174 /*Window coeff for 4 sub band case*/
    175 const SINT32 gas32CoeffFor4SBs[] =
    176 {
    177     (SINT32)0x00000000,
    178 	(SINT32)0x001194E6,
    179 	(SINT32)0x0030E2D3,
    180 	(SINT32)0x00599403,
    181 	(SINT32)0x007DBCC8,
    182 	(SINT32)0x007F88E4,
    183 	(SINT32)0x003D239B,
    184 	(SINT32)0xFF9BB9D5,
    185 
    186 	(SINT32)0x01659F45,
    187 	(SINT32)0x029DBAA3,
    188 	(SINT32)0x03B23341,
    189 	(SINT32)0x041EEE40,
    190 	(SINT32)0x034FEE2C,
    191 	(SINT32)0x00C8F2BC,
    192 	(SINT32)0xFC4F91D4,
    193 	(SINT32)0xF60FAF37,
    194 
    195 	(SINT32)0x115B1ED2,
    196 	(SINT32)0x18F55C90,
    197 	(SINT32)0x1F91CA46,
    198 	(SINT32)0x2412F251,
    199 	(SINT32)0x25AC1FF2,
    200 	(SINT32)0x2412F251,
    201 	(SINT32)0x1F91CA46,
    202 	(SINT32)0x18F55C90,
    203 
    204 	(SINT32)0xEEA4E12E,
    205 	(SINT32)0xF60FAF37,
    206 	(SINT32)0xFC4F91D4,
    207 	(SINT32)0x00C8F2BC,
    208 	(SINT32)0x034FEE2C,
    209 	(SINT32)0x041EEE40,
    210 	(SINT32)0x03B23341,
    211 	(SINT32)0x029DBAA3,
    212 
    213 	(SINT32)0xFE9A60BB,
    214 	(SINT32)0xFF9BB9D5,
    215 	(SINT32)0x003D239B,
    216 	(SINT32)0x007F88E4,
    217 	(SINT32)0x007DBCC8,
    218 	(SINT32)0x00599403,
    219 	(SINT32)0x0030E2D3,
    220 	(SINT32)0x001194E6
    221 };
    222 
    223 /*Window coeff for 8 sub band case*/
    224 const SINT32 gas32CoeffFor8SBs[] =
    225 {
    226     (SINT32)0x00000000,
    227 	(SINT32)0x00052173,
    228 	(SINT32)0x000B3F71,
    229 	(SINT32)0x00122C7D,
    230 	(SINT32)0x001AFF89,
    231 	(SINT32)0x00255A62,
    232 	(SINT32)0x003060F4,
    233 	(SINT32)0x003A72E7,
    234 
    235 	(SINT32)0x0041EC6A,  /* 8 */
    236 	(SINT32)0x0044EF48,
    237 	(SINT32)0x00415B75,
    238 	(SINT32)0x0034F8B6,
    239 	(SINT32)0x001D8FD2,
    240 	(SINT32)0xFFFA2413,
    241 	(SINT32)0xFFC9F10E,
    242 	(SINT32)0xFF8D6793,
    243 
    244 	(SINT32)0x00B97348,  /* 16 */
    245 	(SINT32)0x01071B96,
    246 	(SINT32)0x0156B3CA,
    247 	(SINT32)0x01A1B38B,
    248 	(SINT32)0x01E0224C,
    249 	(SINT32)0x0209291F,
    250 	(SINT32)0x02138653,
    251 	(SINT32)0x01F5F424,
    252 
    253 	(SINT32)0x01A7ECEF, /* 24 */
    254 	(SINT32)0x01223EBA,
    255 	(SINT32)0x005FD0FF,
    256 	(SINT32)0xFF5EEB73,
    257 	(SINT32)0xFE20435D,
    258 	(SINT32)0xFCA86E7E,
    259 	(SINT32)0xFAFF95FC,
    260 	(SINT32)0xF9312891,
    261 
    262 	(SINT32)0x08B4307A, /* 32 */
    263 	(SINT32)0x0A9F3E9A,
    264 	(SINT32)0x0C7D59B6,
    265 	(SINT32)0x0E3BB16F,
    266 	(SINT32)0x0FC721F9,
    267 	(SINT32)0x110ECEF0,
    268 	(SINT32)0x120435FA,
    269 	(SINT32)0x129C226F,
    270 
    271 	(SINT32)0x12CF6C75, /* 40 */
    272 	(SINT32)0x129C226F,
    273 	(SINT32)0x120435FA,
    274 	(SINT32)0x110ECEF0,
    275 	(SINT32)0x0FC721F9,
    276 	(SINT32)0x0E3BB16F,
    277 	(SINT32)0x0C7D59B6,
    278 	(SINT32)0x0A9F3E9A,
    279 
    280 	(SINT32)0xF74BCF86, /* 48 */
    281 	(SINT32)0xF9312891,
    282 	(SINT32)0xFAFF95FC,
    283 	(SINT32)0xFCA86E7E,
    284 	(SINT32)0xFE20435D,
    285 	(SINT32)0xFF5EEB73,
    286 	(SINT32)0x005FD0FF,
    287 	(SINT32)0x01223EBA,
    288 
    289 	(SINT32)0x01A7ECEF, /* 56 */
    290 	(SINT32)0x01F5F424,
    291 	(SINT32)0x02138653,
    292 	(SINT32)0x0209291F,
    293 	(SINT32)0x01E0224C,
    294 	(SINT32)0x01A1B38B,
    295 	(SINT32)0x0156B3CA,
    296 	(SINT32)0x01071B96,
    297 
    298 	(SINT32)0xFF468CB8, /* 64 */
    299 	(SINT32)0xFF8D6793,
    300 	(SINT32)0xFFC9F10E,
    301 	(SINT32)0xFFFA2413,
    302 	(SINT32)0x001D8FD2,
    303 	(SINT32)0x0034F8B6,
    304 	(SINT32)0x00415B75,
    305 	(SINT32)0x0044EF48,
    306 
    307 	(SINT32)0x0041EC6A, /* 72 */
    308 	(SINT32)0x003A72E7,
    309 	(SINT32)0x003060F4,
    310 	(SINT32)0x00255A62,
    311 	(SINT32)0x001AFF89,
    312 	(SINT32)0x00122C7D,
    313 	(SINT32)0x000B3F71,
    314 	(SINT32)0x00052173
    315 };
    316 
    317 #endif
    318 #endif
    319 
    320