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 coefficient table used for DCT computation in
     22  *  analysis.
     23  *
     24  ******************************************************************************/
     25 
     26 #include "sbc_encoder.h"
     27 /*DCT coeff for 4 sub-band case.*/
     28 #if (SBC_FAST_DCT == FALSE)
     29 const SINT16 gas16AnalDCTcoeff4[] =
     30 {
     31 	(SINT16)(0.7071*32768),
     32 	(SINT16)(0.9239*32768),
     33 	(SINT16)(1.0000*32767),
     34 	(SINT16)(0.9239*32768),
     35 	(SINT16)(0.7071*32768),
     36 	(SINT16)(0.3827*32768),
     37 	(SINT16)(0.0000*32768),
     38 	(SINT16)(-0.3827*32768),
     39 
     40 	(SINT16)(-0.7071*32768),
     41 	(SINT16)(0.3827*32768),
     42 	(SINT16)(1.0000*32767),
     43 	(SINT16)(0.3827*32768),
     44 	(SINT16)(-0.7071*32768),
     45 	(SINT16)(-0.9239*32768),
     46 	(SINT16)(-0.0000*32768),
     47 	(SINT16)(0.9239*32768),
     48 
     49 	(SINT16)(-0.7071*32768),
     50 	(SINT16)(-0.3827*32768),
     51 	(SINT16)(1.0000*32767),
     52 	(SINT16)(-0.3827*32768),
     53 	(SINT16)(-0.7071*32768),
     54 	(SINT16)(0.9239*32768),
     55 	(SINT16)(0.0000*32768),
     56 	(SINT16)(-0.9239*32768),
     57 
     58 	(SINT16)(0.7071*32768),
     59 	(SINT16)(-0.9239*32768),
     60 	(SINT16)(1.0000*32767),
     61 	(SINT16)(-0.9239*32768),
     62 	(SINT16)(0.7071*32768),
     63 	(SINT16)(-0.3827*32768),
     64 	(SINT16)(-0.0000*32768),
     65 	(SINT16)(0.3827*32768)
     66 };
     67 
     68 /*DCT coeff for 8 sub-band case.*/
     69 const SINT16 gas16AnalDCTcoeff8[] =
     70 {
     71 	(SINT16)(0.7071*32768),
     72 	(SINT16)(0.8315*32768),
     73 	(SINT16)(0.9239*32768),
     74 	(SINT16)(0.9808*32768),
     75 	(SINT16)(1.0000*32767),
     76 	(SINT16)(0.9808*32768),
     77 	(SINT16)(0.9239*32768),
     78 	(SINT16)(0.8315*32768),
     79 	(SINT16)(0.7071*32768),
     80 	(SINT16)(0.5556*32768),
     81 	(SINT16)(0.3827*32768),
     82 	(SINT16)(0.1951*32768),
     83 	(SINT16)(0.0000*32768),
     84 	(SINT16)(-0.1951*32768),
     85 	(SINT16)(-0.3827*32768),
     86 	(SINT16)(-0.5556*32768),
     87 	(SINT16)(-0.7071*32768),
     88 	(SINT16)(-0.1951*32768),
     89 	(SINT16)(0.3827*32768),
     90 	(SINT16)(0.8315*32768),
     91 	(SINT16)(1.0000*32767),
     92 	(SINT16)(0.8315*32768),
     93 	(SINT16)(0.3827*32768),
     94 	(SINT16)(-0.1951*32768),
     95 	(SINT16)(-0.7071*32768),
     96 	(SINT16)(-0.9808*32768),
     97 	(SINT16)(-0.9239*32768),
     98 	(SINT16)(-0.5556*32768),
     99 	(SINT16)(-0.0000*32768),
    100 	(SINT16)(0.5556*32768),
    101 	(SINT16)(0.9239*32768),
    102 	(SINT16)(0.9808*32768),
    103 	(SINT16)(-0.7071*32768),
    104 	(SINT16)(-0.9808*32768),
    105 	(SINT16)(-0.3827*32768),
    106 	(SINT16)(0.5556*32768),
    107 	(SINT16)(1.0000*32767),
    108 	(SINT16)(0.5556*32768),
    109 	(SINT16)(-0.3827*32768),
    110 	(SINT16)(-0.9808*32768),
    111 	(SINT16)(-0.7071*32768),
    112 	(SINT16)(0.1951*32768),
    113 	(SINT16)(0.9239*32768),
    114 	(SINT16)(0.8315*32768),
    115 	(SINT16)(0.0000*32768),
    116 	(SINT16)(-0.8315*32768),
    117 	(SINT16)(-0.9239*32768),
    118 	(SINT16)(-0.1951*32768),
    119 	(SINT16)(0.7071*32768),
    120 	(SINT16)(-0.5556*32768),
    121 	(SINT16)(-0.9239*32768),
    122 	(SINT16)(0.1951*32768),
    123 	(SINT16)(1.0000*32767),
    124 	(SINT16)(0.1951*32768),
    125 	(SINT16)(-0.9239*32768),
    126 	(SINT16)(-0.5556*32768),
    127 	(SINT16)(0.7071*32768),
    128 	(SINT16)(0.8315*32768),
    129 	(SINT16)(-0.3827*32768),
    130 	(SINT16)(-0.9808*32768),
    131 	(SINT16)(-0.0000*32768),
    132 	(SINT16)(0.9808*32768),
    133 	(SINT16)(0.3827*32768),
    134 	(SINT16)(-0.8315*32768),
    135 	(SINT16)(0.7071*32768),
    136 	(SINT16)(0.5556*32768),
    137 	(SINT16)(-0.9239*32768),
    138 	(SINT16)(-0.1951*32768),
    139 	(SINT16)(1.0000*32767),
    140 	(SINT16)(-0.1951*32768),
    141 	(SINT16)(-0.9239*32768),
    142 	(SINT16)(0.5556*32768),
    143 	(SINT16)(0.7071*32768),
    144 	(SINT16)(-0.8315*32768),
    145 	(SINT16)(-0.3827*32768),
    146 	(SINT16)(0.9808*32768),
    147 	(SINT16)(0.0000*32768),
    148 	(SINT16)(-0.9808*32768),
    149 	(SINT16)(0.3827*32768),
    150 	(SINT16)(0.8315*32768),
    151 	(SINT16)(-0.7071*32768),
    152 	(SINT16)(0.9808*32768),
    153 	(SINT16)(-0.3827*32768),
    154 	(SINT16)(-0.5556*32768),
    155 	(SINT16)(1.0000*32767),
    156 	(SINT16)(-0.5556*32768),
    157 	(SINT16)(-0.3827*32768),
    158 	(SINT16)(0.9808*32768),
    159 	(SINT16)(-0.7071*32768),
    160 	(SINT16)(-0.1951*32768),
    161 	(SINT16)(0.9239*32768),
    162 	(SINT16)(-0.8315*32768),
    163 	(SINT16)(-0.0000*32768),
    164 	(SINT16)(0.8315*32768),
    165 	(SINT16)(-0.9239*32768),
    166 	(SINT16)(0.1951*32768),
    167 	(SINT16)(-0.7071*32768),
    168 	(SINT16)(0.1951*32768),
    169 	(SINT16)(0.3827*32768),
    170 	(SINT16)(-0.8315*32768),
    171 	(SINT16)(1.0000*32767),
    172 	(SINT16)(-0.8315*32768),
    173 	(SINT16)(0.3827*32768),
    174 	(SINT16)(0.1951*32768),
    175 	(SINT16)(-0.7071*32768),
    176 	(SINT16)(0.9808*32768),
    177 	(SINT16)(-0.9239*32768),
    178 	(SINT16)(0.5556*32768),
    179 	(SINT16)(-0.0000*32768),
    180 	(SINT16)(-0.5556*32768),
    181 	(SINT16)(0.9239*32768),
    182 	(SINT16)(-0.9808*32768),
    183 	(SINT16)(0.7071*32768),
    184 	(SINT16)(-0.8315*32768),
    185 	(SINT16)(0.9239*32768),
    186 	(SINT16)(-0.9808*32768),
    187 	(SINT16)(1.0000*32767),
    188 	(SINT16)(-0.9808*32768),
    189 	(SINT16)(0.9239*32768),
    190 	(SINT16)(-0.8315*32768),
    191 	(SINT16)(0.7071*32768),
    192 	(SINT16)(-0.5556*32768),
    193 	(SINT16)(0.3827*32768),
    194 	(SINT16)(-0.1951*32768),
    195 	(SINT16)(-0.0000*32768),
    196 	(SINT16)(0.1951*32768),
    197 	(SINT16)(-0.3827*32768),
    198 	(SINT16)(0.5556*32768)
    199 };
    200 #endif
    201