videoeditorengine/audioeditorengine/codecs/AWB/inc/AWBConstants.h
changeset 0 951a5db380a0
equal deleted inserted replaced
-1:000000000000 0:951a5db380a0
       
     1 /*
       
     2 * Copyright (c) 2010 Ixonos Plc.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - Initial contribution
       
    11 *
       
    12 * Contributors:
       
    13 * Ixonos Plc
       
    14 *
       
    15 * Description:  
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef AWBCONSTANTS_H
       
    21 #define AWBCONSTANTS_H
       
    22 
       
    23 
       
    24 /* size of packed frame for each mode, excluding TOC byte */
       
    25 const TInt16 KAWBPacked_size[16] = {17, 23, 32, 36, 40, 46, 50, 58,
       
    26                                  60,  5,  0,  0,  0,  0,  0,  0};
       
    27 
       
    28 // possible bitrates of AMR wideband
       
    29 const TInt KAWBBitRates[9] = {6600, 8850, 12650, 14250, 
       
    30                             15850, 18250, 19850, 23050, 23850};
       
    31 
       
    32 // enumeration for bitrates
       
    33 enum TAWBBitRate
       
    34     {
       
    35     TAWBBitRate6600 = 0,
       
    36     TAWBBitRate8850 = 1,
       
    37     TAWBBitRate12650 = 2,
       
    38     TAWBBitRate14250 = 3,
       
    39     TAWBBitRate15850 = 4,
       
    40     TAWBBitRate18250 = 5,
       
    41     TAWBBitRate19850 = 6,
       
    42     TAWBBitRate23050 = 7,
       
    43     TAWBBitRate23850 = 8
       
    44     };
       
    45 
       
    46 // gain position in n:th subframe with 6600 kBit/s: KGainPositions[TAWBBitRate6600*4+n]
       
    47 
       
    48 const TInt KGainPositions[4*9] =
       
    49     {
       
    50     57, 80, 103, 126,
       
    51     75, 106, 140, 171,
       
    52     93, 143, 196, 246,
       
    53     101, 159, 220, 278,
       
    54     109, 175, 244, 310,
       
    55     121, 199, 280, 358,
       
    56     129, 215, 304, 390,
       
    57     145, 247, 352, 454,
       
    58     145, 251, 360, 466
       
    59     };
       
    60 
       
    61 // KAwbGaindB2Gamma[0] is gamma*10000 at -127 dB
       
    62 // KAwbGaindB2Gamma[1] is gamma*10000 at -126 dB
       
    63 // KAwbGaindB2Gamma[127] is gamma*10000 at 0 dB
       
    64 // KAwbGaindB2Gamma[128] is gamma*10000 at 1 dB
       
    65 // KAwbGaindB2Gamma[255] is gamma*10000 at 128 dB
       
    66 
       
    67 // Note: gamma = (10^((gain/2)/20))^(1/_2.38_)
       
    68 
       
    69 const TInt KAwbGain_dB2Gamma[] = 
       
    70 
       
    71     {
       
    72  
       
    73 21    ,
       
    74 23    ,
       
    75 24    ,
       
    76 25    ,
       
    77 26    ,
       
    78 27    ,
       
    79 29    ,
       
    80 30    ,
       
    81 32    ,
       
    82 33    ,
       
    83 35    ,
       
    84 37    ,
       
    85 38    ,
       
    86 40    ,
       
    87 42    ,
       
    88 44    ,
       
    89 47    ,
       
    90 49    ,
       
    91 51    ,
       
    92 54    ,
       
    93 57    ,
       
    94 59    ,
       
    95 62    ,
       
    96 65    ,
       
    97 69    ,
       
    98 72    ,
       
    99 76    ,
       
   100 79    ,
       
   101 83    ,
       
   102 87    ,
       
   103 92    ,
       
   104 96    ,
       
   105 101    ,
       
   106 106    ,
       
   107 111    ,
       
   108 117    ,
       
   109 123    ,
       
   110 129    ,
       
   111 135    ,
       
   112 142    ,
       
   113 149    ,
       
   114 156    ,
       
   115 164    ,
       
   116 172    ,
       
   117 180    ,
       
   118 189    ,
       
   119 199    ,
       
   120 209    ,
       
   121 219    ,
       
   122 230    ,
       
   123 241    ,
       
   124 253    ,
       
   125 266    ,
       
   126 279    ,
       
   127 293    ,
       
   128 307    ,
       
   129 322    ,
       
   130 338    ,
       
   131 355    ,
       
   132 373    ,
       
   133 391    ,
       
   134 411    ,
       
   135 431    ,
       
   136 452    ,
       
   137 475    ,
       
   138 498    ,
       
   139 523    ,
       
   140 549    ,
       
   141 576    ,
       
   142 605    ,
       
   143 635    ,
       
   144 666    ,
       
   145 699    ,
       
   146 734    ,
       
   147 770    ,
       
   148 808    ,
       
   149 848    ,
       
   150 890    ,
       
   151 935    ,
       
   152 981    ,
       
   153 1029    ,
       
   154 1080    ,
       
   155 1134    ,
       
   156 1190    ,
       
   157 1249    ,
       
   158 1311    ,
       
   159 1376    ,
       
   160 1444    ,
       
   161 1516    ,
       
   162 1591    ,
       
   163 1670    ,
       
   164 1753    ,
       
   165 1840    ,
       
   166 1931    ,
       
   167 2026    ,
       
   168 2127    ,
       
   169 2232    ,
       
   170 2343    ,
       
   171 2459    ,
       
   172 2581    ,
       
   173 2709    ,
       
   174 2843    ,
       
   175 2984    ,
       
   176 3132    ,
       
   177 3287    ,
       
   178 3450    ,
       
   179 3621    ,
       
   180 3800    ,
       
   181 3989    ,
       
   182 4186    ,
       
   183 4394    ,
       
   184 4612    ,
       
   185 4840    ,
       
   186 5080    ,
       
   187 5332    ,
       
   188 5596    ,
       
   189 5874    ,
       
   190 6165    ,
       
   191 6470    ,
       
   192 6791    ,
       
   193 7128    ,
       
   194 7481    ,
       
   195 7852    ,
       
   196 8241    ,
       
   197 8649    ,
       
   198 9078    ,
       
   199 9528    ,
       
   200 10000    ,
       
   201 10496    ,
       
   202 11016    ,
       
   203 11562    ,
       
   204 12135    ,
       
   205 12736    ,
       
   206 13368    ,
       
   207 14030    ,
       
   208 14725    ,
       
   209 15455    ,
       
   210 16221    ,
       
   211 17025    ,
       
   212 17869    ,
       
   213 18755    ,
       
   214 19684    ,
       
   215 20660    ,
       
   216 21684    ,
       
   217 22758    ,
       
   218 23886    ,
       
   219 25070    ,
       
   220 26313    ,
       
   221 27617    ,
       
   222 28986    ,
       
   223 30422    ,
       
   224 31930    ,
       
   225 33513    ,
       
   226 35174    ,
       
   227 36917    ,
       
   228 38747    ,
       
   229 40667    ,
       
   230 42683    ,
       
   231 44798    ,
       
   232 47019    ,
       
   233 49349    ,
       
   234 51795    ,
       
   235 54362    ,
       
   236 57056    ,
       
   237 59884    ,
       
   238 62852    ,
       
   239 65967    ,
       
   240 69237    ,
       
   241 72668    ,
       
   242 76270    ,
       
   243 80050    ,
       
   244 84017    ,
       
   245 88182    ,
       
   246 92552    ,
       
   247 97139    ,
       
   248 101954    ,
       
   249 107007    ,
       
   250 112310    ,
       
   251 117877    ,
       
   252 123719    ,
       
   253 129851    ,
       
   254 136287    ,
       
   255 143042    ,
       
   256 150131    ,
       
   257 157572    ,
       
   258 165382    ,
       
   259 173578    ,
       
   260 182181    ,
       
   261 191211    ,
       
   262 200688    ,
       
   263 210634    ,
       
   264 221074    ,
       
   265 232031    ,
       
   266 243531    ,
       
   267 255601    ,
       
   268 268270    ,
       
   269 281566    ,
       
   270 295521    ,
       
   271 310168    ,
       
   272 325541    ,
       
   273 341675    ,
       
   274 358610    ,
       
   275 376383    ,
       
   276 395038    ,
       
   277 414617    ,
       
   278 435167    ,
       
   279 456735    ,
       
   280 479372    ,
       
   281 503131    ,
       
   282 528067    ,
       
   283 554240    ,
       
   284 581709    ,
       
   285 610540    ,
       
   286 640800    ,
       
   287 672560    ,
       
   288 705894    ,
       
   289 740880    ,
       
   290 777600    ,
       
   291 816140    ,
       
   292 856590    ,
       
   293 899045    ,
       
   294 943604    ,
       
   295 990372    ,
       
   296 1039457    ,
       
   297 1090976    ,
       
   298 1145048    ,
       
   299 1201799    ,
       
   300 1261364    ,
       
   301 1323880    ,
       
   302 1389495    ,
       
   303 1458363    ,
       
   304 1530643    ,
       
   305 1606506    ,
       
   306 1686129    ,
       
   307 1769698    ,
       
   308 1857409    ,
       
   309 1949467    ,
       
   310 2046088    ,
       
   311 2147498    ,
       
   312 2253934    ,
       
   313 2365645    ,
       
   314 2482893    ,
       
   315 2605952    ,
       
   316 2735110    ,
       
   317 2870669    ,
       
   318 3012948    ,
       
   319 3162278    ,
       
   320 3319009    ,
       
   321 3483508    ,
       
   322 3656160    ,
       
   323 3837369    ,
       
   324 4027560    ,
       
   325 4227177    ,
       
   326 4436687    ,
       
   327 4656582    
       
   328 
       
   329 
       
   330     
       
   331 };
       
   332 
       
   333 
       
   334 #endif